SecurityBrief Australia logo
Story image

Carbon Black discovers new adware related threat

26 Sep 2016

Earlier this week, Carbon Black, in conjunction with the Cb User Exchange Community, discovered anomalies related to well-known Adware variants, including OpenCandy and Dealply, and trojanised Chromium, using highly sophisticated evasion techniques (previously observed by Carbon Black associated with nation-state attacks - specifically Operation Aurora, which targeted major companies including Google, Adobe, etc).

These obfuscation techniques easily evade sandboxing and other intrusion detection techniques due to Binary Fragmentation. Once these Adware variants are installed on a machine, the actor has the ability to bypass existing security controls and successfully install the secondary payloads, giving the adversary full control of a user’s machine.

These Adware variants started to appear across the Carbon Black customer base early this week, spanning industry and size, which suggests this is a recently launched, pervasive campaign.

We believe this attack vector is being used as a delivery mechanism for Ransomware and other malware classes. The Carbon Black Threat Research team is currently performing a technical deep-dive pertaining to this finding, stay tuned for more information.

For Carbon Black customers who would like to add detection of these Adware variants, please add the following Watchlists**:

PRIMARY BEHAVIOR: cmdline:copy AND cmdline:/b SECONDARY BEHAVIOR: process_name:wscript.exe AND netconn_count:[1 TO *]

**If you see a lot of hits on these Watchlists — that’s expected as there might be legitimate activity performing those actions. Filter by what appears to be legitimate activity until their query only shows the strange activity. As we see more examples, we’ll be sure to post them in the Carbon Black Detection eXchange.

For those that are not Carbon Black customers (and who do not have the ability to inspect command-line arguments), we suggest looking in the “Scheduled Tasks” for suspicious, newly created tasks as these variants establish persistence in the Windows Task Scheduler. A significant takeaway from this alert should be to take Adware and other “PUPs” seriously, as these seemingly innocuous applications are growing progressively more malicious in their impact to an environment. As we learn more, we’ll be sure to update this blog.

