一个windows下的ddos样本。

加载器

程序运行之后会在临时目录释放出一个256_res.tmp的文件

之后将该文件移动至system32目录下,以rasmedia.dll命名。

删除原文件。

加载开始释放的dll文件,并调用该dll导出的install函数。

Rasmedia.dll

函数install会将将该dll注册成一个服务WinHelp32。

具体如下

服务运行之后会有两个线程开启。

一个线程用于和远端服务器进行通信。

一个线程会将自身拷贝到内存中,当发现映像文件被删除,会将自己再次拷贝。

该函数用于实现循环写保护。

另一个线程用于和远端的服务器进行通信,其交互的主要过程在函数StartAddress中。

函数一开始会解密出其中的远端服务器地址fabao.309420.com:7002,其对应的ip为61.147.107.79。为江苏省扬州的一个ip地址。

之后获取当前系统信息,加密之后发送至远端服务器。

加密算法还原如下:

发送的数据包如下一共96字节。

之后接受远端服务器的控制包。

该数据结构如下:

command为远端的控制指令。

accack为数据包长度,同时也作为攻击的判断符。

target_url为攻击的目标url。

port为攻击目标的端口。

attack_message为定制攻击数据载荷。

其中接受的command如下所示,其中包含远程执行命令,下载文件等操作,但是可以发现主要功能还是以ddos为主。

可以看见此处0x41000001,0x32000004,0x32000001,0x31000005为复合式指令,肉鸡收到该命令后会对目标进行多种类型的ddos攻击,其余的ddos指令各自对应一种ddos攻击。

此处为接收到的返回包。一共为228个字节,此时的数据为加密状态。

通过以下函数实现解密,可以发现解密数据的开始即为32000020,此处为一个ddos,命令。该命令的攻击目标

继续解密之后的target_url字段可以发现返回的是一个攻击目标的字段,该处为http://code.moquta.com

在提供的ddos攻击策略中有多重攻击模式,此处以32000020举例,该ddos通过http get请求实现攻击,该请求包在代码中已经写好模板,具体如下:只需要填写target,host和refere即可。

可以看到该模式选择由v1偏移208的端口字段指定端口,默认为80。

可以看到此处我们的返回包该偏移为0x50(多一个0是解密脚本的原因)。

此处即为发送的攻击包。

各种方式的攻击包

其中rand是一个随机数生成器。

0x31000001

fun_createthread_sockrandipsend

send_package{

gerneration with 5byte 8 times

}

length:40

one turn 100 time

0x31000002

fun_createthread_sockheapsendto

package{

+2 cout(start with 0)

+6 0

+8 tickcount

}encrypt_by_sub_10005480

length = 4096

one turn 65534 package

0x41000001

fun_createthread_sockrandtentimesendto

send_package{

buf(generation by rand(97,122))

}

length 30

one turn 1000 package

count % 10 sleep

0x31000005

fun_createthread_sockrandsend

send_package{

buf((byte)generation by rand(0,255)<<16)

}

length 1024

one turn all the time

fun_createthread_sockconnect1

send_package{

connect

}

one ture one package

then sleep

fun_createthread_sockconnect2

send_package{

connect

}

one turn 200 package connect and close

0x37000001

fun_createthread_sockendcontainsend

send_package{

buf(command_package[212,228])

}

length 16

one turn all the time

0x33000001

fun_creathethread_sockrandwithcountsend

