How Wiz Used AI and Vibe Coding to Expose 37% of the Fortune 100 in the SHAI-HULUD Breach + Video

Listen to this Post

Featured Image

Introduction:

In the rapidly evolving landscape of cybersecurity, the emergence of massive credential leaks requires equally innovative analysis techniques. The SHAI-HULUD incident, involving approximately 31,000 stolen credential entries, demonstrated a paradigm shift where Artificial Intelligence (AI) and “vibe coding” were leveraged not just for detection, but for large-scale, rapid threat intelligence. By combining traditional data engineering with generative AI, security researchers were able to scrape ephemeral data, de-duplicate compromised assets, and attribute breaches with unprecedented speed, revealing that over 37% of Fortune 100 companies were affected.

Learning Objectives:

  • Understand how to architect an AI-assisted data pipeline for scraping and analyzing leaked credentials from ephemeral sources like GitHub.
  • Learn techniques for composite fingerprinting and deterministic script generation to replace repeated AI queries.
  • Master the implementation of agentic workflows with human-in-the-loop skepticism to validate AI findings and enrich threat intelligence.

You Should Know:

1. Scraping Ephemeral Breach Data with AI-Assisted Tooling

When a breach like SHAI-HULUD occurs, platforms like GitHub act quickly to remove the data. Rami McCarthy’s first step was capturing this ephemeral data before it disappeared. The key insight here is that AI will not automatically build a robust data pipeline; it requires human specification of functional requirements like parallelization, backups, and caching.

Step‑by‑step guide to building a resilient scraper:

Instead of asking AI to “scrape the data,” you must guide it to build composable utilities.
1. Setup a Rotating Proxy and User-Agent List: To avoid rate limiting and IP bans.

Linux Command (using `proxychains` and `curl`):

 Install proxychains
sudo apt-get install proxychains4

Configure /etc/proxychains.conf with your proxy list
 Use it with curl
proxychains4 curl -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" https://target-site.com/leaked-data -o raw_dump.html

2. Implement Parallel Processing with Python: Use `asyncio` or `multiprocessing` to download multiple files simultaneously.

Python Snippet:

import asyncio
import aiohttp

async def fetch(session, url):
async with session.get(url) as response:
return await response.text()

async def main():
urls = ["url1", "url2", ...]  List of leak URLs
async with aiohttp.ClientSession() as session:
tasks = [fetch(session, url) for url in urls]
htmls = await asyncio.gather(tasks)
 Process and save data

asyncio.run(main())

3. Avoid the Data Swamp: AI won’t suggest indexing. Implement a database schema (e.g., SQLite) immediately.

SQLite Command Line:

sqlite3 breach_data.db "CREATE TABLE credentials (id INTEGER PRIMARY KEY, source TEXT, username TEXT, password_hash TEXT, machine_fingerprint TEXT);"

2. Analyzing Leaked Data via Composite Fingerprinting

Once the data is scraped, the next challenge is deduplication. The SHAI-HULUD loot had ~31K entries, but many likely came from the same compromised machine. Composite fingerprinting was used to identify unique systems (user laptops vs. CI/CD servers).

Step‑by‑step guide to fingerprinting and signal extraction:

  1. Generate Composite Fingerprints: Combine unique machine identifiers found in the loot (e.g., hostname, internal IP, domain SID) into a hash.

Linux Command (generating a hash from multiple values):

echo -n "hostname-WIN10-USER|192.168.1.5|S-1-5-21-..." | sha256sum | awk '{print $1}'

2. Use AI for Pattern Recognition: Feed a sample of the data to or a local LLM to identify the “shape” of the data. Ask it to differentiate between a user laptop (presence of browser cookies) and a CI/CD system (presence of `.env` files, npm tokens).

Prompt Example:

“Analyze the following credential entry. Identify if the metadata suggests this is from a personal laptop or a CI/CD build server. Look for paths like /Users/ vs /home/jenkins/.”
3. Codify AI Insights into Deterministic Scripts: Once the AI identifies a pattern (e.g., CI/CD systems have “runner” in the hostname), write a deterministic `grep` or `jq` command to extract all such instances.

Linux Command (using `jq` to filter JSON):

 Assuming data is in JSONL format
cat loot.jsonl | jq 'select(.hostname | contains("runner")) | {hostname, domain, username}' > cicd_machines.json

3. Attributing Victims and Enriching Secrets

