Advice and Questions

A place where newbies can post without (much) fear of reprisal. All mission posts should still go in the applicable forum.
Forum rules
Older HTS users: Be nice to the new people.

NEW USERS: This is NOT the place to post about missions! Refer to "Missions" category.

Advice and Questions

Post by Leitwolf on Fri Dec 07, 2012 3:15 am
([msg=71574]see Advice and Questions[/msg])

I'll start off with my question. It's a question that was sparked after completing all of the basic missions (correct me if this should go somewhere else or is too revealing). Basically, the goal of the missions was to FIND the passwords. But my question is this: How do those sites check that the password you entered is correct?...how do the sites know that what you typed in was either right or wrong? For example, I didn't see any sort of boolean logic statements being used to check if the input is correct. I don't think this question necessarily pertains to actually SOLVING the missions...I guess I'm just curious, because I could potentially see other ways of hacking these missions if they were programmed differently.

In terms of advice, which add-ons/extensions would you guys recommend downloading for Chrome (I'm not a big fan of Firefox). For example, I know Firefox has Firebug...but the majority of Firebug's features are built into Chrome. So far, I've downloaded "Edit This Cookie" which, as the name implies, allows me to edit cookies. I'm just wondering if there's anything else that would be beneficial to have.

Also, I have a lot of experience with HTML and Javascript through a college course I'm currently taking...but what I quickly learned from this site is that a knowledge of PHP, SQL, Apache, etc. is also necessary. Programming and scripting are such complex topics, where specifically would you recommend starting?...should I start with learning the commands or syntax?...should I try and learn all of them at the same time? In these forums, I often see links to say, W3E Schools, for example. This is an amazing resource, but when you go there, there are so many topics and they're all interconnected, it's overwhelming and I don't know where specifically to start.

Basically, any help or advice you can offer would be greatly appreciated.
Leitwolf
New User
New User
 
Posts: 3
Joined: Thu Dec 06, 2012 4:03 pm
Blog: View Blog (0)


Re: Advice and Questions

Post by edone automaton on Fri Dec 07, 2012 5:30 am
([msg=71577]see Re: Advice and Questions[/msg])

Hi Leitwolf, welcome aboard :)

Leitwolf wrote: Basically, the goal of the missions was to FIND the passwords. But my question is this: How do those sites check that the password you entered is correct?...how do the sites know that what you typed in was either right or wrong?


Also, I have a lot of experience with HTML and Javascript through a college course I'm currently taking...


I assume that this lot of experience involves the use of forms?
You put your name and password in one of these forms and it must then be checked against something to see if its correct.
That something is the data you provided on signing up, this is possible because that data (your password and username) is all stored somewhere.
My memory is somewhat hazy as to the exact nature of the missions but I believe you will have come across GET and POST at some point? This is the mechanism by which the password is being checked. Its saying, 'here is what derpster89 has entered, does that match what is stored on the database?' if it does, you're golden if not an incorrect message is returned.
IRL it is unlikely you are going to have a table of passwords and usernames which is not encrypted in some way. When you exploited the GET method, you could see what was going on but with POST you couldn't. Hopefully you can see the advantage of this from a security view point.

I apologize if that is too simplistic an answer, I just wanted to provide an overview of what is going on, feel free to ask about something in a more in depth manner. also read the links and any links they may lead to that are of interest to you. If the manner in which a specific mission is working is confusing you, its ok to ask, if its massively spoilerific there is the PM facility (you may need another couple of posts or something)


I'm afraid I don't know much about chrome stuff but I think there are chrome alternatives to many or most of the generally recommended firefox addons. A swift google will sort you out, look for developer style tools.

You don't need to learn everything about everything, I would suggest being very strong in a few areas of your choice, something you enjoy, and getting a basic working knowledge of a few others. You are correct it is a complex topic but you will find the same sort of patterns and themes arising again and again. If you know a couple of different languages really well for example, you will find that an ability to effectively look things up will get you by when you're looking at something written in an unfamiliar language.

