Ninja
- Type
- Loader
- Capabilities
- PersistencePost exploitationDefense evasionDLL sideloadingProcess injectionSpoofing
- Delivery
- SpearphishingLure
- Platforms
- Windows
Ninja is a Windows trojan and loader framework associated with ToddyCat operations. It has been used in attacks against desktop systems since at least 2021 and provides a broad command set for execution, persistence, traffic relaying, and stealth. Observed delivery includes malicious executable files embedded in ZIP archives and loader packages distributed via Telegram, with victims required to open the embedded executable. Ninja loader components can also be executed through rundll32 and side-loaded through legitimate signed applications, including media player software, using malicious DLLs disguised with benign-looking names.
On compromised hosts, Ninja can establish persistence by creating Windows services masquerading as legitimate components. It supports defense evasion through DLL side-loading, process injection, arbitrary shellcode injection into running processes, and timestomping by altering file access and write times. It can redirect standard input and output through pipes, enabling command execution and output handling across components.
For command and control, Ninja can proxy communications for internal agents, forward TCP packets between command-and-control infrastructure and remote hosts, and build TCP proxy chains of up to 255 hops to obscure operator infrastructure and facilitate pivoting. It can also disguise malicious network traffic by mimicking legitimate services through customized HTTP paths and headers. These characteristics make Ninja a flexible post-compromise platform suited to covert access, internal relaying, and modular payload execution in espionage-oriented intrusions.
Associated threat actors
1 distinct threat actor Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
Techniques & procedures
35 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
1 technique
Initial Access
[Ninja](https://attack.mitre.org/software/S1100) has been distributed to victims via the messaging app Telegram.(Citation: Kaspersky ToddyCat June 2022)
Execution
5 techniques
Execution
The [Ninja](https://attack.mitre.org/software/S1100) loader can call Windows APIs for discovery, process injection, and payload decryption.(Citation: Kaspersky ToddyCat June 2022)(Citation: Kaspersky ToddyCat Check Logs October 2023)
The content repeatedly describes victims being lured into opening malicious attachments, enabling macros, launching installers, clicking embedded files/links, or otherwise directly executing malicious content.
[Ninja](https://attack.mitre.org/software/S1100) has gained execution through victims opening malicious executable files embedded in zip archives.(Citation: Kaspersky ToddyCat June 2022)
[Ninja](https://attack.mitre.org/software/S1100) can use pipes to redirect the standard input and the standard output.(Citation: Kaspersky ToddyCat June 2022)
[Ninja](https://attack.mitre.org/software/S1100) loaders can be side-loaded with legitimate and signed executables including the VLC.exe media player.(Citation: Kaspersky ToddyCat Check Logs October 2023)
Persistence
1 technique
Persistence
[Ninja](https://attack.mitre.org/software/S1100) can create the services `httpsvc` and `w3esvc` for persistence .(Citation: Kaspersky ToddyCat June 2022)
Privilege Escalation
2 techniques
Privilege Escalation
[Ninja](https://attack.mitre.org/software/S1100) has the ability to inject an agent module into a new process and arbitrary shellcode into running processes.(Citation: Kaspersky ToddyCat June 2022)(Citation: Kaspersky ToddyCat Check Logs October 2023)
[Ninja](https://attack.mitre.org/software/S1100) can create the services `httpsvc` and `w3esvc` for persistence .(Citation: Kaspersky ToddyCat June 2022)
Stealth
12 techniques
Stealth
The content repeatedly describes payloads, strings, configuration files, scripts, URLs, and binaries being obfuscated or encoded using Base64, XOR, RC4, AES, RSA, hex encoding, custom algorithms, and other methods across many malware families and threat actors.
Ninja ... Obfuscated Files or Information: Compression; ... Samurai ... Obfuscated Files or Information: Compression
The [Ninja](https://attack.mitre.org/software/S1100) payload is XOR encrypted and compressed.(Citation: Kaspersky ToddyCat Check Logs October 2023) [Ninja](https://attack.mitre.org/software/S1100) has also XORed its configuration data with a constant value of `0xAA`.(Citation: Kaspersky ToddyCat June 2022)(Citation: Kaspersky ToddyCat Check Logs October 2023)
[Ninja](https://attack.mitre.org/software/S1100) has compressed its data with the LZSS algorithm.(Citation: Kaspersky ToddyCat June 2022)(Citation: Kaspersky ToddyCat Check Logs October 2023)
During the 2016 Ukraine Electric Power Attack, DLLs and EXEs with filenames associated with common electric power sector protocols were used to masquerade files.
[Ninja](https://attack.mitre.org/software/S1100) has used legitimate looking filenames for its loader including update.dll and x64.dll.(Citation: Kaspersky ToddyCat Check Logs October 2023)
[Ninja](https://attack.mitre.org/software/S1100) has the ability to inject an agent module into a new process and arbitrary shellcode into running processes.(Citation: Kaspersky ToddyCat June 2022)(Citation: Kaspersky ToddyCat Check Logs October 2023)
[Ninja](https://attack.mitre.org/software/S1100) can change or create the last access or write times.(Citation: Kaspersky ToddyCat June 2022)
The [Ninja](https://attack.mitre.org/software/S1100) loader component can decrypt and decompress the payload.(Citation: Kaspersky ToddyCat June 2022)(Citation: Kaspersky ToddyCat Check Logs October 2023)
[Ninja](https://attack.mitre.org/software/S1100) loader components can be executed through rundll32.exe.(Citation: Kaspersky ToddyCat Check Logs October 2023)
[Ninja](https://attack.mitre.org/software/S1100) can store its final payload in the Registry under `$HKLM\SOFTWARE\Classes\Interface\` encrypted with a dynamically generated key based on the drive’s serial number.(Citation: Kaspersky ToddyCat June 2022)
[Ninja](https://attack.mitre.org/software/S1100) loaders can be side-loaded with legitimate and signed executables including the VLC.exe media player.(Citation: Kaspersky ToddyCat Check Logs October 2023)
Discovery
5 techniques
Discovery
[Ninja](https://attack.mitre.org/software/S1100) can enumerate the IP address on compromised systems.(Citation: Kaspersky ToddyCat June 2022)
[Ninja](https://attack.mitre.org/software/S1100) can enumerate processes on a targeted host.(Citation: Kaspersky ToddyCat June 2022)(Citation: Kaspersky ToddyCat Check Logs October 2023)
[Ninja](https://attack.mitre.org/software/S1100) can obtain the computer name and information on the OS from targeted hosts.(Citation: Kaspersky ToddyCat June 2022)(Citation: Kaspersky ToddyCat Check Logs October 2023)
[Ninja](https://attack.mitre.org/software/S1100) has the ability to enumerate directory content.(Citation: Kaspersky ToddyCat June 2022)(Citation: Kaspersky ToddyCat Check Logs October 2023)
[Ninja](https://attack.mitre.org/software/S1100) can obtain information on physical drives from targeted hosts.(Citation: Kaspersky ToddyCat June 2022)(Citation: Kaspersky ToddyCat Check Logs October 2023)
Collection
2 techniques
Collection
China Chopper ... Data from Local System; ... Cobalt Strike ... Data from Local System; ... LoFiSe ... Data from Local System; ... Ninja ... Data from Local System; ... Pcexter ... Data from Local System; ... Samurai ... Data from Local System
Examples in the content include malware extracting or unpacking ZIP, RAR, CAB, tar.gz, and other archived content, such as 'Emotet has used a self-extracting RAR file to deliver modules to victims' and 'Rocke has extracted tar.gz files after downloading them from a C2 server.'
Command and Control
8 techniques
Command and Control
[Ninja](https://attack.mitre.org/software/S1100) has the ability to modify headers and URL paths to hide malicious traffic in HTTP requests.(Citation: Kaspersky ToddyCat June 2022)
[Ninja](https://attack.mitre.org/software/S1100) has the ability to mimic legitimate services with customized HTTP URL paths and headers to hide malicious traffic.(Citation: Kaspersky ToddyCat June 2022)
[Ninja](https://attack.mitre.org/software/S1100) can use HTTP for C2 communications.(Citation: Kaspersky ToddyCat June 2022)
[Ninja](https://attack.mitre.org/software/S1100) can proxy C2 communications including to and from internal agents without internet connectivity.(Citation: Kaspersky ToddyCat June 2022)(Citation: Kaspersky ToddyCat Check Logs October 2023)
[Ninja](https://attack.mitre.org/software/S1100) has the ability to use a proxy chain with up to 255 hops when using TCP.(Citation: Kaspersky ToddyCat June 2022)
[Ninja](https://attack.mitre.org/software/S1100) can forward TCP packets between the C2 and a remote host.(Citation: Kaspersky ToddyCat June 2022)(Citation: Kaspersky ToddyCat Check Logs October 2023)
[Ninja](https://attack.mitre.org/software/S1100) can encode C2 communications with a base64 algorithm using a custom alphabet.(Citation: Kaspersky ToddyCat June 2022)
[Ninja](https://attack.mitre.org/software/S1100) can XOR and AES encrypt C2 messages.(Citation: Kaspersky ToddyCat June 2022)
Exfiltration
1 technique
Exfiltration
[Ninja](https://attack.mitre.org/software/S1100) can configure its agent to work only in specific time frames.(Citation: Kaspersky ToddyCat June 2022)
Impact
1 technique
Impact
Этот крипто-вымогатель шифрует данные пользователей с помощью AES (режим GCM или похожий) + RSA-2048... К зашифрованным файлам добавляется расширение: .Void
Observables
2 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
32 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.