[HACK] Sobre buffer overflows de 1 byte

RoMaN SoFt / LLFB roman at madrid.com
Wed Oct 31 14:55:53 CET 2001


 Hola.

 Este post va sobre los buffer overflows de 1 byte. Ver articulo
correspondiente en Phrack#55 (P55-8).

 He creado el exploit en mi maquina y me ocurre una cosa muy curiosa:
si lanzo el exploit desde el gdb (traceando y tal) llego a shell sin
problemas. Sin embargo si ejecuto el proceso directamente (desde mi
shell normal), obtengo un segfault (violacion de segmento). ¿Por qué
esta diferencia de comportamiento segun desde donde ejecute el
exploit? (gdb / bash).

 Incluyo tanto el exploit (exp2.c) como el fichero a explotar
(suid.c).

 A ver si alguien que haya probado el tema puede decirme algo...

 Logs:

roman at goliat:~/1byte > gdb -q exp2
(gdb) r
Starting program: /home/roman/1byte/exp2 

Program received signal SIGTRAP, Trace/breakpoint trap.
0x40001990 in _start () at rtld.c:142
142     rtld.c: No existe el fichero o el directorio.
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x40001990 in _start () at rtld.c:142
142     in rtld.c
(gdb) c
Continuing.
sh-2.03$ exit

Program exited normally.
(gdb) q

roman at goliat:~/1byte > ./exp2
missing args
Violación de segmento
roman at goliat:~/1byte > uname -a
Linux goliat 2.4.10 #1 Tue Sep 25 12:04:05 CEST 2001 i686 unknown
roman at goliat:~/1byte >

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    ** RoMaN SoFt / LLFB **  
       roman at madrid.com
   http://pagina.de/romansoft
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exp2.c
Type: application/octet-stream
Size: 802 bytes
Desc: not available
URL: <https://mailman.jcea.es/pipermail/hacking/attachments/20011031/c71f79a3/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: suid.c
Type: application/octet-stream
Size: 317 bytes
Desc: not available
URL: <https://mailman.jcea.es/pipermail/hacking/attachments/20011031/c71f79a3/attachment-0001.obj>


More information about the hacking mailing list