pwn
文章平均质量分 79
长着翅膀的乌龟
it从业者,爱好者。
展开
-
栈溢出
栈溢出 栈溢出指用户通过输入来覆盖栈的返回地址,如果精心构造一个新的返回地址便能控制程序的执行流程,达到攻击的目的。 一个简单的例子来说明一下原理 #include<stdio.h> #include<stdlib.h> #include<unistd.h> int attack() { system("/bin/bash"); ...原创 2019-09-24 21:20:13 · 217 阅读 · 0 评论 -
二进制工具
linux上的动态调试工具gdb 现在的pwn题很多都是linux下的程序,因此学会gdb的调试是做pwn题必不可少的,现在简单介绍一下gdb的使用,gdb下有个很好的插件peda,可以安装一下。 例子: #include<stdio.h> #include<stdlib.h> #include<unistd.h> int add(int a,int b) { ...原创 2019-09-24 22:07:34 · 1025 阅读 · 0 评论 -
64位和32位在汇编语言中的区别
在linux如何生成32位的程序 在linux下默认生成的是64位的,并且ubuntu中没有安装32位的库,因此如果想要在ubuntu中运行或者生成32位的程序需要安装32位的库。 gcc test.c -m32 生成32位的程序 sun@ubuntu:~/Desktop$ gcc test.c -m32 sun@ubuntu:~/Desktop$ file a.out a.out: ELF 3...原创 2019-09-25 12:15:56 · 4455 阅读 · 0 评论 -
jarvisoj level1-2
level1 先使用checksec查询一下这个保护机制没有开启任何保护 [*] '/home/sun/Desktop/1' Arch: i386-32-little RELRO: Partial RELRO Stack: No canary found NX: NX disabled PIE: No PIE (0x...原创 2019-10-03 21:32:53 · 622 阅读 · 0 评论 -
jarvisoj level3
level3 将文件下载下来使用linux下的checksec进行检查开启了什么安全机制 sun@ubuntu:~/Desktop/test$ checksec level3 [*] '/home/sun/Desktop/test/level3' Arch: i386-32-little RELRO: Partial RELRO Stack: No c...原创 2019-10-03 22:30:06 · 1008 阅读 · 0 评论 -
格式化字符串漏洞
漏洞产生的原因 在编写程序时由于编写的不规范有可能产生这个漏洞。 下面一个例子 #include<stdio.h> int a=2; int main() { char b[100]; scanf("%s",b); printf(b); return 0; } 编译时使用 gcc test.c -m32表示编译成32位的程...原创 2019-10-04 13:20:57 · 578 阅读 · 0 评论