Glossary
MSI Custom Action
A CustomAction runs code during an install — an EXE, a DLL entry point, or a JScript/VBScript — and its Type bit-field says what runs, from where, and with which privileges.
A custom action is how an MSI runs logic that the standard install sequence
doesn't cover. It is the single most security-relevant part of a package,
because it is where a package executes code. Each row in the CustomAction
table has a Type integer that is a bit-field:
- What runs (low 3 bits): a DLL entry point (1), an EXE (2), a JScript (5) or VBScript (6), or a nested install (7).
- Where it comes from (bits
0x30): the Binary table (embedded in the package), an installed File, a Directory/inline script, or a Property. - When and as whom: the
0x400bit marks a deferred action (it runs in the install script, in the service context); combined with0x800(no-impersonate) it runs as LocalSystem rather than as the user. Other bits mark async, rollback/commit, and ignore-exit-code.
So a type of 0xC02 is "a deferred EXE from the Binary table that runs as
SYSTEM" — exactly the kind of action a reviewer wants to see. Custom actions
are scheduled by the InstallExecuteSequence and InstallUISequence tables,
which give each action a sequence number and an optional condition.
When triaging an unknown MSI, read the custom actions first: they tell you whether the package merely copies files or whether it runs a program.