[HTS] hackthissite javascript missions 1-7 [tutorial]

Researching, Proof of Concepts, Hacking, Console Modding and Hacking and more. No game hacking / modding here.
Post Reply
User avatar
Sethioz
Admin
Admin
Posts: 4764
Joined: Fri Jul 27, 2007 5:11 pm
Custom: Gaming YT > https://youtube.com/SethiozEntertainment
Game Hacking YT > https://youtube.com/sethioz
Game Hacks Store > https://sethioz.com/shopz
Location: unknown
Contact:

[HTS] hackthissite javascript missions 1-7 [tutorial]

Post by Sethioz »

////////////////////////////////////////////////////////////////////////////
JavaScript:
////////////////////////////////////////////////////////////////////////////


NOTE:
do not even attempt these without right tools, you need the following tools/programs:
*Firefox (tested on 2.x)
*Notepad++
*HEX converter or HEX editor (XVI32 will do)
addons for firefox:
*firebug
*java quick starter (to disable java quickly in one mission, also comes in handy in many real situtations)


1.
view source and find the right "javascript" part.
there you will find "alert" and 1-2 lines above that you will find a password.
it means that if you enter correct password, then it will display that alert.
so use the password to pass the mission.

2.
disable java.
- download "java quick starter" or "tools > options > content" and disable there.
load mission 2 and click to win.

3.
if (x.length == moo)
from code you can see that we need to get value of "moo"
so we do some math:

Code: Select all

var foo = 5 + 6 * 7 
var bar = foo % 8
var moo = bar * 2

6*7=42
42+5=47
%8
5R7

Remainder 7
7

var 7 = foo % 8

7*2=14
14=moo
now we know that password is 14 chars long, so any 14 char pass will do.

4.
ok let me explain this code lil bit.
first of, it is VERY important that you use notepad++
you simply vew source code of page and copy the javascript part into new .txt
now you get this:

Code: Select all

<script language="Javascript">																							RawrRawr = "moo";
function check(x)
{
        "+RawrRawr+" == "hack_this_site"
	if (x == ""+RawrRawr+"")
        {
		alert("Rawr! win!");
                window.location = "../../../missions/javascript/4/?lvl_password="+x;
        } else {
		alert("Rawr, nope, try again!");
	}
}	


if you read the code, then you see that x is the password and x = "+RawrRawr+", but there is a part that also says that "RawrRawr = "moo""
that part in source code is seperated and is on the rigt side of the page, you have to scroll few pages to the right if you are not using notepad++.
so its easy if you using notepad++
yeah, password is "moo"

5.
open up source and find the javascript part.
moo = unescape('%69%6C%6F%76%65%6D%6F%6F');
this part is the password. it is simply in hex.
open up xvi32 (or any other hex to ascii converter) and convert it to ascii.

6.
view the source and find the /checkpass directory. go there.
you see these things:

Code: Select all

moo = "pwns";
rawr = "moo";
and

Code: Select all

if(pass == rawr+" "+moo)
so password is rawr + space + moo
which means that rawr is moo and moo is pwns
lol wtf ?! cows (p)own .. (i personally never understood whats the fucking deal with pwn or pown ..whatever. must be some bratish crap)
anyways password would be "moo pwns"

7.
i'd say this is the idiot test instead of 1.
use firebug and inspect "check password" button.
you will quickly notice the password in the code

Code: Select all

javascript:if (document.getElementById("pass").value=="j00w1n"){alert("You WIN!");window.location += "?lvl_password="+document.getElementById("pass").value}else {alert("WRONG! Try again!")}
where "value=="j00w1n" is the password.


my notes:
2nd and 7th was the easiest and 3rd was hardest.
firebug was the most used tool for me, it really comes in handy.
also i have one theory to fool the site with packets, i need to test it out. if im right, then there is no real password. at least not on site. javascript is the only thing that checks the password. so if you send the win packet to site, it should count.
Post Reply