Hunt for Secrets in Git Repos

Hunt for Secrets in Git Repos


Aws PwnedLabs

git clone https://github.com/huge-logistics/cargo-logistics-dev

ssh_command.

Nos metemos al archivo que acabamos de generar

cd cargo-logistics-dev

git-secrets --install

Instalamos la herramienta git-secrets

ssh_command.

git-secrets --register-aws

git-secrets --scan

Escaneamos y no encontramos nada.

ssh_command.

Vemos que Ian hizo como 6 commits.

ssh_command.

git-secrets --scan-history

ssh_command.

git show d8098af5fbf1aa35ae22e99b9493ffae5d97d58f:log-s3-test/log-upload.php

Vemos un par de credenciales.

ssh_command.

Lo mismo pero por la interfaz de github.

ssh_command.

trufflehog filesystem .

ssh_command.

grep -R "mysqli_connect" . 2> /dev/null

ssh_command.

aws configure

Metemos las credenciales que habiamos encontrado en el repo de github.

ssh_command.

aws s3 ls huge-logistics-transact

aws s3 cp s3://huge-logistics-transact/flag.txt .

batcat flag.txt

ssh_command.

© 2026 Cu3rv0x