← back to journal

Forking one sandbox into five to catch malware that hides

Jun 2026 Daytona AI Builder Hackathon Python security 1 min read

AI coding agents sometimes invent package names that don't exist. Attackers register those names and fill them with malware, a trick called slopsquatting. At the Daytona AI Builder Hackathon our team built Daytonator to catch it, and finished in the top 10.

My part: the sandbox forking.

The problem with one sandbox

Evasive malware checks where it is before doing anything. If there are no credentials to steal and nothing looks like production, it stays quiet. Scan it in one clean sandbox, see zero suspicious events, and you'd call it safe.

One snapshot, five forks

The scan starts from one clean Daytona sandbox snapshot, so every run begins from an identical state. I fork that snapshot into separate environments, each with one planted bait: nothing at all (the control), an SSH key, AWS credentials, a production-looking host, or a clock jumped forward.

The package is then installed in every fork while strace records file, network and process activity.

The control is the proof

Because the forks are identical except for one bait, the comparison is clean: behaviour that shows up in a baited fork but not in the control was provably triggered by that bait. In our test scan, the control saw 0 events, exactly what a normal sandbox would report, while the baited forks caught the package reaching for the planted values.

The test package is a safe fixture: it only reads fake planted values and "sends" them to an unroutable documentation address.

Explaining the verdict

A language model (Qwen2.5-72B via Featherless) writes the verdict in plain English. If no model is available, a built-in heuristic takes over, so a scan never fails just because an API is down.

What I'd do next

Stronger isolation with microVMs for genuinely hostile code, more baits, and a mode that sits in front of an agent's pip install and blocks bad packages in real time.