#HuntingTipOfTheDay
If you're in a SOC or IR role and don't use @GitHub because "you're not a developer", read on! It can be powerful when paired with #VirusTotal.

Came across this interesting command. What is it doing? 🤔
It certainly seems to be mucking with the event log, given the security parameter, it seems clear it's interested in the Windows security event log.
The most obvious explanation is that it is deleting records--the ones that correspond to the EventRecordIDs listed.
How can we find out more about this tool? The tool name (comrelg.exe) is faked🤥 and the hash didn't lead anywhere and I didn't have a copy of the sample. (set aside pivoting on imphash etc for now🧠)
I searched #VirusTotal for the command to start the event log and bounded the file size to match the sample.
This led to some interesting hits. Looking at the samples string content on VT, it showed definite event log manipulation and many more relevant strings.
Since many security tools are on @GitHub, let's search for those strings. Only a small number of projects! 😃💪
✅This one seems a definite match based on strings.
✅If we look closer at the command line params, we can see how they are substituted into an XPath query.
✅And we see the tool invoke the command to restart the eventlog after it's been modified.
🏁github.com/3gstudent/Even…
Hope you found it helpful how #VirusTotal content search and @GitHub code search can enhance your SOC investigations! #DFIR #infosec
Also, rather than surgically edit the event log, many export a copy EXCEPT for the events to remove. Then replace it. That's the reason for the != (EventRecordID!=612476 ...)
📎github.com/3gstudent/Even…
📎github.com/agnusha/EventL…
📎github.com/QAX-A-Team/Eve…
📎docs.microsoft.com/en-us/windows/…

• • •

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

Keep Current with John Lambert

John Lambert 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 @JohnLaTwC

22 Aug
Some of my #infosec infographics in one thread
👇👇👇
Adversaries need credentials more than malware. Avoid the sins of Windows credential administration
📎
Attackers seek to turn illegitimate access into legitimate access. Find them after they submerge.
📎
Read 10 tweets
27 Jul
#HuntingTipOfTheDay
Battle test your rules. Here is an incomplete detection rule for saving a specific registry key. How many ways can you come up with to bypass it? (reply!)

(?i)(reg)[\.(exe)]*\s+save\s+hklm\\HARDWARE

Here's how you play🕹️:
👇👇👇
1⃣ Go to regex101.com and paste the regex in.
2⃣ Develop test strings. A highlighted match means blueteam wins. Keep trying.
3⃣ Once you have a string with no match, verify the test string successfully dumps the regkey.
4⃣ 🍻
This simulates an attack to dump the SAM database, but uses the HARDWARE keep to prevent you from flooding your SOC with benign alerts 😀
📎ired.team/offensive-secu…
Read 4 tweets
11 Oct 20
Some very interesting XLLs in the wild (#blueteam take note!). Will link to some research in this thread. This one loads a payload from an embedded resource and displays a decoy message.
📎virustotal.com/gui/file/1994a…
🎁🎇joesandbox.com/analysis/21041… ImageImageImageImage
This XLL decodes a Base64 string using CryptStringToBinary and uses the Nt APIs to jump to it.
📎virustotal.com/gui/file/5644a… ImageImageImage
Read 13 tweets
14 Sep 20
Want to see the most beautiful equation in math? I’ll show you. It starts with the Roots of Unity.
Image
Image
Read 14 tweets
29 Jul 20
"The best way to show that a stick is crooked is not to argue about it or to spend time denouncing it, but to lay a straight stick alongside it"
― D.L. Moody
"There is no love, there are only proofs of love"
― Pierre Reverdy
"When the student is ready, the teacher will appear"
― various
Read 7 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

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

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(