Skip to content
Tutorials Center
My learning

Topics

Lesson 35 of 37 ยท Projects and Practice

Project: A Mini Threat Hunt

Practice a complete hunt on invented logs: form a hypothesis, find rare processes, spot beaconing, pivot to a host and write the hunt report with findings and gaps.

This project walks you through one full hunt from hypothesis to written report, on a small invented data set (process starts and network connections for ten hosts). You will use the techniques from threat hunting methodology and hunting with log queries: rare-value analysis, beaconing detection and pivoting. Everything is simulated; all hosts, names and addresses are made up, and no real attack tooling is involved.

The scenario

A threat report describes an actor who targets organizations like yours. After initial access, they run a renamed utility from a user's temp folder and then contact a server every minute or so. You decide to hunt for two behaviors:

  1. Hypothesis A: programs launched from user temp folders that appear on very few hosts.
  2. Hypothesis B: workstations that connect to a rare external destination at regular intervals.

Scope: all ten workstations, one working day, process-creation and proxy logs. Data source check: both logs exist for every host (if one were missing, that would be your first finding).

Hunt plan

Hypothesis Two testable behaviors
Data Process and proxy logs
Analysis Rare, regular, pivot
Report Result, gaps, detections

Write the plan before you query.

1 / 2

Step 1: rare programs in temp folders

Python Hunt A: rare executables from temp folders

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

installer-helper.exe appears on eight machines, so it is probably a deployed tool (confirm with software inventory). svc_update.exe appears on only two hosts, and the name imitates a service helper. That is your first lead: ws04 and ws09.

Step 2: beaconing

Python Hunt B: regular connections to rare destinations

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Both ws04 and ws09 contact the same rare destination at steady intervals. Two independent behaviors pointing at the same hosts make a strong lead.

Step 3: pivot on the suspect hosts

Now assemble everything known about ws04 into one timeline, as you would with a SIEM's search across data sources.

Python Pivot: build a timeline for ws04

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The pivot extended the incident: srv01 is now in scope. This is the moment to stop hunting and open an incident (incident response lifecycle), starting with containment decisions.

Step 4: write the hunt report

A hunt report is short and structured so that anyone can repeat it.

TEXT
HUNT REPORT (example, invented data)
Title:       Renamed utility in Temp with periodic outbound contact
Hypotheses:  A) rare executables run from user Temp folders
             B) workstations contacting rare external hosts at regular intervals
Scope:       10 workstations, one day, process and proxy logs
Data check:  all sources present; no DNS logs (GAP: cannot see resolved IPs)
Method:      stack counting by hosts per path; gap regularity of connections
Findings:    ws04, ws09 ran svc_update.exe from Temp and beaconed to
             update-check.example every 60/120 s. ws04 pivoted to srv01.
Verdict:     probable intrusion, incident opened (severity high)
Follow-ups:  1) containment of ws04, ws09, srv01
             2) new detection: office app spawning cmd
             3) new detection: executable in Temp on <= 2 hosts
             4) collect DNS logs
ATT&CK:      T1059, T1071, T1021

Turning findings into detections is the payoff, because the next occurrence alerts automatically (alert tuning explains how to keep them quiet enough).

Extend the project

  1. Lower the beaconing threshold and observe how legitimate update checks appear; write an allow-list entry with an owner and expiry.
  2. Add a third hypothesis: new scheduled tasks created by Office child processes.
  3. Draft the detection rule for "office app spawns shell" in pseudocode and list the log source it needs.
  4. Estimate hunt coverage with an ATT&CK table (coverage).

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Why was installer-helper.exe on eight hosts treated differently from svc_update.exe on two?

    Rarity is a lead, not proof; the widely installed tool is probably deployed software to be confirmed via inventory.
  2. 2. What made the ws04 lead stronger?

    Independent signals that agree raise confidence.
  3. 3. A hunt discovers that DNS logs were missing. How should the report treat this?

    Gaps are a standard hunt output and drive collection improvements.
  4. 4. When should hunting turn into incident response?

    Once a real compromise is likely, follow the incident process: scope, contain, eradicate, recover.

Summary

  • A full hunt is hypothesis, data check, analysis, pivot, report and detections.
  • Rare-value and regularity analysis found two suspicious hosts; a pivot found a third.
  • Findings map to ATT&CK techniques and become new detections.
  • Hunts also deliver visibility gaps such as missing DNS logs.

Next: Project: An Incident Report Generator