Threats Feed|OilRig|Last Updated 29/04/2026|AuthorCertfa Radar|Publish Date16/11/2018

Uncovering OilRig’s Malware Testing Ops for Targeted Attacks in the Middle East

  • Actor Motivations: Espionage,Exfiltration
  • Attack Vectors: Backdoor,Malicious Macro,Spear Phishing
  • Attack Complexity: High
  • Threat Risk: High Impact/Low Probability

Threat Overview

Palo Alto Unit42 provides unique insight into OilRig's pre-attack operational tempo by reconstructing a 6-day testing timeline that preceded the August 26, 2018 BONDUPDATER attack on a Middle Eastern government. By analyzing 11 test Excel documents submitted to public VirusTotal-style scanning services between August 20–26, Unit42 mapped every iterative macro change the attacker made to lower AV detection rates — from 22 detections on the first submission down to 7 on the last, with a rebound to 38 on the final weaponized Word document (N56.15.doc). The test files were named XLS-withyourface.xls and sss.xls, with the C2 domain (withyourface[.]com) embedded directly in the early filenames, linking them conclusively to the BONDUPDATER attack. The tester averaged 33 seconds between file save and VirusTotal submission, conducted three testing waves, and pivoted from Excel to Word for the final delivery document. Key technical lessons the attacker applied: removing the "powershell.exe" string from VBScript lowered detections from 22 to 16; removing the wscript execution call dropped detections from 16 to 6; using vbHide (hidden window) flag caused 8 additional detections compared to vbNormalFocus (visible window); and hex-character concatenation obfuscation of "powershell", "cmd.exe", and "wscript" strings bypassed most detections. The final weaponized Word document was created less than 8 hours after the last test iteration and delivered via spearphishing 20 minutes after its creation, setting a precise operational tempo. OilRig also added a 10-second sleep using Application.Wait during some testing iterations as an anti-sandbox technique, though this was removed in the final payload.

Detected Targets

TypeDescriptionConfidence
SectorGovernment Agencies and Services
Verified
RegionMiddle East Countries
Verified

Extracted IOCs

  • withyourface[.]com
  • 056ffc13a7a2e944f7ab8c99ea9a2d1b429bbafa280eb2043678aa8b259999aa
  • 216ffed357b5fe4d71848c79f77716e9ecebdd010666cdb9edaadf7a8c9ec576
  • 364e2884251c151a29071a5975ca0076405a8cc2bab8da3e784491632ec07f56
  • 66d678b097a2245f60f3d95bb608f3958aa0f5f19ca7e5853f38ea79885b9633
  • 6719e80361950cdb10c4a4fcccc389c2a26eaab761c202870353fe65e8f954a3
  • 687027d966667780ab786635b0d4274b651f27d99717c5ba95e139e94ef114c3
  • 6f522b1be1f2b6642c292bb3fb57f523ebedeb04f0d18efa2a283e79f3689a9f
  • 70ff20f2e5c7fd90c6bfe92e28df585f711ee4090fc7669b3a9bd024c4e11702
  • 7cbad6b3f505a199d6766a86b41ed23786bbb99dab9cae6c18936afdc2512f00
  • 9b6ebc44e4452d8c53c21b0fdd8311bac10dc672309b67d7f214fbd2a08962ce
  • a5bec7573b743932329b794042f38571dd91731ae50757317bdaf9e820ec8d5e
download

Tip: 12 related IOCs (0 IP, 1 domain, 0 URL, 0 email, 11 file hash) to this threat have been found.

Overlaps

OilRigOilRig's Use of BONDUPDATER: A Stealthy Cyber Espionage Campaign on Bahrain

Source: Netscout - September 2019

Detection (one case): withyourface[.]com

OilRigAnalyzing OilRig's Use of DNS Tunneling in Cyber Espionage Campaigns

Source: Palo Alto Network - April 2019

Detection (two cases): 7cbad6b3f505a199d6766a86b41ed23786bbb99dab9cae6c18936afdc2512f00, withyourface[.]com

OilRigOilRig Continues Assault on Middle Eastern Governments and Businesses with BONDUPDATER

Source: Palo Alto Network - September 2018

Detection (two cases): 7cbad6b3f505a199d6766a86b41ed23786bbb99dab9cae6c18936afdc2512f00, withyourface[.]com

Hint: Overlaps are extracted automatically by examining the IOCs associated with all indexed threats and actors.

FAQs

