QUADAGENT is a PowerShell-based backdoor associated with the Iranian state-aligned threat group OilRig, also tracked as APT34. It has been used in espionage operations targeting organizations including government entities and technology service providers, with reporting also linking it to campaigns against healthcare organizations in the Middle East. The malware is executed through PowerShell and also uses VBScript components as part of its operation. Reported delivery includes spearphishing campaigns in which QUADAGENT was distributed alongside other OilRig tooling.
On an infected Windows host, QUADAGENT establishes persistence by creating a scheduled task and stores operational state in the current user Registry hive, including a unique session identifier for the compromised system and a pre-shared key used to protect command-and-control traffic. It checks for the presence of Registry values associated with its scheduled-task-based persistence and includes cleanup functionality to remove its Registry artifacts and scheduled task.
QUADAGENT performs basic host reconnaissance, including collecting the current username and the domain to which the system belongs. Its command-and-control design emphasizes resilience and obfuscation: communications are encoded with Base64, strings and scripts are protected with AES using a pre-shared key, and the malware can fall back across multiple C2 protocols, including HTTPS, HTTP, and DNS, if one channel is unavailable. These characteristics align with OilRig tradecraft focused on stealthy, script-driven persistence and flexible communications on compromised Windows systems.
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.
OilRig Targets Technology Service Provider and Government Agency with QUADAGENT.
32 distinct techniques documented for this family, organized by ATT&CK tactic.
In July 2018, they launched multiple attacks using spearphishing email ... Their initial infection paths were based on watering hole attacks using compromised web servers.
Multiple Iran-nexus APT groups are described as using spear-phishing: e.g., Charming Kitten uses “spear-phishing with fake personas and compromised emails… phishing via benign PDFs for credential harvesting”; several others use “spear-phishing with malicious documents/attachments/links.”
They use phishing emails to deliver weaponized Microsoft Excel documents... Between 2014 to 2016, the group's attack campaigns targeted banks and technology organizations in Saudi Arabia with phishing emails that included weaponized Microsoft Excel attachments.
“Sandworm Team leveraged Scheduled Tasks through a Group Policy Object (GPO) to execute CaddyWiper at a predetermined time.” / “APT29 used scheduler and schtasks to create new tasks on remote host as part of their lateral movement… updating an existing legitimate task to execute their tools and then returned the scheduled task to its original configuration.”
[QUADAGENT](https://attack.mitre.org/software/S0269) creates a scheduled task to maintain persistence on the victim’s machine.(Citation: Unit 42 QUADAGENT July 2018)
most of their malware infect the target system with VisualBasic and PowerShell (.ps1) scripts.
[QUADAGENT](https://attack.mitre.org/software/S0269) uses PowerShell scripts for execution.(Citation: Unit 42 QUADAGENT July 2018)
[QUADAGENT](https://attack.mitre.org/software/S0269) uses cmd.exe to execute scripts and commands on the victim’s machine.(Citation: Unit 42 QUADAGENT July 2018)
[QUADAGENT](https://attack.mitre.org/software/S0269) uses VBScripts.(Citation: Unit 42 QUADAGENT July 2018)
“Sandworm Team leveraged Scheduled Tasks through a Group Policy Object (GPO) to execute CaddyWiper at a predetermined time.” / “APT29 used scheduler and schtasks to create new tasks on remote host as part of their lateral movement… updating an existing legitimate task to execute their tools and then returned the scheduled task to its original configuration.”
[QUADAGENT](https://attack.mitre.org/software/S0269) creates a scheduled task to maintain persistence on the victim’s machine.(Citation: Unit 42 QUADAGENT July 2018)
[QUADAGENT](https://attack.mitre.org/software/S0269) modifies an HKCU Registry key to store a session identifier unique to the compromised system as well as a pre-shared key used for encrypting and decrypting C2 communications.(Citation: Unit 42 QUADAGENT July 2018)
“Sandworm Team leveraged Scheduled Tasks through a Group Policy Object (GPO) to execute CaddyWiper at a predetermined time.” / “APT29 used scheduler and schtasks to create new tasks on remote host as part of their lateral movement… updating an existing legitimate task to execute their tools and then returned the scheduled task to its original configuration.”
[QUADAGENT](https://attack.mitre.org/software/S0269) creates a scheduled task to maintain persistence on the victim’s machine.(Citation: Unit 42 QUADAGENT July 2018)
"The two encoding methods used by these tools... base16 and base64"; "...custom base64 encoder to strip out non-alphanumeric characters"; "...encoding mechanism... splits each hexadecimal byte into two nibbles..."
[QUADAGENT](https://attack.mitre.org/software/S0269) was likely obfuscated using `Invoke-Obfuscation`.(Citation: Unit 42 QUADAGENT July 2018)(Citation: GitHub Invoke-Obfuscation)
[QUADAGENT](https://attack.mitre.org/software/S0269) stores a session identifier unique to the compromised system as well as a pre-shared key used for encrypting and decrypting C2 communications within a Registry key (such as `HKCU\Office365DCOMCheck`) in the `HKCU` hive.(Citation: Unit 42 QUADAGENT July 2018)
actors used the following command to rename one of their tools to a benign file name: ren "%temp%\upload" audiodg.exe ... APT1 ... used ... AcroRD32.exe ... as a name for malware ... APT28 ... changed extensions on files containing exfiltrated data to make them appear benign ... APT32 has renamed a NetCat binary to kb-10233.exe to masquerade as a Windows update.
[QUADAGENT](https://attack.mitre.org/software/S0269) used the PowerShell filenames <code>Office365DCOMCheck.ps1</code> and <code>SystemDiskClean.ps1</code>.(Citation: Unit 42 QUADAGENT July 2018)
Many examples describe post-intrusion cleanup, anti-forensics, and removal of artifacts such as logs, scripts, malware components, scheduled tasks, registry keys, and temporary files.
[QUADAGENT](https://attack.mitre.org/software/S0269) has a command to delete its Registry key and scheduled task.(Citation: Unit 42 QUADAGENT July 2018)
QUADAGENT has a command to delete its Registry key and scheduled task. Silence has deleted artifacts, including scheduled tasks.
Cherry Picker delete files and registry keys created by the malware. GoldenSpy's uninstaller can delete registry entries, files and folders, and finally itself once these tasks have been completed. QUADAGENT has a command to delete its Registry key.
[QUADAGENT](https://attack.mitre.org/software/S0269) uses AES and a preshared key to decrypt the custom Base64 routine used to encode strings and scripts.(Citation: Unit 42 QUADAGENT July 2018)
[QUADAGENT](https://attack.mitre.org/software/S0269) modifies an HKCU Registry key to store a session identifier unique to the compromised system as well as a pre-shared key used for encrypting and decrypting C2 communications.(Citation: Unit 42 QUADAGENT July 2018)
[QUADAGENT](https://attack.mitre.org/software/S0269) checks if a value exists within a Registry key in the HKCU hive whose name is the same as the scheduled task it has created.(Citation: Unit 42 QUADAGENT July 2018)
[QUADAGENT](https://attack.mitre.org/software/S0269) gathers the current domain the victim system belongs to.(Citation: Unit 42 QUADAGENT July 2018)
[QUADAGENT](https://attack.mitre.org/software/S0269) gathers the victim username.(Citation: Unit 42 QUADAGENT July 2018)
"ALMA... gathering the user name and windows product key"; "...dot variant also gathers the computer name and the serial number of '\\.\PhysicalDrive'"; "...send system specific data... <domain>\<username>:pass"
[QUADAGENT](https://attack.mitre.org/software/S0269) uses multiple protocols (HTTPS, HTTP, DNS) for its C2 server as fallback channels if communication with one is unsuccessful.(Citation: Unit 42 QUADAGENT July 2018)
[QUADAGENT](https://attack.mitre.org/software/S0269) uses HTTPS and HTTP for C2 communications.(Citation: Unit 42 QUADAGENT July 2018)
[QUADAGENT](https://attack.mitre.org/software/S0269) uses DNS for C2 communications.(Citation: Unit 42 QUADAGENT July 2018)
"...downloaded data to save to the batch script"; "...download files provided by the C2 server"; "...download a new PowerShell and/or VBScript script from the C2"; "...download a PowerShell script that it will replace itself with"
ADVSTORESHELL C2 traffic is encrypted, then encoded with Base64 encoding. APT19 HTTP malware variant used Base64 to encode communications to the C2 server. APT33 has used base64 to encode command and control traffic.
[QUADAGENT](https://attack.mitre.org/software/S0269) encodes C2 communications with base64.(Citation: Unit 42 QUADAGENT July 2018)
"...upload the results to the C2 via the DNS tunnel"; "...exfiltrate the contents of each file in this folder"; "...upload its contents to the C2 server"; "...transmitting data to the C2 in the queried subdomains"
ComRAT has modified Registry values to store encrypted orchestrator code and payloads ... QakBot can modify the Registry to store its configuration information ... Volgmer modifies the Registry to store an encoded configuration file ...
33 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
57 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.