Deobfuscate/Decode Files or Information
Adversaries may use Obfuscated Files or Information to hide artifacts of an intrusion from analysis. They may require separate mechanisms to decode or deobfuscate that information depending on how they intend to use it. Methods for doing that include built-in functionality of malware, Scripting, PowerShell, or by using utilities present on the system.
Another example is using the Windows
copy /b command to reassemble binary fragments into a malicious payload. 
|APT19||An APT19 HTTP malware variant decrypts strings using single-byte XOR keys. |
An APT28 macro uses the command
|Astaroth||Astaroth uses a fromCharCode() deobfuscation method to avoid explicitly writing execution commands and to hide its code. |
|AuditCred||AuditCred uses XOR and RC4 to perform decryption on the code functions. |
|Azorult||Azorult uses an XOR key to decrypt content and uses Base64 to decode the C2 address.  |
|Bankshot||Bankshot decodes embedded XOR strings. |
|BBSRAT||BBSRAT uses Expand to decompress a CAB file into executable content. |
|Bisonal||Bisonal decodes strings in the malware using XOR and RC4. |
|BRONZE BUTLER||BRONZE BUTLER downloads encoded payloads and decodes them on the victim. |
|Carbon||Carbon decrypts task and configuration files for execution. |
|Cardinal RAT||Cardinal RAT decodes many of its artifacts and is decrypted (AES-128) after being downloaded. |
|certutil||certutil has been used to decode binaries hidden inside certificate files as Base64 information. |
|CoinTicker||CoinTicker decodes the initially-downloaded hidden encoded file using OpenSSL. |
|Darkhotel||Darkhotel has decrypted strings and imports using RC4 during execution. |
|DDKONG||DDKONG decodes an embedded configuration using XOR. |
|Denis||Denis will decrypt important strings used for C&C communication. |
|Dyre||Dyre decrypts resources needed for targeting the victim. |
|Expand||Expand can be used to decompress a local or remote CAB file into an executable. |
|Final1stspy||Final1stspy uses Python code to deobfuscate base64-encoded strings. |
|FinFisher||FinFisher extracts and decrypts stage 3 malware, which is stored in encrypted resources.  |
|Gorgon Group||Gorgon Group malware can decode contents from a payload that was Base64 encoded and write the contents to a file. |
|HiddenWasp||HiddenWasp uses a cipher to implement a decoding function. |
|Honeybee||Honeybee drops a Word file containing a Base64-encoded file in it that is read, decoded, and dropped to the disk by the macro. |
|InvisiMole||InvisiMole can decrypt, unpack and load a DLL from its resources. |
ISMInjector uses the
|Kwampirs||Kwampirs decrypts and extracts a copy of its main DLL payload when executing. |
|LightNeuron||LightNeuron has used AES and XOR to decrypt configuration files and commands. |
menuPass has used certutil in a macro to decode base64-encoded content contained in a dropper document attached to an email. The group has also used
|MirageFox||MirageFox has a function for decrypting data containing C2 configuration information. |
|MuddyWater||MuddyWater decoded base64-encoded PowerShell commands using a VBS file.   |
|NOKKI||NOKKI uses a unique, custom de-obfuscation technique. |
|OilRig||A OilRig macro has run a PowerShell command to decode file contents. OilRig has also used certutil to decode base64-encoded files on victims.   |
|OopsIE||OopsIE concatenates then decompresses multiple resources to load an embedded .Net Framework assembly. |
|PlugX||PlugX decompresses and decrypts itself using the Microsoft API call RtlDecompressBuffer. |
|POWERSTATS||POWERSTATS can deobfuscate the main backdoor code. |
|Proton||Proton uses an encrypted file to store commands and configuration values. |
|PUNCHBUGGY||PUNCHBUGGY has used PowerShell to decode base64-encoded assembly. |
|QUADAGENT||QUADAGENT uses AES and a preshared key to decrypt the custom Base64 routine used to encode strings and scripts. |
|Remexi||Remexi decrypts the configuration data using XOR with 25-character keys. |
|RGDoor||RGDoor decodes Base64 strings and decrypts strings using a custom XOR algorithm. |
|RogueRobin||RogueRobin decodes an embedded executable using base64 and decompresses it. |
|Smoke Loader||Smoke Loader deobfuscates its code. |
|SQLRat||SQLRat has scripts that are responsible for deobfuscating additional scripts. |
|Starloader||Starloader decrypts and executes shellcode from a file called Stars.jps. |
|Threat Group-3390||During execution, Threat Group-3390 malware deobfuscates and decompresses code that was encoded with Metasploit’s shikata_ga_nai encoder as well as compressed with LZNT1 compression. |
|TrickBot||TrickBot decodes the configuration data and modules. |
|Tropic Trooper||Tropic Trooper used shellcode with an XOR algorithm to decrypt a payload. |
|Turla||Turla has used a custom decryption routine, which pulls key and salt values from other artifacts such as a WMI filter or PowerShell Profile, to decode encrypted PowerShell payloads. |
|TYPEFRAME||One TYPEFRAME variant decrypts an archive using an RC4 key, then decompresses and installs the decrypted malicious DLL module. Another variant decodes the embedded file by XORing it with the value "0x35". |
|Ursnif||Ursnif has used crypto key information stored in the Registry to decrypt Tor clients dropped to disk. |
|VERMIN||VERMIN decrypts code, strings, and commands to use once it's on the victim's machine. |
|Volgmer||Volgmer deobfuscates its strings and APIs once its executed. |
|WIRTE||WIRTE has decoded a base64 encoded document which was embedded in a VBS script. |
|Yahoyah||Yahoyah decrypts downloaded files before execution. |
|Zebrocy||Zebrocy decodes its secondary payload and writes it to the victim’s machine. Zebrocy also uses AES and XOR to decrypt strings and payloads.  |
|ZeroT||ZeroT shellcode decrypts and decompresses its RC4-encrypted payload. |
|Zeus Panda||Zeus Panda decrypts strings in the code during the execution process. |
This type of attack technique cannot be easily mitigated with preventive controls since it is based on the abuse of system features.
Detecting the action of deobfuscating or decoding files or information may be difficult depending on the implementation. If the functionality is contained within malware and uses the Windows API, then attempting to detect malicious behavior before or after the action may yield better results than attempting to perform analysis on loaded libraries or API calls. If scripts are used, then collecting the scripts for analysis may be necessary. Perform process and command-line monitoring to detect potentially malicious behavior related to scripts and system utilities such as certutil.
Monitor the execution file paths and command-line arguments for common archive file applications and extensions, such as those for Zip and RAR archive tools, and correlate with other suspicious behavior to reduce false positives from normal user and administrator behavior.
- Malwarebytes Labs. (2017, March 27). New targeted attack against Saudi Arabia Government. Retrieved July 3, 2017.
- Tedesco, B. (2016, September 23). Security Alert Summary. Retrieved February 12, 2018.
- Adair, S.. (2016, November 9). PowerDuke: Widespread Post-Election Spear Phishing Campaigns Targeting Think Tanks and NGOs. Retrieved January 11, 2017.
- Microsoft. (2017, October 15). Expand. Retrieved February 19, 2019.
- Hayashi, K., Ray, V. (2018, July 31). Bisonal Malware Used in Attacks Against Russia and South Korea. Retrieved August 7, 2018.
- ClearSky Cyber Security. (2018, November). MuddyWater Operations in Lebanon and Oman: Using an Israeli compromised domain for a two-stage campaign. Retrieved November 29, 2018.
- Grunzweig, J., Lee, B. (2018, September 27). New KONNI Malware attacking Eurasia and Southeast Asia. Retrieved November 5, 2018.
- Computer Incident Response Center Luxembourg. (2013, March 29). Analysis of a PlugX variant. Retrieved November 5, 2018.
- Grunzweig, J. (2018, October 01). NOKKI Almost Ties the Knot with DOGCALL: Reaper Group Uses New Malware to Deploy RAT. Retrieved November 5, 2018.
- Rosenberg, J. (2018, June 14). MirageFox: APT15 Resurfaces With New Tools Based On Old Ones. Retrieved September 21, 2018.
- Lee, B., Falcone, R. (2018, July 25). OilRig Targets Technology Service Provider and Government Agency with QUADAGENT. Retrieved August 9, 2018.
- Baker, B., Unterbrink H. (2018, July 03). Smoking Guns - Smoke Loader learned new tricks. Retrieved July 5, 2018.
- Hromcová, Z. (2018, June 07). InvisiMole: Surprisingly equipped spyware, undercover since 2013. Retrieved July 10, 2018.
- Falcone, R. (2018, January 25). OilRig uses RGDoor IIS Backdoor on Targets in the Middle East. Retrieved July 6, 2018.
- US-CERT. (2017, December 13). Malware Analysis Report (MAR) - 10135536-B. Retrieved July 17, 2018.
- Ash, B., et al. (2018, June 26). RANCOR: Targeted Attacks in South East Asia Using PLAINTEE and DDKONG Malware Families. Retrieved July 2, 2018.
- Symantec Security Response. (2017, November 7). Sowbug: Cyber espionage group targets South American and Southeast Asian governments. Retrieved November 16, 2017.
- FinFisher. (n.d.). Retrieved December 20, 2017.
- Allievi, A.,Flori, E. (2018, March 01). FinFisher exposed: A researcher’s tale of defeating traps, tricks, and complex virtual machines. Retrieved July 9, 2018.
- Symantec Security Response. (2015, June 23). Dyre: Emerging threat on financial fraud landscape. Retrieved August 23, 2018.
- Falcone, R. and Lee, B. (2017, October 9). OilRig Group Steps Up Attacks with New Delivery Documents and New Injector Trojan. Retrieved January 8, 2018.
- Symantec Security Response Attack Investigation Team. (2018, April 23). New Orangeworm attack group targets the healthcare sector in the U.S., Europe, and Asia. Retrieved May 8, 2018.
- Lancaster, T., Cortes, J. (2018, January 29). VERMIN: Quasar RAT and Custom Malware Used In Ukraine. Retrieved July 5, 2018.
- Reaves, J. (2016, October 15). TrickBot: We Missed you, Dyre. Retrieved August 2, 2018.
- Trend Micro. (2018, November 20). Lazarus Continues Heists, Mounts Attacks on Financial Organizations in Latin America. Retrieved December 3, 2018.
- ESET. (2017, March 30). Carbon Paper: Peering into Turla’s second stage backdoor. Retrieved November 7, 2018.
- Brumaghin, E., et al. (2017, November 02). Poisoning the Well: Banking Trojan Targets Google Search Results. Retrieved November 5, 2018.
- Yan, T., et al. (2018, November 21). New Wine in Old Bottle: New Azorult Variant Found in FindMyName Campaign using Fallout Exploit Kit. Retrieved November 29, 2018.
- Proofpoint. (2018, July 30). New version of AZORult stealer improves loading features, spreads alongside ransomware in new campaign. Retrieved November 29, 2018.
- Lee, B., Falcone, R. (2018, February 23). OopsIE! OilRig Uses ThreeDollars to Deliver New Trojan. Retrieved July 16, 2018.
- Huss, D., et al. (2017, February 2). Oops, they did it again: APT Targets Russia and Belarus with ZeroT and PlugX. Retrieved April 5, 2018.
- US-CERT. (2017, November 01). Malware Analysis Report (MAR) - 10135536-D. Retrieved July 16, 2018.
- Falcone, R., Lee, B. (2018, November 20). Sofacy Continues Global Attacks and Wheels Out New ‘Cannon’ Trojan. Retrieved November 26, 2018.
- ESET. (2018, November 20). Sednit: What’s going on with Zebrocy?. Retrieved February 12, 2019.
- US-CERT. (2018, June 14). MAR-10135536-12 – North Korean Trojan: TYPEFRAME. Retrieved July 13, 2018.
- Patrick Wardle. (n.d.). Mac Malware of 2017. Retrieved September 21, 2018.
- Grunzweig, J.. (2017, April 20). Cardinal RAT Active for Over Two Years. Retrieved December 8, 2018.
- Dahan, A. (2017). Operation Cobalt Kitty. Retrieved December 27, 2018.
- Lee, B. Grunzweig, J. (2015, December 22). BBSRAT Attacks Targeting Russian Organizations Linked to Roaming Tiger. Retrieved August 19, 2016.
- Salem, E. (2019, February 13). ASTAROTH MALWARE USES LEGITIMATE OS AND ANTIVIRUS PROCESSES TO STEAL PASSWORDS AND PERSONAL DATA. Retrieved April 17, 2019.
- Legezo, D. (2019, January 30). Chafer used Remexi malware to spy on Iran-based foreign diplomatic entities. Retrieved April 17, 2019.
- Lee, B., Falcone, R. (2019, January 18). DarkHydrus delivers new Trojan that can use Google Drive for C2 communications. Retrieved April 17, 2019.
- Thomas Reed. (2018, October 29). Mac cryptocurrency ticker app installs backdoors. Retrieved April 23, 2019.
- Proofpoint Staff. (2016, August 25). Nightmare on Tor Street: Ursnif variant Dreambot adds Tor functionality. Retrieved June 5, 2019.
- Gorelik, M.. (2019, June 10). SECURITY ALERT: FIN8 IS BACK IN BUSINESS, TARGETING THE HOSPITALITY INDUSTRY. Retrieved June 13, 2019.
- Alintanahin, K. (2015). Operation Tropic Trooper: Relying on Tried-and-Tested Flaws to Infiltrate Secret Keepers. Retrieved June 14, 2019.
- Platt, J. and Reeves, J.. (2019, March). FIN7 Revisited: Inside Astra Panel and SQLRat Malware. Retrieved June 18, 2019.
- Sanmillan, I. (2019, May 29). HiddenWasp Malware Stings Targeted Linux Systems. Retrieved June 24, 2019.
- Faou, M. (2019, May). Turla LightNeuron: One email away from remote code execution. Retrieved June 24, 2019.
- Sardiwal, M, et al. (2017, December 7). New Targeted Attack in the Middle East by APT34, a Suspected Iranian Threat Group, Using CVE-2017-11882 Exploit. Retrieved December 20, 2017.
- Axel F, Pierre T. (2017, October 16). Leviathan: Espionage actor spearphishes maritime and defense targets. Retrieved February 15, 2018.
- Ray, V. (2016, November 22). Tropic Trooper Targets Taiwanese Government and Fossil Fuel Provider With Poison Ivy. Retrieved November 9, 2018.
- Counter Threat Unit Research Team. (2017, October 12). BRONZE BUTLER Targets Japanese Enterprises. Retrieved January 4, 2018.
- Sherstobitoff, R. (2018, March 02). McAfee Uncovers Operation Honeybee, a Malicious Document Campaign Targeting Humanitarian Aid Groups. Retrieved May 16, 2018.
- Singh, S. et al.. (2018, March 13). Iranian Threat Group Updates Tactics, Techniques and Procedures in Spear Phishing Campaign. Retrieved April 11, 2018.
- Villanueva, M., Co, M. (2018, June 14). Another Potential MuddyWater Campaign uses Powershell-based PRB-Backdoor. Retrieved July 3, 2018.
- Accenture Security. (2018, April 23). Hogfish Redleaves Campaign. Retrieved July 2, 2018.
- Matsuda, A., Muhammad I. (2018, September 13). APT10 Targeting Japanese Corporations Using Updated TTPs. Retrieved September 17, 2018.
- Falcone, R., et al. (2018, August 02). The Gorgon Group: Slithering Between Nation State and Cybercrime. Retrieved August 7, 2018.
- Legezo, D. (2018, June 13). LuckyMouse hits national data center to organize country-level waterholing campaign. Retrieved August 18, 2018.
- Kaspersky Lab's Global Research & Analysis Team. (2015, August 10). Darkhotel's attacks in 2015. Retrieved November 2, 2018.
- Grunzweig, J., Lee, B. (2016, January 22). New Attacks Linked to C0d0so0 Group. Retrieved August 2, 2018.
- Lee, B, et al. (2018, February 28). Sofacy Attacks Multiple Government Entities. Retrieved March 15, 2018.
- Lee, B., Falcone, R. (2018, June 06). Sofacy Group’s Parallel Attacks. Retrieved June 18, 2018.
- S2 Grupo. (2019, April 2). WIRTE Group attacking the Middle East. Retrieved May 24, 2019.
- Faou, M. and Dumont R.. (2019, May 29). A dive into Turla PowerShell usage. Retrieved June 14, 2019.