Detect Wmiprvse.exe as parent in close proximity to Winword.exe startup

One of the TTPs for #Ursnif samples has been to use WMI classes to launch powershell.  This shows in the EDR as wmiprvse.exe as the parent of the malicious powershell process but it is not evident what initiated the process since the parent child relationship has been broken.  You probably already have a signature for the wmiprvse.exe as parent to powershell and the Word file containing the macro uses a detectable name format "info_10_1.doc".  It would be nice to fill in the attack chain a bit to speed up the analysis process.


One interesting method is to use the proximity of the winword.exe startup event to the wmiprvse.exe parent event.  This might seem like a good place for a Splunk transaction but I find them slow at times so I tend to use the Stats command where possible.


Detect Wmiprvse.exe as parent in close proximity to Winword.exe starting


  • The search line is using raw exe names just to speed up the search, the important part is finding winword.exe as the process and wmiprvse.exe as a parent. It was not necessary to specify powershell as the child of wmiprvse.
  • The bucket sets the window in which the events have to occur, in this case 1 minute.
  • Stats is gathering up the events by computer name and our 1 minute windows
  • Since we are looking for two different processes the events of interest will have to have both in them, hence the process count will be greater than one and winword needs to be one of the processes.

And that about does it. Running this back through time was reasonably fast and pulled in Winword opening up the info_10_1.doc and the malicious powershell launching.  There were a handful of tunes needed for a production environment that are not shown here.

Gaps:
In the case that winword was already open, this would not fire since it is looking for process starts.

Happy hunting.

---Update

@Ateixei had a nice tip on using match instead of like in where conditions that make it a bit cleaner as well as a tip to use parens to clean up the SPL. Here is the where condition version using match:

| where mvcount(process)>1 AND match(process,"(?i)winword\.exe")



References:

https://app.any.run/tasks/e2cc76c0-0551-496f-8830-65b4a5de6077/
https://attack.mitre.org/techniques/T1175/
https://www.bromium.com/how-ursnif-evades-detection/
https://twitter.com/ateixei/status/1179692764876955648


Comments

  1. This comment has been removed by the author.

    ReplyDelete
  2. WINWORD EXE Application Error in Windows 10 - Microsoft word is word processing software. The WINWORD EXE Application Error in Windows 10 is a common error affecting users using MS Office. This frustrating error can shut down or suspend your work unexpectedly. You need to make sure you have the latest Windows 10 updates. Run antivirus or anti-malware software to check for viruses or malware. Use the “End Process” from the task manager and restart the Winword.exe process. Repair Microsoft Office installation through the control panel. Uninstall and reinstall MS-Office. For more Information visit: Computer Mobile Info

    ReplyDelete
  3. The SolidWorks training focuses specifically on the user interface and quicker ways of accessing everyday features. In the last two versions (2016 & 2017) SOLIDWORKS has DRASTICALLY improved the user interface with the addition of breadcrumbs and cursor sensitive toolbars. So, if you are looking for solidworks training, look no further. We are here to assist you with your query.

    ReplyDelete

Post a Comment

Popular posts from this blog

Misleading extensions Xls.exe Doc.exe Pdf.exe

Netconn from suspicious directories

Powershell DNS C2 Notes