Sysmon Event ID 7 <ImageLoad>

Sysmon Event ID 7: Image Loaded — DLL Side-Loading, Signature, KQL

Published

A module was loaded into a running process — Sysmon records which process loaded it, the full path of the module, its hashes and version metadata, and what a signature check said about the file.

Logged to: Microsoft-Windows-Sysmon/Operational, on the machine where it happened; filtered in a Sysmon configuration by the <ImageLoad> element.

Microsoft's description

Event ID 7: Image loaded

The image loaded event logs when a module is loaded in a specific process. This event is disabled by default and needs to be configured with the " –l " option. It indicates the process in which the module is loaded, hashes and signature information. The signature is created asynchronously for performance reasons and indicates if the file was removed after loading. This event should be configured carefully, as monitoring all image load events will generate a significant amount of logging.

Source: Microsoft's Sysmon documentation

Every field of event 7

FieldWhat it tells you
ImageThe process the module was loaded into. The pair of loader and loaded file is the whole point of the event — a trusted executable loading an untrusted DLL is the classic finding.
ImageLoadedFull path of the module that was loaded. Paths under user profiles, temp or other writable directories, and system DLL names loaded from a non-system folder, are the ones to read first.
HashesHashes of the loaded file, in the algorithms the configuration's HashAlgorithms setting asks for. Use them to pivot to other hosts that loaded the same file and to reputation sources.
SignedWhether the loaded file carried a signature at all — the first split between Microsoft-signed system modules and everything else.
SignatureThe signer of the file, when it is signed. A signer that does not belong to the product that loaded the module is a lead for side-loading.
SignatureStatusThe result of checking that signature. Microsoft notes the signature "is created asynchronously for performance reasons and indicates if the file was removed after loading", so this field also reflects a file that disappeared between the load and the check.
OriginalFileNameThe file name compiled into the binary's version resource, which stays the same when the file on disk is renamed — compare it with the name in ImageLoaded.
CompanyThe company string from the module's version metadata. Missing or copied vendor strings on a module outside its product directory are worth a look.
ProcessGuidJoins the load to the process creation event (event 1, where it is ProcessGuid) for the command line, parent and user of the process that did the loading.
UserThe account the loading process runs as, which tells you whose session or which service brought the module in.
RuleName—
UtcTime—
ProcessId—
FileVersion—
Description—
Product—

Field names and order from Sysmon's manifest (schema 4.90), checked on every build.

What it records

Microsoft’s description: “The image loaded event logs when a module is loaded in a specific process. This event is disabled by default and needs to be configured with the ” –l ” option. It indicates the process in which the module is loaded, hashes and signature information.”

One record is a pairing. On one side the loader — Image, ProcessGuid, ProcessId and User; on the other the module — ImageLoaded, with its version metadata (FileVersion, Description, Product, Company, OriginalFileName), its Hashes, and the signature fields Signed, Signature and SignatureStatus. UtcTime and RuleName complete the record, the latter naming the configuration rule that let the event through.

Two things follow from Microsoft’s wording. First, the event has to be turned on: it “is disabled by default and needs to be configured with the ” –l ” option”. Second, the signature “is created asynchronously for performance reasons and indicates if the file was removed after loading” — so the signature fields describe a check made after the module was already mapped into the process, and they also tell you when the file on disk did not survive its own load.

Because every process loads dozens of modules, Microsoft is explicit that “this event should be configured carefully, as monitoring all image load events will generate a significant amount of logging”. Filtering happens in the <ImageLoad> element, for example by restricting the event to modules under writable directories:

<ImageLoad onmatch="include">
  <ImageLoaded condition="contains">\Users\</ImageLoaded>
  <ImageLoaded condition="contains">\Temp\</ImageLoaded>
  <ImageLoaded condition="contains">\ProgramData\</ImageLoaded>
</ImageLoad>

Whatever you choose to log, write the include list down: an attacker’s module in a directory you never log is invisible in this event.

When it matters

ReadingMeaning
A signed executable from Program Files loading a DLL from the same directory that is unsigned or signed by someone elseDLL side-loading — a trusted binary carrying untrusted code (T1574.002)
A system DLL name in ImageLoaded, but from a user profile, temp or application folder instead of System32Search-order hijacking of that module name (T1574.001)
ImageLoaded under a user-writable path loaded by a service or a scheduled taskCode placed by a user-level foothold and run with higher privilege
OriginalFileName that does not match the file name in ImageLoadedA renamed module — compare the Hashes against the copy you expect
Script hosts, rundll32.exe, regsvr32.exe or Office applications loading modules from outside their own directoriesA loader stage pulling in its payload (T1055.001)
Signature information showing the file was removed after loadingThe module cleaned itself off disk, leaving only this event as evidence

How to investigate

Start with modules loaded from directories a user can write to:

