Dray Agha Profile picture
Mar 17 16 tweets 8 min read
SRUM is maybe one of the best Windows digital forensic artefacts, if you’re willing to roll your sleeves up.

You can get proof of execution and execution runtime, as well as proof of network communication and the bytes sent and received

Let's take a look in this #DFIR thread🧵
Since Win8, System Resource Usage Monitor (SRUM) monitors a bunch!

What we’re most interested in is its detailed record of programs and network activity.

SRUM has a LONG memory compared to some of the other more ephemeral artefacts📜
To put SRUM to forensic work, grab its .DAT file

C:\Windows\System32\sru\SRUDB.dat

To gain extra contextual data, we're advised to also collect the SOFTWARE hive.

I didn't do that however, because I am a bad person 😞 Image
We'll leverage one of @EricRZimmerman's brilliant tools to parse out the .DAT

f001.backblazeb2.com/file/EricZimme…

And we can simply execute with : `.\SrumECmd.exe -f .\SRUDB.dat --csv .` Image
You should get a bunch of CSV files

I tend to prioritise the following ones:
- SrumECmd_NetworkUsages_Output.csv
- SrumECmd_AppResourceUseInfo_Output.csv
- SrumECmd_Unknown*_Output.csv (occasionally)

But maybe you'll find use from the others? Image
Let's take a look at the results. I'll be using Excel because (again) I am a bad person.

SRUM seems to write once an hour and at shutdown, so don’t trust the timestamps as complete gospel.
S͟r͟u͟m͟E͟C͟m͟d͟_N͟e͟t͟w͟o͟r͟k͟U͟s͟a͟g͟e͟s͟_O͟u͟t͟p͟u͟t͟.c͟s͟v͟

When tidied up has some cool fields. Most noteworthy in the orange box are the network bytes IN/OUT Image
If you’re looking for possible indicator of C2 or data exfil, try this:

Convert these columns into a graph. I'd separate graphs for bytes in/out, initially.

You can then click on these points in the graph, and it will highlight the EXE back in your table. ImageImage
S͟r͟u͟m͟E͟C͟m͟d͟_A͟p͟p͟R͟e͟s͟o͟u͟r͟c͟e͟U͟s͟e͟I͟n͟f͟o͟_O͟u͟t͟p͟u͟t͟.c͟s͟v͟

We can use it to see programmes more / less resource intensive.

Maybe it will snitch on coin miners using a lot of resource, or quiet backdoors using fewer. Image
S͟r͟u͟m͟E͟C͟m͟d͟_U͟n͟k͟n͟o͟w͟n͟3͟1͟2͟_O͟u͟t͟p͟u͟t͟.c͟s͟v͟

This one is a real mixed bag. Sometimes it’s gold, other times trash. It will show runtime with okayish accuracy

I tend to sort by shortest runtime when looking here. ImageImage
U͟s͟i͟n͟g͟ I͟R͟L͟

I had a case where an alert claimed some kind of process injection.

But I couldn’t find any other evidence to triangulate that finding. Maybe SRUM can help?

From SRUM's CSV formatted data, let's zero in on that window of time from the alert (23:52) ImageImageImage
ScreenConnect - a remote management tool - appeared during our window of time.

I graphed out all of the ScreenConnect data SRUM held, with a focused on bytes in and out.

And look at the that wild spike in network communication?! ImageImage
Drilling into the specific ScreenConnect spike, we can see it’s recorded 𝘢𝘯 𝘩𝘰𝘶𝘳 𝘭𝘢𝘵𝘦𝘳 than our initial alert time

I considered this suspicious nonetheless for three reasons:

1. When baselined, that colossal byte in/out was anomalous compared to previous activity

2. Image
We already contextualised this window of time as suspicious, from the initial alert.

3. We know that SRUM timestamps are not always accurate. Neither are alerts sometimes! An hour's flexibility is more than satisfactory to connect the potential sus activity.
I then initiated a ScreenConnect investigation, to see if anything here would contextualise the initial process inject alert

But that's for another day!

I hope this thread has brought SRUM to your attention, and equipped you with a foundation to explore SRUM's data yourself 💪 Image
Here are some much better resources on SRUM by @velocidex and @13CubedDFIR

Thanks for your time 🧵

velociraptor.velocidex.com/digging-into-t….

Image

• • •

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

Mar 9
As a security investigator, what are your thoughts when you see this result in your SIEM? 🚨

Bad, right?

Let’s discuss how we can conclude something is a false positive, and what we can do with that information🧵
When drafting some internal docs the other morning, I wanted a screenshot of an Elastic search.

Without intending to start any drama, I searched for a string associated with Impacket's lateral movement tools :

*\\\\127.0.0.1\\ADMIN*

github.com/SecureAuthCorp…
I expected some internal test data, or even results from previously identified activity.

So you can imagine my surprise when I saw results that were from a handful of hours ago
Read 19 tweets
Feb 28
Let’s have a chat about web browser investigations

We’ll look at Chrome, Edge, Firefox, and Safari’s data. And investigate if a user has downloaded anything from a dubious, malicious source.

Along the way, we'll drop tips on formatting the data so it's easier to look at.

🧵
We’re not concerned if other members of our org are looking at eBay or cat memes during work hours.

If your employer has tasked you to snoop on your peers' browser history, then dm me about finding a new job.

We're focusing on downloads and their corresponding URLs.
According to this graph I didn’t fact check, Chrome and Safari dominate the game.

Investigating Edge is similar to Chrome, so we’ll look at that too. And Firefox is 4th place, so we'll take a look here too. Image
Read 19 tweets
Feb 19
Let's quickly look at how Defenders can benefit from tools like Chainsaw, Sigma, docs from KAPE & Velociraptor, and Security Onion 🕵️‍♂️

We'll use real, shady data - fresh out the kitchen 🧑‍🍳

Along the way, I'll share some tips and shortcuts to cut faster through data and logs

🧵
We had an alert for a ScreenConnect session on a DC involving a PowerShell script called 'LAPSToolkit'

This COULD could be for legitimate auditing. But adversaries have been known to use ScreenConnect for their campaigns.

github.com/leoloobeek/LAP…

huntandhackett.com/blog/revil-the…
I don't want to waste anyone's time by highlighting false positives.

So we'd need to dig a bit deeper on the host, and see if any findings can contextualise this activity as legitimate or malicious.

To start, I'd like to pull some data from the machine
Read 13 tweets
Feb 13
This is a cool bit of offensive Nim from @WhyDee86

Let's unravel this from a Defenders point of view 🧵

We'll start with some basic reverse engineering analysis, and then move into monitoring this from an ELK stack

TLDR: A decent SIEM setup will catch this.
Let's start off by compiling it.

We'll then analyse it like we don't know the source code, and we're investigating malware on a machine.

If your compile fails, you'll likely need to download winim library.

[Winim github.com/khchen/winim#i…]
First, let's throw StringSifter at the EXE.

What catches my eye are the ranked strings to do with NIM as well as the AMSI DLL reference.

From a basic strings, I'd already be sus of an unknown EXE like this on a host.

[StringSifter github.com/mandiant/strin…]
Read 15 tweets
Feb 7
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
Read 8 tweets
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!

Follow Us on Twitter!

:(