Lab

Log hunt: query the records

Search a day of invented sign-in, mailbox, web, DNS, proxy and process logs with a SIEM-style query language, then answer the questions of six missions from what you find.

Level: Beginner to intermediateSkills: Log analysis, threat hunting

Runs locallyInvented data. Progress is kept only in this browser.

Simulation: invented data

One day at Kuzey Lojistik A.Ş.

Thursday 12 March 2026, 00:00–24:00. A 34-person logistics company sends six log sources to its SIEM: sign-ins, mailbox audit, the customer portal, DNS, the web proxy and process creation. Five incidents are hidden among ordinary traffic. Search the logs with the query bar, then answer each mission's questions from what the logs show.

SIEM (security information and event management) is the system that collects logs from many sources so they can be searched together. The query language here is a small subset modelled on the pipe style of SIEM search tools; the guide below lists everything it understands.

Sign-ins
–
Mailbox audit
–
Customer portal
–
DNS
–
Web proxy
–
Process creation
–
Events in the day
–

Search

Press Enter to run. Up and down arrows bring back earlier queries.

Example queries

Events per hour

Select an hour to narrow the search to it; select it again to clear.

Fields

Most common values among the matched events. Add one as a filter or exclude it.

Results

Query language guide

Search

SyntaxMeaningExample
wordEvents that contain the word in any field. Case does not matter.
"two words"A phrase with spaces, searched as one piece.
field=valueThe field equals the value exactly (case-insensitive).
field!=valueThe field exists and differs from the value. NOT field=value also returns events that lack the field.
field>n < >= <=Numeric comparison. Times such as 09:30 can be compared too.
*Wildcard: any number of characters. field=* means the field exists.
AND, OR, NOT, ( )Terms side by side are joined with AND. OR and NOT are written in capitals; parentheses group them.
earliest= latest=Time range for the whole search. earliest is included, latest is not.

Commands after a pipe |

SyntaxMeaningExample
| count | count by fNumber of results, in total or per value of a field.
| top N f | rare N fMost (or least) common values with count and percentage. N defaults to 10.
| dc(f) by gDistinct count: how many different values f takes for each g.
| stats sum(f) avg(f) min(f) max(f) count by gSeveral calculations at once. The result is sorted by the first one, largest first.
| sort -f | sort fSorts by a field; a minus sign means largest first. Several fields can be given.
| table f1,f2Keeps only these columns, in this order.
| head N | tail NFirst or last N results (default 10). Events are listed newest first.
| dedup fKeeps the first result for each value of the field.
| where conditionFilters calculated rows with the same syntax as the search.

Log sources and their fields

source Log source: auth, mail, web, dns, proxy, processtime Time of the event, HH:MM:SShour Hour of the event, 0–23 (calculated)

source=authSign-ins

Windows logons, single sign-on (SSO) to company apps and VPN connections.

user
Account name
src_ip
Address the sign-in came from
result
success or failure
method
windows, sso or vpn
app
App reached through SSO: mail, portal, erp, hr
client
browser, outlook, mobile, vpn-client, or the legacy protocols imap and ews, which accept a password without the MFA prompt
country
Country code from a simulated GeoIP lookup
reason
Why it failed: bad_password, unknown_user, mfa_denied
host
Computer name for Windows logons
source=mailMailbox audit

What was done inside mailboxes: messages sent, items read, rules created.

operation
What was done: Send, MailItemsAccessed, New-InboxRule or MoveToDeletedItems
rule_name
Name of an inbox rule
rule_condition
When the rule fires
forward_to
Where the rule forwards mail
folder
Folder involved
subject
Subject of a sent message
recipient
Recipient of a sent message
items
Number of items touched
source=webCustomer portal

nginx access log of portal.kuzeylojistik.example. The SIEM stores the query string already URL-decoded.

method
HTTP method
path
Requested path
query
Query string
status
HTTP status code
bytes
Size of the response
user_agent
Client software as it announces itself
source=dnsDNS

Query log of the internal DNS resolver.

host
Computer that asked
query
Name that was looked up
qtype
Record type: A, AAAA, TXT, SRV
rcode
NOERROR or NXDOMAIN (name does not exist)
answer
Answer returned
domain
Registered domain, the last two labels of the name
qlen
Length of the queried name in characters
source=proxyWeb proxy

Every web request from staff computers passes through the proxy, which applies the category policy.

url_domain
Destination domain
category
Category assigned by the proxy
action
allowed or blocked
bytes_out
Bytes sent from the company
bytes_in
Bytes received
source=processProcess creation

Process start events from workstations and servers, similar to Sysmon event 1.

image
Program that started
parent
Program that started it
pid
Process ID
ppid
Parent process ID
cmdline
Full command line

Every lab uses invented data and simulates defence work only. Do not test systems you do not own or have written permission to test: unlawful access to an information system is an offence (Turkish Penal Code art. 243).