Fortinet FortiEDR uncovered a Moses Staff campaign targeting Israeli organizations, leveraging ProxyShell exploits to deploy web shells and a multi-component backdoor for espionage, data exfiltration, and payload delivery. The operation includes a loader that installs a DriveGuard service, a watchdog, and a configurable C2-connected backdoor, attributed to Moses Staff with Iranian sponsorship. #MosesStaff #DriveGuard
Keypoints
- 1) Moses Staff is a geo-political threat group likely sponsored by the Iranian government and focused on Israeli targets for espionage.
- 2) Initial access occurred via ProxyShell on Microsoft Exchange, enabling unauthenticated execution via an exposed HTTPS port and deployment of web shells.
- 3) Post-infection activity included PST/data exfiltration and credential dumping from LSASS memory using LOLBin techniques before backdoor components were dropped.
- 4) A loader component (drvguard.exe) installs as a service (DriveGuard), maintains persistence with a watchdog, and injects into LSASS via inj.dll.
- 5) The backdoor communicates with two C2 servers, uses XOR-based encryption for configuration, and supports a large set of commands for file operations, command execution, and DLL loading.
- 6) Fortinet identifies multiple IOCs (files, hashes, IPs, domains, and URLs) and attributes the activity to Moses Staff, with techzenspace.com sinkholed by FortiGuard Labs.
MITRE Techniques
- [T1190] Exploit Public-Facing Application β The ProxyShell exploit on Exchange allowed unauthenticated command execution via an exposed HTTPS port. [The initial infiltration was accomplished by leveraging the ProxyShell exploit in Microsoft Exchange servers to allow an unauthenticated attacker to execute arbitrary commands on them through an exposed HTTPS port.]
- [T1505.003] Server Software Component: Web Shell β Web shells iispool.aspx and map.aspx were deployed post-exploitation to access and control the server. [These two web shells are used in conjunction with one another, and some of their functionalities overlap. On numerous occasions, map.aspx was used to validate the results of the commands executed by iispool.aspx.]
- [T1003.001] OS Credential Dumping: LSASS Memory β Attackers dumped LSASS memory to steal credentials. [Next, the attackers dumped LSASS memory using a LOLBin to steal credentials.]
- [T1005] Data from Local System β Exfiltration of PST files and other sensitive data from the compromised server. [Post infection, the attackers dedicated several days to the exfiltration of PST files and other sensitive data from the compromised server.]
- [T1569.002] System Services: Service Execution β The loader installs itself as a service named DriveGuard. [When executed with the β-Iβ command-line argument, it installs itself as a service named DriveGuard.]
- [T1055] Process Injection β inj.dll uses VirtualAllocEx and SetThreadContext to run shellcode in the target process. [The injection is implemented in inj.dll, which uses VirtualAllocEx and SetThreadContext to run shellcode in the target process.]
- [T1134.004] Access Token Manipulation: Parent PID Spoofing β The loader spoofs the backdoorβs parent process to svchost.exe. [This is achieved via calling CreateProcess and setting the parent process attribute to the first svchost.exe process found in the system.]
- [T1140] Deobfuscate/Decode Files or Information β The backdoor configuration is encrypted (XOR-based) and decrypted with a Python routine. [The encryption scheme used is XOR-based and can be decrypted by the following Python code.]
- [T1573.001] Encrypted Channel: Symmetric Cryptography β The backdoor/config data is encrypted and transmitted over encrypted channels. [The configuration contains two sets of C2 and URI addresses, alongside a time interval, in seconds, that determines the frequency at which to contact the server. A random value between 0 and 2 seconds is added to the interval to cause jitter.]
- [T1008] Fallback Channels β The backdoor switches between two C2 servers if the primary is unresponsive or returns empty data. [The backdoor continually queries the server for commands. In the event of five consecutive unsuccessful queries, the backdoor will switch to contacting the backup server.]
- [T1071.001] Application Layer Protocol: Web Protocols β Commands are delivered over HTTP/S POST to the C2 servers. [The backdoor first sends a POST request to the first configured server. It alternates between contacting the two servers depending on their statusβ¦]
- [T1059.003] Command and Scripting Interpreter: Windows Command Shell β Several commands involve executing command lines (e.g., Execute command line). [The command-line argument β-serβ is used to trigger backdoor execution.]
- [T1041] Exfiltration Over C2 Channel β Data is sent to the C2 server and parsed responses drive actions. [The data field contains information about the infected machine.]
- [T1033] System Owner/User Discovery β The C2 data includes hostname and username, helping attribution. [The token field is comprised of the hostname, username, and an ID.]
- [T1560.001] Obfuscated/Compressed Files (Not explicitly listed, but Deobfuscation is shown) β Backdoor config and communications are obfuscated/encoded. [The data field contains information about the infected machine, encrypted with the same algorithm and key as the configuration file.]
Indicators of Compromise
- [File Hash] 2ac7df27bbb911f8aa52efcf67c5dc0e869fcd31ff79e86b6bd72063992ea8ad β map.aspx (SHA256)
- [File Hash] ff15558085d30f38bc6fd915ab3386b59ee5bb655cbccbeb75d021fdd1fde3ac β agent4.exe
- [File Hash] cafa8038ea7e46860c805da5c8c1aa38da070fa7d540f4b41d5e7391aa9a8079 β calc.exe
- [File Name] iispool.aspx, map.aspx, drvguard.exe, inj.dll, lic.dll β Backdoor components and loader
- [Event] program Event, Program event β Event names used by the malware
- [IP] 87.120.8.210 β C2 IP address
- [Domain] techzenspace.com β C2 domain (sinkhole noted)
- [URL] http://87.120.8.210:80/RVP/index3.php, http://techzenspace.com:80/RVP/index8.php β C2 URLs
Read more: https://www.fortinet.com/blog/threat-research/guard-your-drive-from-driveguard