Frequently Asked Questions: OilRig's AV Evasion Testing Before the BONDUPDATER Attack

Palo Alto Unit42 documented OilRig's pre-attack testing process before their August 2018 BONDUPDATER attack on a Middle Eastern government. By finding 11 test documents that OilRig submitted to public antivirus scanning services in the days before the actual attack, researchers were able to map the entire 6-day preparation period — watching the attacker methodically reduce AV detections from 22 to 7 through iterative macro changes before finally launching the spearphishing attack 20 minutes after creating the final document.

The testing and the subsequent attack are attributed to OilRig, also known as APT34 — an Iranian state-linked cyberespionage group. Unit42 links the test files to OilRig based on the C2 domain (withyourface[.]com) embedded in the test filenames, the identical BONDUPDATER payload found in cached data inside the first test file, and the same hex-char string obfuscation technique seen across test files and the weaponized delivery document.

The testing phase wasn't itself an attack — it was preparation for one. OilRig's goal was to develop a spearphishing document that would bypass antivirus detection, then use it to deploy the BONDUPDATER backdoor on a Middle Eastern government machine. BONDUPDATER gives operators persistent remote access for espionage: command execution, file collection, and data exfiltration over DNS. The testing phase was the quality assurance step that made the final attack more likely to succeed undetected.

The testing spanned 6 days across three waves: August 20, 21, and 26, 2018. The attacker created 11 test documents and submitted each to public AV scanning services with an average of just 33 seconds between saving a file and uploading it — a remarkably fast feedback loop suggesting an organized, operator-driven process rather than automated generation. The final attack followed within 8 hours of the last test completion and was delivered to the target within 20 minutes of the weaponized document being created.

The target was a Middle Eastern government organization — the same nation state targeted by OilRig's concurrent QUADAGENT campaign in July–August 2018, though a different agency. Unit42 does not name the specific country. The consistent government sector targeting across multiple simultaneous campaigns in the same country suggests OilRig was conducting broad, coordinated espionage operations against multiple ministries rather than focusing on a single target.

OilRig systematically isolated which parts of their VBA macro triggered antivirus detections by making one targeted change per iteration, resubmitting, and measuring the result. Key findings: including "powershell.exe" as a string triggered detections; running a VBScript via wscript from the macro triggered others; using the vbHide flag to hide the execution window added 8 extra detections compared to vbNormalFocus; and generic Shell function calls were detected regardless of the command. The solution that worked: replacing sensitive strings like "powershell", "cmd.exe", and "wscript" with character-by-character hex concatenation (Chr(CLng("&H70"))&...) — a technique that was then applied in the final weaponized Word document and the subsequent attack.

This report is unusual because it documents an attack before it happened from a defender's perspective — the test files were publicly visible on AV scanning services days before the actual spearphishing email was sent. This raises a practical defensive opportunity: organizations can monitor public AV scanning services for submissions of documents containing their own internal terminology, branding, or domain names. OilRig's practice of naming test files with the C2 domain (withyourface[.]com) made the link to the eventual attack obvious in retrospect. Tracking such submissions in near real time could theoretically provide advance warning of an impending targeted attack.

Alert on VBA macros using hex-char concatenation for strings like "powershell", "cmd.exe", or "wscript" — specifically the Chr(CLng("&H..")) pattern — as this is OilRig's documented and preferred string obfuscation technique. Monitor for Office macros spawning wscript.exe with vbNormalFocus or vbHide flags. Hunt for AppPool.vbs, AppPool.ps1, and scheduled tasks linked to BONDUPDATER using the 11 SHA256 hashes in the IOC bundle. Block withyourface[.]com. Consider a proactive posture of monitoring public AV scanning platforms for documents containing your organization's name or domain — OilRig's testing documents were publicly visible for days before the attack, representing an early warning that defenders could act on.

About Affiliation
OilRig
OilRig is an Iranian MOIS-linked threat cluster active since at least 2014, considered one of Iran's most technically capable and consistently active espionage groups. The cluster targets government, energy, financial, and telecommunications organizations across the Middle East and beyond, using spear phishing, credential harvesting portals, DNS tunneling, and a large arsenal of custom backdoors including HELMINTH, BONDUPDATER, VEATY, and SPEARAL. OilRig is tracked as APT34 (Mandiant), Helix Kitten (CrowdStrike), Cobalt Gypsy (Secureworks), and Hazel Sandstorm (Microsoft) among other names.
View OilRig's Insights