Significant cyber incident

Bankshot implant attacks on the Turkish financial sector

In March 2018, McAfee Advanced Threat Research reported the Bankshot implant, linked to North Korean Hidden Cobra activity, at five Turkish financial and government-finance organizations.

In short

In March 2018, McAfee Advanced Threat Research reported the Bankshot implant, linked to North Korean Hidden Cobra activity, at five Turkish financial and government-finance organizations. A Word document carried a Flash exploit for CVE-2018-4878 that fetched the implant. MITRE ATT&CK records the use as Lazarus Group against the Turkish financial sector in 2018. McAfee reports no theft.

What happened

On 8 March 2018, McAfee Advanced Threat Research published its analysis of an attack on Turkish financial organizations. The team found the campaign on 28 February, and its telemetry showed infections on 2 and 3 March.

The first target was a major government-controlled financial organization. The implant then appeared at another Turkish government body involved in finance and trade, and at three large Turkish financial institutions. McAfee did not name them and saw the implant in no other sector or country.

Targets received spear-phishing emails with a Word document. The main sample, Agreement.docx, looked like a Bitcoin distribution agreement template between an individual in Paris and a cryptocurrency exchange to be named. It contained a Flash exploit for CVE-2018-4878 that downloaded the Bankshot DLL from falcancoin.io, a domain that imitated a cryptocurrency lending platform.

McAfee found two more documents, written in Korean, that used the same exploit and domain and had cryptocurrency security themes. It judged that the attack resembled earlier Hidden Cobra operations against the SWIFT network. MITRE ATT&CK links the same tool to the Lazarus Group profile and dates the use against the Turkish financial sector to 2018.

The tool itself was already public. DHS and the FBI described seven related files in malware analysis report MAR-10135536-B on 13 December 2017. A US-CERT alert on 21 December 2017 pointed to the report.

Timeline

  1. 13 December 2017

    DHS and FBI analysis report. DHS and the FBI date malware analysis report MAR-10135536-B on the BANKSHOT variants.

  2. 21 December 2017

    US-CERT alert. An alert on North Korean malicious cyber activity points to the report.

  3. 27 December 2017

    Lure domain created. McAfee says falcancoin.io was created on this date, and updated on 19 February 2018.

  4. 25 to 26 February 2018

    Exploit documents prepared. McAfee dates the Flash files to 25 February and Agreement.docx to 26 February.

  5. 28 February 2018

    McAfee finds the campaign. Its Advanced Threat Research team sees the Bankshot implant return.

  6. 2 to 3 March 2018

    Infections. McAfee telemetry shows the implant hitting five Turkish organizations.

  7. 8 March 2018

    McAfee publishes. The analysis names CVE-2018-4878, the implant's abilities and the indicators.

How the attack worked

Delivery chain seen by McAfee

  1. A spear-phishing email carries a Word document with a financial or cryptocurrency theme.
  2. The document embeds a Flash object that exploits CVE-2018-4878, a flaw recently announced by the Korean Internet Security agency. McAfee says this gave a high chance of success against unpatched Flash.
  3. The exploit downloads a DLL from falcancoin.io. The DLL is disguised as a ZIP file and can run as a normal library inside a legitimate process.
  4. The implant contacts one of three hardcoded command servers, two of them Chinese-language gambling sites, and waits for commands.

What the implant does

A new thread starts from DllMain. It loads the Windows functions it needs at run time, decrypts its strings, contacts the server and handles commands. The first request is an HTTP POST with form fields named board_id, which McAfee thinks is a campaign ID, and user_id, a value hardcoded by the attacker. A file name of king.jpg acts as a beacon that says the implant is ready.

Commands arrive as encoded numbers in the range 0x123459 to 0x123490. McAfee lists abilities that include:

  • List files in a directory, read a file and send it to the server.
  • Run commands with cmd.exe /c and start processes, also as the logged-on user.
  • Collect process times, account names, network addresses, drive details and the system version.
  • Write data to disk, change file times and load more libraries.
  • Delete files, or overwrite them with zeros and delete them at reboot, which destroys evidence.

The 2017 DHS and FBI report

The DHS and FBI report analyses seven malicious executable files. Five are proxy applications that use a similar cipher to hide traffic between the malware and the remote operator. Two of those five can create fake TLS handshake sessions using valid public SSL certificates. The other two files are remote access tools that let a remote user run commands on an infected system.

One remote access tool adds a cipher and the OpenSSL library to protect traffic with its command server, and may have been used to install the proxies. One analyzed proxy binds to the victim system and listens on port 110, so the operator can reach the internet through it. Data is encoded to stop firewalls and network analysis tools from spotting the sessions.

ATT&CK techniques

McAfee listed techniques with their 2018 names. The IDs below come from the current MITRE ATT&CK entry for Bankshot (S0239), matched to what McAfee and the DHS report describe.

