Image File Execution Options (IFEO) enable a developer to attach a debugger to an application. When a process is created, any executable file present in an application’s IFEO will be prepended to the application’s name, effectively launching the new process under the debugger (e.g., “C:\dbg\ntsd.exe -g notepad.exe”). (Citation: Microsoft Dev Blog IFEO Mar 2010)IFEOs can be set directly via the Registry or in Global Flags via the Gflags tool. (Citation: Microsoft GFlags Mar 2017) IFEOs are represented as Debugger Values in the Registry under
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options/
andHKLM\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Image File Execution Options<executable>
whereis the binary on which the debugger is attached. (Citation: Microsoft Dev Blog IFEO Mar 2010)
Similar to Process Injection, this value can be abused to obtain persistence and privilege escalation by causing a malicious executable to be loaded and run in the context of separate processes on the computer. (Citation: Engame Process Injection July 2017) Installing IFEO mechanisms may also provide Persistence via continuous invocation.
Malware may also use IFEO for Defense Evasion by registering invalid debuggers that redirect and effectively disable various system and security applications. (Citation: FSecure Hupigon) (Citation: Symantec Ushedix June 2008)
Detection: Monitor for common processes spawned under abnormal parents and/or with creation flags indicative of debugging such as
DEBUG_PROCESS
andDEBUG_ONLY_THIS_PROCESS
. (Citation: Microsoft Dev Blog IFEO Mar 2010)Monitor the IFEOs Registry value for modifications that do not correlate with known software, patch cycles, etc. Monitor and analyze application programming interface (API) calls that are indicative of Registry edits such as RegCreateKeyEx and RegSetValueEx. (Citation: Engame Process Injection July 2017)
Platforms: Windows
Data Sources: Process Monitoring, Windows Registry, Windows event logs
Permissions Required: Administrator, SYSTEM
TODO
Supported Platforms: Windows
Name | Description | Type | Default Value |
---|---|---|---|
target_binary | Binary To Attach To | Path | winword.exe |
payload_binary | Binary To Execute | Path | cmd.exe |
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\#{target_binary}" /v Debugger /d "#{payload_binary}"
Leverage Global Flags Settings
Supported Platforms: Windows
Name | Description | Type | Default Value |
---|---|---|---|
target_binary | Binary To Attach To | Path | notepad.exe |
payload_binary | Binary To Execute | Path | cmd.exe |
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\#{target_binary}" /v GlobalFlag /t REG_DWORD /d 512 REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SilentProcessExit\#{target_binary}" /v ReportingMode /t REG_DWORD /d 1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SilentProcessExit\#{target_binary}" /v MonitorProcess /d "#{payload_binary}"