Analyse a malware sample from your own systems in an isolated lab
Defensive first look at a suspicious file found on systems you are responsible for: hash it, triage it without running it, and hand it on. Authorised, isolated lab only.
Warning
Ethics and authorisation. This page is for defending systems you are responsible for. Analyse only files taken from your own or your employer’s systems, or a client’s systems under a written agreement, with written authorisation from the system owner before you start. Work only in an isolated lab that has no route to production or the internet. This page does not cover, and AdminCycle will not publish, cracking, licence or copy-protection bypass, DRM removal, exploit development, or analysis of software you are not authorised to analyse. If the file may be evidence in a legal case, or the insurer has responders on the case, stop and hand it to them untouched.
Before you start
- Written authorisation from the system owner, naming the file and the purpose. Keep it with the incident log.
- An isolated analysis machine: a VM with no network adapter, or a host-only network with no route out. Snapshot it before you start and revert it afterwards. Purpose-built distributions exist for this, for example REMnux (Linux) and FLARE-VM (Windows).
- Never run the sample on your own workstation or on any machine that touches production.
- Transport: move the file in a password-protected archive, so nothing opens or scans it by accident on the way. Label it clearly as a malware sample.
Steps
1. Record the hash
The hash identifies the file without sharing it. On Windows:
Get-FileHash -Algorithm SHA256 -Path <sample-file>
Source: Get-FileHash, Microsoft Learn
Write the hash, the original path, the host it came from and the time in the incident log.
2. Look the hash up, do not upload the file
Search threat intelligence services and your EDR console by hash. Do not upload the file itself to public services: it may contain your organisation’s data, and an upload can tell the attacker that you found it.
3. Read printable strings, without running it
On the Linux analysis VM:
strings <sample-file>
Source: strings, GNU Binutils documentation
Look for host names, IP addresses, URLs, file paths and ransom note text. Copy indicators into the log, not into a chat that the attacker might read.
4. Check it against YARA rules you trust
yara <rules-file> <sample-file>
Source: running YARA from the command line, YARA documentation
Use rules from your security vendor or a source your security lead trusts.
5. List capabilities with capa
capa <sample-file>
Source: Mandiant capa
capa reports what the program appears able to do (for example persistence or encryption) without running it. Treat the result as a lead, not a verdict.
6. Hand it on
Give the hash, the indicators and the capa summary to your security lead, the insurer’s responders, or your national incident reporting body. Deeper analysis, for example in a disassembler such as Ghidra, belongs with people trained for it, under the same written authorisation.
What good and bad look like
- Good: you have a hash, a short list of indicators and a capabilities summary in the incident log, and the sample never ran outside the isolated lab.
- Bad, stop: you find the analysis VM had a network route out, or someone ran the sample on a normal machine. Treat that machine as part of the incident and tell the incident owner.
- Bad: indicators were pasted into a chat or a ticket system the attacker may be able to read. Move them to the log and tell the incident owner.
Traps
- Uploading the file to a public scanning service. It may contain your data, and it can tell the attacker you found it. Search by hash instead.
- Shared folders between the lab VM and your host. They are a route out. Turn them off before the sample arrives.
- Treating one tool’s output as a verdict. strings, YARA and capa give leads. The decision belongs to your security lead or the responders.
- Evidence handling. If the file may matter in a legal case or an insurance claim, the original must stay untouched. Work on a copy, and log who handled it.
Undo
Revert the analysis VM to its clean snapshot. Delete working copies of the sample from the lab, and keep only the protected archive that the incident owner asked you to keep.
Record it
Example included. The row marked Example is made up to show the format. Delete it and add your own rows.
| Date | File and host | SHA-256 (first 12 characters) | Authorised by | Indicators found | Handed to | Initials |
|---|---|---|---|---|---|---|
| Example: 2026-12-10 | invoice.js from PC-0142 | 3f5a9c0e1b2d | IT manager, in writing | One URL, one file path | Insurer’s responders | AB |