Dray Agha Profile picture
Feb 7 8 tweets 4 min read
This is awesome, thank you @x86matthew.

I wanted to share a blue team perspective on monitoring and hunting for this kind of LNK -> EXE bamboozling

We'll use the example PoC if that's alright with you 🧵
Let's execute the PoC of the .LNK, which brings a pop up.

@x86matthew was kind enough to create a non-malicious PoC. But of course an adversary will not be so kind.

So let's take a look at our logs: Image
Let's assume we're rolling with SysMon.

We get an Event 11 for a strange tmp*.exe being created. This of course could be called something different if re-engineered by an adversary IRL.

But for now let's focus on this tmp*.exe Image
We can see a process is connected to this tmp*.exe, with a parent PowerShell process offering us some insight into the tmp*.exe. Image
We can then find evidence that the .LNK was successful in executing.

Not just because we received the pop up box, but because in our Prefetch directory we can see evidence of the tmp*.exe successfully executing Image
Okay so that's a post-mortem of monitoring execution.

Your logging / SIEM solutions aren't blind to this technique, but it is not immediately obvious that it originated from LNK to EXE

Now, I want to talk about how to proactively HUNT for this🕵️🔍🔍
This PwSh one-liner asks for LNKs, and specifies 'only show me after X date'. Then, it asks to see the filename and the related target.

This PwSh is noisy if you don't filter well! But shows anomalies, and scales well for a tool like Velociraptor. Image
Probably missed loads here, but wanted to contribute with some defence insights.

Thanks @x86matthew

If anyone wants the above PowerShell, or other blue team tips, I have them on my repo: github.com/Purp1eW0lf/Blu…

End of thread 🧵

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Dray Agha

Dray Agha Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Purp1eW0lf

Nov 22, 2021
This article contains DFIR techniques I've used IRL, in investigations where the event logs can't be used.

The real hard work has been done by the articles' referenced tool creators and educators
@davisrichardg / @13CubedDFIR
@scudette / @velocidex
@EricRZimmerman
🧵
1/6
The first technique in the article discusses how to retrieve the PowerShell history for every user account via the 'ConsoleHost_History file' (typically enabled on Windows 10 endpoints)
2/6
The second leverages @EricRZimmerman's PECmd tool to examine Prefetch, an application caching system that we can use to evidence execution
3/6
Read 6 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

:(