[逛站]搏天文章营销[sql]

发布于 2021-03-08  91 次阅读


大前提

不渗透已备案内容合法的站点!
不渗透企事业单位站点!
不渗透政府站点!

前言

这个站也是寒假的时候看见的,算是个营销文章联盟吧。

先放个后台看到的域名列表。

file

是用搏天短网址改的,站长似乎就是作者本人...

whois查询结果:

xlwswlgq.cn: 陈腾跃.1807139605@qq.com
tsxfzw.cn: 肖调桂.daixu888@qq.com
zghnhxs.com: 已开启匿名防护
19h5ic.cn: 何国华.1397813053@qq.com
dhxhyw.cn: 肖调桂.daixu888@qq.com
----
btstu.cn: 陈腾跃.1807139605@qq.com

有个域名和作者的域名是同个人注册的,然后下面分析下来发现管理员密码还是站长qq,qq一查确实是叫飘渺,也就是搏天短网址的作者。

过程

一个星期内收到同个手段的不同营销文章好几回,于是就打算去看看这个站能不能打下来,反正不是正规站点。

file

消息记录中的样本:

1563: http://prwa9xnn.zghnhxs.com:666/qq.php?t=161408223619958&gs=tar18&_wv=vmsl&alert%28%29id=1807139605#alert%28%29
213: http://xgrbjuvr.zghnhxs.com:666/qq.php?t=161267578074543&gs=tar18&_wv=vmsl&alert%28%29id=1807139605#alert%28%29
3710: http://9sej657q.zghnhxs.com:666/qq.php?t=161345923363056&gs=tar18&_wv=vmsl&alert%28%29id=1807139605#alert%28%29
5540: http://e7byrl5z.zghnhxs.com:666/qq.php?t=161355901592233&gs=tar18&_wv=vmsl&alert%28%29id=1807139605#alert%28%29
空密码: http://xyd94ckg.zghnhxs.com:666/qq.php?t=161371814376598&gs=tar18&_wv=vmsl&alert%28%29id=1807139605#alert%28%29
412: http://stabq1c8.zghnhxs.com:666/qq.php?t=161268323982925&gs=tar18&_wv=vmsl&alert%28%29id=1807139605#alert%28%29
542: http://61s9ya9m.zghnhxs.com:666/qq.php?t=161361578159651&gs=tar18&_wv=vmsl&alert%28%29id=1807139605#alert%28%29
984: http://um8jbbq5.zghnhxs.com:666/qq.php?t=161363151183068&gs=tar18&_wv=vmsl&alert%28%29id=1807139605#alert%28%29
951: http://8meyhnf3.zghnhxs.com:666/qq.php?t=161366018838547&gs=tar18&_wv=vmsl&alert%28%29id=1807139605#alert%28%29

最终我在写这篇文章时在自己机器的聊天记录里找到了这九条营销链接,可能还有部分在手机上没同步到电脑,不过手机找指定关键词的聊天记录比较麻烦而且还有玄学问题,就不继续收集样本了,已经够用了。

先进行参数删除处理,留下与页面有关的参数(只要删掉不影响页面显示的都是无关参数),最终得到如下样本:

1563: http://prwa9xnn.zghnhxs.com:666/qq.php?t=161408223619958
213: http://xgrbjuvr.zghnhxs.com:666/qq.php?t=161267578074543
3710: http://9sej657q.zghnhxs.com:666/qq.php?t=161345923363056
5540: http://e7byrl5z.zghnhxs.com:666/qq.php?t=161355901592233
空密码: http://xyd94ckg.zghnhxs.com:666/qq.php?t=161371814376598
412: http://stabq1c8.zghnhxs.com:666/qq.php?t=161268323982925
542: http://61s9ya9m.zghnhxs.com:666/qq.php?t=161361578159651
984: http://um8jbbq5.zghnhxs.com:666/qq.php?t=161363151183068
951: http://8meyhnf3.zghnhxs.com:666/qq.php?t=161366018838547

发现t参就是文章id,其他参数都是无关紧要的东西。

再抓包看看访问密码的实现方式,表单get个密码过去然后密码正确就返回个Set-Cookie: pwd=啥啥啥,然后密码还都已经写在html的描述头里了(为了转发时显示密码),也就是说密码存在两个有可能的注入点,即get传参的时候注入和cookie使用的时候注入。

不过感觉密码那个可能不容易注入,于是先开始测试对t注入:

默认情况:

file

基础语法' or ''='注入成功:

file

看来是一点防护也没有...直接sqlmap梭一把

file

结语

hso 我tm直接写个脚本跳过密码

// ==UserScript==
// @name         搏天营销自动填写
// @namespace    https://www.wkr.moe/
// @version      0.1
// @description  要啥密码呢
// @author       Wankko Ree
// @match        http://*/qq.php?t=*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    function getMeta(metaName) {
        const metas = document.getElementsByTagName('meta');
        for (let i = 0; i < metas.length; i++) {
            if (metas[i].getAttribute('name') === metaName) {
                return metas[i].getAttribute('content');
            }
        }
        return '';
    }
    function getCookie(name) {
        var nameEQ = name + "=";
        var ca = document.cookie.split(';');
        for(var i=0;i < ca.length;i++) {
            var c = ca[i];
            while (c.charAt(0)==' ') c = c.substring(1,c.length);
            if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
        }
        return null;
    }
    function setCookie(c_name, value, expiredays) {
        var exdate = new Date();
        exdate.setDate(exdate.getDate()+expiredays);
        document.cookie = c_name + "=" + escape(value) + ((expiredays==null) ?
                                                          "" :
                                                          ";expires="+exdate.toUTCString() + ";path=/");
    }
    var description = getMeta("description");
    var password = description.substr(5);
    var pwd = getCookie('pwd');
    if (password != pwd){
        setCookie('pwd', password, 1);
        var searchableStr = document.URL + '&';
        var t = searchableStr.match (/[\?\&]t=([^\&\#]+)[\&\#]/i) [1];
        var url = searchableStr.match (/([\S]*)\?/i) [1];
        console.log(url);
        window.location = url + '?t=' + t;
    }
})();

建议

别搞这种擦边球了,还打算盈利?当心喝茶

因为站点是以营利为目的的非法站点,不予技术性建议。