
Lemon Sandstorm Breach Middle East Infrastructure
The Iranian state-sponsored hacking group Lemon Sandstorm also known as Pioneer Kitten, Parisite, and UNC757 conducted a prolonged, multi-stage cyberattack targeting critical national infrastructure in the Middle East.
According to a report by the FortiGuard Incident Response (FGIR) team, the campaign spanned from May 2023 to February 2025, involving extensive cyber-espionage and suspected network prepositioning a tactic commonly used to establish long-term access for future strategic operations.
Technical Description
According to a May 1, 2025 report by cybersecurity firm FGIR, the compromise began at least two years ago when the attackers leveraged stolen VPN credentials to infiltrate the organization’s network. FGIR, which later assisted with remediation efforts starting in late 2024, revealed that within a week of initial access, the attackers had deployed web shells on two externally facing Microsoft Exchange servers and subsequently upgraded these backdoors to enhance stealth and persistence.
The threat actors identified as part of the Iran-linked Lemon Sandstorm group continued expanding their foothold by adding new capabilities, installing persistence mechanisms, and deploying five custom attack tools. Notably, the attackers appeared more focused on establishing long-term access than on immediate data exfiltration.
Initial Breach through VPN Access:
The intrusion began on May 15, 2023, when the attackers used stolen domain administrator credentials to access the organization’s SSL VPN infrastructure, specifically targeting two on-premises Microsoft Exchange servers (EXCH-1 and EXCH-2). The credentials worked on the first login attempt, with no prior failed logins or indications of recent password changes, strongly suggesting that the credentials were pre-validated.
On May 20, 2023, at 08:00 UTC, the adversary reconnected via VPN and launched a series of SMB brute-force attacks and network scans from the VPN-connected endpoint. The scanning activity focused on externally facing servers, while the brute-force attempts targeted key domain administrator accounts to escalate privileges. However, limited VPN log retention hindered efforts to trace the attacker’s source IP address.
Establishment of Web Shell-Based Access:
Approximately five hours after reconnecting via VPN, the adversary established a Remote Desktop Protocol (RDP) session with EXCH-1 and deployed a simple web shell named default.aspx. This shell accepted POST requests, writing files to attacker-specified paths via the fg field, with file contents decoded from base64-encoded data in the gh field. Access was confirmed using GET requests, and the same shell was subsequently deployed on EXCH-2, likely as a test for endpoint-level restrictions.
On May 21, 2023, at 07:00 UTC, a more advanced web shell, UpdateChecker.aspx, was deployed on both Exchange servers. This shell incorporated multiple obfuscation techniques, including character code substitution, nested loops, junk functions, and AES-encrypted variable names, significantly complicating detection, and analysis. It became the primary method of remote access during the early stages of the intrusion.
Credential Harvesting Mechanisms:
On June 18, 2023, the attackers created a scheduled task named EDP Policy on SERV-4 and SERV-5, placed in Microsoft\Windows\AppID\ to mimic the legitimate EDP Policy Manager. It extracted files from domain controller paths, outputting XML files with epoch timestamps and base64-encoded credentials to a web directory.
Two DLLs, synapy.dll and synapx.dll, were deployed as password filters (T1556.002) on domain controllers to harvest credentials via LSA authentication, with confirmed exfiltration occurring six times over 13 months until removal on August 29, 2024. The attackers also ran Mimikatz (m.exe) on EXCH-1 and EXCH-2, and used PowerShell to enable RDP logins with local admin accounts by modifying the LocalAccountTokenFilterPolicy.
HanifNet Backdoor Deployment:
On August 6, 2023, a scheduled task named CleanupTemporay (note the misspelling) was created under Microsoft\Windows\ApplicationData\ on SERV-6, mimicking the legitimate cleanupTemporarystate task. It executed mast.exe, a .NET backdoor dubbed HanifNet, located in C:\Program Files\Python39\DLLs\.
HanifNet, an unsigned executable, included namespaces H4N1F_Agent_V2_ and H4N1F_Crypto, and communicated with its C2 server via a config file processed by the GetConfig function. Though unobfuscated, it posed as a Microsoft utility with the description “System Update Health Services.” The name “hanif” (Farsi for pre-Islamic monotheists) and metadata linked the tool to Iranian threat activity.
Consolidation and Advanced Persistence:
From April 30 to November 22, 2024, adversaries strengthened their foothold by deploying additional web shells and the NeoExpressRAT backdoor for persistence. They used proxy tools (plink, Ngrok, ReverseSocks5, glider) to bypass network segmentation and chain access.
The attackers targeted email exfiltration and interacted with virtualization infrastructure, chaining four proxy tools to penetrate deeper into critical national infrastructure (CNI) segments, as shown in Figure 2. Additional backdoors, Havoc and HXLibrary, were deployed via scheduled tasks, ensuring long-term access. The network, comprising hundreds of endpoints, included both virtualized and dedicated servers, with OT networks targeted through reconnaissance and credential collection.
Remediation and Adversary Countermeasures:
From November 23 to December 13, 2024, initial remediation triggered a surge in adversary activity. New backdoors (MeshCentral and SystemBC) and additional web shells were deployed to maintain access to critical segments. Attackers exploited a vulnerable web server and launched targeted phishing campaigns for credential harvesting.
Containment efforts from December 14, 2024 eradicated adversary access, but the attackers attempted re-entry via persistent mechanisms, server exploits, and phishing. The victim’s segmented network, with OT isolation, prevented a confirmed OT breach, though adversaries gained a foothold in OT-related segments.
Malware and TTP Analysis:
The intrusion involved five unreported malware clusters: HanifNet (backdoor), RemoteInjector (loader), NeoExpressRAT (backdoor), HXLibrary (backdoor), and CredInterceptor (credential access). These utilized open-source frameworks (e.g., Havoc) and low-complexity web shells.
Key TTPs included RDP/SMB lateral movement using compromised VPN credentials, web shell deployment for remote execution, proxy chaining to bypass firewalls, and phishing for credential harvesting. The report highlights that these established TTPs, not novel malware, represent the greatest risk, as they are commonly used across multiple threat actors.
Network Topology and Adversary Navigation:
The victim’s infrastructure included hundreds of endpoints, such as external web servers, an on-premises Exchange server, database servers, and application servers, with partial virtualization. Network segmentation and trust relationships were strong, particularly for the OT network, which was isolated by multiple layers.
Adversaries targeted OT systems through reconnaissance, credential collection, and network scanning, gaining a foothold in OT-related segments but not breaching the OT network. Proxy chaining (e.g., plink, Ngrok, ReverseSocks5, glider) enabled lateral movement across segments, showcasing sophisticated navigation of the victim’s network topology.
Attribution and Historical Context:
The intrusion was attributed to an Iranian state-backed group, likely Lemon Sandstorm, based on TTP overlaps with past campaigns and the use of Farsi-derived names (e.g., “hanif”). Traces of the compromise dated back to May 2021, indicating a multi-year operation.
The adversary’s focus on CNI sectors (transportation, energy, telecommunications) and use of sophisticated proxy chaining highlighted their strategic intent for espionage and prepositioning amid geopolitical tensions.
Conclusion:
The intrusion was a prolonged, multi-year operation targeting critical national infrastructure (CNI) sectors, with a focus on transportation, energy, and telecommunications, indicating strategic espionage and prepositioning efforts amid geopolitical tensions. The use of advanced persistence techniques, including proxy chaining and multiple backdoors, demonstrated the adversary’s sophisticated approach to maintaining access. The attackers relied heavily on credential harvesting and lateral movement through phishing and RDP/SMB exploitation. The operation is likely attributed to the Iranian state-backed group, Lemon Sandstorm, due to TTP overlaps and Farsi-derived names, highlighting its alignment with broader Iranian cyber objectives.
Impact
The intrusion facilitated espionage and prepositioning within Middle Eastern CNI, threatening operational stability in the transportation, energy, and telecom sectors. Prolonged access since May 2021 exposed sensitive data, weakening regional cybersecurity. Ongoing adversary attempts, even after remediation, underscore the persistent threat to the stability of critical infrastructure.
IOC and Context Details
Topics | Details |
---|---|
Tactic Name | Persistence, Lateral Movement, Execution, Credential Access, Initial Access, Command and Control |
Technique Name |
Persistence: Scheduled Task/Job, Valid Accounts, Server Software Component Lateral Movement: Remote Services Execution: Command and Scripting Interpreter Credential Access: Input Capture, OS Credential Dumping, Modify Authentication Process Initial Access: External Remote Services Command and Control: Protocol Tunneling, Remote Access Tools |
Sub Technique Name |
Persistence - Scheduled Task/Job: Scheduled Task Persistence - Valid Accounts: Local Accounts, Domain Accounts Persistence - Server Software Component: Web Shell Lateral Movement - Remote Services: Remote Desktop Protocol, SMB/Windows Admin Shares, SSH Execution - Command and Scripting Interpreter: PowerShell Credential Access - Input Capture: Web Portal Capture Credential Access - OS Credential Dumping: LSASS Memory Credential Access - Modify Authentication Process: Password Filter DLL Command and Control - Remote Access Tools: Remote Desktop Software |
Attack Type | Malware |
Targeted Applications | Windows |
Region Impacted | Middle East |
Industry Impacted | Transportation , Energy , Telecommunications |
IOC’s |
IP 194[.]213[.]18[.]182 , 5[.]255[.]100[.]203 , 45[.]147[.]230[.]159 Hash sha256 : cfb241b1ead4cc2bdb1cb55094708e8d85b27628159251725f8a648d7b5631d7 , c3777df8af97479419aaff9bbb113ddeb1aef7515a91fc683f8c62133466a137 , 17f b52476016677db5a93505c4a1c356984bc1f6a4456870f920ac90a7846180 , d0c 1662ce239e4d288048c0e3324ec52962f6ddda77da0cb7af9c1d9c2f1e2eb , 22bd 09fbab54963d4b0234585d33571a47a2df569dbab8b40988415ab0a3c37b , 9188 830f1fd5165ab77c4d049fc922a3fba299c899e8b7a8535f30910a611ffe , 29441fa c132411894c79577489274fce14e1cf9bf166a0a9a981d1a139f11af6 , 3e20143e3 e6346e09009109c997e91ce135eafc20496a02b2d5bad4a0b2a823c sha1 : bf6ba3f9fa93e2860a1041a443b318b7cd93a1d5 , aea717754ba2ba8fb3981bb87 837b150ab659023 , 5cbde184bd95db80df89bbae7f6af6cc318b5a1a , 06f68ce5 e68cf4b0ce04bb52105b90091b4b52d8 , 10955a02ef3fd3f80f20062c401bf7960ff 6ce94 , aa52ec30f5127b62c65239535eda2e949532f484 , 3477a173e2c1005a8 1d042802ab0f22cc12a4d55 , e3b707f2479b1b9ceb14dadc9b96c94cac22c327 md5 : fe94c576b99dcc99b1c82fce00af97ab , e736229e890a138ccf7810e00a6bb50d , e12e14eeac7d8631c2ebe67f2192d16b , 057999f7fedb3339def3be576a2408a7 , ebd96cf97f93e62210fe4d928c49464c , 48274e0b14ce2fbea39bbb98d7c8d495 , 6445cddd5284516b192330a2805606de , 6a58b52b184715583cda792b56a0a1e d Domain apps[.]gist[.]githubapp[.]net , encoremir[.]com , cdn[.]gupdate[.]net , clus ter[.]amazonaws[.]work |
CVE | NA |
Recommended Actions
- Enhance Credential Security: Enforce multi-factor authentication (MFA) and monitor for abnormal login behavior.
- Strengthen Network Segmentation: Regularly audit trust relationships and limit RDP/SMB access to prevent lateral movement.
- Monitor Web Servers: Deploy intrusion detection systems to identify and remove unauthorized web shells.
- Patch Vulnerabilities: Prioritize updates for public-facing servers and applications to reduce exploitation risks.
- Retain Logs: Extend VPN and server log retention to trace adversary origins and actions.