TEC-CYBE44-07 · Lesson 7 · 14 clock hours · lab
Malware Analysis Basics and Eradication
Objective. Students will perform static and basic dynamic analysis of a provided malware sample in an isolated sandbox environment and produce an eradication plan.
⚠ Pending professional review
This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.
VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.
What Is Malware Analysis?
Malware analysis is the process of examining malicious software to understand what it does, how it spreads, and how to remove it. Incident responders use analysis findings to contain an active infection, clean affected systems, and prevent recurrence. Two foundational approaches are static analysis and dynamic analysis.
Static Analysis
Static analysis examines a file without executing it. You collect facts about the file itself:
- File hashes (MD5, SHA-1, SHA-256) uniquely identify a sample. Record all three. A hash match in a threat-intelligence database such as VirusTotal confirms a known threat.
- Strings extraction pulls readable text from the binary — URLs, IP addresses, registry key paths, error messages, and API function names. Even partially obfuscated malware usually leaves useful strings.
- File metadata — PE header timestamps, section names, compiler artifacts — can reveal how the file was built.
- Import table review shows which Windows API calls the malware is likely to make (e.g., `CreateRemoteThread` suggests process injection; `RegSetValueEx` suggests registry persistence).
Static analysis is fast and safe because you never run the file. Its limitation is that obfuscation and packing can hide most meaningful content.
Basic Dynamic Analysis
Dynamic analysis runs the sample in a controlled environment and records what actually happens. A sandbox automates this: it executes the file inside an isolated virtual machine, captures system calls, network traffic, registry changes, and file system activity, then produces a behavior report.
Cuckoo Sandbox is an open-source, self-hosted sandbox widely used in training and production environments. Any.Run is a cloud-based interactive sandbox with a free tier suitable for training. Both are acceptable for this lab.
Key behaviors to record during dynamic analysis:
- Processes spawned and their parent-child relationships
- Registry keys created or modified (look for `HKCU\Software\Microsoft\Windows\CurrentVersion\Run` and similar autorun locations)
- Files dropped to disk and their paths
- Scheduled tasks created
- Network connections — domains contacted, IP addresses, protocols used
- Attempts to disable security tools or modify firewall rules
Sysinternals Tools for Live Analysis
When examining a running or recently infected Windows system, the Sysinternals Suite (published by Microsoft) provides essential visibility:
- Process Monitor (Procmon) captures real-time file system, registry, and process/thread activity. Filter by process name or path to isolate suspicious behavior.
- Autoruns shows every location where software is configured to launch automatically — registry run keys, scheduled tasks, services, browser extensions, and more. Unsigned or oddly named entries warrant investigation.
- TCPView displays all active TCP and UDP connections with the owning process. An unusual process making an outbound connection on port 443 to an unfamiliar IP is a red flag.
Use Sysinternals on the lab VM only, never on a production system during live analysis without authorization and a documented change-control process.
Safety and Lab Isolation
Isolation is non-negotiable. Malware analysis — even with pre-approved training samples — must occur inside a network-isolated virtual machine. Before starting:
1. Confirm the lab VM's network adapter is set to Host-Only or Isolated mode, with no path to your production network or the internet (unless using a cloud sandbox where isolation is managed for you).
2. Take a snapshot of the clean VM state before executing or importing any sample. You can revert cleanly when finished.
3. Never transfer a malware sample to a host machine or share it over email or chat.
4. Treat every file produced during analysis (memory dumps, dropped files, logs) as potentially hazardous until confirmed otherwise.
These controls mirror real-world incident response practice and protect both you and the school network.
Writing an Eradication Plan
Eradication removes the threat completely. A well-ordered plan prevents re-infection. Standard sequence:
1. Isolate the affected system from the network first (pull cable or disable the NIC).
2. Terminate malicious processes.
3. Remove persistence mechanisms — delete malicious registry run keys, disable or delete scheduled tasks, remove malicious services.
4. Delete dropped files — use full absolute paths identified during analysis.
5. Reset credentials that may have been exposed.
6. Patch the vulnerability exploited for initial access.
7. Restore from a known-good backup or rebuild if the system integrity is in doubt.
8. Verify with a fresh scan before reconnecting to the network.
Order matters: removing a dropped file before disabling its scheduled task can allow the task to re-download it. Always kill persistence first, then artifacts.
Connecting to Your Credentials
CompTIA Security+ and CySA+ both include incident response and malware-analysis content. ISC2 CC covers the security principles that underpin safe analysis practices. The skills you practice in this lab — hashing, behavioral observation, and structured eradication — map directly to exam objectives and to day-one job tasks in a SOC or IR role.
Key terms10
Static analysisExamination of a malware file without executing it, using hashes, string extraction, and PE header review to identify its characteristics.
Dynamic analysisRunning a malware sample in a controlled, isolated environment and recording its runtime behaviors such as file drops, registry changes, and network connections.
SandboxAn isolated virtual environment — such as Cuckoo Sandbox or Any.Run — that executes a malware sample and automatically captures its behavior for analysis.
File hashA fixed-length cryptographic digest (e.g., SHA-256) computed from a file's contents that uniquely identifies it and supports threat-intelligence lookups.
Persistence mechanismA method malware uses to survive reboots, such as registry run keys, scheduled tasks, or malicious services.
AutorunsA Sysinternals tool that enumerates all autostart locations on a Windows system, making it practical to spot malware-added persistence entries.
Indicators of Compromise (IOCs)Observable artifacts — file hashes, IP addresses, domain names, registry keys — that indicate a system has been compromised.
EradicationThe incident response phase in which all components of a threat — malicious files, persistence mechanisms, and attacker-created accounts — are removed from affected systems.
Strings extractionA static analysis technique that pulls printable character sequences from a binary file to reveal embedded URLs, registry paths, and API function names.
Process Monitor (Procmon)A Sysinternals tool that captures real-time file system, registry, and process activity on a Windows system, used to observe malware behavior during live analysis.
In class: Submit a provided malware sample (pre-approved, safe for training) to an isolated Cuckoo Sandbox or Any.Run session; record file hashes, strings, and observed behaviors in an analysis worksheet. · Use Sysinternals tools (Process Monitor, Autoruns, TCPView) on a Windows lab VM to identify persistence mechanisms and lateral movement artifacts left by a simulated malware infection. · Write a step-by-step eradication plan for the simulated infection, including removal of malicious registry keys, scheduled tasks, and dropped files, and specify the order of operations to avoid re-infection.
Materials: Cuckoo Sandbox or Any.Run (free tier), Sysinternals Suite, pre-staged lab VMs with simulated infection artifacts, malware analysis worksheet, student guides
Check: Analysis worksheet and eradication plan reviewed by instructor; must correctly identify at least 4 of 5 planted artifacts and provide a logically ordered eradication sequence to pass.
Practice check8
Answer each question, then check it. Nothing is recorded; this is your own practice.
Record this lesson on my transcript. Sign in with your key and enrollment email to record lessons (enroll free if you have no key). This page stays open to read and practise.