send_package{

buf(#%d<<<<<I@C<<<<<%s! count,generation with rand(65,122))

}

length rand(20,120)

one turn 6500

0x31000003

fun_callback_sockrandthousandtimesendto

send_package{

buf((int)(generation with rand(97,122)<<16)*512*4)

}

length:2048

one turn 1000 time

0x32000004

fun_createthread_socksend_withoutref_httpone

send_package{

80

'GET %s?=%d HTTP/1.1'

'User-Agent: Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www'

'.baidu.com/search/spider.html)'

'Host: %s'

'Cache-Control: no-cache'

'Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/s'

'earch/spider.html)

GET %s?=%d HTTP/1.1'

'User-Agent: Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www'

'.baidu.com/search/spider.html)'

'Host: %s:%d'

'Cache-Control: no-cache'

}

Length:buff

one turn all the time

0x32000001

fun_createthread_socksend_withoutref_httptwo

send_package{

80

'GET / HTTP/1.1'

'Host: %s'

'User-Agent: Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www'

'.baidu.com/search/spider.html)'

'Cache-Control: no-cache'

'Connection: Close'

for other port

'GET / HTTP/1.1'

'Host: %s:%d'

'User-Agent: Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www'

'.baidu.com/search/spider.html)'

'Cache-Control: no-cache'

'Connection: Close'

}without_referer

length:buff

one turn all the time

0x32000001

fun_createthread_socksend_onlyhost_http

send_package{

80

'GET / HTTP/1.1'

'Host: %s'

for other port

'GET / HTTP/1.1'

'Host: %s:%d'

}

length:buf

one turn all the time

0x36000001

fun_createthread_socksend_withref_httpone

send_package{

80

'GET %s HTTP/1.1'

'Host: %s'

'User-Agent: Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www'

'.baidu.com/search/spider.html)'

'Cache-Control: no-store, must-revalidate'

'Referer: http://%s'

'Connection: Close'

for other port

'GET %s HTTP/1.1'

'Host: %s:%d'

'User-Agent: Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www'

'.baidu.com/search/spider.html)'

'Cache-Control: no-store, must-revalidate'

'Referer: http://%s'

'Connection: Close'

}

Length:buff

one turn all the time

0x32000002

fun_createthread_socksend_withref_httptwo

send_package{

80

'GET %s HTTP/1.1'

'Host: %s'

'User-Agent: Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www'

'.baidu.com/search/spider.html)'

'Cache-Control: no-store, must-revalidate'

'Referer: http://%s'

'Connection: Close'

for other port

'GET %s HTTP/1.1'

'Host: %s:%d'

'User-Agent: Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www'

'.baidu.com/search/spider.html)'

'Cache-Control: no-store, must-revalidate'

'Referer: http://%s'

'Connection: Close'

}

length:buf

one turn all the time

一个windows下的ddos样本的更多相关文章

  1. 做一个WINDOWS下破解WIFI。不须要Linux抓包!

    搬家了,没网了. 没有WIFI了! 想破解,只是没有Linux环境,不能抓包!破解! 于是自己动手开工. 在windows 下直接破解.貌似国内 还没看到.假设有了,那么请各位童鞋 提醒一下.赶急 要 ...

  2. 开源一个windows下的定时任务框架,简单粗暴好用。

    这里是你想要的功能: 支持插件,将你要执行的任务编译成程序集放到框架的根目录下,再进行简单的配置就行了. 支持Corn表达式.想让任务在什么时候执行就在什么时候执行. 支持安装成windows ser ...

  3. Python写一个Windows下的android设备截图工具

    界面版 利用python的wx库写个ui界面,用来把android设备的截图输出到电脑屏幕,前提需要安装adb,涉及到的python库也要安装.代码如下: import wx,subprocess,o ...

  4. 一个Windows下线程池的实现(C++)

    前言 本文配套代码:https://github.com/TTGuoying/ThreadPool 先看看几个概念: 线程:进程中负责执行的执行单元.一个进程中至少有一个线程. 多线程:一个进程中有多 ...

  5. 分享一个windows下检测硬件信息的bat脚本

    文件名必须以.bat结尾,如果出现闪退,请右击鼠标,以管理身份运行即可 @echo offcolor 0atitle 硬件检测 mode con cols=90sc config winmgmt st ...

  6. 在windows下使用linux命令,GnuWin32的使用.

    http://sourceforge.net/projects/getgnuwin32 使用过linxu的伙计估计都会喜欢上linux各种各样强大的命令如:grep, sed,awk,diff和pat ...

  7. 在windows下使用linux命令

    <转:http://www.cnblogs.com/adgnat/archive/2011/07/16/2108098.html> 使用过linxu的伙计估计都会喜欢上linux各种各样强 ...

  8. Windows下搭建deepnet环境

    近期在做deep learning的项目,学习了一下deepnet,之前搭建了一个windows下的deepnet的学习开发环境,把搭建系统的过程分享给大家. 1.我用的是windows下的visua ...

  9. windows下用c实现Socket通信

    原文:windows下用c实现Socket通信 原本以为c是跨平台,所以,c在windows下和linux下的程序应该是类似于Java,什么都不用改变的,今儿才恍然大悟,他们的类库不一样啊-- 下面我 ...

随机推荐

  1. 制造高CPU使用率的简单方法

    在群里有人问制造CPU占用率高的场景用来做测试.所谓做好事难,干“坏”事还不容易?这个需求有很多方法可以实现,比如使用一些压力测试工具.我首先想 到的是HASH JOIN.这个联接比较消耗CPU资源, ...

  2. JPA入门

    JPA是什么 JPA全称Java Persistence API,是一组用于将数据存入数据库的类和方法的集合.JPA通过JDK 5.0注解或XML描述对象-关系表的映射关系,并将运行期的实体对象持久化 ...

  3. Java动态加载JAR包

    参考代码: package org; import java.io.File; import java.net.URL; import java.net.URLClassLoader; import ...

  4. ASP.NET 显示项目之外的图片

    1.<asp:Image>标签的使用Loginer.images是图片的路径 this.images.ImageUrl = "showImg.aspx?imgFile=" ...

  5. 答辩HTML5

    答辩有三个项目,有三个游戏和知乎,游戏都是有js写的,我想说的是想要做一个是那么难啊!老师给了我们游戏的项目还有游戏的思路构成,完成项目.还有一个知乎,也很难,用到HTML,css3,php,数据库, ...

  6. shell脚本重新挂载出问题的卷

    #!/bin/bash#卷的全路径示例#pathexample =mount -t cetusfs 127.0.0.1:/cinderv/var/lib/cinder/volumes/0f6a20f4 ...

  7. Webstorm 2016.3激活码

    webstorm 2016.3 可用激活码, 使用activation code方式激活 就这么任性,就这么长 43B4A73YYJ-eyJsaWNlbnNlSWQiOiI0M0I0QTczWVlKI ...

  8. win7系统下 自带的定时关机

    进入cmd下,输入shutdown -s -t 600 以上例子代表的是10分钟后自动关机 -s代表定时关机 -t代表着定时,时间以秒为单位一分钟60s 输入完后按enter 定时关机设置完成 当想取 ...

  9. centos6安装php5.4以上版本

    1.检查当前安装的PHP包 yum list installed | grep php 如果有安装的PHP包,先删除他们  yum remove php.x86_64 php-cli.x86_64 p ...

  10. 在桌面程序上和Metro/Modern/Windows store app的交互(相互打开,配置读取)

    这个标题真是取得我都觉得蛋疼..微软改名狂魔搞得我都不知道要叫哪个好.. 这边记录一下自己的桌面程序跟windows store app交互的过程. 由于某些原因,微软的商店应用的安全沙箱导致很多事情 ...