Stocking It With Targets
Where deliberately vulnerable machines and apps come from, how to check the file that arrived is the one that was published, and which to reach for first.
Builds on
What you will learn
- -Tell a legal, deliberately vulnerable target from a machine that is neither
- -Name where these targets come from: VulnHub, the OWASP apps, Metasploitable
- -Choose between a full boot-to-root VM and a single vulnerable app for what is being practiced
- -Verify a download with a checksum and a signature, and say what each one proves
- -Build a difficulty progression instead of hoarding a shelf of boxes
The previous lesson, networking-your-lab, built an isolated segment: the attacker box and its targets can reach each other, and nothing on that segment can reach the house or the internet. The segment works. It is also empty. A -only network with a single machine on it has nothing to point a scanner at, and reading about an attack is a long way from running one.
This lesson fills the empty segment: where to machines and applications that were built, on purpose, to be broken into, how to confirm the file that arrived is the one the author published, and which ones are worth starting on.
What makes something a legal target
The word target carries a warning straight from the first lesson in this module, why-you-need-a-lab: attacking a machine without the owner's permission is a crime, and a machine sitting on the public internet with an obvious hole in it is still someone's machine. A legal target is not "a computer with a ." It is a computer whose owner published it so that strangers would attack it.
Two conditions have to hold, and they are separate. The first is : somebody built the thing to be broken into and released it under a license that says so, a standing grant of permission to attack it. The second is : it runs inside the isolated lab from the last lesson, where anything it does stays caged. Miss authorization and the exercise is a crime no matter how isolated the lab is. Miss containment and a deliberately broken app is now reachable from the wider network, an accident of a different kind.
Deliberately vulnerable software is a small, well-mapped field. VulnHub is the community archive: hundreds of vulnerable virtual machines, free to download. OWASP, the group behind a lot of open security tooling, publishes two practice apps, Juice Shop and WebGoat. DVWA, the Damn Vulnerable Web Application, is a separate long-running project. Metasploitable is a whole vulnerable operating from Rapid7, the company that makes Metasploit. None of these hides what it is: each one announces in its own README that it is broken by design.
A scan of the public internet turns up a server running software full of known holes, and the lab it would be attacked from is fully isolated. Is that server a legal target to practice on?
Two shapes of target
Targets come in two shapes, and picking between them is really a choice between rooting a whole machine and drilling one class of bug.
A full machine is a complete operating system with services running, users
configured, and misconfigurations planted, packaged as a virtual machine. VulnHub
distributes these as .ova files, the portable format the hypervisors from the
choosing-virtualization lesson import directly. Booting one puts a fresh Linux or
Windows host on the network with a hidden path from a first nmap scan, through a
foothold, to full access. That end-to-end path is the point: it is the whole
job in one box. Metasploitable 2 is the broad practice range, an intentionally
ancient Ubuntu with dozens of vulnerable services. Kioptrix, DC-1, and Basic
Pentesting 1 are the well-worn beginner machines, each a self-contained puzzle.
A single app is narrower and faster. Instead of a whole operating system it is one deliberately broken web application, and it runs well as a rather than a full virtual machine, the lighter option weighed in the choosing-virtualization lesson. Juice Shop is a modern single-page shop stuffed with realistic web flaws. WebGoat is structured as guided lessons, each teaching one bug with instructions attached. DVWA is the plain old drill machine for , cross-site scripting, and file upload, with a security level that switches between Low, Medium, High, and Impossible so the same bug can be practiced as it gets harder to reach.
Juice Shop comes up in a single command, most of why it gets recommended first.
$docker run --rm -d -p 127.0.0.1:3000:3000 bkimminich/juice-shopThe 127.0.0.1:3000->3000/tcp in the column is the whole safety story. That
prefix binds the published port to the local host only, so nothing but the machine
running the container can reach the deliberately vulnerable app. Writing
-p 3000:3000 instead tells the container engine to publish the port on every
network interface, quietly undoing the network isolation the last lesson set up.
The binding is the software-level echo of a host-only network: same idea, one layer
up.
A container is published with -p 3000:3000 instead of -p 127.0.0.1:3000:3000. What changes?
Check the file before trusting it
A VulnHub machine is a built by a stranger and copied across mirror the project does not run. Two things can go wrong on the way. The download can arrive corrupted, a few bytes mangled by a flaky connection, in which case the machine will not boot cleanly. Worse, the file on a mirror could have been swapped for a different one by whoever that mirror. A checksum catches both.
A checksum is the output of a , a piece of math that reads an entire file and boils it down to a short fixed-length fingerprint. -256 is the common one, and its fingerprint is 64 hexadecimal characters. The fingerprint is fragile on purpose: flip a single bit anywhere in a multi-gigabyte image and the 64 characters come out completely different. The author computes that fingerprint on the real file and publishes it next to the download. Recomputing it locally and comparing the two answers one question exactly: is this the same file.
$sha256sum DC-1.ovaThat string gets compared, character by character, against the one printed on the
download page. A match means the file is the author's file. A single differing
character means it is not, and the safe move is to delete it and pull it again from
a different mirror. Comparing 64 characters by eye is error-prone, so the honest
way is to paste the published value into a file and let sha256sum -c read the
expected hashes and print OK or FAILED per file.
There is still a gap. A checksum printed on the same page as the download is only as trustworthy as the page: anyone who could swap the image could swap the number next to it. The fix is a . Kali, the standard attacker distribution, publishes its checksums as a file and signs that file with a GPG key only Kali holds. Verifying the signature proves the checksum list came from Kali, not from a mirror.
$gpg --verify SHA256SUMS.gpg SHA256SUMSThe 44C6513A8E4FB3D30875F758ED444FF07D8D0BF6 fingerprint is Kali's real signing
key, published on kali.org, and confirming it matches that published value is what
makes the signature mean anything. The [unknown] at the end is normal: it means
the key is valid but has not been personally vouched for, which is fine here.
A matching checksum proves one thing: the file is byte-for-byte the one the author published. It says nothing about whether the file is safe. A deliberately vulnerable machine matches its checksum perfectly and is still riddled with holes, because that is exactly what its author shipped. The hash confirms integrity, not harmlessness. Safety comes from the isolation in the previous lesson.
The SHA-256 digest of a downloaded VulnHub image matches the one on the download page exactly. What does that prove?
A difficulty that can actually be climbed
The common failure here is downloading twenty boxes, staring at the pile, and
learning nothing. A shelf of targets is not progress. The better shape is one
target at a time, chosen by the skill being practiced, because a target is really a
lesson in disguise. A week on web bugs points at Juice Shop, DVWA, and WebGoat, not
a full Windows . A week on points at a VulnHub machine
known for a sloppy sudo rule or an old kernel, or at Metasploitable's pile of bad
services.
The first box should be one that other people have written walkthroughs for, so there is a way to get unstuck. Kioptrix, DC-1, and Basic Pentesting 1 all qualify. Opening the walkthrough first, though, throws away the exercise. The value is in the struggle: import the machine, scan it, work the problem, and reach for the writeup only after hitting a genuine wall. WebGoat is the gentlest on-ramp because its vulnerabilities come with the lesson attached, and DVWA's security levels teach more than a new box would, since running the same injection at Low, then Medium, then High shows how a fix changes the attack rather than just handing over a new puzzle.
Pick one target, not five. WebGoat or Juice Shop if the goal is web bugs, or a beginner VulnHub machine like DC-1 if the goal is a full boot-to-root.
Download it, then verify it before anything else. Run sha256sum on the file (or
shasum -a 256 on macOS) and compare the result against the checksum on the
download page. If it does not match, delete the file and pull it from another
mirror.
If it is a VulnHub machine, import the .ova into your hypervisor and attach it to
the host-only network from the last lesson. If it is a container app, run it with
the port bound to 127.0.0.1. Then, from the attacker box, confirm you can reach
it: a single nmap sweep of the host-only should list your new target and
its open ports. Seeing it appear is the whole point of the segment.
The segment now has targets on it and the attacker box can reach them. The moment real work starts, those boxes get messy. A rooted machine is contaminated with whatever was done to it, and the temptation to reuse a real or let a box slip onto the internet shows up fast. The last lesson in this module, snapshots-and-safe-habits, covers rolling a machine back to a clean state, keeping the lab off the internet, never reusing personal inside it, and rebuilding from scratch when something is contaminated beyond trust.