Flame
- Type
- Spyware
- Capabilities
- ExfiltrationPersistenceLateral movementDefense evasionReconnaissanceProcess injectionSpoofing
- Delivery
- USBFake update
- Platforms
- Windows
Flame, also known as Flamer and sKyWIper, is a sophisticated Windows cyberespionage platform discovered in 2012 after remaining undetected for years. Its surveillance and information-stealing capabilities include collecting documents, metadata, images, GPS coordinates, and technical CAD drawings. It can capture screenshots when selected applications are open and transmit them to command-and-control infrastructure. It also identifies installed security software.
Flame supports propagation through USB drives by exploiting the Windows shortcut vulnerability CVE-2010-2568 and lateral movement through the Windows Print Spooler vulnerability CVE-2010-2729, addressed by MS10-061. It has also spread by intercepting Windows Update traffic and delivering malicious updates authenticated with a forged code-signing certificate. USB-based transfer mechanisms enable information collection from air-gapped Windows environments.
Persistence mechanisms include Windows authentication packages and, when sufficient privileges are available, creation of backdoor local accounts on domain-connected systems. Flame uses module overwriting to execute malicious code within another process while reducing conspicuous memory artifacts, and it can execute through the trusted Windows Rundll32 utility. Its operational focus is covert intelligence collection rather than financial crime or destructive activity.
Associated vulnerabilities
2 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Associated threat actors
2 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
Flame (a.k.a Flamer or sKyWIper) was the object of extensive research and fascination by the security community circa 2011.
Three years ago, on May 28th 2012, we announced the discovery of a malware known as Flame. At the same time we published our FAQ, CrySyS Lab posted their thorough analysis of sKyWIper. A few days earlier, Maher CERT published IOCs for Flamer. In short, Flame, sKyWIper and Flamer are different names for the same threat.
Techniques & procedures
70 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
1 technique
Resource Development
The discoveries of the Stuxnet virus – and then the Duqu and Flame viruses – herald a new era of highly complex weaponised software made by powerful states to attack weaker states.
Initial Access
2 techniques
Initial Access
Frog Infect machines using pre-defined user accounts. The only user account specified in the configuration resource is “HelpAssistant” that is created by the “Limbo” attack.
[Flame](https://attack.mitre.org/software/S0143) contains modules to infect USB sticks and spread laterally to other Windows systems the stick is plugged into using Autorun functionality.(Citation: Kaspersky Flame)
Execution
5 techniques
Execution
var s = GetObject("winmgmts:root\\cimv2");var oProcs = s.ExecQuery("SELECT * FROM Win32_Process ..."); s.Delete("__EventFilter.Name='FilterForClassCreation'");
The code could activate computer microphones and cameras, log keyboard strokes, take screen shots, extract geolocation data from images, and send and receive commands and data through Bluetooth wireless technology.
var objFileSystem = new ActiveXObject("Scripting.FileSystemObject");var s = GetObject("winmgmts:root\\cimv2");
Malicious LNK files are usually used as the exploit to trigger a vulnerability in old components of Windows, such as the Windows Shell, that allow the malware to get remote code execution with no user action required other than viewing the LNK file in Windows Explorer.
Flame... was the first known attack to trick users in this way by hijacking the Microsoft Windows updating tool on machines to infect computers
Persistence
6 techniques
Persistence
Frog Infect machines using pre-defined user accounts. The only user account specified in the configuration resource is “HelpAssistant” that is created by the “Limbo” attack.
Limbo Creates backdoor accounts with login “HelpAssistant” on the machines within the network domain if appropriate rights are available.
[Flame](https://attack.mitre.org/software/S0143) can create backdoor accounts with login “HelpAssistant” on domain connected systems if appropriate rights are available.(Citation: Kaspersky Flame)(Citation: Kaspersky Flame Functionality)
The malware can be started using two different methods: 1. Set msgsecmgr.ocx in the registry ... At startup, mssecmgr.ocx is loaded as LSA Authentication Package.
[Flame](https://attack.mitre.org/software/S0143) can use Windows Authentication Packages for persistence.(Citation: Crysys Skywiper)
Euphoria Create a “junction point” directory with “desktop.ini” and “target.lnk” ... The directory acts as a shortcut for launching Flame.
Privilege Escalation
8 techniques
Privilege Escalation
There are multiple injections of code during startup... the code injection mechanism is stealthier such that the presence of the code injection cannot be determined by conventional methods... these regions must have been allocated dynamically by means of VirtualAllocEx() or WriteProcessMemory().
DLL injection to system processes ... In case of sKyWIper, the code injection mechanism is stealthier ... inserted code belongs to shell32.dll.
The 2009 Stuxnet was built to replicate using an exploit from Flame. This indicates the two were indeed connected.
Frog Infect machines using pre-defined user accounts. The only user account specified in the configuration resource is “HelpAssistant” that is created by the “Limbo” attack.
The script gathers credential information ... it cruises all the token objects to find the ones belong to the administrator or the Administrators, Domain Admins groups.
The malware can be started using two different methods: 1. Set msgsecmgr.ocx in the registry ... At startup, mssecmgr.ocx is loaded as LSA Authentication Package.
[Flame](https://attack.mitre.org/software/S0143) can use Windows Authentication Packages for persistence.(Citation: Crysys Skywiper)
Euphoria Create a “junction point” directory with “desktop.ini” and “target.lnk” ... The directory acts as a shortcut for launching Flame.
Stealth
14 techniques
Stealth
The extensions are chosen according to the detected anti-malware products... usually uses the .ocx extension... In case of McAfee McShield installed, the preferred extension is changed to .tmp
[Flame](https://attack.mitre.org/software/S0143) can create backdoor accounts with login `HelpAssistant` on domain connected systems if appropriate rights are available.(Citation: Kaspersky Flame)(Citation: Kaspersky Flame Functionality)
There are multiple injections of code during startup... the code injection mechanism is stealthier such that the presence of the code injection cannot be determined by conventional methods... these regions must have been allocated dynamically by means of VirtualAllocEx() or WriteProcessMemory().
DLL injection to system processes ... In case of sKyWIper, the code injection mechanism is stealthier ... inserted code belongs to shell32.dll.
In May 2012, the Flame operators issued a SUICIDE module to clean up active infections and burned down their remaining command-and-control infrastructure.
Self-kill logic inside ... SUICIDE.RESIDUAL_FILES ... %temp%\~a28.tmp ... %windir%\system32\commgr32.dll
Frog Infect machines using pre-defined user accounts. The only user account specified in the configuration resource is “HelpAssistant” that is created by the “Limbo” attack.
The script gathers credential information ... it cruises all the token objects to find the ones belong to the administrator or the Administrators, Domain Admins groups.
Rundll32.exe is used as a way of executing [Flame](https://attack.mitre.org/software/S0143) at the command-line.(Citation: Crysys Skywiper)
The authors took extra precautions to evade detection by security products... the extensions are chosen according to the detected anti-malware products.
So as to store payload and configuration information secretly Win32/Gapz implements hidden storage.
Files marked with hidden or system attribute
Information placed in hidden storage space, such as hidden virtual filesystems or at specific raw offsets
Flame... was the first known attack to trick users in this way by hijacking the Microsoft Windows updating tool on machines to infect computers
Defense Impairment
5 techniques
Defense Impairment
The attack involved the almost magical re-engineering of a certificate that could be used to sign Windows updates. The certificate relied on an MD5 signature, which the attackers managed to fake.
Flame malware used a collision attack to obtain a valid digital signature.
2005, two x.509 certificates sharing the same hash with different public keys are published... 2012, the Flame malware uses a forged Microsoft code-signing certificate with MD5 collision against a valid one.
The authors took extra precautions to evade detection by security products... the extensions are chosen according to the detected anti-malware products.
s.Delete("__EventFilter.Name='FilterForClassCreation'"); ... f = objFileSystem.GetFile("wbem\\mof\\good\\svchostevt.mof");f.Delete(true);
Credential Access
7 techniques
Credential Access
HKLM\SAM\SAM\Domains\Account\F ... Items the malware is interested in
Snack Listens on network interfaces, receives and saves NBNS packets in a log file.
It covers all major possibilities to gather intelligence, including keyboard, screen, microphone, storage devices, network, wifi, Bluetooth, USB and system processes.
HKLM\Security\Policy\PolSecretEncryptionKey ... HKIU\Software\Microsoft\office ... HKIU\Software\Adobe\Adobe Acrobat – surely interesting from propagation perspective.
CRUISE_CRED.lua The script gathers credential information from an already infected machine. More precisely, it cruises all the token objects to find the ones belong to the administrator or the Administrators, Domain Admins groups.
The script gathers credential information from an already infected machine. More precisely, it cruises all the token objects to find the ones belong to the administrator or the Administrators, Domain Admins groups.
2012, the Flame malware uses a forged Microsoft code-signing certificate with MD5 collision against a valid one.
Discovery
14 techniques
Discovery
The massive piece of malware secretly mapped and monitored Iran's computer networks, sending back a steady stream of intelligence to prepare for a cyberwarfare campaign.
Beetlejuice Bluetooth: enumerates devices around the infected machine. May turn itself into a “beacon”
clan_seclog.lua ... retrieves the corresponding username and ip information ... Account Name, User Name and IP address
Snack Listens on network interfaces, receives and saves NBNS packets in a log file.
Beetlejuice Bluetooth: enumerates devices around the infected machine... Snack Listens on network interfaces, receives and saves NBNS packets in a log file.
Event Id: 540 – Refers to successful network logon ... the log stores the User Name and Source Network Address as well.
Frameworks gather information such as computer name, username, domain name, list of running processes
Frameworks gather information such as computer name, username, domain name, list of running processes, listing of files in directories, drives and network shares, as well as network configuration information
They check for the existence of specific files, windows registry entries, and other signs ... For example, this script looks for the existence of an actual file “winver32.exe” in the very specific $docsandsettings\\$subkey\\Application Data\\winver32.exe path.
~DEB93D.tmp Encrypted file containing SQLite database of nmb lookups... contains samba nmb name resolution traffic log.
The authors took extra precautions to evade detection by security products... the extensions are chosen according to the detected anti-malware products.
Security Identifies programs that may be hazardous to Flame, i.e., anti-virus programs and firewalls.
[Flame](https://attack.mitre.org/software/S0143) identifies security software such as antivirus through the Security module.(Citation: Kaspersky Flame)(Citation: Kaspersky Flame Functionality)
The code could activate computer microphones and cameras, log keyboard strokes, take screen shots, extract geolocation data from images, and send and receive commands and data through Bluetooth wireless technology.
Lateral Movement
4 techniques
Lateral Movement
Transport: Replication method... that based on bad access permissions is a “Transport”. E.g. “NU” or “NUSystem” refers to “net use” way of propagation. obj.REMOTE_PATH_TEMPLATES = {temp = string.format("\\\\%s\\admin$\\temp", l_4_0.tgt)
[Flame](https://attack.mitre.org/software/S0143) contains modules to infect USB sticks and spread laterally to other Windows systems the stick is plugged into using Autorun functionality.(Citation: Kaspersky Flame)
[Flame](https://attack.mitre.org/software/S0143) can use MS10-061 to exploit a print spooler vulnerability in a remote system with a shared printer in order to move laterally.(Citation: Kaspersky Flame)(Citation: Kaspersky Flame Functionality)
If Flame had administrative rights on the domain controller, it created backdoor user accounts that would be used to copy itself to remote machines.
Collection
7 techniques
Collection
USBStealer, USBCulprit, Retro, USBThief, PlugX and Ramsay, for example, were clearly built to steal specific files.
It covers all major possibilities to gather intelligence, including keyboard, screen, microphone, storage devices, network, wifi, Bluetooth, USB and system processes.
collects information that is staged on the USB drive for exfiltration.
[Flame](https://attack.mitre.org/software/S0143) can take regular screenshots when certain applications are open that are sent to the command and control server.(Citation: Kaspersky Flame)
the creators of Flame are simply looking for any kind of intelligence - emails, documents, messages, discussions inside sensitive locations, pretty much everything
[Flame](https://attack.mitre.org/software/S0143) can record audio using any existing hardware recording devices.(Citation: Kaspersky Flame)(Citation: Kaspersky Flame Functionality)
...designed to gather vast amounts of sensitive information including but not limited to: documents, audio or video recordings...
Command and Control
6 techniques
Command and Control
· Establishment of secure connection with C&C servers through SSH and HTTPS protocols
Connected side: Contacted C&C servers via HTTP.
The routine downloads the file mssecmgr.ocx ... Further information shows that this is related to the windows update mechanism and the MUNCH attack
“Those controlling the virus can direct it from a distance,” Mr. Napelian said. “Flame is no ordinary product. This was designed to monitor selected computers.”
C&C servers are changed frequently by changing the IP address of the particular host/domain name (the well-known fluxing technique used by botnets).
connect(10.55.55.55,80,6); ... One method we are aware of is related to windows update and file downloading by some modules using SSL and some proprietary text based protocol.
Exfiltration
3 techniques
Exfiltration
[Flame](https://attack.mitre.org/software/S0143) has a module named BeetleJuice that contains Bluetooth functionality that may be used in different ways, including transmitting encoded information from the infected system over the Bluetooth protocol, acting as a Bluetooth beacon, and identifying other Bluetooth devices in the vicinity.(Citation: Symantec Beetlejuice)
When such a stick was connected to a machine infected by Flame connected to the Internet, the hidden information was taken off the stick and sent to its C&Cs.
used USB drives as the physical transmission medium to transfer information across air gaps.
Impact
2 techniques
Impact
Several attacks shared similar methods in that they specifically overwrote the master boot record (MBR) of computers hard drives, which then needed to be physically replaced in many cases.
In May 2012, the Flame operators issued a SUICIDE module to clean up active infections and burned down their remaining command-and-control infrastructure.
Observables
33 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
79 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.