Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 37 ยท Getting Started

What Is Malware Analysis?

Learn what malware analysis is, why defenders do it, the questions an analyst answers, and how static and dynamic methods fit together, with safe examples.

Malware analysis is the craft of examining a suspicious program, script or document to understand what it does, how it works, who or what it targets, and how to detect and remove it. The word malware is short for malicious software: anything built to harm a system, steal data, spy on people, extort money or give an attacker unauthorized control.

When a security team finds a strange file on a laptop, they cannot just delete it and move on. They need to know whether other machines are infected, what data left the network, how the attacker got in, and what to block so it does not happen again. Malware analysis answers those questions. This course teaches the defensive side of the job: reading evidence, building safe labs and writing detection rules. It never gives you working malware to deploy, and every hands-on example in it is a harmless simulation you can run in your browser.

Authorized and defensive use only. Analyze only files you have the right to examine, inside an isolated lab. Never run a real sample on your everyday computer, and never use what you learn to attack systems you do not own. The safety and legal lesson comes before any lab work.

Why defenders analyze malware

An alert such as "antivirus flagged report.exe" is only the start. Analysis turns it into decisions:

  • Incident response: which hosts are affected, what did the program change, is it still running?
  • Detection engineering: which file names, registry keys, network patterns or byte sequences can a tool match to catch it everywhere?
  • Threat intelligence: is this a known family? Who else has seen it? What do the attackers usually do next?
  • Attribution and trends: how did the technique change since last month?
  • Product security: vendors analyze samples to improve scanners, sandboxes and operating-system protections.

Notice that the goal is rarely "understand every instruction". The goal is the smallest amount of understanding that lets you act. A good analyst keeps asking: what decision does this finding support?

The questions an analyst answers

Almost every investigation starts from the same short list.

Question Example answer
What is it? A 64-bit Windows executable, probably a downloader
What does it do? Contacts a web server, saves a second file, adds a startup entry
How does it persist? A Run key in the registry and a scheduled task
How does it communicate? HTTPS to a rarely seen domain every five minutes
What does it touch? Browser password stores, documents, screenshots
How do we find it elsewhere? File hash, mutex name, domain, YARA rule
How do we remove it? Kill the process, delete two files, undo the registry change

The rest of this course is a toolbox for answering each row.

Static and dynamic analysis

Two families of technique cover most of the work, and they complement each other.

Static analysis studies the sample without running it. You compute hashes, read printable strings, inspect file headers, list imported functions and, later, read the disassembled code. It is safe in the sense that no malicious code executes, and it reveals what the program could do. Its weakness is that packed or encrypted samples hide most of what you want to see.

Dynamic analysis runs the sample in a controlled lab and watches. You record the processes it starts, the files and registry keys it changes and the network traffic it produces. It shows what the program actually does, even if the code is obfuscated. Its weakness is that clever malware detects the lab and behaves politely, or waits for a trigger that never comes.

flowchart LR
    S["Suspicious file"] --> T["Triage: hashes, type, strings"]
    T --> ST["Static analysis"]
    T --> DY["Dynamic analysis"]
    ST --> R["Findings and indicators"]
    DY --> R
    R --> D["Detection rules and response"]

Static and dynamic work feed each other: strings suggest a domain to watch for, and network captures point you to code worth reading.

Part of the craft is reverse engineering: reading disassembled or decompiled code to understand logic that no tool report explains. It is the deepest and slowest method, so analysts use it only when the faster ones leave open questions.

A first, safe simulation: turning observations into conclusions

You do not need a real sample to practice the thinking. The program below plays the role of a triage note. It takes a few plain observations about an imaginary file and prints which analysis questions they raise. Nothing in it is malicious: it only compares text.

Python Triage notes become questions

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.

Notice how each finding is a hypothesis, not a verdict. A string like cmd.exe appears in plenty of harmless programs. Analysts combine many weak signals before they decide.

Putting numbers on a sample

Even the simplest facts become useful when you record them consistently. This second example computes the identifiers a report always starts with, using a made-up byte string instead of a real file.

Python The first facts about any sample

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 SHA-256 value is the sample's fingerprint: two files with the same SHA-256 are, for all practical purposes, identical. Hashing and fingerprinting goes much deeper.

Skills and career paths

Analysts come from varied backgrounds, but most share a toolbox: operating-system internals (Windows especially), networking, scripting (Python is the common glue), a little assembly and a habit of careful note-taking. Common roles include malware analyst, incident responder, threat hunter, detection engineer and reverse engineer. This course builds those skills in order, from terminology to a complete report.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the main goal of malware analysis for a defender?

    Analysis supports decisions: scoping an incident, writing detections and cleaning systems. It is a defensive activity.
  2. 2. Which statement about static analysis is correct?

    Static analysis inspects hashes, strings, headers and code without running the sample. Packing and encryption can hide a lot from it.
  3. 3. Why do analysts combine static and dynamic analysis?

    Static work shows what the code could do, dynamic work shows what it actually does, and findings from one guide the other.
  4. 4. A file contains the string cmd.exe. What should you conclude?

    Many legitimate programs mention cmd.exe. A single string is a hypothesis, not a verdict.

Summary

  • Malware analysis explains what a suspicious file does so defenders can respond and detect it.
  • Typical questions: what is it, what does it do, how does it persist, how does it communicate, how do we find and remove it.
  • Static analysis inspects without running; dynamic analysis watches it run in a lab; reverse engineering reads the code.
  • Findings are hypotheses to combine, not verdicts.
  • Work only on samples you are authorized to examine, in an isolated lab.

Next: Malware Types and Families