2020 @expel_io incident stats tell a familiar story: a lot of commodity malware *still* being deployed via evil macros and zipped HTA / JS files.
This isn't a thread to tell you to block macros or associate WSH files with notepad (like PS), but questions to ask if you can't.
On blocking macros: If it were easy, everyone would do it.
But if you're a #SOC analyst, do you fire an alert when winword.exe spawns an unusual process like PS or regsvr32?
Can you create a macro that behaves like an evil one but is totally benign to test your alerting?
Can you use #EDR to understand which processes are almost never spawned from winword.exe? Or maybe ask which processes spawned from winword.exe initiate an external connection out? Can you fine tune your logic and deploy in BLOCK mode?
Yea, the evil macro ran but EDR stopped it.
Or maybe look at proxy logs from recent commodity malware infections. Turns out when the macro ran the initial payload was downloaded from a site categorized by our proxy as <insert category>.
Can you build logic to deny download?
Yea, the macro ran but our proxy stopped it.
OK, what about those evil HTA / JS files? How often are HTA / JS opened from an explorer.exe window?
- Create a benign HTA file
- Open it
- Interrogate your SIEM / EDR
- Find new creative ways to alert on the activity
Now repeat the process to understand the tech and policy you have available to build better security around this technique.
If we can't associate WSH files with notepad, what else can we do to protect the org?
Back in the day at $dayjob we needed to find a way to better protect org against java exploits.
Remember I said "back in the day".
Tons of working exploits, running vuln versions.
We used proxy to block web requests where:
UA = java
Content = exe
Uncategorized website
Def not a silver bullet, but we knew that keeping java up-to-date was a constraint. We understood this and worked around it.
So we asked: what other tech can we use to protect the org?
Commodity infections from Java exploits dropped dramatically.
You may not be able block macros or associate WSH files with notepad but what other protections you can build around the use of these techniques?
Understand your constraints (e.g. we run the business using macros!) and come up with new ways to protect the org. Get creative!
• • •
Missing some Tweet in this thread? You can try to
force a refresh
We see a lot of variance at the end of Feb that continues into the beginning of Mar. This was due to a number of runaway alerts and some signatures that needed tweaking.
What’s most interesting is that the variance decreases after we released the suppressions features on Mar 17.
We believe this is due to analysts having more granular control of the system and it’s now easier than ever get a poor performing Expel alert back under control.
Process tree below so folks can query / write detections
Also, update!
Detection moments:
- w3wp.exe spawning CMD shell
- PS download cradle to execute code from Internet
- CMD shell run as SYSTEM to run batch script from Public folder
- Many more
Bottom line: a lot of ways to spot this activity.
Build.test.learn.iterate.
Also, update. :)
And some additional details from @heyjokim after further investigating:
Attack vector/Initial Compromise: CVE-2021-27065 exploited on Exchange Server
Foothold: CHOPPER webshells
Payload: DLL Search Order Hijacking (opera_browser.exe, opera_browser.dll, opera_browser.png, code)
1. Create an inbox rule to fwd emails to the RSS Subscriptions folder 2. Query your SIEM 3. How often does this happen? 4. Can you build alert or cadence around inbox rule activity?
- Pro-active search for active / historical threats
- Pro-active search for insights
- Insights lead to better understanding of org
- Insights are springboard to action
- Actions improve security / risk / reduce attack surface
With these guiding principles in hand, here's a thread of hunting ideas that will lead to insights about your environment - and those insights should be a springboard to action.
Here are my DCs
Do you see evidence of active / historical credential theft?
Can you tell me the last time we reset the krbtgt account?
Recommendations to harden my org against credential theft?