Rightclick on the page and click view-source or just ctrl+u. There you can see a javascript:
You can easy see that the password is 'h4x0r'
Level 2
Right click are disabled here, so just click ctrl+u to view the source. There you will see that a flash file are included:
View the source of the flash file by entering this in the address bar in your browser: view-source:http://try2hack.nl/levels/level2.swf
There you will see the username and password among the mess.
txtUsername
try2hack
txtPassword
irtehh4x0r!
Level 3
You will get an annoying prompt that disables you to view the source with right click and ctrl+u.
Just click on it and stop the browser before you get transfered to disneyland!
View the source directly with: view-source:http://try2hack.nl/levels/level3-.xhtml
The Javascript you will find is:
pwd = prompt("Please enter the password for level 3:","");
if (pwd==PASSWORD){
alert("Allright!\nEntering Level 4 ...");
location.href = CORRECTSITE;
}
else {
alert("WRONG!\nBack to disneyland !!!");
location.href = WRONGSITE;
}
PASSWORD="AbCdE";
CORRECTSITE="level4-sfvfxc.xhtml";
WRONGSITE="http://www.disney.com";
Nevermind that Javascript you see there, its fake, but check out that external Javascript that is camouflaged right over it:
<script src="JavaScript"></script>
Lets check it out: view-source:http://try2hack.nl/levels/JavaScript
Now try to open LEVEL5.EXE, you will probably get some errors, but that's OK. Now you will find some new files in you level5 folder.
The important files are LEVEL5.bas and main.txt
main.txt:
Global Const gc0006 = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.,:;-*+=~|&!_$#@()[]{}<\/>"
Global Const gc000A = "http://www.try2hack.nl/levels/level6-ksghvb.xhtml"
LEVEL5.bas:
If edtUsername = Mid(gc0006, 56, 1) & Mid(gc0006, 28, 1) &
Mid(gc0006, 35, 1) & Mid(gc0006, 3, 1) &
Mid(gc0006, 44, 1) & Mid(gc0006, 11, 1) &
Mid(gc0006, 13, 1) & Mid(gc0006, 21, 1) Then
If edtPassword = Mid(gc0006, 45, 1) & Mid(gc0006, 48, 1) &
Mid(gc0006, 25, 1) & Mid(gc0006, 32, 1) &
Mid(gc0006, 15, 1) & Mid(gc0006, 40, 1) &
Mid(gc0006, 25, 1) & Mid(gc0006, 14, 1) &
Mid(gc0006, 19, 1) Then
MsgBox "Level 6 can be found at: " &
Left$(gc000A, 37) & Mid(gc0006, 21, 1) &
Mid(gc0006, 14, 1) & Mid(gc0006, 29, 1) &
Mid(gc0006, 32, 1) & Mid(gc0006, 12, 1) &
Mid(gc0006, 14, 1) & Mid(gc000A, 44, 6), 0, "Horray!"
End
End If
End If
You should see that the username and password are made from the constant gc0006 in main.txt (don't get fooled by gc000A).
The 2. parameter in Mid() is the position of the character in gc0006.
I made a JavaScript to print out the username, password and the url to level6:
Download and install Wireshark (you will find it easily on google) or any other packet sniffer. Start capturing.
Now open LEVEL6.EXE and type a random username and password. Now you will se that you got some packages in Wireshark.
One of them contain this data:
After I figured out that this level was broken, it was quite easy. The server first require that you use IE 7.66.
I made a php script which sends a HTTP request where I set the user-agent to meet the requirements.
Then the server complains about not using Unix or Linux, and so it wants you to be refered from a microsoft site.
When the server is happy it gives you the URL to level 8.
After you have done level 9 you get an IRC channel name and password. After joining you receive a binary welcome message.
Just go to my favorite binary encoding/decoding site http://www.nickciske.com/tools/binary.php and decode it.
As you can see, you get a command that you must write to the bot to show you the bug.
It looked like a script, but the characters were all messed up, so thought this was rot13, which replaces all chars with the char 13 places to the right in the alphabet.
So the only thing I needed was to rot13 it again (26 chars in the alphabet. 13+13):
bind ctcr - PING ctcr:pingreply
proc ctcr:pingreply {nick uhost hand dest key arg} {
set dur [expr [unixtime] - $arg]
putserv "NOTICE $nick :Your ping reply took $dur seconds"}
After almost 24 hours, x number cups of coffee, trying and failing, hours googling and reading on eggdrop I finally made it!
The argument sent with the ping are in most irc clients a timestamp, but you can send what you want.
The bot lacks of security, it doesn't check $arg for bad code. Time to exploit.
I tried sending raw data with the /quote command but that didn't work.
I then come across the /nctcp command in Irssi (/ctcpreply for mIRC) which I noticed sent some stuff along with the data that seemed to make a diffrence.
I think it was some UTF \x00\x01 thing: