391. Hunting for TeamPCP's Stealer

Hello everyone!

What do I know about stealers? They seem to be very noisy! And today, we’ll once again see that in action using TeamPCP (Haze Wolf) as an example.

This time, the stealer was implanted by attackers into three versions of the xinference package (2.6.0, 2.6.1, and 2.6.2). Essentially, it collects SSH keys, various credentials, environment variables, crypto wallets, and much more, then uses cURL for exfiltration.

Let’s take a look at a couple of techniques the attackers used to obtain credentials. For example, they were interested in data stored in environment variables:

env | grep AWS_

env | grep -i google

env | grep -i gcloud

env | grep -i azure

This looks fairly suspicious from a detection perspective:

event_type: processcreate*

AND

proc_file_path: "env"

AND

cmdline: ("grep" AND ("aws_" OR "google" OR "azure" OR "gcloud"))

Another technique was abusing kubectl to obtain credentials:

kubectl get secrets --all-namespaces -o json 2>/dev/null || true

And this is also a good detection opportunity:

event_type: processcreate*

AND

proc_file_path: kubectl*

AND

cmdline: ("get" AND "secrets")

And of course, the stealer accesses a huge number of credential-related files, which also creates plenty of detection opportunities!

See you soon!

Comments

Popular posts from this blog

082. Huniting for Malicious Browser Extensions

033. Free Google Threat Intelligence Course

163. A Curious Case of Iediagcmd.exe Abuse