
Demos for Black Hat Europe 2025's The Forensic Trail On GitHub: Hunting For Supply Chain Activity
This repository contains three demos for Black Hat Europe 2025's The Forensic Trail On GitHub: Hunting For Supply Chain Activity
potential_attacks_demo: A Flask web application that shows a demo of identifying and investigating an attack based off the public GH firehose.ghdig: A command-line tool for investigating GitHub activity.gitthrunter: A toy tool that identifies suspicious GitHub activity, enriches it, and renders it for futher investigation.potential_attacks_demopotential_attacks_demo directory:
cd potential_attacks
pip install -r requirements.txt
flask run
http://127.0.0.1:5000 to see the demo.ghdigghdig directory:
cd ghdig
pip install -r requirements.txt
ghdig requires a GitHub Personal Access Token to interact with the GitHub API.
Create a file named .env in the ghdig directory.
Add your GitHub token to the file like this:
GITHUB_TOKEN=your_github_token_here
The tool is run as a Python module from the root of the project.
python -m ghdig <command> [options]
Here are the available commands and examples of how to use them:
gist: Handles GitHub Gists.
python -m ghdig gist <gist_id_or_url>python -m ghdig gist https://gist.github.com/mmvojwip/e9975a3a16acc492e3e7f677b6276cb2pr: Handles GitHub Pull Requests.
python -m ghdig pr <repo_url>python -m ghdig pr https://github.com/7finney/ethcodecommit: Handles GitHub Commits.
python -m ghdig commit <commit_url>python -m ghdig commit https://github.com/mmvojwip/agentkit/commit/023f11f08cc7b82036a78580202143381d703b9auser: Analyzes a GitHub user.
gitthruntergitthrunter directory:
cd gitthrunter
pip install -r requirements.txt
To run a query, execute the main.py script and provide the path to your SQL query file located in the queries/ directory.
python main.py potential_attacks.sql --start_date "2025-09-01 00:00:00"
Note: --start_date may be necessary to cut down on query size
Then, enrich the actor data:
python main.py potential_attacks.sql --enrich
Note: enrichment will likely have issues with rate limits if a github token is not configured
Finally, start the app:
python app.py
python -m ghdig user <username_or_url>python -m ghdig user mmvojwiprender: Renders a user analysis HTML report.
python -m ghdig render <username>python -m ghdig render mmvojwipabsence: Checks for absent users and repos from a ClickHouse query.
python -m ghdig absence "<query>"python -m ghdig absence "$(< ghdig/tjactions_demo_query.sql)"