Sign up to our newsletter
Update (December 15th): Further research and comparison of our findings with those of our colleagues from Proofpoint and Trend Micro brought us to the conclusion that the malvertising campaign we analyzed was actually a new wave of the AdGholas campaign. Initially, the gang behind AdGholas had been using the Angler and Neutrino exploit kits. In the most recent campaigns, they switched to the Stegano exploit kit, also known as Astrum, and began using unique steganography techniques, as described in this post.
Millions of readers who visited popular news websites have been targeted by a series of malicious ads redirecting to an exploit kit exploiting several Flash vulnerabilities. Since at least the beginning of October, users might have encountered ads promoting applications calling themselves “Browser Defence” and “Broxu” using banners similar to the ones below:
These advertisement banners were stored on a remote domain with the URL hxxps://browser-defence.com and hxxps://broxu.com.
Without requiring any user interaction, the initial script reports information about the victim’s machine to the attacker’s remote server. Based on server-side logic, the target is then served either a clean image or its almost imperceptibly modified malicious evil twin.
The malicious version of the graphic has a script encoded in its alpha channel, which defines the transparency of each pixel. Since the modification is minor, the final picture’s color tone is only slightly different to that of the clean version:
Using the known Internet Explorer vulnerability CVE-2016-0162, the encoded script attempts to verify that it is not being run in a monitored environment such as a malware analyst’s machine.
”If the script does not detect any signs of monitoring, it redirects to the Stegano exploit kit’s landing page, via the TinyURL service. The landing page loads a Flash file that is able to exploit three different vulnerabilities (CVE-2015-8651, CVE-2016-1019, CVE-2016-4117), depending on the version of Flash found on the victim’s system.
Upon successful exploitation, the executed shell code collects information on installed security products and performs – as paranoid as the cybercriminals behind this attack – yet another check to verify that it is not being monitored. If results are favorable, it will attempt to download the encrypted payload from the same server again, disguised as a gif image.
The payload is then decrypted and launched via regsvr32.exe or rundll32.exe. Payloads detected so far include backdoors, banking trojans, spyware, file stealers and various trojan downloaders.
An earlier variant of this stealthy exploit pack has been hiding in plain sight since at least late 2014, when we spotted it targeting Dutch customers. In spring 2015 the attackers focused on the Czech Republic and now they have shifted their focus onto Canada, Britain, Australia, Spain and Italy.
In the earlier campaigns, in an effort to masquerade as an advertisement, the exploit kit was using domain names starting with “ads*.” and URI names containing watch.flv, media.flv, delivery.flv, player.flv, or mediaplayer.flv.
In the current campaign, they have improved their tactics significantly. It appears that the exploit pack’s targeting of specific countries is a result of the advertising networks the attackers were able to abuse.
We can say that even some of the other major exploit kits, like Angler and Neutrino, are outclassed by the Stegano kit in terms of referrals – ‘the websites onto which they managed to get the malicious banners installed. We have observed major domains, including news websites visited by millions of people every day, acting as “referrers” hosting these advertisements.
Upon hitting the advertising slot, the browser will display an ordinary-looking banner to the observer. There is, however, a lot more to it than advertising.
In the vast majority of the cases, the advertisement was promoting a product called “Browser Defence” and it has been only recently when we started to detect banners promoting the software “Broxu”. However, for the sake of simplicity, and since the campaigns are practically identical (apart from the banner and its hosting domain, of course), only the “Browser Defence” campaign is analyzed below.
The advertisement was located at the browser-defence.com domain with a URI structure similar to the following (note the https):
The index.html loads countly.min.js and feeds the initial parameters to the script. This countly, however, is not the stock library of the open source mobile & web analytics platform you would download from github. It is a heavily modified and obfuscated version, with some parts deleted and interlaced with custom code. This custom code is responsible for an initial environment check. Information about the environment is reported back to the server as XOR-encrypted parameters of the 1x1gif file, as captured in the image above.
The following information about the environment is sent:
After that, the script will request the advertising banner. The server will reply with either a clean or a malicious version, most likely also depending on the previous environment check.
The steganography is implemented in the following way: Two consecutive alpha values represent the tens and ones of a character code, encoded as a difference from 255 (the full alpha). Moreover, in order to make the change more difficult to spot by naked eye, the difference is minimized using an offset of 32.
For instance, if the first few alpha bytes contained the values 239, 253, 237, 243, 239, 237, 241, 239, 237, 245, 239, 247, 239, 235, 239 and 237, they would decode to the word “function”. In this example, the first two alpha values 239, 253 would give us an ‘f’:
A closer look at one of the clean banners and one with the Stegano code shows only a subtle difference.
The alpha channel of the unused pixels is filled with some pseudorandom values, in order to make the “alpha noise” evenly distributed and thus more difficult to spot.
After successful extraction, the JS code integrity is checked against a hash encoded at the end of the picture, then executed.
Next, the new script attempts to check the browser and computer environment further using a known Internet Explorer vulnerability, CVE-2016-0162. In particular, it is it is focused on checking for the presence of packet capture, sandboxing, and virtualization software, as well as various security products. Also, it checks for various graphics and security drivers to verify whether it is running on a real machine. More details can be found Appendix 1.
If no indication of monitoring is detected, it creates an iframe (just one pixel in size) at coordinates off the screen, sets its window.name property (this name will be used later) and redirects to TinyURL via https. TinyURL then redirects to an exploit landing page via http. The referrer to the original site is lost during this process.
After successful redirection, the landing page checks the userAgent looking for Internet Explorer, loads a Flash file, and sets the FlashVars parameters via an encrypted JSON file. The landing page also serves as a middleman for the Flash and the server via ExternalInterface and provides basic encryption and decryption functions.
The Flash file has another Flash file embedded inside and, similarly to the Neutrino exploit kit, it comes with three different exploits based on the Flash version.
The second stage Flash file decrypts the FlashVars. It contains a JSON file with URI for error reporting, JS function names for ExternalInterface, the callback function name and some unused data:
Subsequently, it invokes a JS via ExtelnalInterface.call() that checks for the Flash version and communicates this to the server via the landing page. This is done through an encrypted URI parameter of a request for a GIF file. The encryption’s algorithm is simple, and uses the window.name from the advertisement:
The response is a GIF image of which the first bytes are discarded and the rest is decrypted using the same algorithm and then passed back to Flash.
The response is a JSON containing a letter denoting which exploit to use (CVE-2015-8651, CVE-2016-1019 or CVE-2016-4117), a password for the corresponding exploit and a shell code ready with the URI for the payload.
The shell code is decrypted into its final stage during the exploitation phase. It will attempt to download an encrypted payload, again disguised as a GIF image. First, however, it performs yet another check for signs that could suggest it is being analyzed.
It is particularly interested in presence software containing the following strings in their filenames:
If it detects anything suspicious, it will not attempt to download the payload.
If the payload is received, the first 42 bytes of the GIF are discarded; the rest is decrypted and saved to a file using one of the following methods:
The payload is then launched via regsvr32.exe or rundll32.exe.
During our research, we have seen the following payloads being downloaded by the Stegano exploit kit:
After a detailed analysis of the Downloaders and Kryptiks (the latter are ESET’s detections of extensively obfuscated variants), we found out that they either contained or were downloading Ursnif and Ramnit malware.
Ursnif has a multitude of modules for stealing email credentials, has a backdoor, keylogger, screenshot maker, and video maker, is injecting into IE/FF/Chrome and modifying http traffic, and can steal any file from the victim computer. According to the configuration files found in the analyzed samples, they seem to be targeting the corporate sector, focusing on payment services and institutions.
Ramnit is a file infector that has been targeting the banking sector as well, utilizing its many capabilities, such as information exfiltration, screenshot capture, file execution, etc.
The Stegano exploit kit has been trying to fly under the radar since at least 2014. Its authors have put quite some effort into implementing several techniques to achieve self-concealment. In one of the most recent campaigns we detected, which we traced back at least to the beginning of October 2016, they had been distributing the kit through advertisement banners using steganography and performing several checks to confirm that they were not being monitored.
In the event of successful exploitation, the vulnerable victims’ systems had been left exposed to further compromise by various malicious payloads including backdoors, spyware and banking Trojans.
Exploitation by the Stegano kit, or any other known exploit kit for that matter, can often be avoided by running fully patched software and by using a reliable, updated internet security solution.
C:\Program Files\VMware\VMware Tools\vmtoolsd.exe
C:\Program Files (x86)\VMware\VMware Tools\vmtoolsd.exe
C:\Program Files\Oracle\VirtualBox Guest Additions\VBoxTray.exe
C:\Program Files (x86)\Oracle\VirtualBox Guest Additions\VBoxTray.exe
C:\Program Files\Parallels\Parallels Tools\prl_cc.exe
C:\Program Files (x86)\Parallels\Parallels Tools\prl_cc.exe
C:\Program Files (x86)\Fiddler\Fiddler.exe
C:\Program Files (x86)\Fiddler2\Fiddler.exe
C:\Program Files (x86)\Fiddler4\Fiddler.exe
C:\Program Files (x86)\FiddlerCoreAPI\FiddlerCore.dll
C:\Program Files (x86)\Charles\Charles.exe
C:\Program Files (x86)\Wireshark\wireshark.exe
C:\Program Files (x86)\Sandboxie\SbieDll.dll
C:\Program Files (x86)\Invincea\Enterprise\InvProtect.exe
C:\Program Files\Invincea\Browser Protection\InvBrowser.exe
C:\Program Files (x86)\Invincea\Browser Protection\InvBrowser.exe
C:\Program Files\Invincea\threat analyzer\fips\nss\lib\ssl3.dll
C:\Program Files (x86)\Invincea\threat analyzer\fips\nss\lib\ssl3.dll
C:\Program Files (x86)\Proxifier\Proxifier.exe
C:\Program Files\Proxy Labs\ProxyCap\pcapui.exe
C:\Program Files (x86)\Proxy Labs\ProxyCap\pcapui.exe
C:\Program Files (x86)\Ufasoft\SocksChain\sockschain.exe
C:\Program Files\Debugging Tools for Windows (x86)\windbg.exe
C:\Program Files (x86)\Debugging Tools for Windows (x86)\windbg.exe
C:\Program Files\Malwarebytes Anti-Exploit\mbae.exe
C:\Program Files (x86)\Malwarebytes Anti-Exploit\mbae.exe
C:\Program Files\Malwarebytes Anti-Malware\mbam.exe
C:\Program Files (x86)\Malwarebytes Anti-Malware\mbam.exe
C:\Program Files\EMET 4.0\EMET_GUI.exe
C:\Program Files (x86)\EMET 4.0\EMET_GUI.exe
C:\Program Files\EMET 4.1\EMET_GUI.exe
C:\Program Files (x86)\EMET 4.1\EMET_GUI.exe
C:\Program Files\EMET 5.0\EMET_GUI.exe
C:\Program Files (x86)\EMET 5.0\EMET_GUI.exe
C:\Program Files\EMET 5.1\EMET_GUI.exe
C:\Program Files (x86)\EMET 5.1\EMET_GUI.exe
C:\Program Files\EMET 5.2\EMET_GUI.exe
C:\Program Files (x86)\EMET 5.2\EMET_GUI.exe
C:\Program Files\EMET 5.5\EMET_GUI.exe
C:\Program Files (x86)\EMET 5.5\EMET_GUI.exe
C:\Program Files (x86)\GeoEdge\GeoProxy\GeoProxy.exe
C:\Program Files (x86)\geoedge\geovpn\bin\geovpn.exe
C:\Program Files\GeoSurf by BIscience Toolbar\tbhelper.dll
C:\Program Files (x86)\GeoSurf by BIscience Toolbar\tbhelper.dll
C:\Program Files\AdClarity Toolbar\tbhelper.dll
C:\Program Files (x86)\AdClarity Toolbar\tbhelper.dll
C:\Program Files\EffeTech HTTP Sniffer\EHSniffer.exe
C:\Program Files (x86)\EffeTech HTTP Sniffer\EHSniffer.exe
C:\Program Files (x86)\HttpWatch\httpwatch.dll
C:\Program Files (x86)\IEInspector\HTTPAnalyzerFullV7\HookWinSockV7.dll
C:\Program Files (x86)\IEInspector\HTTPAnalyzerFullV6\HookWinSockV6.dll
C:\Program Files (x86)\IEInspector\IEWebDeveloperV2\IEWebDeveloperV2.dll
C:\Program Files (x86)\NirSoft\SmartSniff\smsniff.exe
C:\Program Files\SoftPerfect Network Protocol Analyzer\snpa.exe
C:\Program Files (x86)\SoftPerfect Network Protocol Analyzer\snpa.exe
C:\Program Files (x86)\York\York.exe
C:\Program Files (x86)\Andiparos\Andiparos.exe
C:\Program Files (x86)\IEInspector\HTTPAnalyzerStdV7\HTTPAnalyzerStdV7.exe
C:\Program Files (x86)\IEInspector\HTTPAnalyzerFullV7\HttpAnalyzerStdV7.exe
C:\Program Files (x86)\HTTPDebuggerPro\HTTPDebuggerUI.exe
C:\Program Files\OWASP\ed Attack Proxy\AP.exe
C:\Program Files (x86)\OWASP\ed Attack Proxy\AP.exe
C:\Program Files\Iarsn\AbpMon 9.x\AbpMon.exe
C:\Program Files (x86)\Iarsn\AbpMon 9.x\AbpMon.exe
C:\Program Files\AnVir Task ManagerAnVir.exe
C:\Program Files (x86)\AnVir Task ManagerAnVir.exe
C:\Program Files\rohitab.com\API Monitor\apimonitor-x64.exe
C:\Program Files (x86)\rohitab.com\API Monitor\apimonitor-x64.exe
C:\Program Files\Chameleon Task Manager\manager_task.exe
C:\Program Files (x86)\Chameleon Task Manager\manager_task.exe
C:\Program Files\Free Extended Task Manager\Extensions\ExtensionsTaskManager.exe
C:\Program Files (x86)\Free Extended Task Manager\Extensions\ExtensionsTaskManager.exe
C:\Program Files\Kozmos\Kiwi Application Monitor\Kiwi Application Monitor.exe
C:\Program Files (x86)\Kozmos\Kiwi Application Monitor\Kiwi Application Monitor.exe
C:\Program Files (x86)\PerfMon4x\PerfMon.exe
C:\Program Files\Process Lasso\ProcessLasso.exe
C:\Program Files (x86)\Process Lasso\ProcessLasso.exe
C:\Program Files\Uniblue\ProcessQuickLink 2\ProcessQuickLink2.exe
C:\Program Files (x86)\Uniblue\ProcessQuickLink 2\ProcessQuickLink2.exe
C:\Program Files (x86)\Psymon\Psymon.exe
C:\Program Files\LizardSystems\Remote Process Explorer\rpexplorer.exe
C:\Program Files (x86)\LizardSystems\Remote Process Explorer\rpexplorer.exe
C:\Program Files\Security Process Explorer\procmgr.exe
C:\Program Files (x86)\Security Process Explorer\procmgr.exe
C:\Program Files\System Explorer\SystemExplorer.exe
C:\Program Files (x86)\System Explorer\SystemExplorer.exe
C:\Program Files\Iarsn\TaskInfo 10.x\TaskInfo.exe
C:\Program Files (x86)\Iarsn\TaskInfo 10.x\TaskInfo.exe
C:\Program Files\What’s my computer doing\WhatsMyComputerDoing.exe
C:\Program Files (x86)\What’s my computer doing\WhatsMyComputerDoing.exe
C:\Program Files\VMware\VMware Workstation\vmware.exe
C:\Program Files (x86)\VMware\VMware Workstation\vmware.exe
C:\Program Files (x86)\Oracle\VirtualBox\VirtualBox.exe
C:\Program Files (x86)\HitmanPro.Alert\hmpalert.exe
Drivers and libraries
(needs to find at least one)
(must not find any of these)
mhtml:file:///Program Files\k-lite codec pack/
mhtml:file:///Program Files\the bat!/
mhtml:file:///Program Files\nvidia corporation/
mhtml:file:///Program Files\ati technologies/
Code from banner
banner.png with stegano
Stegano exploit kit landing page
Stegano exploit kit landing pages
Author ESET Research, ESET