Delivery by spear-phishing email is also in McAfee's account. MITRE's page for Bankshot does not list it, so the Phishing mapping (T1566.001, see Phishing (T1566)) is ours.

Impact

McAfee describes five victim organizations: one government-controlled financial organization, one Turkish government body in finance and trade, and three large financial institutions. It reports no stolen funds and no losses. It says the implant does not make financial transactions, but opens a channel for later stages.

McAfee read the campaign as an early data-gathering step before a possible heist. That is an assessment, not an observed theft. McAfee and the DHS report quote no Turkish authority or bank on this incident.

Government and regulator response

McAfee published file hashes, the falcancoin.io domain and three command server URLs, and named its detections for the documents and the implant. It noted that the Flash documents evaded static defenses and stayed undetected as exploits on VirusTotal when it checked.

DHS and the FBI had shared the 2017 report to support network defense. They asked users and administrators to flag activity linked to the malware and to report it to the DHS National Cybersecurity and Communications Integration Center or the FBI Cyber Watch. The report includes a detection rule and a list of best practices.

Lessons

  1. A public report is an early warning

    DHS and the FBI documented Bankshot in December 2017, before the March 2018 attack. McAfee found the new sample 99% similar to documented 2017 variants, so the 2017 report already described near-identical code.

  2. A new exploit can carry an old implant

    The attackers paired a fresh Flash flaw with a near-unchanged implant. Detect the implant's behavior and traffic, not only the delivery document.

  3. The traffic was built to blend in

    Proxies encode their data and can fake TLS with valid public certificates. A check that asks only whether a connection looks like normal encrypted traffic would miss it.

  4. Targets were chosen with care

    McAfee saw the implant only in Turkish government-linked finance and banking, and in no other sector or country. Banks in the region should treat it as a targeted warning.

What to check in your own organization

  1. Hunt for the known domains and servers

    Search proxy and DNS logs for falcancoin[.]io. Also search for the three command servers in the McAfee report: 530hr[.]com, 028xmz[.]com and 168wangpi[.]com.

  2. Look for the implant on disk and in memory

    Check for a DLL that is disguised as a ZIP file and loaded into a normal process, and for temporary files matching %temp%DWS00*. McAfee also lists four hashes, including sample a2e966edee45b30bb6bb5c978e55833eec169098.

  3. Watch outbound HTTP for the beacon

    Look for HTTP POST requests with multipart fields board_id and user_id and a file name such as king.jpg. McAfee took these strings from earlier captures, so check older logs too.

  4. Do not rely on static document scanning

    McAfee says the Flash documents evaded static defenses. Use behavior detection and a sandbox for attachments, and patch browsers, Office and plug-ins.

  5. Check for fake TLS and odd proxies

    The DHS and FBI report describes proxies that fake TLS handshakes with valid public certificates. Use the report's detection rule and report findings to DHS or the FBI.

  6. Follow the report's basic list

    The report advises keeping antivirus current, limiting who can install software, scanning attachments to confirm the file type, patching the operating system and disabling unneeded services.

Questions

What is the Bankshot implant?

Bankshot is a Windows remote access tool. DHS and the FBI described its variants in December 2017 as used by the North Korean government. It can list and read files, run commands, collect system data and wipe files.

What did McAfee find in March 2018?

McAfee found Bankshot at five Turkish organizations: a government-controlled financial organization, a government body in finance and trade, and three large financial institutions. A Word document with a Flash exploit for CVE-2018-4878 downloaded the implant. McAfee reports no theft.

Who used Bankshot against the Turkish financial sector?

McAfee said its evidence strongly indicated a Hidden Cobra attack, and MITRE ATT&CK says Lazarus Group used Bankshot against the Turkish financial sector in 2018. Hidden Cobra is the US Government's name for North Korean government activity.

How does Bankshot hide its traffic?

The DHS and FBI report describes proxies that use a cipher to hide traffic, and two that fake TLS handshakes with valid public certificates. McAfee describes HTTP POST beacons with a campaign ID and a fixed user ID.

How can banks look for it?

Search logs for falcancoin[.]io and the three server addresses, the board_id and user_id POST fields, and DLLs disguised as ZIP files. Use the DHS and FBI detection rule, and patch Flash, Office and browsers.

Sources

  1. Hidden Cobra Targets Turkish Financial Sector With New Bankshot Implant (8 March 2018) McAfee Advanced Threat Research
  2. North Korean Malicious Cyber Activity (alert of 21 December 2017, links Malware Analysis Report MAR-10135536-B) CISA (US-CERT)
  3. Bankshot, Software S0239 | MITRE ATT&CK MITRE ATT&CK
  4. Lazarus Group, Group G0032 | MITRE ATT&CK MITRE ATT&CK