Setupapi.dll

type: OSLibraries
Windows Setup Application Programming Interface

Full path

c:\windows\system32\setupapi.dll
c:\windows\syswow64\setupapi.dll

Commands

  1. AWL BypassUser T1218.011

    Run local or remote script(let) code through INF file specification.

    rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 128 {PATH_ABSOLUTE:.inf}

    Execute the specified (local or remote) .wsh/.sct script with scrobj.dll in the .inf file by calling an information file directive (section name specified).

    os: Windows 10, Windows 11

    Execute: INF

  2. ExecuteUser T1218.011

    Load an executable payload.

    rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 128 {PATH_ABSOLUTE:.inf}

    Launch an executable file via the InstallHinfSection function and .inf file section directive.

    os: Windows

    Execute: INF

Detection

Code samples

Resources

acknowledgement: Kyle Hanslovan (COM Scriptlet) @KyleHanslovan, Huntress Labs (COM Scriptlet) @HuntressLabs, Casey Smith (COM Scriptlet) @subTee, Nick Carr (Threat Intel) @ItsReallyNick