Attribution is where AI shines but also where it fails without skepticism. In the SHAI-HULUD analysis, AI was used to extract claims from JWTs and URLs, but it made false assumptions (e.g., assuming `dev.azure.com` links always belonged to Microsoft).

Step‑by‑step guide to building an attribution pipeline with validation:
1. Signal Extraction with Regex and AI: Extract all potential identifiers (emails, JWTs, API keys, cloud URLs).

Linux Command (extract JWTs):

grep -Po 'eyJ[A-Za-z0-9_-].[A-Za-z0-9_-].[A-Za-z0-9_-]' leaked_data.txt > extracted_jwts.txt

2. Decode and Enrich with Python: Create a script to decode the JWTs and extract the `iss` (issuer) claim.

Python Snippet (decode JWT without verification):

import json
import base64

def decode_jwt(token):
parts = token.split('.')
 Decode the payload (second part)
payload = parts[bash]
 Add padding if necessary
payload += '='  (4 - len(payload) % 4)
decoded_bytes = base64.urlsafe_b64decode(payload)
return json.loads(decoded_bytes)

with open('extracted_jwts.txt', 'r') as f:
for token in f:
try:
data = decode_jwt(token.strip())
print(f"Issuer: {data.get('iss')}")
except:
pass

3. Implement the “Ralph Loop” (Skepticism): Force the AI to re-verify its own results. After it attributes a URL to a company, prompt it with: “Are you 100% certain this domain is owned by that entity? Check the WHOIS or DNS records.”

Windows PowerShell Command (for WHOIS lookup):

 Requires a whois module or tool installed
whois dev.azure.com | Select-String "Registrant Organization"

4. Agentic Workflows and Just-in-Time Tooling

The final phase involved creating an agentic system with a three-phase architecture: Signal extraction → Attribution → GitHub enrichment. This required building one-off tools to auto-triage results.

Step‑by‑step guide to building a validation agent:

  1. Create a GitHub Code Search Tool: Use the GitHub CLI or API to check if exposed API keys are still valid or hard-coded in public repos.

GitHub CLI Command:

 Search for a specific API key pattern in public repos
gh api search/code -q 'q=AIzaSyA... +org:targetcompany' --jq '.items[].html_url'

2. Automate Backtesting: When the AI finds a new pattern (e.g., a specific Slack webhook format), generate a `grep` command to retroactively search the entire 31K entry dataset.

Linux Command (backtesting):

grep -r "https\?://hooks.slack.com/services/T[0-9A-Z]+/B[0-9A-Z]+/." /path/to/breach/data/ > slack_hooks_found.txt

3. Human-in-the-Loop (HITL) Feedback: The researcher found things the AI missed. This step involves teaching the AI by providing corrective examples.
Process: When a false negative is found, add the new rule to the deterministic script and re-run the analysis pipeline.

What Undercode Say:

  • AI is an Amplifier, Not an Architect: The SHAI-HULUD response proves that while AI is exceptional at signal extraction and pattern recognition, it cannot design resilient data architectures. The human researcher must define the data structures, caching mechanisms, and parallelization strategies to avoid creating a “Data Swamp.” The real power lies in distilling AI’s transient insights into permanent, deterministic scripts that can be run repeatedly and at scale.
  • Skepticism Must Be Baked into the Pipeline: Lazy AI and incorrect assumptions (like the Azure DevOps misattribution) are critical vulnerabilities in AI-driven threat intel. Implementing feedback loops like the “Ralph loop” and maintaining a “human in the loop” are non-negotiable for accuracy. The most effective tool is a hybrid one: AI generates the leads, and the security engineer validates them with targeted tooling and domain knowledge.

Prediction:

The use of “vibe coding” and agentic AI in the SHAI-HULUD analysis heralds a future where security research is democratized and accelerated. We can expect a surge in “just-in-time tooling,” where one-off analysis scripts are generated dynamically by LLMs to solve specific, ephemeral problems. However, this will also lead to a new class of risks—”AI Hallucination Vulnerabilities”—where threat reports contain plausible but false attributions. The industry will shift toward developing standardized frameworks for AI-assisted validation, requiring researchers to be as skilled in prompt engineering and deterministic script writing as they are in traditional penetration testing.

▶️ Related Video (72% Match):

🎯Let’s Practice For Free:

IT/Security Reporter URL:

Reported By: Clintgibler Rami – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow UndercodeTesting & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin | 🦋BlueSky