随笔分类 - PWN--基础
对pwn 的基础学习
摘要://fmt.c #include <stdio.h> #include <string.h> int flag = 0x44434241; int main(int argc, char **argv) { char buf[1024]; int secret = 0x12345678; if (a
阅读全文
摘要:hacker@ubuntu:~/Desktop$ ./libc-2.23.so GNU C Library (Ubuntu GLIBC 2.23-0ubuntu11) stable release version 2.23, by Roland McGrath et al. Copyright (C
阅读全文
摘要:ubuntu 安装 docker 略 docker pull docker pull registry.cn-hangzhou.aliyuncs.com/pwndocker/pwndocker-nocbtm:1.0 效果 添加软连接 ln –s /home/hacker/Desktop /root
阅读全文
摘要:数据提取:已Hitcon-Training LAB1为例 | IDApython ea=here() print hex(ea),idc.GetDisasm(ea) ch=idc.GetDisasm(ea) print ch[-9:] ea=here() print hex(ea),idc.GetD
阅读全文
摘要:write函数 ssize_t write(int fd, const void *buf, size_t n) fd:文件描述符;write一般为1,由屏幕输出显示 buf:指定的缓冲区,即指针,指向一段内存单元;比如GOT表项 nbyte:要写入文件指定的字节数,64位一般指针8字节,32位是4
阅读全文
摘要:##x64 | libc_csu_init原理 x64位传参数,当参数少于7个时, 参数从左到右放入寄存器: rdi, rsi, rdx, rcx, r8, r9,如下在64位程序中调用libc的话会出下的libc_csu_init .text:00000000004005C0 ; void _li
阅读全文
摘要:ROP | 无防护下 shellcode #include <stdio.h> #include <stdlib.h> #include <unistd.h> //"unistd.h" iniclude many functions ,sush as ,read,write void vulnera
阅读全文
摘要:###ctf-wiki | 栗子1 gcc -g -o test test.c gdb ./test list #回车 查看源代码 一次显示10源代码 b 11 #在11行下断点 对于chunk结构的解析 逐次释放堆,观察对应的内存变化 释放chunk1,内存无变化 接着释放chunk2,内存映射如
阅读全文
摘要:看雪资料库 https://www.pediy.com/kssd/ CTF ALL IN ONE https://www.bookstack.cn/read/CTF-All-In-One/doc-1.4.4_webserver_basic.md ctf wiki https://wiki.x10se
阅读全文
摘要:##源码 #include<stdlib.h> #include<unistd.h> #include<string.h> #include<sys/types.h> struct data { char name[64]; }; struct fp { int (*fp)(); }; void w
阅读全文
摘要:##栈迁移 当我们的rop链过长时很可能栈空间不够,并且ebp之前的空间其实只是填充一些没什么用的数据 ##栈迁移机理 与传统的pop_ret类似,利用level_ret实现栈的迁移,都是寻找很小短的零碎代码,进行拼接,和拼积木很像。 level ret//拆解 mov esp,ebp//esp跟着
阅读全文
摘要:源码 setions信息 以下是原图: gdb peda:put@plt首探 结合.plt section信息 0x8048300就在.plt section,puts@plt是特殊符号名称 0x804a00c(指针)在.got.plt节这里 乍一看就得很奇怪,为什么要莫名其妙的跳到紧接着下一条指令
阅读全文
摘要:参考: https://www.cnblogs.com/EliteDci/p/5578901.html
阅读全文
摘要:0x00:预处理 以下两条指令可以均可以使源文件(.c)预处理,得到一个源文件(.i) 0x01:编译 编译过程就是将预处理后得到的预处理文件(如 hello.i)进行 词法分析、语法分析、语义分析、优化后,生成汇编代码文件。 由编译器(Compiler)对编译程序处理 从hello.i hello
阅读全文
摘要:大致框架 官网的一个简单样例 from pwn import * context(arch = 'i386', os = 'linux') r = remote('exploitme.example.com', 31337) EXPLOIT CODE IS HERE r.send(asm(shell
阅读全文
摘要:0x01:偏移量 0x7fffffffdd00: 0x4141414141414141 0x4141414141414141 0x7fffffffdd10: 0x4141414141414141 0x4141414141414141 0x7fffffffdd20: 0x414141414141414
阅读全文