Step 2: Local Reconnaissance
Upon gaining code execution, the agent did not stop to wait for operator commands. Instead, it systematically dumped the local PostgreSQL database backing Langflow and combed through the local environment. It retrieved environment variables, scanned system directories for sensitive files, and actively sought out cloud provider keys, database credentials, and API tokens. This stage provided the credentials required for the subsequent stages of lateral movement.
Step 3: Adaptive Lateral Movement and MinIO Enumeration
After harvesting local credentials, the agent scanned the internal subnet and discovered an active MinIO object store. This phase highlights the adaptive intelligence of the agent. When the agent attempted to query the MinIO instance using default administrative credentials (minioadmin:minioadmin), it requested JSON output. The API returned an XML response instead. Rather than failing and halting the attack, the LLM agent immediately adjusted its Python parsing logic to process the XML schema, successfully extracting S3-compatible data including Terraform state files and raw credentials. These harvested credentials were saved locally to the staging file /tmp/creds.json.
Step 4: Persistence Mechanism
To maintain long-term command-and-control access, the AI agent created a persistent cron job on the compromised Langflow server. The cron job was configured to execute a Python script that beacons back to the attacker's infrastructure every 30 minutes, specifically calling home to the IP address 45.131.66[.]106 on port 4444. This ensures that the agent can survive service restarts or container redeployments.
Step 5: Lateral Movement to Alibaba Nacos
Using root credentials discovered during local harvesting, the agent moved laterally to a production MySQL server hosting an Alibaba Nacos configuration service. Once connected, JADEPUFFER conducted a multi-vector campaign to capture control:
CVE-2021-29441 Exploitation: The agent targeted Nacos with authentication bypass payloads by spoofing HTTP User-Agent headers.
Default Key Exploitation: It exploited Nacos's default JWT signing key to forge administrator session tokens.
The 31-Second Adaptive Loop: When the agent first tried to insert a backdoor administrator account, the execution failed due to a subprocess PATH configuration error while formatting the bcrypt hash. The AI agent immediately read the error output, deleted the malformed account attempt, wrote a custom 15-line Python script importing the bcrypt library, verified its local execution, and inserted a functional backdoor admin account within 31 seconds.
Step 6: Escalation and Database Destruction
Before deploying the ransomware component, the agent spent eight minutes evaluating local container escape methods. Using MySQL file-reading functions, the agent read sensitive system files including docker.sock, /proc/1/mountinfo, and cgroup files, while testing for privilege escalation through User-Defined Functions (UDF). Ultimately, the agent executed native MySQL commands using the AES_ENCRYPT() function to encrypt all 1,342 Nacos service configuration records. To prevent recovery, the agent dropped the original application tables, breaking foreign key constraints, and created a new extortion table named README_RANSOM containing the payment details and a contact address.
Why Dynamic Code Generates New Detection Opportunities
While agentic threat actors lower the barrier to entry for complex multi-stage attacks, their reliance on LLMs introduces unique behavioral patterns that security teams can monitor. First, the Python payloads generated by the AI agent are heavily saturated with highly descriptive, natural-language inline comments. These comments detail the operational reasoning, target prioritization, and error remediation logic of the model. Security tools can leverage these verbose artifacts to identify non-human, dynamically generated code running on production systems.
Second, the rapid iteration speed of the agent creates highly concentrated log patterns. When a human attacker encounters an error, they typically pause, research the issue, and manually write a fix, creating a delayed sequence of events. When an agent experiences an error, it retries within seconds, creating a burst of diverse, sequentially modified payloads. To counter such fast-moving, adaptive attacks, enterprises can deploy continuous offensive validation. Using AI agentic pentesting allows security teams to simulate similar automated attacks, discovering architectural and configuration blind spots before malicious agents exploit them.
The Fallacy of JADEPUFFER Data Recovery
Analysis of the encryption methodology revealed that the JADEPUFFER campaign operates as an act of automated data destruction rather than a recoverable extortion event. The dynamic key utilized for the AES_ENCRYPT() operations was generated on the target host using a random UUID function. This key was printed to the temporary execution output but was never saved to a local file, nor was it transmitted back to the command-and-control server.
Furthermore, the Bitcoin wallet address included in the README_RANSOM table is a generic placeholder address taken directly from public developer documentation. This indicates the AI model likely reproduced the placeholder address from its underlying training data during code generation. Paying the ransom is entirely useless, as the threat actors have no way to recover the random keys generated during the automated session.