Event
| where TimeGenerated > ago(7d)
| where Source == "Microsoft-Windows-Sysmon" and EventID == 7
| extend D = parse_xml(EventData).DataItem.EventData.Data
| mv-apply d = D on (summarize f = make_bag(bag_pack(tostring(d["@Name"]), tostring(d["#text"]))))
| extend Image = tostring(f.Image), ImageLoaded = tostring(f.ImageLoaded), Company = tostring(f.Company),
         OriginalFileName = tostring(f.OriginalFileName), Signed = tostring(f.Signed),
         Signature = tostring(f.Signature), SignatureStatus = tostring(f.SignatureStatus),
         Hashes = tostring(f.Hashes), Account = tostring(f.User)
| where ImageLoaded has_any ("\\Users\\", "\\Temp\\", "\\ProgramData\\", "\\PerfLogs\\", "\\Public\\")
| project TimeGenerated, Computer, Account, Image, ImageLoaded, OriginalFileName, Signed, Signature, SignatureStatus, Company, Hashes
| order by TimeGenerated desc

Then look for the same module name arriving from more than one place. Group by file name and directory and keep the rare combinations — a DLL name that normally lives in System32 showing up once, in one folder, on one host:

Event
| where TimeGenerated > ago(30d)
| where Source == "Microsoft-Windows-Sysmon" and EventID == 7
| extend D = parse_xml(EventData).DataItem.EventData.Data
| mv-apply d = D on (summarize f = make_bag(bag_pack(tostring(d["@Name"]), tostring(d["#text"]))))
| extend ImageLoaded = tolower(tostring(f.ImageLoaded)), Image = tostring(f.Image), Hashes = tostring(f.Hashes)
| extend FileName = tostring(split(ImageLoaded, "\\")[-1]),
         Directory = strcat_array(array_slice(split(ImageLoaded, "\\"), 0, -2), "\\")
| summarize Hosts = dcount(Computer), Loads = count(), Loaders = make_set(Image, 5), Fingerprints = make_set(Hashes, 5)
    by FileName, Directory
| where Hosts <= 2
| order by FileName asc, Loads asc

For every candidate, follow ProcessGuid to the process creation event to see the command line, the parent and the hashes of the loader itself, and to event 4688 if Sysmon is not on that host. Check whether the module was written shortly before it was loaded with FileCreate on the same path, whether the process then opened anything sensitive with ProcessAccess, and which accounts were logged on at the time via 4624. Take the Hashes value across the estate to find every other host that loaded the same file; the free analyzer will do the same grouping over an exported Sysmon log.

Read a Sysmon log without a SIEM

Copy Microsoft-Windows-Sysmon%4Operational.evtx from C:\Windows\System32\winevt\Logs (or wevtutil epl Microsoft-Windows-Sysmon/Operational sysmon.evtx) and open it in the EVTX viewer: every event in a table, event 7 filterable, with the analyzer's checks for LSASS access, remote threads and suspicious command lines. Nothing is uploaded.

Related events

Detect it

MITRE ATT&CK: T1574.001T1574.002T1055.001

Frequently Asked Questions

Why do I see no Sysmon Event ID 7 at all?
Microsoft states that this event "is disabled by default and needs to be configured with the \" –l \" option". Even once it is enabled, only loads that survive the `<ImageLoad>` include and exclude rules in your configuration file are written, and many configurations keep that list very short.
How do I keep Event ID 7 from flooding the log?
Microsoft warns that "this event should be configured carefully, as monitoring all image load events will generate a significant amount of logging". Filter in the `<ImageLoad>` element — include a small set of module names or writable directories you care about rather than logging every module every process loads.
Why is the signature information sometimes missing or odd?
Microsoft's description says the signature "is created asynchronously for performance reasons and indicates if the file was removed after loading". The signature fields therefore describe a check made after the module was already in the process, and a module whose file was deleted straight after loading shows up in that state.
How does Event ID 7 help find DLL side-loading?
It gives you both halves of the load. Group by the file name in ImageLoaded and look at the directories it came from and the executables that loaded it: a system DLL name loaded from a user-writable folder, or a vendor module loaded by a process from a different product, is the pattern side-loading leaves.

Find every Sysmon 7 that matters

Open a Sysmon .evtx or XML export in the free browser analyzer: LSASS access, remote thread injection, process tampering, suspicious command lines and reverse-shell ports are flagged, with the events behind each. Nothing is uploaded.

Investigating something right now? LogTriage checks every address in the file against threat intelligence and writes the incident report: 10 analyses a month free. The incident pack adds the in-depth AI analysis and files up to 100 MB: 25 analyses for $19, one payment, no subscription. Pricing

How this page was made. The official definitions, field names and examples on it are copied by script from the sources it links and re-checked against them on every build. The investigation advice was drafted with AI from those sources and passed a separate review before publishing. What is checked, and how · found a mistake? [email protected]