This report provides an outline of the attacks based on what was shared in the article, and our own additional findings.
As stated in the blog, the attacks are suspected of originating from the website of the Polish Financial Supervision Authority (knf.gov[.]pl), shown below:
Some hashes of the backdoor have been provided in BadCyber's technical analysis:
The C&Cs given in the BadCyber analysis were the following IP addresses:
Only one of the samples referenced by BadCyber is available in public malware repositories. At the moment we cannot verify that it originated from the watering-hole on the KNF website – but we have no reason to doubt this either.
|MD5 hash||Filename||File Info||First seen||Origin|
The file is packed with a commercial packer known as 'Enigma Protector'. Once unpacked it drops a known malware variant, which has been seen as part of the Lazarus group’s toolkit in other cases over the past year.
The unpacked executable takes several command line arguments:
The provided password's MD5 hash is used as an RC4 password. On top of that, there is one more RC4-round, using a hard coded 32-byte RC4 password:
Once the data is decrypted with two RC4 rounds, the dropper checks the decrypted data contains a valid 4-byte signature:
WATERING HOLE ANALYSIS
The attacker content on the compromised
sap.misapor[.]ch sitewas not accessible at the time of writing. However, archived versions of some pages can be found:
Default.htmlcontains code to load
MisaporPortalUI.xap– a Silverlight application which likely would contain the malicious first-stage implant. This is unfortunately not available for analysis currently.
ADDITIONAL WATERING HOLES
eye-watch[.]indomain appears to have been used in watering-hole attacks on other financial sector websites. On 2016-11-08 we observed connections to the site referred from:
This is the page for the Comisión Nacional Bancaria y de Valores (National Banking and Stock Commission of Mexico), specifically the portion of their site that details sanctions made by the Mexican National Banking Commission. This organisation is the Mexican banking supervisor and the equivalent of Poland's KNF.
In this instance the site redirected to the following URL:
At the time of writing the compromise is no longer present and no archived versions of the page exist to show where the compromise was located.
A further instance of the malicious code appears to have been present on a bank website in Uruguay around 2016-10-26 when a PCAP of browsing to the website was uploaded to VirusTotal.com.
This shows a GET request made to:
Followed shortly after by connections to:
Unfortunately, the response was empty and it is not possible to assess what may have been delivered.
ADDITIONAL MALWARE AND EXPLOIT ACTIVITY
eye-watch[.]indomain has been associated with other malicious activity in recent months. Below is a list of samples which have used the site:
|MD5 hash||Filename||File Info||First seen||Origin|
The last 4 samples can loosely be categorised as the same malware variant, however the first sample appears to be a separate exploit (as detailed later).
It is worth noting that these samples were all compiled after the domain began being used alongside the
knf.gov[.]plwatering-hole. Additionally, the samples uploaded from Poland and Uruguay match with the watering-hole activity observed – suggesting this is all part of the same campaign.
Despite this potential connection to the Poland bank compromises, the malware is not particularly advanced – for example using basic operations to gather system information. The malware attempts to run a series of commands with cmd.exe and then returns the result via the C&C,
These commands are as follows:
An example C&C beacon is seen below:
SILVERLIGHT XAP FILE
The cambio.xap archive sample (4cc10ab3f4ee6769e520694a10f611d5) does not use
eye-watch[.]inas a C&C channel but instead was downloaded from the URL:
'cambio' is Spanish for 'change'. The URL is similar to that noted in the BadCyber blog, and the use of an XAP file matches what can be found in the Archive.org cache for the
XAP is a software package format used for Microsoft Silverlight applications.
It can be opened as a standard ZIP archive and contains the following files:
Together they form a re-packaged exploit for Silverlight based on CVE-2016-0034 (MS16-006) – a Silverlight Memory Corruption vulnerability. The exploit has previously been used by several exploit kits including RIG and Angler to deliver multiple crimeware tools.
Shell_siver.dllfile contains a compile path:
Internally, the code of this DLL loads a 2nd stage library called
binaryreader.Exploit– as seen below with the XOR-encoded string:
This 2nd stage payload DLL contained within the assembly is 30,720 bytes in size and encoded with XOR 56:
Once the payload stub is decoded, it represents itself as a PE-image, which is another .NET 4.0 assembly with the internal name
This second-stage DLL assembly,
binaryreader.dll, is heavily obfuscated. The DLL (MD5 hash:
7b4a8be258ecb191c4c519d7c486ed8a) is identical to the one reported in a malware traffic analysis blog post from March 2016 where it was used to deliver Qbot. Thus it is likely the code comes from a criminal exploit kit which is being leveraged for delivery in this campaign.
A similarly named
6dffcfa68433f886b2e88fd984b4995a) was uploaded to VirusTotal from a US IP address in December 2016.
When examining the code on the exploit kit website a list of 255 IP address strings was found. The IPs only contained the first 3 octets, and would have been used to filter traffic such that only IPs on that subnet would be delivered the exploit and payload.
The IP addresses corresponded to a mix of public and private financial institutions spread across the globe:
However, banks in some specific countries feature prominently in the list:
The prominence of Polish and Mexican banks matches the observation of watering-hole code on sites in both countries.
The evidence available is currently incomplete and at the moment we can only conclude the following:
- • There has been a series of watering hole attacks on bank supervisor websites in Poland & Mexico, and a state owned bank in Uruguay in recent months. These leverage Silverlight and Flash exploits to deliver malware.
- • Investigators in Poland have identified known Lazarus group implants on bank networks and associated this with the recent compromise of the Polish Financial Supervision Authority's website.
The technical/forensic evidence to link the Lazarus group actors (who we believe are behind the Bangladesh Bank attack and many others in 2016) to the watering-hole activity is unclear. However, the choice of bank supervisor / state-bank websites would be apt, given their previous targeting of Central Banks for Heists – even when it serves little operational benefit for infiltrating the wider banking sector.
Nonetheless, further evidence to connect together the pieces of this attack is needed, as well as insights into the end-goal of the culprits. We are continuing our analysis of new artefacts as they emerge and may issue further updates in due course.
We recommend organisations use the indicators provided in Appendix A to update their defensive systems to identify attacks. For compromised legitimate websites we would suggest a minimum 1 month block be placed on the domain. Patches against CVE-2016-0034 should be applied as soon as possible.
APPENDIX A - INDICATORS OF ATTACK
|C&C IP address||