Skip to content

Attack encyclopedia

OilRig (APT34) - Iran's cyber espionage arm in the energy sector

OilRig/APT34 (G0049) - profile of the Iranian APT group targeting the Middle Eastern energy sector. DNS tunneling, credential harvesting, MITRE ATT&CK techniques.

Józef SulwińskiJózef Sulwiński

Published 7 min read

OilRigAPT34G0049Helix KittenIranDNS tunnelingenergy sectorAPTMITRE ATT&CK
OilRig (APT34) - Iran's cyber espionage arm in the energy sector
Contents
  1. Origins - from 2014 to the present
  2. Spearphishing - the entry point
  3. DNS tunneling - the hidden communication channel
  4. Credential harvesting - collecting passwords at industrial scale
  5. Tool leak - 2019
  6. Supply chain attacks
  7. MITRE ATT&CK techniques
  8. Why OilRig matters for the energy sector
  9. Summary
  10. Sources

On the list of Iranian cyber espionage groups, one designation appears more frequently than any other. OilRig - also known as APT34, Helix Kitten, Hazel Sandstorm, COBALT GYPSY, Evasive Serpens, Earth Simnavaz, Crambus, and at least five other aliases - is the longest-running and best-documented Iranian threat group, whose operations for over a decade have focused on a single objective: collecting intelligence from the energy, government, and telecommunications sectors across the Middle East.

MITRE ATT&CK catalogs OilRig under the designation G0049. The number of techniques attributed to this group - from spearphishing, through DNS tunneling, to the abuse of Microsoft 365 services - paints a picture of an actor that does not rely on sophisticated exploits but instead systematically and patiently exploits human errors and configuration gaps.

Origins - from 2014 to the present

The earliest traces of OilRig activity date back to 2014. Researchers from Mandiant (then FireEye) and Palo Alto Networks Unit 42 independently identified spearphishing campaigns targeting financial and government organizations in Saudi Arabia, the United Arab Emirates, Qatar, Kuwait, and Bahrain.

Attribution to Iran rests on several independent indicators: the use of Iranian network infrastructure, references to Iranian names and conventions in tool code, operator activity hours consistent with the Tehran time zone, and - above all - a target profile that aligns almost perfectly with the intelligence priorities of the Islamic Republic of Iran.

For over a decade, OilRig has consistently attacked organizations in countries that are strategic rivals or partners of Iran in the Persian Gulf region. The energy sector - oil, gas, petrochemicals - forms the backbone of these nations’ economies and, simultaneously, the core of OilRig’s interests.

Spearphishing - the entry point

Almost every documented OilRig operation begins the same way: with an email.

The group specializes in high-quality spearphishing - carefully crafted messages tailored to a specific recipient. Attachments are typically Microsoft Office documents with embedded macros or HTA (HTML Application) files that, once opened, execute code to download subsequent attack stages.

What sets OilRig apart from other groups is patience. Before sending a phishing message, they conduct reconnaissance - identifying key employees, their roles, professional relationships, and social media activity. The message is not a generic “please open the attachment.” It is tailored to the recipient’s work context - referencing a conference they attended, a project they are working on, or a colleague who supposedly sent it.

DNS tunneling - the hidden communication channel

The technique that has become OilRig’s signature is DNS tunneling - using the DNS protocol as a communication channel between malware on an infected host and the attackers’ C2 (Command and Control) server.

How does it work? Every organization must allow DNS traffic - without it, websites, email, and cloud services stop functioning. OilRig exploits this fact by encoding data inside DNS queries. An infected host sends a query for a domain like “abc123.evil-domain.com,” where “abc123” is an encrypted fragment of stolen data. The DNS server controlled by the attackers receives these queries and reassembles the data.

From the perspective of firewalls and security systems, this looks like normal DNS traffic. Without dedicated DNS traffic analysis - including inspection of query contents, detection of unusually long domain names, and analysis of query frequency and patterns - DNS tunneling is practically invisible.

OilRig developed this technique to a level where their DNS backdoors became the primary channel for data exfiltration and remote control. Tools such as DNSpionage, ALMA Communicator, and Karkoff use DNS as their sole or primary C2 channel.

Credential harvesting - collecting passwords at industrial scale

