
Black Hat Europe 2025의 'The Forensic Trail On GitHub: Hunting For Supply Chain Activity'를 위한 데모
이 저장소는 Black Hat Europe 2025의 The Forensic Trail On GitHub: Hunting For Supply Chain Activity 를 위한 세 가지 데모를 포함합니다.
potential_attacks_demo: 공개 GH firehose를 기반으로 공격을 식별하고 조사하는 데모를 보여주는 Flask 웹 애플리케이션입니다.ghdig: GitHub 활동을 조사하기 위한 명령줄 도구입니다.gitthrunter: 의심스러운 GitHub 활동을 식별하고, 이를 보강하며, 추가 조사를 위해 렌더링하는 장난감 도구입니다.potential_attacks_demopotential_attacks_demo 디렉터리로 이동합니다:
cd potential_attacks
pip install -r requirements.txt
flask run
http://127.0.0.1:5000으로 이동하여 데모를 확인합니다.ghdigghdig 디렉터리로 이동합니다:
cd ghdig
pip install -r requirements.txt
ghdig는 GitHub API와 상호작용하기 위해 GitHub Personal Access Token이 필요합니다.
ghdig 디렉터리에 .env 파일을 만듭니다.
다음과 같이 GitHub 토큰을 파일에 추가합니다:
GITHUB_TOKEN=your_github_token_here
도구는 프로젝트 루트에서 Python 모듈로 실행됩니다.
python -m ghdig <command> [options]
사용 가능한 명령어와 사용 예시는 다음과 같습니다:
gist: GitHub Gist를 처리합니다.
python -m ghdig gist <gist_id_or_url>python -m ghdig gist https://gist.github.com/mmvojwip/e9975a3a16acc492e3e7f677b6276cb2pr: GitHub Pull Request를 처리합니다.
python -m ghdig pr <repo_url>python -m ghdig pr https://github.com/7finney/ethcodecommit: GitHub Commit을 처리합니다.
python -m ghdig commit <commit_url>python -m ghdig commit https://github.com/mmvojwip/agentkit/commit/023f11f08cc7b82036a78580202143381d703b9auser: GitHub 사용자를 분석합니다.
gitthruntergitthrunter 디렉터리로 이동합니다:
cd gitthrunter
pip install -r requirements.txt
쿼리를 실행하려면 main.py 스크립트를 실행하고 queries/ 디렉터리에 있는 SQL 쿼리 파일의 경로를 제공합니다.
python main.py potential_attacks.sql --start_date "2025-09-01 00:00:00"
참고: --start_date는 쿼리 크기를 줄이는 데 필요할 수 있습니다
그런 다음 행위자 데이터를 보강합니다:
python main.py potential_attacks.sql --enrich
참고: GitHub 토큰이 설정되지 않은 경우 보강 과정에서 속도 제한 문제가 발생할 가능성이 있습니다
마지막으로 앱을 시작합니다:
python app.py
python -m ghdig user <username_or_url>python -m ghdig user mmvojwiprender: 사용자 분석 HTML 보고서를 렌더링합니다.
python -m ghdig render <username>python -m ghdig render mmvojwipabsence: ClickHouse 쿼리에서 누락된 사용자와 저장소를 확인합니다.
python -m ghdig absence "<query>"python -m ghdig absence "$(< ghdig/tjactions_demo_query.sql)"