Home

pwnable.tw writeup - Start

跟我一起用热门渗透测试框架 metasploit rock ! 题目链接: Start 100 pts Start [100 pts] 检查保护: $ checksec start [*] '/home/z1933/workplace/vbshare/ctf/start' Arch: i386-32-little RELRO: No RELRO Stack: No canary found NX: NX disabled PIE: No PIE (0x8048000) NX disabled 表明可以在栈上执行指令。 拉到IDA中反汇编分析发现其输入输出是作者自己纯手写,程序有缓冲区溢出...

Read more

shellphish/how2heap 学习

shellphish/how2heap是一个学习各种学习各种堆利用技术的wargame。 本篇文章作为学习笔记加上一些个人理解。只做了Glibc>=2.31版本的,前面部分是用的2.31版本的Glibc,后面部分是较新的2.34版本的Glibc(从tcache_poisoning.c开始)。 fastbin_dup_into_stack.c 版本: Glibc-2.31 Tricking malloc into returning a nearly-arbitrary pointer by abusing the fastbin freelist. 源程序是先把tcache bin填满,这样free的时候chunk会插入到fastbin中,而不是tcachebi...

Read more

如何用gdb调试glibc源码

调试环境搭建: 根据这个回答Include source code of malloc.c in gdb?,下载源码用GDB调试。也可以到bminor/glibc上下载想要的其他版本源码。 这里所用的glibc 版本:glibc-2.31 根据gdb-onlinedocs-Preprocessor Macros,我们现在编译带调试信息的动态库(关键是宏扩展): 目录结构是: 源码存放在glibc-2.31文件里面。GNU C Library不能在源码的文件里面编译,只能创建一个单独的文件。 The GNU C Library cannot be compiled in the source directory. You must build it in a sepa...

Read more

CTF Waregames-Utumno-Writeup

Utumno 00 这个不能dump到本地,因为没有读权限,只能登录上去做了。 utumno0@utumno:/utumno$ ./utumno0 Read me! :P utumno0@utumno:/utumno$ file utumno0 utumno0: executable, regular file, no read permission 没有读权限,gdb,objdump没有用。 但是可以用LD_PRELOAD hook动态链接的库函数,设置LD_PRELOAD环境变量时,LD_PRELOAD共享的目标会优先加载,举个例子: 没有设置LD_PRELOAD环境变量的情况: $ ldd plt linux-vdso.so.1 (0x00007f...

Read more

CTF Waregames-Behemoth-Writeup

Behemoth wargame 包括缓冲区溢出,权限提升,格式化字符串漏洞,一些绕过。 behemoth0 SSH: ssh behemoth0@narnia.labs.overthewire.org -p 2221 pass: behemoth0 behemoth0@behemoth:~$ cd /behemoth/ behemoth0@behemoth:/behemoth$ ./behemoth0 Password: demoo Access denied.. 用ltrace指令试下: $ ltrace ./behemoth0 __libc_start_main(0x80485b1, 1, 0xffc717b4, 0x8048680 <unfinishe...

Read more

CSAPP Attack Lab 实验

深入理解操作系统实验。Attack Lab。 实验环境: Ubuntu 20.04.4 LTS 用的书是深入理解计算机系统中文第三版 GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2 5段实验: 按照官方所给的这部分实验的Writeup,一共分为五个段: Phase Program Level Method Function Points 1 CTARGET 1 CI touch1 10 2 ...

Read more