This post is the second part of the post.
strace, ltrace
Let’s run the file again but this time providing a random string.
./ctf foobar
checking 'foobar'
echo $?
1
Now a new reply appears on the screen.
Let’s try with the string discovered.
./ctf show_me_the_flag
checking 'show_me_the_flag'
ok
echo $?
1
It still ends up with the error but it returns ok. We are getting there!
It is able to see the system calls and library calls using tools called strace and ltrace.
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "7ELFstrace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
>strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
p\tstrace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "7ELFstrace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
>strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "7ELFstrace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
>strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "7ELFstrace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
>strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
P~strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
"..., 832) = 832
pread64(3, "strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
@strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
@strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
@strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
@strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
@strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
@strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "7ELFstrace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
>strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
strace ./ctf show_me_the_flag
execve("./ctf", ["./ctf", "show_me_the_flag"], 0x7fff2d8ea008 /* 60 vars */) = 0
brk(NULL) = 0x10c6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0f8e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/glibc-hwcaps/x86-64-v2/", 0x7ffecb11f560, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/lib5ae9b7f.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\t\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=10296, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4202592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_DENYWRITE, -1, 0) = 0x7f60c0b8b000
mmap(0x7f60c0c00000, 2105440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7f60c0c00000
munmap(0x7f60c0b8b000, 479232) = 0
munmap(0x7f60c0e03000, 1613920) = 0
mprotect(0x7f60c0c01000, 2097152, PROT_NONE) = 0
mmap(0x7f60c0e01000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f60c0e01000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=91379, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 91379, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f60c0f77000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2432184, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 2445632, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0800000
mmap(0x7f60c089c000, 1159168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9c000) = 0x7f60c089c000
mmap(0x7f60c09b7000, 577536, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b7000) = 0x7f60c09b7000
mmap(0x7f60c0a44000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x244000) = 0x7f60c0a44000
mmap(0x7f60c0a52000, 12608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c0a52000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=141720, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 144232, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0f53000
mmap(0x7f60c0f56000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f60c0f56000
mmap(0x7f60c0f71000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f60c0f71000
mmap(0x7f60c0f75000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7f60c0f75000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P~\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1933688, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1985936, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c061b000
mmap(0x7f60c0641000, 1404928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f60c0641000
mmap(0x7f60c0798000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f60c0798000
mmap(0x7f60c07ed000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f60c07ed000
mmap(0x7f60c07f3000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f60c07f3000
close(3) = 0
openat(AT_FDCWD, "/home/kali/Desktop/textbooks/binary-analysis/code/chapter5/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=919768, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 921624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f60c0e71000
mmap(0x7f60c0e81000, 483328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f60c0e81000
mmap(0x7f60c0ef7000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x86000) = 0x7f60c0ef7000
mmap(0x7f60c0f51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdf000) = 0x7f60c0f51000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6f000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f60c0e6c000
arch_prctl(ARCH_SET_FS, 0x7f60c0e6c740) = 0
set_tid_address(0x7f60c0e6ca10) = 38383
set_robust_list(0x7f60c0e6ca20, 24) = 0
rseq(0x7f60c0e6d060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f60c07ed000, 16384, PROT_READ) = 0
mprotect(0x7f60c0f51000, 4096, PROT_READ) = 0
mprotect(0x7f60c0f75000, 4096, PROT_READ) = 0
mprotect(0x7f60c0a44000, 45056, PROT_READ) = 0
mprotect(0x7f60c0e01000, 4096, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7f60c0fc0000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f60c0f77000, 91379) = 0
futex(0x7f60c0a5277c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x3f\x73\xde\x1d\x72\x46\x5a\x89", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x10c6000
brk(0x10e7000) = 0x10e7000
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_EMPTY_PATH) = 0
write(1, "checking 'show_me_the_flag'\n", 28checking 'show_me_the_flag'
) = 28
write(1, "ok\n", 3ok
) = 3
exit_group(1) = ?
+++ exited with 1 +++
It shows many things but is not so helpful.
Let’s try with ltrace this time.
ltrace -i -C ./ctf show_me_the_flag
[0x400fe9] __libc_start_main(0x400bc0, 2, 0x7ffd360dd448, 0x4010c0 <unfinished ...>
[0x400c44] __printf_chk(1, 0x401158, 0x7ffd360df1fb, 320checking 'show_me_the_flag'
) = 28
[0x400c51] strcmp("show_me_the_flag", "show_me_the_flag") = 0
[0x400cf0] puts("ok"ok
) = 3
[0x400d07] rc4_init(rc4_state_t*, unsigned char*, int)(0x7ffd360dd1e0, 0x4011c0, 66, 0x7f657c11a4e0) = 0
[0x400d14] std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*)(0x7ffd360dd120, 0x40117b, 58, 3) = 0x7ffd360dd120
[0x400d29] rc4_decrypt(rc4_state_t*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)(0x7ffd360dd180, 0x7ffd360dd1e0, 0x7ffd360dd120, 0x7e889f91) = 0x7ffd360dd180
[0x400d36] std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)(0x7ffd360dd120, 0x7ffd360dd180, 0x7ffd360dd190, 0) = 0x7ffd360dd130
[0x400d53] getenv("GUESSME") = nil
[0xffffffffffffffff] +++ exited (status 1) +++
-i option to print instruction pointer and -C options to demangle C++ function names.
The result is simpler than strace and easy to understand.
I marked the interesting functions.
It compares the string show_me_the_money, and if this is the case it prints “ok”.
Then the encryption is executed and assigns the value.
The decryption is also executed and assigns the value too.
Finally, it requires an environment variable called “GUESSME”.
Therefore, the correct way of running the function should be like below.
GUESSME='foobar' ./ctf show_me_the_flag
checking 'show_me_the_flag'
ok
guess again!
Not it returns another line!
Let’s see the library call again with the environment variable this time.
GUESSME='foobar' ltrace -i -C ./ctf show_me_the_flag
[0x400fe9] __libc_start_main(0x400bc0, 2, 0x7ffd995d0c98, 0x4010c0 <unfinished ...>
[0x400c44] __printf_chk(1, 0x401158, 0x7ffd995d21ec, 320checking 'show_me_the_flag'
) = 28
[0x400c51] strcmp("show_me_the_flag", "show_me_the_flag") = 0
[0x400cf0] puts("ok"ok
) = 3
[0x400d07] rc4_init(rc4_state_t*, unsigned char*, int)(0x7ffd995d0a30, 0x4011c0, 66, 0x7f923451a4e0) = 0
[0x400d14] std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*)(0x7ffd995d0970, 0x40117b, 58, 3) = 0x7ffd995d0970
[0x400d29] rc4_decrypt(rc4_state_t*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)(0x7ffd995d09d0, 0x7ffd995d0a30, 0x7ffd995d0970, 0x7e889f91) = 0x7ffd995d09d0
[0x400d36] std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)(0x7ffd995d0970, 0x7ffd995d09d0, 0x7ffd995d09e0, 0) = 0x7ffd995d0980
[0x400d53] getenv("GUESSME") = "foobar"
[0x400d6e] std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*)(0x7ffd995d0990, 0x401183, 7, 17) = 0x7ffd995d0990
[0x400d88] rc4_decrypt(rc4_state_t*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)(0x7ffd995d09f0, 0x7ffd995d0a30, 0x7ffd995d0990, 0x14516e0) = 0x7ffd995d09f0
[0x400d9a] std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)(0x7ffd995d0990, 0x7ffd995d09f0, 0x1451730, 0) = 0x14516e0
[0x400db4] operator delete(void*)(0x1451730, 0x1451730, 21, 0) = 0x143f010
[0x400dd7] puts("guess again!"guess again!
) = 13
[0x400c8d] operator delete(void*)(0x14516e0, 0x14512b0, 0, 0x7f923451a4e0) = 0x143f010
[0xffffffffffffffff] +++ exited (status 1) +++
It can be seen that the delete function is added.
I think we collected all the hints from the result.
It’s time to investigate it at the instruction level.
Using objdump
Check the .rodata section using objdump.
-s option to print the full section contents.
objdump -s --section .rodata ctf
ctf: file format elf64-x86-64
Contents of section .rodata:
401140 01000200 44454255 473a2061 7267765b ....DEBUG: argv[
401150 315d203d 20257300 63686563 6b696e67 1] = %s.checking
401160 20272573 270a0073 686f775f 6d655f74 '%s'..show_me_t
401170 68655f66 6c616700 6f6b004f 89df919f he_flag.ok.O....
401180 887e009a 5b38babe 27ac0e3e 434d6285 .~..[8..'..>CMb.
401190 55868954 3848a34d 00192d76 40505e3a U..T8H.M..-v@P^:
4011a0 00726200 666c6167 203d2025 730a0067 .rb.flag = %s..g
4011b0 75657373 20616761 696e2100 00000000 uess again!.....
4011c0 49742773 206b696e 6461206c 696b6520 It's kinda like
4011d0 4c6f7569 7369616e 612e204f 72204461 Louisiana. Or Da
4011e0 676f6261 682e2044 61676f62 6168202d gobah. Dagobah -
4011f0 20576865 72652059 6f646120 6c697665 Where Yoda live
401200 73210000 00000000 s!......
From the binary, we can see the guess again string starts at 4011af.
Now let’s let’s check the instructions around the puts guess again call.
objdump -d ctf
...
400dc0: 0f b6 14 03 movzbl (%rbx,%rax,1),%edx
400dc4: 84 d2 test %dl,%dl
400dc6: 74 05 je 400dcd <__gmon_start__@plt+0x21d>
400dc8: 3a 14 01 cmp (%rcx,%rax,1),%dl
400dcb: 74 13 je 400de0 <__gmon_start__@plt+0x230>
400dcd: bf af 11 40 00 mov $0x4011af,%edi
400dd2: e8 d9 fc ff ff call 400ab0 <puts@plt>
400dd7: e9 84 fe ff ff jmp 400c60 <__gmon_start__@plt+0xb0>
400ddc: 0f 1f 40 00 nopl 0x0(%rax)
400de0: 48 83 c0 01 add $0x1,%rax
400de4: 48 83 f8 15 cmp $0x15,%rax
400de8: 75 d6 jne 400dc0 <__gmon_start__@plt+0x210>
...
guess again string is loaded by the instruction at 0x400dcd.
So, the instruction jumping to 0x400dcd means the input string is wrong.
0x400dc4 should be passed to escape the jump instruction.
Then the value in the register rcx is compared with dl at 0x400dc8.
the register rax works as an index.
Using gdb
To find the expected value of GUESSME, gdb can be used.
First, set the breakpoint at the comparison instruction.
Next, set the env variable GUESSME to foobar.
Finally, run the file.
(gdb) b *0x400dc8
Breakpoint 1 at 0x400dc8
(gdb) set env GUESSME=foobar
(gdb) run show_me_the_flag
Starting program: /home/kali/Desktop/textbooks/binary-analysis/code/chapter5/ctf show_me_the_flag
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
checking 'show_me_the_flag'
ok
Breakpoint 1, 0x0000000000400dc8 in ?? ()
(gdb) display/i $pc
1: x/i $pc
=> 0x400dc8: cmp (%rcx,%rax,1),%dl
(gdb) info registers rcx
rcx 0x6156e0 6379232
(gdb) info registers rax
rax 0x0 0
(gdb) x/s 0x6156e0
0x6156e0: "Crackers Don't Matter"
When the execution stops at the breakpoint, you can use display/i $pc
command to display the instruction at the current program counter ($pc).
It can be seen that it is stopped at the comparison instruction.
To see the base address contained in the rcx register, the command info registers rcx
is typed.
As it says the address is 0x6156e0, we can dump the string value in the address.
The value is “Crackers Don’t Matter”
Lastly, let’s run the file with the correct env variable.
GUESSME="Crackers Don't Matter" ./ctf show_me_the_flag
checking 'show_me_the_flag'
ok
flag = 84b34c124b2ba5ca224af8e33b077e9e
Then the flag is found.