Exams / CSCO-300-215 / D1 Forensics Techniques
Forensics Techniques (part 1 of 2)
- Exam domain: Forensics Techniques
Anti-forensics: hiding files and data
Attackers try to keep payloads from being noticed. The exam uses the Cisco course definitions.
| Technique | What it does | Clue in a question |
|---|---|---|
| Steganography | Conceals data inside an ordinary carrier. NIST: "Embedding data within other data to conceal it." | Images with repetitive patterns |
| Transmogrification | Changes the file header (magic bytes) or extension so a file looks like another type | File type does not match its content |
| Tunneling | Encapsulates traffic inside another protocol | Data over an allowed protocol |
| Obfuscation / encoding | Makes code hard to read (Base64, XOR) | Encoded PowerShell, XOR loops in VBScript |
MITRE describes the header trick: "Adversaries may edit the header’s hex code and/or the file extension of a malicious payload in order to bypass file validation checks and/or input sanitization." A PDF starts with 25 50 44 46 2D (%PDF-); a Windows executable starts with MZ.
Static versus dynamic analysis
| Analysis | Examples | Sandbox? |
|---|---|---|
| Static (file is not run) | Hash, file type/magic bytes, PE header, strings, objdump -h (section headers) |
No |
| Dynamic (file is run) | Processes spawned, registry changes, files created (e.g. a fake Recycle Bin), network streams | Yes |
Cisco Secure Malware Analytics (Threat Grid) is a sandbox: use its behavioral indicators and network (TCP/IP) streams. Cisco Umbrella is DNS-layer security, not a file sandbox.
Tools to know
| Need | Tool |
|---|---|
| Reverse engineering a binary | Ghidra ("a software reverse engineering (SRE) framework") |
| Memory dump analysis | Volatility |
| Live process, CPU, loaded DLLs on Windows | Sysinternals Process Explorer |
| Pattern matching on files/memory | YARA: strings (hex, text, regex) + condition |
| Object file headers | objdump -h |
| Packets | Wireshark (filters such as http.request.uri, tls.handshake.type == 1) |
YARA is "based on textual or binary patterns", so a rule that scans memory works by string matching.
Reading exhibits
| Exhibit | Reading |
|---|---|
Apache log: login POST 302, plugin install, cmd=upload of r57.php, then hits on wp-content/r57.php |
Normal admin login, file-manager plugin abused to upload a PHP web shell |
Many [SYN] from varied sources to one port |
SYN flood: bigger backlog, recycle half-open connections |
One IP, many 404s on guessed names (/admin, /secret) |
Directory fuzzing (reconnaissance), not DDoS |
SMB NTLMSSP_CHALLENGE, STATUS_LOGON_FAILURE |
Authentication attempts |
schtasks /create ... /sc ONLOGON /ru "System" |
Persistence: "the task runs whenever a user (any user) logs on." |
.xlsm attachment on an unexpected refund email |
Macro-enabled phishing attachment |
Function ... End Function, On Error Resume Next, Chr, Asc |
VBScript |
| Artifact: PE32 executable from network source | An executable download, nothing more |
HTTP response with filename="Fy.exe" from iraniansk.com |
IOCs: domain and filename (not nginx, not content type, not a cookie) |
STIX: pattern holds the URL, malware name holds the threat |
Threat name plus URL |
| Word starts PowerShell with encoded arguments | Decode the Base64 first |
MITRE ATT&CK mapping
| Technique | Fits |
|---|---|
| T1055 Process injection | "executing arbitrary code in the address space of a separate live process" |
| T1048.002 Exfiltration over asymmetric encrypted non-C2 protocol | Encrypted upload over a protocol other than the C2 channel |
| T1567 Exfiltration over web service | Legitimate external web service used for exfiltration |
| T1053.005 Scheduled task | Persistence |
Exam traps
- Sandbox = behavior. Hash, file type and PE header are static.
- Steganography (carrier) versus transmogrification (header change) versus tunneling (encapsulation).
- Unknown file with no signature match: isolate and analyze deeper; never delete, rename or move to a less secure segment.
- An unexpected daily access by an authorised user with large dumps is a malicious insider, not privilege escalation.
- Public cloud forensics: multitenancy is the concern (do not expose other tenants).
- Memoryze and MemDump also touch memory, but the expected answer for "memory analysis" is Volatility.
Docs
- https://attack.mitre.org/techniques/T1027/003/
- https://attack.mitre.org/techniques/T1036/008/
- https://attack.mitre.org/techniques/T1055/
- https://attack.mitre.org/techniques/T1048/002/
- https://attack.mitre.org/techniques/T1595/003/
- https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks-create
- https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_powershell_exe
- https://learn.microsoft.com/en-us/defender-endpoint/malware/macro-malware
- https://yara.readthedocs.io/en/stable/
- https://ghidra-sre.org/
- https://www.sourceware.org/binutils/docs/binutils/objdump.html