Hacking Mission


Basic Web Hacking Challenges



Introduction:

This is my first Article/Tutorial so hopefully it is pretty good and that it is able to help those out who are in need and who want to become better Hackers.
This is meant as a Tutorial to help you learn what you should know for the different Basic Web Hacking Challenges and a guide to help you along.
It does not give you answers or tell you exactly what to do, it just helps lead you in the right direction with a little help and advice.
Please give me some feedback about what you think about it and what I could do to improve it.

Basic Web Hacking - Mission 1:


This mission is called "The Idiots Test" for some obvious reasons.
This mission and almost all of the other Basic Web Hacking Challenges will use a web designing code called HTML (Hyper Text Markup Language) and PHP (Hypertext Preprocessor), along with some others.
I recommend that if you know very little or nothing about HTML or PHP that you go and read up on it either on the web or in a book. You can check some sites that I listed in my References at the bottom for help.

If you are wondering how to check and view the HTML of a site, you have three options.
Option One: "Right click" any where on the page except on Pictures, Flash Documents, Java Applets and other content like that, and press "View Page Source". This will open up a file that has the HTML code used to make that site.
Option Two: On your Web Browsers top menu bar click "View" then choose "Page Source".
Option Three: Hold down on the control (Ctrl) button on your keyboard and press "U".
Explore the HTML source code and who knows what you might be able to find.


Basic Web Hacking - Mission 2:

This mission is A LOT easier than one might believe and to be completely honest, it even stumped me for a er ... lengthy period of time.
I can't stress how important it is to read the beginning information very clearly. Read it once, then read it again without even trying to get the password. This will come in handy for later challenges.
So remember Read The Beginning Information VERY CAREFULLY!


Basic Web Hacking - Mission 3:


This is the first mission that really relies on knowing how to read HTML, especially about forms in HTML.
You also need to start noticing how the directories of the different web pages are used and when a form is submitted what it does to make sure the password is right and on what directory and web page it would store the password in.
HTML knowledge is key for this challenge. Also, pay close attention to the action used in this form and to where it is being checked from.


Basic Web Hacking - Mission 4:

This is where you will probably notice the challenges getting a bit harder.
In this mission, Network Sam seems to be a forgetful person so he made a script that would E-Mail the password to him so that he be able to get it if he forgot it.
This script is the Key to this challenge and there are two different ways to complete this challenge. One using HTML and the other using a form of JavaScript.
One option is to use JavaScript Injection. You should now do some research on JavaScript and more importantly JavaScript Injection. Don't just grab some information and try it. Read it and understand it because this will help you a lot not just for these challenges, but for real life situations.
Some good references are listed in my references. This will be a main part of this mission and even the next one.
The other option is to re-write the HTML document. How and what exactly to re-write is up to you to find out. All I can say without giving it away is that you sould keep in mind the script that Network Sam created to E-Mail the password to himself and where it is being checked (the action of the form).

Basic Web Hacking - Mission 5:


This challenge is quite similar to the previous but Network Sam has gotten a bit smarter and made the script to E-Mail the password to him a bit more secure.
If you used Javascript Injection to complete that last challenge this one should be a breeze. If you decided to re-write the HTML document, this would be the right time to do some research on how to use JavaScript Injection.
If not here is just a little information about JavaScript Injection: This is a form of JavaScript that is used to do such things as view cookies and parts of forms, and can also be used to disable or void things. It is placed in the URL (Uniform Resource Locator) Bar by itself and activated by pressing "Enter" or "Go".
Keep in mind the script that he is running in his form that is E-Mailing him the password and what you might be able to do to that with JavaScript Injection.


Basic Web Hacking - Mission 6:


Now Sam has gotten smarter. He has ... gulp ... ENCRYPTED his password. But not to worry because he always messes up somewhere.
He has a script on his page that when you type letters, number and/or symbols into and press "Encrypt", it gives you the encrypted version of what you typed in.
He has the encrypted password on the page, but the password that you need is the decrypted version of encrypted one that he gives you.
This can be achieved in different ways. You might want to fool around with the Encryptor and try to find a pattern in the way it encrypts what you type in. You can build a decryptor yourself, or once you find the pattern, try to figure it out yourself with the slow and time consuming method of Trial and Error.
Try some letter sequences and muck around with it and it will become a lot clearer. Try some sequences such as "aaaaa" which when encrypted becomes "abcde".
You might also want to read up on ASCII and how it works.


