Reversing MD5 Hash Function from 2500-Layer Neural Network in Jane Street CTF Puzzle
A Jane Street puzzle released in February last year presented participants with a complete PyTorch model in pickle format containing roughly 2500 linear layers. The model, stored in model.pt, produced an output of 0 for almost every input, including the example strings “vegetable dog”. The challenge required discovering an input that would make the network return a non-zero value without relying on gradient descent or exhaustive search.
Initial inspection of the output layers
Participant Alex began by examining the final two linear layers. The last layer was a 48×1 weight matrix clearly divided into three equal sections, while the preceding layer contained three copies of identical weights together with a repeating 16-byte bias pattern incremented by one each time. This structure indicated that the network maintained three versions of a 16-byte vector v and compared them against a secret target x using the combination v, v+1, v+2. The final layer applied weights 1, −2 and 1, so that only an exact match across all 16 bytes produced a positive result after the bias of −15 was applied.
Network simplification and constraint solving
The remaining 2500 layers formed a directed acyclic graph of integer operations. Alex modeled the entire network as an integer linear program, introducing binary variables to encode the behavior of each ReLU activation. After repeated simplifications—merging identity mappings, removing redundant ReLUs on strictly positive paths, and collapsing duplicate neurons—the problem size dropped from approximately two million nodes to 75 000. Even then, both an ILP solver and a subsequent SAT encoding with 200 000 variables failed to finish within practical time limits.
Discovery of the MD5 core
Plotting layer widths revealed 32 identical periods of length 48. Consulting common cryptographic primitives, Alex recognized the structure of the MD5 compression function. Manual verification confirmed that intermediate activations matched MD5 round constants and state variables, while other hash functions did not. The target 128-bit value was already visible in the bias of the penultimate layer, reducing the original problem to finding a preimage under that specific MD5 hash.
Unintentional length-encoding bug
Further reverse engineering exposed a flaw in the first seven layers responsible for encoding message length in little-endian format. When the input length reached or exceeded 256 bits, the network stored the raw integer 256 instead of the correct four-byte representation. This error affected only a subset of MD5 blocks yet prevented correct hashing for any input longer than 32 bytes. The bug was later confirmed by the puzzle authors to be unintentional.
Final solution
Once the algorithm and the target hash were known, the remaining task was a modest brute-force search over two-word English phrases. A larger word list quickly yielded the correct input that satisfied the hidden MD5 value. The puzzle demonstrated that a carefully constructed neural network can embed a non-differentiable cryptographic routine while still remaining solvable through systematic simplification and algorithmic insight.
Related articles
Agent-Ops 0.4.0 Released: Methodology for Secure Human-AI Collaboration in IT Operations
Sergey Zhitinsky, founder of Git in Sky, has published the public normative candidate for Agent-Ops 0.4.0, an open industry methodology governing how engineers and AI agents jointly handle IT infrastructure tasks. The framework keeps humans firmly in the decision-making loop while using deterministic programs for data collection and approved changes. It addresses risks such as prompt injection through processed data, unverified model outputs, and unclear accountability when AI recommendations lead to incidents. The methodology divides work across eight explicit steps and three separate planes: data, governance, and independent verification performed by a Guardian role. Two additional companies have joined as maintainers following agreements at the IT Elements 2026 conference, turning the project into a multi-organization effort. Contributors are invited to help refine contracts, schemas, and operational scenarios through GitHub and GitVerse.
ProxyKey MCP: Securing API Access for AI Agents Without Exposing Credentials
ProxyKey has released an MCP server that allows AI coding agents such as Claude Code and Cursor to manage API credentials without ever reading the actual secret values. The solution addresses the risk that any key visible to an agent becomes compromised through logging, tracing, or prompt injection. Real provider keys are stored encrypted with AES-256-GCM and never returned by any API endpoint after initial entry. Agents instead receive limited virtual passes that support IP binding, rate limits, TTL, and detailed request logging. A pending-secret workflow lets agents prepare services before the real token exists, with the human entering the secret only through a web panel. The approach deliberately restricts the MCP tool contract so no operation can read or return secret values.
Shadow AI in CI/CD: Why AI Agents Must Be Modeled as Security Threats
A new analysis from the CNCF highlights the growing risks of Shadow AI within continuous integration and continuous deployment pipelines. The report argues that AI agents should be treated as potential threats rather than simple productivity tools. Starting from a developer's laptop and extending to Kubernetes clusters, these agents can introduce unauthorized access paths and data exposure risks. Security teams are urged to incorporate AI agent behavior into formal threat modeling exercises. The discussion emphasizes the need for visibility and control over autonomous AI components operating in production environments.
Detecting Lateral Movement with Neural Networks Trained Solely on Synthetic Data
A researcher generated entire corporate network histories using a 135-line configuration file to create synthetic authentication logs containing lateral movement attacks. Neural networks trained exclusively on these artificial datasets were then evaluated against 1.65 billion real authentication events from Los Alamos National Laboratory, including 749 red team events across 301 compromised machines. The best ensemble of six models flagged 3.6 million hourly machine windows and placed 16 genuine attacks among the top 23 highest-scoring entries, producing only seven false positives. In comparison, a simple threshold counter required 161,000 false alarms to reach the same detection level. The approach also demonstrated an iterative feedback loop where detector errors directly informed refinements to the synthetic world generator. The work shows that synthetic data can reach AUC performance comparable to models trained on real labeled attacks while providing full control over the underlying attack definitions.