1/196
Looks like no tags are added yet.
Network forensics
Capturing, recording, and analyzing network events to discover the source of security incidents.
What four things can network forensics reveal?
The source, the path of intrusion, the techniques used, and the traces left behind.
Name the six network IoCs from the course.
Traffic on unusual ports, suspicious URLs, log-in anomalies, unusual outbound traffic, user-agent strings, and a spike in requests for the same file.
Full content data
The actual packets, stored as PCAP files. You can analyze any subset with tcpdump or Wireshark.
Session data
A summary of a conversation between two hosts: source and destination IP and port, start time, and amount exchanged. It shows who talked to whom and how much, without the packets.
Alert data
Raised by an IDS (Snort, Suricata) when traffic matches an IoC. It can contain false positives.
Statistical data
The overall profile of traffic: timestamps, protocols and services, and average packet size and rate. Used to spot volume and pattern anomalies.
You need to know which hosts talked and how much data moved, but you don't need the packet contents. Which evidence type do you use?
Session data.
Which network evidence type is known for false positives?
Alert data.
Application layer: where do you look, and which protocols live there?
Servers, desktops, antivirus, business apps, and databases. Protocols: FTP, SMTP, SNMP, DNS.
Transport layer: where do you look, and which protocols live there?
Firewall, IDS/IPS. Protocols: TCP, UDP.
Internet layer: where do you look, and which protocols live there?
Firewall, IDS/IPS, VPN. Protocols: IP, ICMP, ARP.
Network access layer: where do you look, and which protocols live there?
Routers and switches. Protocols: Ethernet, PPP, ARP.
Event correlation
Relating events from a predefined time interval to see how they add up to a bigger event, usually on a log management platform.
What are the four steps of event correlation, in order?
(1) Event aggregation, (2) event filtering, (3) event masking, (4) root cause analysis.
Same-platform vs. cross-platform correlation
Same-platform: one OS throughout the network. Cross-platform: different OSes and hardware, such as Windows clients behind a Linux firewall and email gateway.
What are the three prerequisites of event correlation?
Transmission of data (encrypted and authenticated), normalization, and data reduction.
Normalization vs. data reduction
Normalization rewrites many log formats into one. Data reduction removes repeated or unneeded data.
How many event correlation approaches are there? Name them.
13: automated field, packet parameter/payload, profile/fingerprint, rule-based, field-based, graph-based, neural network, codebook, vulnerability-based, open-port, Bayesian, time or role-based, and route correlation.
Why do firewall logs matter, and what do they record?
The firewall is the first point of entry. Its logs record source and destination, ports, time and date, and priority.
How are Cisco firewall log entries structured?
They use mnemonics with a severity. Each entry shows date and time, the mnemonic message, the firewall action, source and destination IP and port, and the request type.
What does Cisco firewall mnemonic 106001 mean?
Inbound TCP connection denied.
Check Point log colors
Red = blocked. Orange = suspicious but accepted. Green = accepted.
What do IDS logs do? Name three vendors.
They find suspicious packet types and probes, build new signatures, and measure attacks. Vendors: Juniper, Check Point, Snort.
What are the six indicators to look for in IDS logs?
Requests aimed at known vulnerabilities; repeated unusual activity; protocol or syntax failures; address anomalies; unexpected date, time, or resource values; and mistyped commands.
Honeypot
A decoy that lures attackers so you can learn their techniques.
What does a Kippo honeypot log record?
Timestamp, session type, session ID and source IP, and a message.
What's in router logs, and what are they used for?
Date, time, and source and destination IP and port. They're used to verify attack timestamps and correlate events. Outgoing entries also include the URL accessed and its IP.
Cisco IOS syslog levels 0–7
0 Emergency, 1 Alert, 2 Critical, 3 Error, 4 Warning, 5 Notification, 6 Informational, 7 Debugging. A lower number is more severe.
Where are Windows DHCP logs stored, and what fields do they have?
C:\Windows\System32\dhcp. Fields: event ID, date, time, description, IP address, host name, MAC address.
Scenario: A firewall log shows a suspicious internal IP. How do you prove which machine had that IP at that time?
Use the DHCP logs. They tie an IP address to a specific machine (host name and MAC) at a specific time.
Wireshark display filter building blocks
A protocol name (http, dns, arp), tcp.port==23, ip.addr==10.0.0.4, ip.src and ip.dst, joined with && or or.
Write a Wireshark filter for TCP port 23 traffic to or from 10.0.0.4.
ip.addr==10.0.0.4 && tcp.port==23
Passive vs. active sniffing
Passive sniffing works on hubs. Active sniffing on switches uses MAC flooding and ARP poisoning, which set up man-in-the-middle attacks.
TCP SYN flood: where to look, and what you see
Statistics > Protocol Hierarchy. You see many SYNs of similar length from many spoofed sources, never ACKed, and abnormal TCP volume.
SYN-FIN flood: filter or view, and what you see
tcp.flags==0x003; Statistics > Capture File Properties. You see packets with both SYN and FIN set and a high packets-per-second rate.
How do you find an FTP brute force in Wireshark?
Filter ftp.response.code == 530, then == 230.
What do FTP response codes 530 and 230 mean?
530 = failed login (many from one source points to brute force). 230 = successful login.
How do you spot an SMB brute force?
Inspect the SMB responses for usernames with STATUS_LOGON_FAILURE. A name that matches a real user suggests the attack succeeded.
MAC flooding: where to look, and what you see
Analyze > Expert Information. You see malformed packets from many sources to one destination, all with the same TTL.
ARP poisoning: filter, and what you see
arp.duplicate-address-detected. You see "duplicate use of
Scenario: Wireshark shows "duplicate use of 10.0.0.1 detected." What attack is this, and what does it mean?
ARP poisoning. One IP is mapped to two MAC addresses, which sets up a man-in-the-middle attack.
How do you investigate suspected malware traffic in a capture?
Filter on the unusual port or IP, then look the port or IP up in online databases.
Which port is tied to njRAT?
1177.
Web application forensics
Tracing an attack on a web application back to its origin and how it got in, using logs and configuration files from the web, application, and database servers plus system events.
What are the five challenges of web application forensics?
Traces are spread across many components; little or no downtime is allowed; huge log volumes have to be correlated; you need knowledge of many servers and apps; and reverse proxies and anonymizers make tracing back hard.
What are the seven indicators of a web attack?
Customers can't reach services, defacement, slow network, suspicious activity in user accounts, frequent reboots, leaked data, and URLs redirecting to the wrong sites.
Name as many of the 18 web application threats as you can.
XSS, SQL injection, parameter/form tampering, CSRF, directory traversal, security misconfiguration, cookie poisoning, improper error handling, injection flaws, insufficient logging and monitoring, broken access control, unvalidated input, information leakage, sensitive data exposure, buffer overflow, DoS, broken authentication, log tampering.
What are the eight steps of the web attack investigation methodology?
(1) Interviews; (2) locate the servers and devices, take them offline, and seize them soundly; (3) image and duplicate; (4) collect logs and config files; (5) protect log integrity; (6) analyze working copies and correlate them into a chain of events; (7) trace the attacking IP; (8) document every step.
Which logs do you collect in step 4 of the methodology?
Logs from the web, app, and database servers, the WAF, system events, SIEM, and IDS, plus config files.
How do you protect log integrity?
With encryption and checksums.
Do you analyze the original logs or copies?
Working copies.
IIS vs. Apache: which platforms do they run on?
IIS is Windows only. Apache is cross-platform.
IIS architecture
The kernel-level HTTP.SYS receives traffic first. Application Pools isolate apps. WAS and the WWW Service manage them.
Apache architecture
A user-space server loop (HTTP_MAIN). Modules are dispatched by HTTP_REQUEST, and ALLOC manages memory pools.
IIS vs. Apache configuration files
IIS uses ApplicationHost.config (centralized). Apache uses httpd.conf and .htaccess (distributed).
Where are IIS logs, and what format are they in?
ASCII text in %SystemDrive%\inetpub\logs\LogFiles.
List the IIS log fields.
date, time, s-ip, cs-method, cs-uri-stem (path), cs-uri-query, s-port, cs-username, c-ip, cs(User-Agent), cs(Referer), sc-status, time-taken (ms).
In an IIS log, which field is the client's IP and which is the server's?
c-ip = client. s-ip = server.
What does the IIS field cs-uri-stem hold? What unit is time-taken in?
cs-uri-stem is the path requested. time-taken is in milliseconds.
What are Apache's two log types?
The access log and the error log.
Decode the Apache Common Log Format: %h %l %u %t "%r" %>s %b
%h client IP, %l identity, %u user ID, %t time, "%r" request line, %>s status, %b bytes.
What does Apache's Combined log format add to the Common format?
Referer and User-agent.
What's in an Apache error log entry?
Date and time, severity, process and thread ID, client IP, message, and object requested.
On a Windows-based web server, what four things do you look for in eventvwr.msc?
The event log service ending, Windows File Protection inactive, the MS Telnet service running, and failed logins or locked-out accounts.
Decode: %3C %3E %27 %22 %20 %2F
Decode: %3B %7C %28 %29 %25
; | ( ) %
What is double encoding? Decode %253C.
Encoding the % itself. %253C decodes to %3C, then to <.
Decode ..%2F..%2Fetc%2Fpasswd. What attack is it?
../../etc/passwd. Directory traversal.
What's the golden rule before judging a log entry?
Decode before you judge.
A malicious-looking request returned a 200. What does that tell you?
The server processed the request and returned content. It does NOT mean the request was harmless.
What's the XSS signature in a log?
HTML tags such as
Name the seven XSS obfuscation techniques.
Hex encoding, double encoding, toggle case (sCRipT), in-line comments, char encoding, replaced keywords, and white-space manipulation.
Why should a regex search for XSS match <, %3C, and %253C?
To catch the plain, encoded, and double-encoded forms of the same tag.
Why is stored XSS especially serious?
It runs for every visitor.
What are the three SQL injection signatures in logs?
' or 1=1 --, exec master..xp_cmdshell, and UNION SELECT.
Explain how ' or 1=1 -- works.
The quote closes the string, OR 1=1 makes the WHERE clause always true, and -- comments out the rest (the password check).
What does UNION SELECT in a log indicate?
It pulls rows from the database, so it means data exposure.
Where do you check for SQL injection evidence?
IDS logs, web logs, and SIEM alerts.
Directory traversal: signature, what it does, and how to prevent it
../ repeated (often as ..%2F) toward /etc/passwd or ..\windows\win.ini. It climbs out of the web root. Prevent it with path canonicalization and least privilege.
What's the command injection signature in a log?
;, |, &, or backticks in a parameter (encoded as %3B, %7C).
What proves a command injection worked?
The response holds output the intended command could never produce.
What does a web brute-force attack look like in the logs?
A burst of 401s from one IP within seconds, then a 200, with a tool user agent such as python-requests.
What do Windows Event IDs 4625 and 4624 mean, and what does the sequence tell you?
4625 = failed logon. 4624 = successful logon. A run of 4625s followed by a 4624 means a successful brute force.
Brute force: how do you detect it vs. prevent it?
Detect with thresholds. Prevent with lockout and MFA.
Describe the upload-and-web-shell attack sequence in the logs.
A POST stores a script (report.php), then GETs with cmd=, then the home page size changes. The web shell was operated, then used for defacement.
How do you prevent web shell uploads?
Validate uploads, store them outside the web root, and remove execute permission.
Scenario: A log shows GET /search?q=%3Cscript%3E… with status 200. What's the attack, and what does the 200 prove?
XSS. The 200 only shows the server processed the request and returned content. It doesn't prove the request was harmless.
Surface web
Visible content that search engines such as Google and Yahoo can access.
Deep web
Content that needs a valid username and password: legal documents, financial records, government reports, subscriptions.
Dark web
Hidden content that needs a special browser such as Tor, which protects user anonymity.
Tor entry relay
The first relay the user connects to. It can see the user's IP address.
Tor middle relay
Passes encrypted traffic between relays.
Tor exit relay
Sends traffic to the destination, which sees the exit relay as the origin. This hides the user's identity.
Tor bridge node
Not listed in the public Tor directory. It acts as a proxy into the entry relay, so Tor use is harder to censor.
Which Tor relay can see the user's real IP address?
The entry relay.
What browser is the Tor browser based on?
Mozilla Firefox.
Onion routing
Traffic is wrapped in layers of encryption and passed through the relays.
What is Tor's hidden service protocol?
It lets sites (.onion sites) be hosted anonymously for Tor users only.
Dark web forensics
Investigating illicit activity done through the dark web. The investigator collects memory dumps to recover websites browsed and emails accessed.