Basic Web Hacking - Mission 7:



This time Sam has made a nice little script that when you put in a year, the calendar of that year shows up. This is also knows as the UNIX "cal" command.
No when Sam usually puts things like this on his page there is usually always a way to exploit it, and that is what you are going to do.
If you know nothing about *NIX/UNIX Commands, I would highly recommend that you go do some research right now.
To get you going on the right track, you should know that he is currently running the "cal" command so you have to find a way to end that command and start another command that will do something else and maybe get you a list of important files.


Basic Web Hacking - Mission 8:


This mission introduces a new dot extension that you have never seen so far in the challenges. It is .shtml. Before going any further, I would reccommend you do some research on .shtml more specifically SSI (Server Side Includes).
Sam gives the file that the password file is stored in /var/www/hackthissite.org/html/missions/basic/9/.
When you use the script on that page you will notice that it takes you two directories ahead of where the password is stored.
Like the last challenge, you will want to list the files to find the one that you want but in a different format (SSI). You will also have to find the *NIX/UNIX command to go back two directories.
You will have to get the code dead on because your syntax is monitored very carefully.


Basic Web Hacking - Mission 9:


This challenge is very similar to BASIC 8, except that it is missing an input box to run a command.
His new password is now stored in /var/www/hackthissite.org/html/missions/basic/9/, which is very similar to where it was stored in BASIC 8, except in a different directory.
If only you had a place somewhat like BASIC 8 to type in your code and get to that directory.


Basic Web Hacking - Mission 10:

Network Sam has become a little more advanced. He has created a cookie script to see if you are authorized to view the password page or not.
If you took the time back on Mission 4 and 5 to actually read up and try to understand and make sense of JavaScript Injection, this should be no challenge to you. If you didn't read up and just tried to whip throughout the challenge, read it now and understand it. It is very helpful.
Using your knowledge of JavaScript Injection, you need to find a way to help you become authorized to view the password.



Conclusion:

I would like to conclude saying that I hoped that this quick and to the point Article/Tutorial has helped you understand how to complete the Basic Web Hacking Challenges and helped you learn something new.
Learning by doing most of the work and research is a lot better than getting the answer or how to get the answer given to you is critical for you Hacking future and because if it is given to you it is no fun and is basically making you rely on someone else. There is nothing better that the feeling of beating a challenge on your own.
I hope that I have not given any BIG spoilers and just helped you fellow and future hackers to understand the concepts use to get the answers but still making you do basically all of the main work yourself because it is a better way of learning.
If you think that I did not help enough and that I could have told you more on how to find the answer, you will thank me in the future when you realize that doing it yourself has taught you great knowledge that you can use with confidence because you took the time to figure it out yourself and do not have to wait on people to do it for you.
Please feel free to give me feedback on this article so that I can try to make it better. If anyone thinks that I said too much somewhere, please inform me because that definitely the last thing that I want to do. If you have a question that you don't think should be posted,
Thank You for taking the time to read my article and please be sure to check out my References for further learning and knowledge.

How Firewalls Work

How Firewalls WorkIf you have been using Internet on a regular basis or working in a large company and surf the Internet while you are at work, you must have surely come across the term firewall. You might have also heard of people saying “firewalls protect their computer from web attacks and hackers” or “a certain website has been blocked by firewall in their work place”. If you have ever wondered to know what exactly is this firewall and how it works, here we go. In this post I will try to explain “How firewalls work” in a layman’s terms.
How Firewalls Work


Firewalls are basically a barrier between your computer (or a network) and the Internet (outside world). A firewall can be simply compared to a security guard who stands at the entrance of your house and filters the visitors coming to your place. He may allow some visitors to enter while denying others whom he suspects of being intruders. Similarly a firewall is a software program or a hardware device that filters the information (packets) coming through the Internet to your personal computer or a computer network.

How Firewalls Work

Firewalls may decide to allow or block network traffic between devices based on the rules that are pre-configured or set by the firewall administrator. Most personal firewalls such as Windows firewall operate on a set of pre-configured rules that are most suitable under normal circumstances so that the user need not worry much about configuring the firewall.

