Injection 7 Information On Ransomware Attack and Measures
Injection 7 Information On Ransomware Attack and Measures
Injection 7 Information On Ransomware Attack and Measures
1 Threat Details
1.1 TrickBot
What began as a banking trojan and descendant of Dyre malware, TrickBot now provides its operators
a full suite of tools to conduct a myriad of illegal cyber activities. These activities include credential
harvesting, mail exfiltration, cryptomining, point-of-sale data exfiltration, and the deployment of
ransomware, such as Ryuk and Conti.
In early 2019, the FBI began to observe new TrickBot modules named Anchor, which cyber actors
typically used in attacks targeting high-profile victims—such as large corporations. These attacks often
involved data exfiltration from networks and point-of-sale devices. As part of the new Anchor toolset,
TrickBot developers created anchor_dns, a tool for sending and receiving data from victim machines
using Domain Name System (DNS) tunneling.
anchor_dns is a backdoor that allows victim machines to communicate with C2 servers over DNS
to evade typical network defense products and make their malicious communications blend in with
legitimate DNS traffic. anchor_dns uses a single-byte XOR cipher to encrypt its communications,
which have been observed using key 0xB9. Once decrypted, the string anchor_dns can be found in
the DNS request traffic.
・ C:¥Windows¥
1
https://us-cert.cisa.gov/ncas/alerts/aa20-302a
1
[Exercise Exercise Exercise]
ASEAN-Japan Remote Cyber Exercise 2022
・ C:¥Windows¥SysWOW64¥
・ C:¥Users¥[Username]¥AppData¥Roaming¥
Once the executable is running and successful in establishing communication with C2s, the executable
places appropriate modules downloaded from C2s for the infected processor architecture type (32 or
64 bit instruction set), to the infected host’s %APPDATA% or %PROGRAMDATA% directory, such
as %AppData¥Roaming¥winapp. Some commonly named plugins that are created in a Modules
subdirectory are (the detected architecture is appended to the module filename, e.g., importDll32
or importDll64):
・ Systeminfo
・ importDll
・ outlookDll
・ injectDll with a directory (ex. injectDLL64_configs) containing configuration files:
➢ dinj
➢ sinj
➢ dpost
・ mailsearcher with a directory (ex. mailsearcher64_configs) containing configuration
file:
➢ mailconf
・ networkDll with a directory (ex. networkDll64_configs) containing configuration file:
➢ dpost
・ wormDll
・ tabDll
・ shareDll
Filename client_id or data or FAQ with the assigned bot ID of the compromised system is created
in the malware directory. Filename group_tag or Readme.md containing the TrickBot campaign IDs
is created in the malware directory.
The malware may also drop a file named anchorDiag.txt in one of the directories listed above.
Part of the initial network communications with the C2 server involves sending information about the
victim machine such as its computer name/hostname, operating system version, and build via a
base64-encoded GUID. The GUID is composed of /GroupID/ClientID/ with the following naming
convention:
2
[Exercise Exercise Exercise]
ASEAN-Japan Remote Cyber Exercise 2022
/anchor_dns/[COMPUTERNAME]_[WindowsVersionBuildNo].[32CharacterString]/.
The malware uses scheduled tasks that run every 15 minutes to ensure persistence on the victim
machine. The scheduled task typically uses the following naming convention.
[random_folder_name_in_%APPDATA%_excluding_Microsoft]
autoupdate#[5_random_numbers] (e.g., Task autoupdate#16876).
After successful execution, anchor_dns further deploys malicious batch scripts (.bat) using
PowerShell commands.
The following domains found in outbound DNS records are associated with anchor_dns.
・ kostunivo[.]com
・ chishir[.]com
・ mangoclone[.]com
・ onixcellent[.]com
This malware used the following legitimate domains to test internet connectivity.
・ ipecho[.]net
・ api[.]ipify[.]org
・ checkip[.]amazonaws[.]com
・ ip[.]anysrc[.]net
・ wtfismyip[.]com
・ ipinfo[.]io
・ icanhazip[.]com
・ myexternalip[.]com
・ ident[.]me
3
[Exercise Exercise Exercise]
ASEAN-Japan Remote Cyber Exercise 2022
https://feodotracker.abuse.ch/browse/trickbot/.
While negotiating the victim network, Ryuk actors will commonly use commercial off-the-shelf
products—such as Cobalt Strike and PowerShell Empire—in order to steal credentials. Both
frameworks are very robust and are highly effective dual-purpose tools, allowing actors to dump clear
text passwords or hash values from memory with the use of Mimikatz. This allows the actors to inject
malicious dynamic-link library into memory with read, write, and execute permissions. In order to
maintain persistence in the victim environment, Ryuk actors have been known to use scheduled tasks
and service creation.
Ryuk actors will quickly map the network in order to enumerate the environment to understand the
scope of the infection. In order to limit suspicious activity and possible detection, the actors choose to
live off the land and, if possible, use native tools—such as net view, net computers, and ping—to locate
mapped network shares, domain controllers, and active directory. In order to move laterally throughout
the network, the group relies on native tools, such as PowerShell, Windows Management
Instrumentation (WMI), Windows Remote Management , and Remote Desktop Protocol (RDP). The
group also uses third-party tools, such as Bloodhound.
4
[Exercise Exercise Exercise]
ASEAN-Japan Remote Cyber Exercise 2022
Once dropped, Ryuk uses AES-256 to encrypt files and an RSA public key to encrypt the AES key.
The Ryuk dropper drops a .bat file that attempts to delete all backup files and Volume Shadow Copies
(automatic backup snapshots made by Windows), preventing the victim from recovering encrypted
files without the decryption program.
In addition, the attackers will attempt to shut down or uninstall security applications on the victim
systems that might prevent the ransomware from executing. Normally this is done via a script, but if
that fails, the attackers are capable of manually removing the applications that could stop the attack.
The RyukReadMe file placed on the system after encryption provides either one or two email
addresses, using the end-to-end encrypted email provider Protonmail, through which the victim can
contact the attacker(s). While earlier versions provide a ransom amount in the initial notifications,
Ryuk users are now designating a ransom amount only after the victim makes contact.
The victim is told how much to pay to a specified Bitcoin wallet for the decryptor and is provided a
sample decryption of two files.
Initial testing indicates that the RyukReadMe file does not need to be present for the decryption script
to run successfully but other reporting advises some files will not decrypt properly without it. Even if
run correctly, there is no guarantee the decryptor will be effective. This is further complicated because
the RyukReadMe file is deleted when the script is finished. This may affect the decryption script unless
it is saved and stored in a different location before running.
5
[Exercise Exercise Exercise]
ASEAN-Japan Remote Cyber Exercise 2022
Technique Use
Ryuk has called CreateToolhelp32Snapshot to enumerate all
Process Discovery [T1057]
running processes.
Command and Scripting
Interpreter: Windows Ryuk has used cmd.exe to create a Registry entry to establish
Command Shell persistence.
[T1059.003]
File and Directory Ryuk has called GetLogicalDrives to enumerate all mounted
Discovery [T1083] drives, and GetDriveTypeW to determine the drive type.
Ryuk has used multiple native APIs including ShellExecuteW to
run executables; GetWindowsDirectoryW to create folders;
Native API [T1106]
and VirtualAlloc, WriteProcessMemory,
and CreateRemoteThread for process injection.
Access Token Ryuk has attempted to adjust its token privileges to have
Manipulation [T1134] the SeDebugPrivilege.
Ryuk has used a combination of symmetric and asymmetric
encryption to encrypt files. Files have been encrypted with their
Data Encrypted for Impact
own AES key and given a file extension of .RYK. Encrypted
[T1486]
directories have had a ransom note of RyukReadMe.txt written to
the directory.
Ryuk has called kill.bat for stopping services, disabling services
Service Stop [T1489]
and killing processes.
Ryuk has used vssadmin Delete Shadows /all /quiet to
Inhibit System Recovery delete volume shadow copies and vssadmin resize
[T1490] shadowstorage to force deletion of shadow copies created by
third-party applications.
Boot or Logon Autostart Ryuk has used the Windows command line to create a Registry
Execution: Registry Run entry
Keys / Startup Folder under HKEY_CURRENT_USER¥SOFTWARE¥Microsoft¥Windows¥
[T1047.001] CurrentVersion¥Run to establish persistence.
Impair Defenses: Disable
or Modify Tools Ryuk has stopped services related to anti-virus.
[T1562.001]
Access Token Ryuk has attempted to adjust its token privileges to have
Manipulation [T1134] the SeDebugPrivilege.
6
[Exercise Exercise Exercise]
ASEAN-Japan Remote Cyber Exercise 2022
2 Measures
2.1 Plans and Policies
Healthcare and Public Health (HPH) Sector organizations are encouraged to maintain business
continuity plans—the practice of executing essential functions through emergencies (e.g.,
cyberattacks)—to minimize service interruptions. Without planning, provision, and implementation of
continuity principles, organizations may be unable to continue operations. Evaluating continuity and
capability will help identify continuity gaps. Through identifying and addressing these gaps,
organizations can establish a viable continuity program that will help keep them functioning during
cyberattacks or other emergencies. It is suggested that HPH Sector organizations review or establish
patching plans, security policies, user agreements, and business continuity plans to ensure they address
current threats posed by malicious cyber actors.
7
[Exercise Exercise Exercise]
ASEAN-Japan Remote Cyber Exercise 2022
2
https://us-cert.cisa.gov/ncas/alerts/aa20-302a