惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

K
Kaspersky official blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
F
Full Disclosure
B
Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
L
Lohrmann on Cybersecurity
月光博客
月光博客
I
Intezer
博客园 - 三生石上(FineUI控件)
Hacker News - Newest:
Hacker News - Newest: "LLM"
D
Darknet – Hacking Tools, Hacker News & Cyber Security
博客园_首页
P
Proofpoint News Feed
C
Check Point Blog
N
News | PayPal Newsroom
H
Heimdal Security Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
G
GRAHAM CLULEY
WordPress大学
WordPress大学
C
CERT Recently Published Vulnerability Notes
Y
Y Combinator Blog
Recorded Future
Recorded Future
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Tailwind CSS Blog
W
WeLiveSecurity
L
LINUX DO - 热门话题
Microsoft Azure Blog
Microsoft Azure Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Schneier on Security
Schneier on Security
爱范儿
爱范儿
Martin Fowler
Martin Fowler
U
Unit 42
T
Troy Hunt's Blog
S
Securelist
V
V2EX
V2EX - 技术
V2EX - 技术
MongoDB | Blog
MongoDB | Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 聂微东
人人都是产品经理
人人都是产品经理
M
MIT News - Artificial intelligence
T
Tor Project blog
Cisco Talos Blog
Cisco Talos Blog
罗磊的独立博客
小众软件
小众软件
阮一峰的网络日志
阮一峰的网络日志
Vercel News
Vercel News

博客园 - ssooking

cobaltstrike4.0 cracked CobaltStrike3.14破解 CobaltStrike3.12/13 破解 MobaXterm v10.9破解 BlackHat Arsenal USA 2018 ToolsWatch黑客工具库 - ssooking Jupyter/JupyterLab安装使用 - ssooking - 博客园 WordPress <= 4.6 命令执行漏洞(PHPMailer)复现分析 linux下pppoe连接管理 SQL注入学习资料总结 Win10添加右键在此处打开命令行 2018铁三测评题write以及一些想送给你们的话 GPG 认识浏览器请求头User-Agent 构建基于Suricata+Splunk的IDS入侵检测系统 iptables转发技术 博客园html测试 CTF线下防御战 — 让你的靶机变成“铜墙铁壁” 攻击流量的清洗 拒绝服务攻击的常见类型
60cms Cookies欺骗漏洞审计
ssooking · 2017-10-12 · via 博客园 - ssooking

 源码地址:https://files.cnblogs.com/files/ssooking/60cms.zip

 运行60cms目录下的Netbox.exe即可开启Asp Web服务,默认端口80

 

环境搭建完毕之后即可访问主页

1.漏洞分析

首先,我们分析 login.asp

  在admin目录下找到login.asp,可以发现登录页面的两个Cookies字段名分别为 cmsname 和 cmsid

 继续往下看

  可以看到,网页会把输入的管理员帐号和管理员ID分别赋值给cmsname和cmsid这两个cookies值,如果密码正确就会跳转到后台首页,并添加上述的两个cookies值.

  我们再来看一下后台首页(index.asp)的源代码,发现头部引用了check.asp文件

  这个文件的作用应该就是对登陆操作进行验证,我们跟踪分析其中的代码。

<!--#include file="../inc/md5.asp"--><%
'判断用户是否登陆
if session("cmsname")="" and instr(CStr(Request.ServerVariables("SCRIPT_NAME")),site_install&AdminPath&"/login.asp")=0 then
	if request.Cookies("cmsname")="" then
		response.Redirect(site_install&AdminPath&"/login.asp")
	elseif Session("admin_id") =null then
     Response.Write("<script>alert('登陆超时!');parent.location = '"&site_install&AdminPath&"/login.asp';</script>")
	else
		session("cmsname")=request.Cookies("cmsname")
		session("cmsid")=request.Cookies("cmsid")
	end if
end if
%>

   这里可以看到,网页虽然有验证用户登录状态,但只仅仅验证了Cookies的内容,只要两个Cookies的内容都对得上,就能访问后台首页。我们查看data目录下的数据库文件,发现60cms的默认管理员为admin,默认管理员ID为1

  因此我们只要根据这两个信息伪造Cookies,即可实现越权访问后台。

 2.漏洞利用

 在firebug中分别添加两个cookie:cmsname,cmsid。

注意这里的日期一定要修改超过当前时间,否则Cookies无法添加

这样就添加好了cookie

 此时我们访问http://localhost/admin则可以直接以admin身份进入管理后台

 

参考文章:

http://www.freebuf.com/articles/web/149232.html

声明:
作者:ssooking  联系邮箱:c3Nvb2tpbmdAeWVhaC5uZXQ=
若无特殊说明,所发博文皆为原创,转载请务必注明出处、保留原文地址。欢迎交流分享!如果您有任何问题,请联系我!