Personal firewalls are easy to install and use and hence preferred by end-users for use on their personal computers.  However large networks and companies prefer those firewalls that have plenty of options to configure so as to meet their customized needs. For example, a company may set up different firewall rules for FTP servers, Telnet servers and Web servers. In addition the company can even control how the employees connect to the Internet by blocking access to certain websites or restricting the transfer of files to other networks. Thus in addition to security, a firewall can give the company a tremendous control over how people use the network.

Firewalls use one or more of the following methods to control the incoming and outgoing traffic in a network:

1. Packet Filtering: In this method packets (small chunks of data) are analyzed against a set of filters. Packet filters has a set of rules that come with accept and deny actions which are pre-configured or can be configured manually by the firewall administrator. If the packet manages to make it through these filters then it is allowed to reach the destination; otherwise it is discarded.

2. Stateful Inspection: This is a newer method that doesn’t analyze the contents of the packets. Instead it compares certain key aspects of each packet to a database of trusted source. Both incoming and outgoing packets are compared against this database and if the comparison yields a reasonable match, then the packets are allowed to travel further. Otherwise they are discarded.

Firewall Configuration


Firewalls can be configured by adding one or more filters based on several conditions as mentioned below:

1. IP addresses: In any case if an IP address outside the network is said to be unfavorable, then it is possible to set  filter to block all the traffic to and from that IP address. For example, if a cetain IP address is found to be making too many connections to a server, the administrator may decide to block traffic from this IP using the firewall.

2. Domain names: Since it is difficult to remember the IP addresses, it is an easier and smarter way to configure the firewalls by adding filters based on domain names. By setting up a domain filter, a company may decide to block all access to certain domain names, or may provide access only to a list of selected domain names.

3. Ports/Protocols: Every service running on a server is made available to the Internet using numbered ports, one for each service. In simple words, ports can be compared to virtual doors of the server through which services are made available. For example, if a server is running a Web (HTTP) service then it will be typically available on port 80. In order to avail this service, the client needs to connect to the server via port 80. Similarly different services such as Telnet (Port 23), FTP (port 21) and SMTP (port 25) services may be running on the server. If the services are intended for the public, they are usually kept open. Otherwise they are blocked using the firewall so as to prevent intruders from using the open ports for making unauthorized connections.

4. Specific words or phrases: A firewall can be configured to filter one or more specific words or phrases so that, both the incoming and outgoing packets are scanned for the words in the filter. For example, you may set up a firewall rule to filter any packet that contains an offensive term or a phrase that you may decide to block from entering or leaving your network.

Hardware vs. Software Firewall


Hardware firewalls provide higher level of security and hence preferred for servers where security has the top most priority whereas, the software firewalls are less expensive and are most preferred in home computers and laptops. Hardware firewalls usually come as an in-built unit of a router and provide maximum security as it filters each packet in the hardware level itself even before it manages to enter your computer. A good example is the Linksys Cable/DSL router.

Why Firewall?


Firewalls provide security over a number of online threats such as Remote login, Trojan backdoors, Session hijacking, DOS & DDOS attacks, viruses, cookie stealing and many more. The effectiveness of the security depends on the way you configure the firewall and how you set up the filter rules. However major threats such as DOS and DDOS attacks may sometimes manage to bypass the firewalls and do the damage to the server. Even though firewall is not a complete answer to online threats, it can most effectively handle the attacks and provide security to the computer up to the maximum possible extent.

Delete or Remove Recycle bin Icon from Desktop


If you are the kind of person who always likes neatness specially desktop, then here is a small trick for you that will simply remove the Recycle bin icon from desktop.



Follow the steps below:

[Start] [Run] [Regedit]
Registry Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\

CurrentVersion\Explorer\BitBucket


Modify/Create the Value Data Type(s) and Value Name(s) as detailed below.


Data Type: DWORD // Value Name: NukeOnDelete


Setting for Value Data: [0 = Use Recycle Bin / 1 = Permanently Delete]
Exit Registry and Reboot


Another Method
start->run->gpedit.msc-> user configuration ->desktop->remove recycle bin from desktop->double click->change it not configured to enable->apply and ok.

now come to start->run->gpupdate.exe and press enter.

your recycle bin icon is gone from desktop nad you will need to revert your settings for get that back.

after reverting setting make sure to run gpupdate.exe command.