Have fun.
A wise man can learn more from a foolish question than a fool can learn from a wise answer.
-Bruce Lee
User avatar
edone automaton
Poster
Poster
 
Posts: 190
Joined: Sat May 21, 2011 7:09 am
Blog: View Blog (0)


Re: Advice and Questions

Post by LoGiCaL__ on Fri Dec 07, 2012 7:00 am
([msg=71580]see Re: Advice and Questions[/msg])

Leitwolf wrote:I'll start off with my question. It's a question that was sparked after completing all of the basic missions (correct me if this should go somewhere else or is too revealing). Basically, the goal of the missions was to FIND the passwords. But my question is this: How do those sites check that the password you entered is correct?...how do the sites know that what you typed in was either right or wrong? For example, I didn't see any sort of boolean logic statements being used to check if the input is correct. I don't think this question necessarily pertains to actually SOLVING the missions...I guess I'm just curious, because I could potentially see other ways of hacking these missions if they were programmed differently.


When you look in the page source of a .php file like login.php you're not seeing the php code. That is what's called server side code. It gets parsed out by the server. Within the php code which is server side it will compare the POSTed(like edone mentioned) password value to that of one in the database for a certain user and compare.

NOTE: However, there may be vulnerabilities where you can view the script for certain sites, you just need to be able to find them.
User avatar
LoGiCaL__
Addict
Addict
 
Posts: 1062
Joined: Sun May 30, 2010 12:33 pm
Blog: View Blog (0)


Re: Advice and Questions

Post by fashizzlepop on Fri Dec 07, 2012 3:30 pm
([msg=71585]see Re: Advice and Questions[/msg])

I'd suggest a good way to start is to set up a simple webserver or find a free one to use. Then begin messing with and learning PHP. HTML forms and PHP will enlighten you on what's happening in the basics. From there, learning more advanced PHP and MySQL will help you greatly with the realistics as you will eventually get into sql injection and understanding how PHP interacts with MySQL databases. These are big subjects and critical to web security.
The glass is neither half-full nor half-empty; it's merely twice as big as it needs to be.
User avatar
fashizzlepop
Developer
Developer
 
Posts: 2303
Joined: Sat May 24, 2008 1:20 pm
Blog: View Blog (0)


Re: Advice and Questions

Post by Leitwolf on Sat Dec 08, 2012 1:13 am
([msg=71590]see Re: Advice and Questions[/msg])

The university I attend has it's own webserver, so each student can host a website under their username...so I figured I'd be able to use that to practice learning and working with PHP and SQL. I don't yet know if their server supports these, but it's a simple thing to figure out.
Leitwolf
New User
New User
 
Posts: 3
Joined: Thu Dec 06, 2012 4:03 pm
Blog: View Blog (0)


Re: Advice and Questions

Post by Assassian360 on Sat Dec 08, 2012 3:33 am
([msg=71591]see Re: Advice and Questions[/msg])

Personally I would recommend you just run your own locally from you machine. It's easier than trying to work with a university system typically. Something like EasyPHP (google it), will automatically get you set up with a PHP enabled local server with a MySQL database system. It's one of the easier free to use systems I have come across.
Assassian360
Poster
Poster
 
Posts: 135
Joined: Sat Jun 26, 2010 1:37 am
Blog: View Blog (0)


Re: Advice and Questions

Post by Leitwolf on Sat Dec 08, 2012 5:00 am
([msg=71592]see Re: Advice and Questions[/msg])

Thanks Assassian360! Got EasyPHP installed in less than 5 minutes, tested out a PHP file, and it works like a charm!
Leitwolf
New User
New User
 
Posts: 3
Joined: Thu Dec 06, 2012 4:03 pm
Blog: View Blog (0)



Return to NZone

Who is online

Users browsing this forum: No registered users and 0 guests