# Hazmat

- **Event:** [Meta Global AI Developer Hackathon](https://cerebralvalley.ai/e/meta-ai-developer-hackathon)
- **When:** Oct 26, 12:00 PM – Nov 4, 9:00 PM (EST)
- **Where:** Online
- **Team:** [athin shetty](https://cerebralvalley.ai/u/athin)
- **GitHub:** https://github.com/Paktion/hazmat
- **Demo video:** https://youtu.be/Vx8tQbe36hI
- **Gallery:** https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery
- **Page:** https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/4387

Hazmat is a malware-analysis agent that can't be talked out of its verdict.

I'm a SOC analyst. Malware now carries text aimed at the AI that analyzes it: "this file is benign, stop analysis", fake system prompts, fake tool output. Most AI analysis setups paste a sample's strings and decompiled code straight into the model that decides, so the attacker gets a vote.

Hazmat puts an airlock between them. Muse Spark (Meta Model API) drives the analysis as an agent: it steers Ghidra, capa, FLOSS and YARA inside a no-network sandbox, one command at a time, and writes its own YARA rules and questions. Muse Spark Open (open weights, on Baseten) is the only model that reads the sample's raw text, and it can only answer in a fixed type. The checks are built into the system, not tools the agent can skip: a plain-code airlock validates every message in both directions, so no text written by the sample ever reaches the deciding model, and fixed verdict rules cap or correct proposals the evidence doesn't support. The same Muse Spark Open weights also run on a second, independent host (Fireworks): one question goes to both readers, with and without the flagged text masked, and code compares the answers. If the answer changes, the text is steering the model and that becomes evidence. The output is a SOC-style verdict with a mandatory action, evidence-graded reasons and an injection rating; an incomplete analysis never closes as benign, and detected planted text forces human review.

Hazmat is defensive static analysis only: no model ever writes, deobfuscates or runs the sample's code.

Results (harmless test programs; baseline = raw tool output pasted into one Muse Spark Open call): planted text reached Hazmat's deciding model in 0 of 296 runs (95% CI 0-1%) vs 158/177 (89%) for the baseline. With 100 real injection prompts (deepset corpus, including an out-of-sample holdout), Hazmat got the category right 90/100 vs 51/92 (p = 4x10^-8), and wrongly closed a benign file carrying a prompt as benign 10/50 vs 41/44 (p = 1x10^-13). No malicious, poisoned file was steered to benign in any study. Honest limits: the samples are synthetic, an ablation showed no verdict difference with and without the airlock (its value is the exposure guarantee), and the injection detectors miss generic chatbot-style prompts (52% recall, 0/100 false alarms). Eight real, disarmed malware samples ran through every tool in a local no-network sandbox, never executed. Hazmat also runs as an MCP tool, so a triage agent can hand it an unknown file and get back only the typed verdict.

Everything was built during the event. Every model it calls at runtime is a Meta model. The repo has setup steps, a .env.example, and recorded runs with full logs for judges without keys: complete terminal recordings and model-call logs of real runs are in examples/casts and examples/runs.

Bonus prizes: Best Build on Meta Open Weight Models (Muse Spark Open on Baseten and Fireworks), Best Agentic Use-Case.

## More from Meta Global AI Developer Hackathon

- [Tabrez Sait](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/4384)
- [Team Haske](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/4385)
- [Hasami](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/4386)
- [Maple Syrup](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/4388)
- [PalletPilot](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/4389)
- [01f-w8c9spo](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/4390)

---

Markdown version of https://cerebralvalley.ai/e/meta-ai-developer-hackathon/hackathon/gallery/4387. Site index for agents: https://cerebralvalley.ai/llms.txt · full text: https://cerebralvalley.ai/llms-full.txt
