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

推荐订阅源

C
Check Point Blog
AI
AI
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
U
Unit 42
Vercel News
Vercel News
Stack Overflow Blog
Stack Overflow Blog
P
Proofpoint News Feed
Microsoft Security Blog
Microsoft Security Blog
The GitHub Blog
The GitHub Blog
WordPress大学
WordPress大学
Martin Fowler
Martin Fowler
博客园 - 【当耐特】
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
F
Full Disclosure
Google DeepMind News
Google DeepMind News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
H
Help Net Security
Recorded Future
Recorded Future
N
News and Events Feed by Topic
雷峰网
雷峰网
V
Vulnerabilities – Threatpost
Schneier on Security
Schneier on Security
aimingoo的专栏
aimingoo的专栏
S
Schneier on Security
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
O
OpenAI News
Project Zero
Project Zero
罗磊的独立博客
G
GRAHAM CLULEY
腾讯CDC
P
Privacy International News Feed
V
V2EX
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Hugging Face - Blog
Hugging Face - Blog
爱范儿
爱范儿
H
Heimdal Security Blog
L
LINUX DO - 热门话题
Forbes - Security
Forbes - Security
美团技术团队
MongoDB | Blog
MongoDB | Blog
Security Latest
Security Latest
M
MIT News - Artificial intelligence
T
Tor Project blog
Cisco Talos Blog
Cisco Talos Blog
宝玉的分享
宝玉的分享
T
Threat Research - Cisco Blogs
TaoSecurity Blog
TaoSecurity Blog

博客园 - 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=
若无特殊说明,所发博文皆为原创,转载请务必注明出处、保留原文地址。欢迎交流分享!如果您有任何问题,请联系我!