docker run --rm -it suezawa/exploit-example1 bash
./hello
# see all system calls
strace ./hello
# see write only
strace -e trace=write ./hello
file hello.s
cat hello.s
file hello.o
file hello
file static_hello
# ldd hello
linux-vdso.so.1 (0x00007ffdbc983000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff9c6614000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff9c6a05000)
# ldd static_hello
not a dynamic executable
# Assembly
gcc -S hello.c -masm=intel -o hello.s
# Object file
gcc -g -c hello.c -o /hello.o
# Dynamic Link ELF
gcc -fno-stack-protector -z execstack hello.c -o /hello
# Static Link ELF
RUN gcc -static -fno-stack-protector -z execstack hello.c -o /static_hello
Content type
Image
Digest
Size
207.5 MB
Last updated
almost 7 years ago
docker pull suezawa/exploit-example1