Distillation Friday: Trojanized Terraform Provider

The Zscaler team have a great write up about a trojanized terraform provider here:

It attacks both Windows and Mac and the code contains God-awful emojis, the now universal sign of slopware. hashicorp-terraform[.]io is no longer operational, but the attacker-controlled webhook domain (this isn’t a Webhook-aaS) appears to still be online.

The two domains above are certainly their own malicious indicators worthy of MISP entries. But this attack also contains some indicators rolling up to Living off Trusted Sites (LOTS). I’m going to focus on distillation of these observables to see what we can add to our kill chain with minimal regret and nerf these attacks in the future.

Indicator Distillation

.online TLD

Network Indicator: hxxps://arusupport-region1-webhook[.]online/statics/cache/v11/abicfjej

The TLD .online is well known for abuse by threat actors. The domain’s first-year cost is generally ~$1 from Hostinger or Namecheap.

And ranks 25th on Spamhaus

Perform a historical query on .online domains to see if blocking this TLD is appropriate for your organization.

Raw GitHub User Content

Network Indicator: hxxps://raw.githubusercontent[.]com/bluearuhost/hospitalrun-frontend/refs/heads/main/public/fonts/version1/

Blocking GitHub isn’t feasible for most organizations, but you can build risk-based detections and scoring for users whose role would be odd to see traffic to raw.githubusercontent[.]com

If you are lucky enough to have a robust SASE with identity-based controls, moving access to GitHub via an AD Security Group is an excellent option. You can then reduce user friction with deployment of birth rights based on role.

Vercel

Network Indicator: hxxps://stage-fashion365.vercel[.]app/static/tinymce4.7.5/plugins/fonts/v1104/

Vercel is a CDN and web app builder that provides low-code solutions. They also offer free subdomain hosting, I colloquiality refer to this as geoshitties, a reference to the long-gone GeoCities of yore. Blocking free hosting domains can be a very effective solution to a lot of phishing and clickfix attacks.

In instances where it could be high-friction such as GitHub pages, moving these to a warning policy in a SASE/Firewall/ZIA is also effective. Users will still be able to access necessary content, but scripts will fail, unable to pass the warning page.

Community List: BS Lists - Geoshitties

Pastebins

Network Indicator: hxxps://pastebin[.]com/raw/3yptBDhL

Pastebins are not only a high-risk for dead-drop C2, they are also potential exfil from a threat actor or negligent inside risk. There is absolutely no reason any organization should allow access to pastebins on their network.

IFIN has you covered with two pastebin lists:

Community List: IFIN Lists - Pastebins

Community List: IFIN Lists - Code Pastebins

Dynamic DNS

Network Indicator: delay.servehttp[.]com
Network Indicator: hxxps://supportaru.serveftp[.]com/statics/cache/v11/

These particular domains are used in conjunction with No-Ip, a dynamic DNS service. Best practice for any SASE/firewall/proxy deployment is to block with the vendor-provided category for Dynamic DNS, if available.

You can also block entire CIDR ranges by Dynamic/Free DNS providers like afraid.org’s 70.39.64.0/18

Nostr

In this attack there is a fail-back to Nostr. Social media profiles used for dead drop C2 is nothing new. Steam Community profiles have long been used for this. Some of them are almost impossible to block without business impact and user friction such as X and YouTube. Then you have the more clever places like Mapbox FTP banners, and Soundcloud.

You can reduce services and platforms unnecessary to the business’ function, but this one is highly org specific and where defenders will pick their battles.

Not seen in this attack, but it’s always a good idea to block Telegram. Discord may be difficult to block, but you can target abused functionality of the platforms, such as just Discord’s API. Below is a list of some chat APIs/webhooks that may be useful to limit in your environment.

Community List: BS Lists - Chat Hooks

MITRE Technique: T1102

2 Likes