The second technique that defines OilRig is systematic credential harvesting. The group uses the following methods:

  • Fake login pages. OilRig creates faithful replicas of target organizations’ login portals - email systems, VPNs, web applications. Links to these pages are distributed via spearphishing.

  • Mimikatz and derivative tools. After gaining network access, the group uses Mimikatz and custom tools to extract credentials from operating system memory, SAM databases, and Active Directory.

  • Keyloggers. OilRig has deployed custom keyloggers that record every keystroke on infected workstations.

  • Microsoft 365 abuse. In more recent campaigns, the group exploited OAuth tokens and Exchange Web Services to gain access to mailboxes without needing the user’s password.

Stolen credentials serve two purposes: further privilege escalation within the compromised organization and attacks on affiliated organizations (supply chain). OilRig has repeatedly leveraged access to one organization as an entry point to its suppliers, contractors, and partners.

Tool leak - 2019

In March 2019, an account called “Lab Dookhtegan” appeared on Telegram and began publishing OilRig’s internal tools - backdoor source code, victim data, C2 infrastructure, and the identities of alleged group operators. The leak included tools such as Glimpse (a DNS backdoor), PoisonFrog (a DNSpionage variant), and HyperShell (a webshell).

This was an unprecedented event. Someone - likely motivated by internal disputes within Iran’s intelligence apparatus - publicly exposed the arsenal of one of Iran’s most important cyber espionage groups.

Paradoxically, the leak did not end OilRig’s operations. The group rebuilt its arsenal and resumed operations with new tools, confirming the principle that exposing tools slows but does not eliminate a well-organized APT group.

Supply chain attacks

OilRig does not limit itself to direct attacks on final targets. The group employs a supply chain strategy - compromising IT providers, telecommunications companies, and managed service providers (MSPs), then using their infrastructure as an attack vector against those providers’ customers.

This tactic is particularly dangerous in the energy sector, where critical infrastructure operators frequently rely on external providers of SCADA systems, integrators, and service companies. Compromising an OT systems integrator grants potential access to dozens of industrial facilities.

MITRE ATT&CK techniques

The full list of OilRig techniques in MITRE ATT&CK contains several dozen entries. Key ones include:

Technique ID Context
Spearphishing Attachment T1566.001 Primary entry vector - Office documents with macros
Application Layer Protocol: DNS T1071.004 DNS tunneling as a C2 and exfiltration channel
OS Credential Dumping T1003 Mimikatz, LaZagne, custom tools
Valid Accounts T1078 Use of stolen credentials
Supply Chain Compromise T1195 Attacks via IT and telecommunications providers
Exfiltration Over Alternative Protocol T1048 Data exfiltration via DNS

More on how to use the MITRE ATT&CK framework for threat analysis and building defenses in our guide to MITRE ATT&CK.

Why OilRig matters for the energy sector

OilRig is not a group that attacks opportunistically. It is an actor that has been systematically and patiently collecting intelligence from the Middle Eastern energy sector for over a decade. Their operations include:

  • industrial espionage (geological data, contracts, pricing strategies),
  • political espionage (diplomatic communications, regulatory plans),
  • terrain preparation for future destructive operations (mapping OT networks, identifying critical systems).

For energy infrastructure operators - including those in Europe, where Iranian APT groups are expanding their operations - OilRig should be treated as a persistent threat, not an incident.

Summary

OilRig/APT34 is the quintessence of Iranian cyber espionage: patient, methodical, focused on credential harvesting and concealing communications within DNS traffic. The group does not need zero-day exploits - its strength lies in understanding how people work, what mistakes they make, and how to exploit those mistakes systematically.

For security teams, the key takeaways are: monitor DNS traffic for tunneling, deploy MFA on all internet-facing services, analyze login logs for anomalies, and treat every provider with access to your network as a potential attack vector.

Sources

  1. OilRig, Group G0049 - MITRE ATT&CK
  2. OilRig (G0049 / APT34): TTPs, Malware & Detection Strategies - Security Scientist
  3. Dark Web Profile: OilRig (APT34) - SOCRadar
  4. OilRig Exposed: Unveiling the Tools and Techniques of APT34 - Picus Security
  5. APT34: The Evolution of Iran's Cyber Espionage Tactics - NoorStream
  6. Leak Exposes OilRig APT Group's Tools - BankInfoSecurity

Need help in this area?

Our experts will help you assess the risk and plan next steps.

Talk to an expert

We'll discuss scope, methodology, and timeline.

Book a call