Janicab
- Type
- Spyware
- Capabilities
- KeyloggingExfiltrationPersistencePost exploitationDefense evasion
- Delivery
- Spearphishing
- Platforms
- macOSWindows
Janicab is a multi-platform espionage malware family active since at least 2013, with Windows and macOS variants, and later closely associated with the DeathStalker threat actor. It has been used against legal, financial, and travel-related organizations, including legal entities in the Middle East and victims in Europe. Janicab supports remote command execution and surveillance functions including screenshot capture, and older variants also supported audio recording. Later Windows intrusions used a VBScript-based final-stage implant and auxiliary components for keylogging, proxying, local FTP access, reverse tunneling, persistence, anti-virtual-machine checks, and downloading additional tools.
Janicab has used multi-stage infection chains. Early Windows activity included malicious Office documents exploiting CVE-2012-0158 to drop a DLL that launched an encoded Visual Basic script. Later campaigns used spearphishing with ZIP archives containing malicious shortcut droppers that launched chained VBE/VBS stages and unpacked additional resources. macOS variants used compiled Python scripts and established persistence through cron, while Windows variants established persistence through startup mechanisms and, in some cases, Winlogon shell modification.
A notable characteristic of Janicab is its use of dead-drop resolvers on public web services to obtain command-and-control information, including long-observed use of platforms such as YouTube. Some variants were signed to reduce security friction on macOS. Operationally, Janicab has overlapped with other DeathStalker toolsets through shared tradecraft and supporting utilities. High-confidence capabilities include screenshot collection with exfiltration to command-and-control infrastructure, audio capture in older variants, persistence, command execution, keylogging support through bundled components, and post-compromise access enablement through proxying and tunneling.
Associated vulnerabilities
1 CVE Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
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.
While hunting for less common Deathstalker intrusions that use the Janicab malware family, we identified a new Janicab variant used in targeting legal entities in the Middle East throughout 2020... Janicab is a VBS-based malware implant...
Techniques & procedures
27 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
1 technique
Initial Access
Based on our telemetry, the delivery mechanism remains spear-phishing.
Execution
8 techniques
Execution
[Janicab](https://attack.mitre.org/software/S0163) used a cron job for persistence on Mac devices.(Citation: Janicab)
Function runCmd(cmd, cmdType) Function facilitating command execution using CMD.exe or PowerShell.exe
Function runCmd(cmd, cmdType) Function facilitating command execution using CMD.exe or PowerShell.exe
The Windows version has a VBscript-based implant as the final stage... The LNK file has an embedded “Command Line Arguments” field that aims at extracting and executing an encoded VBScript loader (1.VBE).
The new Janicab variants also embed a CAB archive containing several Python files and other artifacts used later in the intrusion lifecycle.
A dynamic linked library is dropped and loaded.
One of them is called ActiveX.bin and it carries the main shell-code that is triggered by a widely spread exploit CVE-2012-0158 (under special settings ActiveX controls in MSCOMCTL.OCX trigger code execution).
Once a victim is tricked into opening the malicious LNK file, a series of chained malware files are dropped.
Persistence
3 techniques
Persistence
[Janicab](https://attack.mitre.org/software/S0163) used a cron job for persistence on Mac devices.(Citation: Janicab)
If it commands a keyword "reg" as a startup method then a registry file containing lines "[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon] "Shell"="wscript.exe \"%userprofile%\\SystemFolder\\.vbe\"" will be imported.
The final stage will initiate persistence by deploying a new LNK file in the Startup directory
Privilege Escalation
3 techniques
Privilege Escalation
[Janicab](https://attack.mitre.org/software/S0163) used a cron job for persistence on Mac devices.(Citation: Janicab)
If it commands a keyword "reg" as a startup method then a registry file containing lines "[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon] "Shell"="wscript.exe \"%userprofile%\\SystemFolder\\.vbe\"" will be imported.
The final stage will initiate persistence by deploying a new LNK file in the Startup directory
Stealth
3 techniques
Stealth
It uses a right-to-left override method to confuse the user while executing
Function delFFcookies() Function delGCcookies() Function delIEcookies() Points to respective browser location and deletes its cookies.
Function checkRunningProcess() Checks for a list of processes indicating malware analysis or process debugging
Defense Impairment
1 technique
Defense Impairment
[Janicab](https://attack.mitre.org/software/S0163) used a valid AppleDeveloperID to sign the code to get past security restrictions.(Citation: Janicab)
Credential Access
1 technique
Credential Access
K.dll Named Stormwind... it’s a DLL-based keylogger... sets a global hook to capture keystrokes.
Discovery
3 techniques
Discovery
getAV() Gets a list of installed AV products
Function checkRunningProcess() Checks for a list of processes indicating malware analysis or process debugging
Function isMalwb() Function to check if MalwareBytes is installed. Similar functions were seen in other variants that check for other AV products Function HandleCCleaner() Checks if CCleaner is installed by checking system registry
Lateral Movement
1 technique
Lateral Movement
the script will start an SSH reverse tunnel to a remote server controlled by the threat actor
Collection
4 techniques
Collection
K.dll Named Stormwind... it’s a DLL-based keylogger... sets a global hook to capture keystrokes.
[Janicab](https://attack.mitre.org/software/S0163) captured screenshots and sent them out to a C2 server.(Citation: f-secure janicab)(Citation: Janicab)
[Janicab](https://attack.mitre.org/software/S0163) captured audio and sent it out to a C2 server.(Citation: f-secure janicab)(Citation: Janicab)
The new Janicab variants also embed a CAB archive containing several Python files and other artifacts used later in the intrusion lifecycle.
Command and Control
5 techniques
Command and Control
The protocol in use for C2 communication is HTTP with GET/POST methods, and the backend C2 software is PHP.
PythonProxy.py An IPv4/IPv6 capable Python-based proxy that is able to relay web traffic between the local target system and remote C2 server.
the threat actor continues to use YouTube, Google+, and WordPress web services as DDRs.
Function downFile(args) Used to download files from C2 and save them to disk
Then it randomly chooses a youtube.com link from a hard-coded list and evaluates a regular expression on the received content... server = "http://" & objMatch.Item(0).Submatches(0)
Observables
25 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
11 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.