Skip to content

Lesson 9 of 14 · 15m

The Graph Walk

Every finding is a node; ProcessGuid, LogonId, hashes, and destinations are the edges you traverse until the graph terminates.

A hunt result is a node in a graph. Pivoting is edge traversal, and the edges are typed: a ProcessGuid reaches its parent, its children, its connections, its DNS, its file writes. A LogonId reaches the session's source IP, its workstation, and every event that session caused. A user SID reaches across hosts. A hash reaches fleet-wide. A destination IP or domain reaches every host that talked to it. A timestamp reaches a window. Every hop is a query; every answer is either closure or another key.

Watch it work. Sysmon 3 shows a workstation making periodic HTTPS connections to an IP no proxy has ever categorized. Pivot on ProcessGuid → Sysmon 1 says the process is rundll32.exe with a command line pointing at a DLL in %APPDATA%. Pivot on ParentProcessGuid → the parent was WINWORD.EXE, started 40 seconds after Sysmon 11 recorded a .docm write into %TEMP%. Pivot on LogonId → Security 4624 shows the session arrived type 3 from the file server, which tells you where else to look. Pivot on the hash → two other hosts ran the same DLL last week. Pivot on the destination domain → dns.log says four hosts resolved it. One odd connection just became a named campaign with a scope.

The keys, by name

  • Process identity: ProcessGuid (Sysmon), or PID+start-time where you must correlate on 4688. Fragile without the GUID — PIDs recycle.
  • Session identity: Logon ID from 4624, joining every 4688/4624 in the session and the Source Network Address that delivered it.
  • Principal: account name/SID, or auid on Linux — the field that survives sudo and ties activity to a human.
  • Artifact: file hash (imphash travels better than SHA256), file path pattern, mutex, service name.
  • Infrastructure: destination IP, domain, JA3 fingerprint. JA3 lets you find siblings of the tool rather than siblings of the value.
  • Time: window expansion around confirmed nodes — lateral hops cluster within minutes-to-hours of the landing.

The two failure modes

First: treating each alert as a closed case. An alert is an unexplained node; the hunt ends when the graph terminates — either at patient zero (the inbound edge with no predecessor) or at a boundary, a place your telemetry can't see past. A boundary isn't a dead end to be embarrassed about; it's a documented collection gap, and it goes in the hunt log as an artifact.

Second: pivoting without a question per hop. "Follow the ProcessGuid" is the method; "follow everything that looks interesting" is browsing again. Each hop should answer a named question — who spawned this, where did the session come from, who else ran it — and the hop count should be in the log so a second analyst can replay the walk.

The SUNBURST reconstruction is this exact motion at national scale: a DNS pattern → the signed SolarWinds.Orion.Core.BusinessLayer.dll → the build pipeline that produced it. Each hop changed the question being asked.

A worked hop, stated as queries

The parent-child hop in KQL on Defender: DeviceProcessEvents | where InitiatingProcessFileName =~ "WINWORD.EXE" | project DeviceName, FileName, ProcessCommandLine, InitiatingProcessCommandLine. In Splunk on Sysmon: EventCode=1 ParentImage="*\\WINWORD.EXE" | table host, Image, CommandLine, ProcessGuid. Same question, same key, two dialects — the graph doesn't care which SIEM holds the nodes.

The discipline

Keep a pivot log: key → key → result, one line per hop. In Splunk the canonical parent-child query is a ProcessGuid/ParentProcessGuid join on EventCode=1; in KQL, DeviceProcessEvents gives you InitiatingProcessId chains natively. Write the query once, save it, and the next pivot costs you thirty seconds instead of a hypothesis.

The last edge worth naming is the negative edge — the hop that returns nothing. "No other host resolved the domain" closes the scope question as firmly as a hit opens it, and it belongs in the pivot log next to the hits. A hunt that only records expansions is a scope that grew forever; the refuted edges are how you prove the graph actually ended.

Was this lesson helpful?

Sign in to rate

Keep reading

Related articles from the SudoSecurity blog.