Adform are an advertising company used by around 14k companies, owning around a 30% share of the demand-side category.They operate by offering a Javascript embed for websites, via this URL:hxxps://s2.adform.net/banners/scripts/st/trackpoint-async.jsThis script was compromised to serve a crypto stealer. Adform have been hacked. As far as I can tell Adform haven’t told people.This allows end user devices of downstream websites to be compromised with crypto stealing malware. Meaning if you visit example.com and they use Adform, example.com will compromise your device.An example of what is being served by s2.adform.net:File hash 02ff86c7f9fe609a753ff15bda90baa3c3e0d4a2e559ec4fcf8a3de0954b7c55That file flags as fine across vendors on Virustotal (all the URLs, files, domains and IPs flag as clean across all security vendors).The actual file served, trackpoint-async.js, had malicious code starting at this function:The code in this sample matches valid Bitcoin, Etherum and TRX wallets in clipboard:It then replaces said addresses in clipboard withThe wallet values are swapped for attacker controlled wallets. Addresses appear to vary.It does this by polling every 3 seconds, then swapping addresses in clipboard:Even if you notice the address is wrong and recopy the wallet, it keeps replacing it.Other scripts directly served by Adform include ones which poll out to the attacker:Aside from crypto fraud, they also record the IP address of the user, the website they arrived from (i.e. the supply chain bit of the compromise) and the URL path.The attacker server is 84.32.102.230 on port 7744An example request:hxxp://84.32.102.230:7744/p?h=example.com&u=/testIt appears Adform may be aware, or the attacker has realised they’ve been rumbled, as the malicious code appears to be disappearing as I type this out. I can see malicious activity via Adform over the past week, and the security industry appears to have entirely missed it.Example full script served by Adform for reverse engineers:https://pastebin.com/mc7psaNFIoCs84.32.102.230 — beacons2.adform.nethxxps://s2.adform.net/banners/scripts/st/trackpoint-async.jsAdform compromised to serve crypto stealer via supply chain attack was originally published in DoublePulsar on Medium, where people are continuing the conversation by highlighting and responding to this story.