It started out like any other Thursday: team meetings, coffee, more meetings, and of course more coffee. At 11:00 AM, I began my first customer call of the day. As it turns out, it was a threat hunting and Kill Chain analysis call. 35 minutes into the call, we found some generic trojans, but at the time they didn’t seem particularly interesting. It was at this point that I just happened to remember an attack vector I had once triaged while doing some work during Operation Aurora. (See #FlashbackToOperationAurora at the end of this article for the whole story).

Just for fun, I asked my customer to the run the query: cmdline:copy AND cmdline:/b. Cb Response showed they had three hits. I bolted upright in my chair. Three years ago, I stumbled upon this this attack vector and I’d never seen it since… until last week.

As we began to triage the event, we began to see .dat files being joined to form all sorts of unusual file types including .txt, .png, .log, .ico, & .dll files. It was highly irregular.

Obviously, I couldn’t think of a legitimate reason for someone to conjoin “random” .dat files to create an image or even a .dll file (As shown in the screenshots below). As we began to follow the process execution, these “icons” and “log files” were then being launched by wscript where they beaconed to multiple “unusual” domains/IPs and established persistence as a scheduled task on the compromised system.

So, now for the “stranger” part. As we began to walk backward up the process tree, we began noticing that the parent processes launching these rather advanced obfuscation techniques were “routine” adware (Flagged multiple times by Virus Total). I was stunned. I kept asking myself why in the world “regular” Adware would need such advanced obfuscation?

Resulting from this meeting, we found several other systems, all demonstrating similar symptoms of compromise. In my next two calls that day, BOTH of my customers (different industries) also had systems compromised in the same manner. 

I felt at this point it was my duty to spread the word and post my findings to Carbon Black’s User Exchange (UX). Within minutes, reports began to pour in regarding similar findings across our customer base. (Direct link to the original thread in the Carbon Black User eXchange:

The Cb Collective Defense model came through on this attack like a grand slam as all of our customers have access the Detection Exchange to share indicators and comment on detection and analysis methods Just yesterday (09/22/2016), a user in the Community who goes by the alias of “dumonal” made a wild discovery: the “Adware” may be a delivery vector for the Enigma Ransomware. To-date we’ve not been able to replicate this behavior, but will keep you updated as we learn more.

All of a sudden, the level of advanced obfuscation for this “Adware” makes sense. This Adware appears be the stager being used to covertly distribute the binaries (believed to be) attributed to ransomware and other classes of malware.

There are several methods being discussed in our UX to detect and contain these sort of attacks that leverage Binary Fragmentation. Given the widespread nature of this compromise, I strongly recommend scanning your systems for use of the copy command being leveraged with the binary append “/b” parameter.

Another user in our UX who goes by the name “myersjos” has suggested that “Process searching Wscript.exe with Netcons out to the internet may reveal interesting results to you.”

For those that are not Carbon Black customers (and who do not have the ability to inspect command-line arguments), we suggest looking in the “Scheduled Tasks” for suspicious newly created tasks as these variants establish persistence in the Windows Task Scheduler.

A significant takeaway from this alert should be to take Adware and other “PUPs” seriously as these seemingly innocuous applications are growing progressively more malicious in their impact to an environment. As we learn more, we’ll be sure to update this blog.


At the time I was managing the SOC for a large financial client and our Division Chief had been targeted by a very skillfully crafted phishing email. (Fortunately for the client, the spam filter blocked the payload as it contained a .rar file). However, given the tailored information contained in the phishing email, I decided to “play around” and see what the presumed malicious payload did. As I opened the rar file, I saw a Word document and a shortcut file, along with a sub directory.

I (wrongly) assumed that there was a malicious macro embedded in the word doc. However, when I fired up MS Word in a VM, much to my surprise nothing malicious happened. I double and triple analyzed the doc and still nothing. From there, I began to explore the subdirectory. I was interested by what appeared to be two temp files as they were named ~$1.tmp & ~$2.tmp. I hashed the files, however an open source query came back null.

When I ran strings on them I was a bit perplexed as when I opened up ~$1.tmp in Winhex it had an MZ header (thus signaling to me that it had executable content), however it was only a 16 character file. Weird, but obviously way too small to actually be a Portable Executable. ~$2.tmp was pure gibberish, nothing really interesting and not many readable characters. I tried a number of different methods to launch these files, however nothing worked.

At this point, I was greatly perplexed. The actor went through a decent bit of work to craft a VERY good spearphish, however, nothing malicious would execute. Just for due diligence sake, I went back and clicked on the shortcut, my jaw nearly hit the floor when all the sudden the system began beaconing and *something* established persistence.

I couldn’t believe what I was seeing and I immediately viewed the properties of that little innocuous shortcut. No, it didn’t send me to a web link, instead it did one of the coolest things I’ve ever seen to date:

The target field of the shortcut ran a Copy command in the using the Binary Append parameter and conjoined the two “temp files” into a single binary. (This is a legitimate function of the standard Windows copy command:

The command executed by the shortcut was something like this to build & launch the payload and then remove the malware fragments:

copy /b “temp/~$1.tmp”+“temp/~$2.tmp” “temp/svcmgr.exe” & start “temp/svcmgr.exe” &  del “temp/~$1.tmp” & del “temp/~$2.tmp”

I remember just sitting back in my chair with my jaw still hanging open and shaking my head at what I just found. I was thoroughly impressed. This was one of those times you see an attack vector that you know is really bad, but was so clever you wanted to almost shake the attacker’s hand congratulate him on his brilliance.

What makes this attack so interesting is how effective it is at evading perimeter and network based IDS/IPS tools. Obviously, hash-based detection mechanisms would fail to catch these fragments as they would be hashed individually. Sandboxing & Detonation based tools would also give a false negative rating & allow these fragments to pass as they would be executed individually as well.

Article by Ben Tedesco, Carbon Black 

Story image
Why the rise of containers has created a vulnerability crisis
A rise in the use of Kubernetes and Docker services — and increased adoption of DevOps methodologies — have all contributed to the rise in popularity of containers. But as with all emerging technologies, there are risks.More
Story image
Interpol announces it will join the Coalition Against Stalkerware
The international criminal police organisation Interpol has announced that it will join forces with the Coalition Against Stalkerware, which cybersecurity company Malwarebytes is a part of.More
Story image
Attivo Networks announces SentinelOne integration to increase threat protection
The integrated solution creates a defence against sophisticated attackers and provides comprehensive coverage across a broad set of attack techniques, as documented in the MITRE ATT&CK matrix.More
Story image
Greater demand for modern data protection, disaster recovery as COVID sees increase in attacks
Data-driven organisations must evaluate evolving requirements for backup and disaster recovery to combat emerging workload challenges.More
Story image
Sharp increase in cyber attacks in last quarter of 2020 - report
There was an increase in the number of attacks aimed at the trade industry and medical institutions, as well in the number of social engineering attacks on individuals.More
Story image
ThreatQuotient launches automation capability for detection and response
"The focus of ThreatQ TDR Orchestrator is data, not process. In detection and response, what is learned when performing an action is far more important than the action itself."More