[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

System Binary Proxy Execution: Regsvr32

Adversaries may abuse Regsvr32.exe to proxy execution of malicious code. Regsvr32.exe is a command-line program used to register and unregister object linking and embedding controls, including dynamic link libraries (DLLs), on Windows systems. The Regsvr32.exe binary may also be signed by Microsoft. [1]

Malicious usage of Regsvr32.exe may avoid triggering security tools that may not monitor execution of, and modules loaded by, the regsvr32.exe process because of allowlists or false positives from Windows using regsvr32.exe for normal operations. Regsvr32.exe can also be used to specifically bypass application control using functionality to load COM scriptlets to execute DLLs under user permissions. Since Regsvr32.exe is network and proxy aware, the scripts can be loaded by passing a uniform resource locator (URL) to file on an external Web server as an argument during invocation. This method makes no changes to the Registry as the COM object is not actually registered, only executed. [2] This variation of the technique is often referred to as a "Squiblydoo" and has been used in campaigns targeting governments. [3] [4]

Regsvr32.exe can also be leveraged to register a COM Object used to establish persistence via Component Object Model Hijacking. [3]

ID: T1218.010
Sub-technique of:  T1218
Tactic: Defense Evasion
Platforms: Windows
Defense Bypassed: Anti-virus, Application control, Digital Certificate Validation
Contributors: Casey Smith
Version: 2.1
Created: 23 January 2020
Last Modified: 21 April 2023

Procedure Examples

ID Name Description
S0622 AppleSeed

AppleSeed can call regsvr32.exe for execution.[5]

G0073 APT19

APT19 used Regsvr32 to bypass application control techniques.[6]

G0050 APT32

APT32 created a Scheduled Task/Job that used regsvr32.exe to execute a COM scriptlet that dynamically downloaded a backdoor and injected it into memory. The group has also used regsvr32 to run their backdoor.[7][8][9]

S0373 Astaroth

Astaroth can be loaded through regsvr32.exe.[10]

G0108 Blue Mockingbird

Blue Mockingbird has executed custom-compiled XMRIG miner DLLs using regsvr32.exe.[11]

C0015 C0015

During C0015, the threat actors employed code that used regsvr32 for execution.[12]

G0080 Cobalt Group

Cobalt Group has used regsvr32.exe to execute scripts.[13][14][15]

S1155 Covenant

Covenant can create SCT files for installation via Regsvr32 to deploy new Grunt listeners.[16]

G0009 Deep Panda

Deep Panda has used regsvr32.exe to execute a server variant of Derusbi in victim networks.[17]

S0021 Derusbi

Derusbi variants have been seen that use Registry persistence to proxy execution through regsvr32.exe.[18]

S0384 Dridex

Dridex can use regsvr32.exe to initiate malicious code.[19]

S0554 Egregor

Egregor has used regsvr32.exe to execute malicious DLLs.[20]

S0367 Emotet

Emotet uses RegSvr32 to execute the DLL payload.[21]

S0568 EVILNUM

EVILNUM can run a remote scriptlet that drops a file and executes it via regsvr32.exe.[22]

S0698 HermeticWizard

HermeticWizard has used regsvr32.exe /s /i to execute malicious payloads.[23]

S0087 Hi-Zor

Hi-Zor executes using regsvr32.exe called from the Registry Run Keys / Startup Folder persistence mechanism.[24]

G0100 Inception

Inception has ensured persistence at system boot by setting the value regsvr32 %path%\ctfmonrn.dll /s.[25]

G0094 Kimsuky

Kimsuky has executed malware with regsvr32s.[26]

S0250 Koadic

Koadic can use Regsvr32 to execute additional payloads.[27]

G0065 Leviathan

Leviathan has used regsvr32 for execution.[28]

S0284 More_eggs

More_eggs has used regsvr32.exe to execute the malicious DLL.[29]

S1047 Mori

Mori can use regsvr32.exe for DLL execution.[30]

C0022 Operation Dream Job

During Operation Dream Job, Lazarus Group used regsvr32 to execute malware.[31]

S0229 Orz

Some Orz versions have an embedded DLL known as MockDll that uses Process Hollowing and regsvr32 to execute another payload.[28]

S0650 QakBot

QakBot can use Regsvr32 to execute malicious DLLs.[32][33][34][35][36][37]

S0481 Ragnar Locker

Ragnar Locker has used regsvr32.exe to execute components of VirtualBox.[38]

S1130 Raspberry Robin

Raspberry Robin uses regsvr32.exe execution without any command line parameters for command and control requests to IP addresses associated with Tor nodes.[39]

S0270 RogueRobin

RogueRobin uses regsvr32.exe to run a .sct file for execution.[40]

S1018 Saint Bot

Saint Bot has used regsvr32 to execute scripts.[41][42]

S1030 Squirrelwaffle

Squirrelwaffle has been executed using regsvr32.exe.[43]

G0127 TA551

TA551 has used regsvr32.exe to load malicious DLLs.[44]

S0476 Valak

Valak has used regsvr32.exe to launch malicious DLLs.[45][44]

G0090 WIRTE

WIRTE has used regsvr32.exe to trigger the execution of a malicious script.[46]

S0341 Xbash

Xbash can use regsvr32 for executing scripts.[47]

Mitigations

ID Mitigation Description
M1050 Exploit Protection

Microsoft's Enhanced Mitigation Experience Toolkit (EMET) Attack Surface Reduction (ASR) feature can be used to block regsvr32.exe from being used to bypass application control. [48] Identify and block potentially malicious software executed through regsvr32 functionality by using application control [49] tools, like Windows Defender Application Control[50], AppLocker, [51] [52] or Software Restriction Policies [53] where appropriate. [54]

Detection

ID Data Source Data Component Detects
DS0017 Command Command Execution

Command arguments used before and after the regsvr32.exe invocation may also be useful in determining the origin and purpose of the script or DLL being loaded. [3]

DS0011 Module Module Load

Monitor DLL/PE file events, specifically creation of these binary files as well as the loading of DLLs into processes. Look for DLLs that are not recognized or not normally loaded into a process.

Note: This looks for unsigned images that may be loaded by regsvr32, while attempting to eliminate false positives stemming from Windows/Program Files binaries.

Analytic 5 - Loading Unsigned Images

(sourcetype=WinEventLog:Microsoft-Windows-Sysmon/Operational EventCode="7") (Image="C:\Windows\System32\regsvr32.exe" OR Image="C:\Windows\SysWOW64\regsvr32.exe") Signed=false ImageLoaded!="C:\Program Files" ImageLoaded!="C:\Windows\"|stats values(ComputerName) as "Computer Name" count(ImageLoaded) as ImageLoadedCount by ImageLoaded

DS0029 Network Traffic Network Connection Creation

Monitor for newly constructed network connections that are sent or received by untrusted hosts.

DS0009 Process Process Creation

Use process monitoring to monitor the execution and arguments of regsvr32.exe. Compare recent invocations of regsvr32.exe with prior history of known good arguments and loaded files to determine anomalous and potentially adversarial activity.

Note: Event IDs are for Sysmon (Event ID 1 - process create) and Windows Security Log (Event ID 4688 - a new process has been created). - Analytic 1 is a more generic analytic that looks for suspicious usage of regsvr32.exe, specifically for cases where regsvr32.exe creates child processes that aren’t itself. It’s not likely that this will result in millions of hits, but it does occur during benign activity so some form of baselining would be necessary for this to be useful as an alerting analytic.- Analytic 2 is around "Squiblydoo", which is a specific usage of regsvr32.exe to load a COM scriptlet directly from the internet and execute it in a way that bypasses application whitelisting. It looks for regsvr32.exe process creation events that load scrobj.dll via the command-line (which executes the COM scriptlet).- Analytic 3 This uses the same logic as above, but adds lightweight baselining by ignoring all results that also showed up in the previous 30 days (it runs over 1 day).- Analytic 4 This looks for child processes that may be spawend by regsvr32, while attempting to eliminate some of the common false positives such as werfault (Windows Error Reporting).

Analytic 1 - Generic Regsvr32

(source="WinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode="1") OR (source="WinEventLog:Security" EventCode="4688") regsvr32.exe | search ParentImage="regsvr32.exe" AND Image!="regsvr32.exe*"

Analytic 2 - Squiblydoo

(source="WinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode="1") OR (source="WinEventLog:Security" EventCode="4688") regsvr32.exe scrobj.dll | search Image="*regsvr32.exe"

Analyt 3 - New Items since last month

(source="WinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode="1") earliest=-d@d latest=now() regsvr32.exe | search ParentImage="regsvr32.exe" AND Image!="regsvr32.exe" | search NOT [search (source="WinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode="1") earliest=-60d@d latest=-30d@d regsvr32.exe | search ParentImage="regsvr32.exe" AND Image!="regsvr32.exe" | dedup CommandLine | fields CommandLine ]

Analytic 4 - Spawning Child Processes

(source="*WinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode="1") (ParentImage="C:\Windows\System32\regsvr32.exe" OR ParentImage="C:\Windows\SysWOW64\regsvr32.exe") AND Image!="C:\Windows\System32\regsvr32.exe" AND Image!="C:\Windows\SysWOW64\regsvr32.exe" AND Image!="C:\WINDOWS\System32\regsvr32.exe" AND Image!="C:\WINDOWS\SysWOW64\regsvr32.exe" AND Image!="C:\Windows\SysWOW64\WerFault.exe" AND Image!="C:\Windows\System32\wevtutil.exe" AND Image!="C:\Windows\System32\WerFault.exe"|stats values(ComputerName) as "Computer Name" values(ParentCommandLine) as "Parent Command Line" count(Image) as ImageCount by Image

References

  1. Microsoft. (2015, August 14). How to use the Regsvr32 tool and troubleshoot Regsvr32 error messages. Retrieved June 22, 2016.
  2. LOLBAS. (n.d.). Regsvr32.exe. Retrieved July 31, 2019.
  3. Nolen, R. et al.. (2016, April 28). Threat Advisory: “Squiblydoo” Continues Trend of Attackers Using Native OS Tools to “Live off the Land”. Retrieved April 9, 2018.
  4. Anubhav, A., Kizhakkinan, D. (2017, February 22). Spear Phishing Techniques Used in Attacks Targeting the Mongolian Government. Retrieved February 24, 2017.
  5. Jazi, H. (2021, June 1). Kimsuky APT continues to target South Korean government using AppleSeed backdoor. Retrieved June 10, 2021.
  6. Ahl, I. (2017, June 06). Privileges and Credentials: Phished at the Request of Counsel. Retrieved May 17, 2018.
  7. Dumont, R. (2019, March 20). Fake or Fake: Keeping up with OceanLotus decoys. Retrieved April 1, 2019.
  8. Carr, N.. (2017, May 14). Cyber Espionage is Alive and Well: APT32 and the Threat to Global Corporations. Retrieved June 18, 2017.
  9. Dahan, A. (2017). Operation Cobalt Kitty. Retrieved December 27, 2018.
  10. Salem, E. (2019, February 13). ASTAROTH MALWARE USES LEGITIMATE OS AND ANTIVIRUS PROCESSES TO STEAL PASSWORDS AND PERSONAL DATA. Retrieved April 17, 2019.
  11. Lambert, T. (2020, May 7). Introducing Blue Mockingbird. Retrieved May 26, 2020.
  12. DFIR Report. (2021, November 29). CONTInuing the Bazar Ransomware Story. Retrieved September 29, 2022.
  13. Svajcer, V. (2018, July 31). Multiple Cobalt Personality Disorder. Retrieved September 5, 2018.
  14. Gorelik, M. (2018, October 08). Cobalt Group 2.0. Retrieved November 5, 2018.
  15. Giagone, R., Bermejo, L., and Yarochkin, F. (2017, November 20). Cobalt Strikes Again: Spam Runs Use Macros and CVE-2017-8759 Exploit Against Russian Banks. Retrieved March 7, 2019.
  16. cobbr. (2021, April 21). Covenant. Retrieved September 4, 2024.
  17. RSA Incident Response. (2014, January). RSA Incident Response Emerging Threat Profile: Shell Crew. Retrieved January 14, 2016.
  18. Fidelis Threat Research Team. (2016, May 2). Turbo Twist: Two 64-bit Derusbi Strains Converge. Retrieved August 16, 2018.
  19. Red Canary. (2021, February 9). Dridex - Red Canary Threat Detection Report. Retrieved August 3, 2023.
  20. Joe Security. (n.d.). Analysis Report fasm.dll. Retrieved January 6, 2021.
  21. Kenefick, I. (2023, March 13). Emotet Returns, Now Adopts Binary Padding for Evasion. Retrieved June 19, 2024.
  22. Porolli, M. (2020, July 9). More evil: A deep look at Evilnum and its toolset. Retrieved January 22, 2021.
  23. ESET. (2022, March 1). IsaacWiper and HermeticWizard: New wiper and worm targetingUkraine. Retrieved April 10, 2022.
  24. Fidelis Cybersecurity. (2015, December 16). Fidelis Threat Advisory #1020: Dissecting the Malware Involved in the INOCNATION Campaign. Retrieved March 24, 2016.
  25. GReAT. (2014, December 10). Cloud Atlas: RedOctober APT is back in style. Retrieved May 8, 2020.
  26. KISA. (2021). Phishing Target Reconnaissance and Attack Resource Analysis Operation Muzabi. Retrieved March 8, 2024.
  27. Magius, J., et al. (2017, July 19). Koadic. Retrieved September 27, 2024.
  1. Axel F, Pierre T. (2017, October 16). Leviathan: Espionage actor spearphishes maritime and defense targets. Retrieved February 15, 2018.
  2. Villadsen, O.. (2019, August 29). More_eggs, Anyone? Threat Actor ITG08 Strikes Again. Retrieved September 16, 2019.
  3. FBI, CISA, CNMF, NCSC-UK. (2022, February 24). Iranian Government-Sponsored Actors Conduct Cyber Operations Against Global Government and Commercial Networks. Retrieved September 27, 2022.
  4. Breitenbacher, D and Osis, K. (2020, June 17). OPERATION IN(TER)CEPTION: Targeted Attacks Against European Aerospace and Military Companies. Retrieved December 20, 2021.
  5. Rainey, K. (n.d.). Qbot. Retrieved September 27, 2021.
  6. Cyberint. (2021, May 25). Qakbot Banking Trojan. Retrieved September 27, 2021.
  7. Morrow, D. (2021, April 15). The rise of QakBot. Retrieved September 27, 2021.
  8. Kenefick, I. et al. (2022, October 12). Black Basta Ransomware Gang Infiltrates Networks via QAKBOT, Brute Ratel, and Cobalt Strike. Retrieved February 6, 2023.
  9. Inman, R. and Gurney, P. (2022, June 6). Shining the Light on Black Basta. Retrieved March 8, 2023.
  10. Vilkomir-Preisman, S. (2022, August 18). Beating Black Basta Ransomware. Retrieved March 8, 2023.
  11. SophosLabs. (2020, May 21). Ragnar Locker ransomware deploys virtual machine to dodge security. Retrieved June 29, 2020.
  12. Lauren Podber and Stef Rand. (2022, May 5). Raspberry Robin gets the worm early. Retrieved May 17, 2024.
  13. Lee, B., Falcone, R. (2019, January 18). DarkHydrus delivers new Trojan that can use Google Drive for C2 communications. Retrieved April 17, 2019.
  14. Hasherezade. (2021, April 6). A deep dive into Saint Bot, a new downloader. Retrieved June 9, 2022.
  15. Unit 42. (2022, February 25). Spear Phishing Attacks Target Organizations in Ukraine, Payloads Include the Document Stealer OutSteel and the Downloader SaintBot. Retrieved June 9, 2022.
  16. Kumar, A., Stone-Gross, Brett. (2021, September 28). Squirrelwaffle: New Loader Delivering Cobalt Strike. Retrieved August 9, 2022.
  17. Duncan, B. (2020, July 24). Evolution of Valak, from Its Beginnings to Mass Distribution. Retrieved August 31, 2020.
  18. Salem, E. et al. (2020, May 28). VALAK: MORE THAN MEETS THE EYE . Retrieved June 19, 2020.
  19. S2 Grupo. (2019, April 2). WIRTE Group attacking the Middle East. Retrieved May 24, 2019.
  20. Xiao, C. (2018, September 17). Xbash Combines Botnet, Ransomware, Coinmining in Worm that Targets Linux and Windows. Retrieved November 14, 2018.
  21. National Security Agency. (2016, May 4). Secure Host Baseline EMET. Retrieved June 22, 2016.
  22. Beechey, J. (2010, December). Application Whitelisting: Panacea or Propaganda?. Retrieved November 18, 2014.
  23. Gorzelany, A., Hall, J., Poggemeyer, L.. (2019, January 7). Windows Defender Application Control. Retrieved July 16, 2019.
  24. Tomonaga, S. (2016, January 26). Windows Commands Abused by Attackers. Retrieved February 2, 2016.
  25. NSA Information Assurance Directorate. (2014, August). Application Whitelisting Using Microsoft AppLocker. Retrieved March 31, 2016.
  26. Corio, C., & Sayana, D. P. (2008, June). Application Lockdown with Software Restriction Policies. Retrieved September 12, 2024.
  27. Microsoft. (2012, June 27). Using Software Restriction Policies and AppLocker Policies. Retrieved April 7, 2016.