It has been a while since I haven't posted on RHA, that's because I was extremely busy with my university stuff and had absolutely no time for blogging, However today I finally managed to get some time for posting on RHA, In my previous article related to webserver security section I told you some ways which hackers can use to compromise your webserver, However in this article I will tell you how to protect your webserver from getting hacked or being compromised.
Well there are variety of methods you can implement to protect your webserver, but I will not be covering all of those method because it will take alot of time explaining the concepts.
WebApplication Security
Most of the webservers get compromised due to the vulnerability in their webapplication, some of the most common existing webapplication vulnerabilities are SQL Injection, Cross site scripting, Local file inclusion etc, These vulnerabilities usually due to improper or poor coding of web applications.
How do I find if these types of vulnerabilities really exist in my webapplications?
Well unless you are a penetration tester or have proper information related to these types of vulnerabilities, it is really difficult for you to find these types of vulnerabilities, A better option is to use a vulnerability scanner like Nessus or Acunetix.
Read More About finding a vulnerability in your website - How To Find A Vulnerable Website?
SSL(Secure Socket Layer)
SSL is not really necessary until you are running an ecommerce website or a website where you want the communication to be secure, If you are wondering what is SSL(Secure Socket Layer), Kindly read my article on What is SSL(Secure Socket Layer)
Password Cracking Attacks
As I told you in my previous article that some of the popular password cracking methods include:
1. Brute Force Attacks
2. Dictionary Attacks
3. Rainbow Tables
Here is a simple tip on how you can avoid these types of attacks - Keep Strong passwords, Now what do I mean by a strong password, read my post on How to create a strong password
Use Of Firewalls
Firewalls are usually designed from stopping attackers from evading a website, A firewall is basically a gateway used to allow or deny access, but are firewalls enough to protect your webserver?
The answer is "no", The administrator need to open ports like 80, 21, 25 etc to allow the firewall to give the users access to services like website, email, ftp etc, which leaves these services vulnerable to attackers.
What if some one sends a virus attached with an email through a mail server behind a firewall, The firewall will not be able to block these types of attacks, Hopefully I will explain this stuff related to firewall security in my upcoming articles.
Update Your Webserver Regularly
Vulnerabilities are created and pathed every day, so you need to make sure that you update your webserver and install latest patches and fixes.
Intrusion Detection System
An intrusion detection system (IDS) is used to monitor the entire network, it detects intruders; that is, unexpected, unwanted or unauthorized people or programs on network, If you want to know more about Intrusion detection system kindly read the following post, It will give you a better understanding of IDS
Certainly these methods aren't enough too for a total security, however I will continue the series of articles related to webserver security, Moreover I have also finished writing my newset book "An Introduction To Keyloggers, RATS And Malware" which I will be releasing very soon and the best part is that it will be free for all.
What methods do you use to secure your webserver?
Monday, March 14, 2011
Saturday, March 5, 2011
Man In The Middle Attack - SSL Hacking
One of the most successful way of gaining information such as passwords,user ids etc in LAN (local area network) is through man in the middle attacks . I will not be going to deep into Man in the middle attacks, but in simple words it can be explained as attacker or a hacker listening to all the information sent in between the client and the server .To prevent these kind of attacks Email providers started using Hypertext Transfer Protocol Secure (HTTPS) It is a combination of the Hypertext Transfer Protocol(HTTP) with SSL (Secure socket layer )protocol to provide encrypted communication between the client and the server .So when a hacker caries out a Mimt attack the victim is cautioned with a invalid SSL Certificate
In this tutorial I will teach how to carry out a successful Mitm attack
Concept :-
We Know that HTTP (Hypertext Transfer Protocol )simply sends all the information through plain text .So if we make the victim use HTTP instead of HTTPS to connect sites like Gmail , Pay pal. we will be able to carry out a successful Mitm attack with out causing any suspicion To do this we are going to use a tool called SSL strip
Read More: What is SSL(Secure Socket Layer)
Thing we Need
1. SSL strip: You can search Google for SSL strip it comes both in windows and Linux versions . I will be using the windows version in this tutorial
2. Ettercap to carry out mitm attacks
Demonstration :-
1. Open SSL strip and fill in all the required information for arpsoof, network ,ssl strip, change data .If you don’t know what to enter simply click auto check . remember to check if HTTPS to HTTP is included in Change data , finally click ok
2. Now select the victim’s IP and click open
3. Now open ettercap go to sniff -unsniffed sniffing and select your network interface and click ok
4. Now select hosts-scan hosts .Once scanning is completed .Open host list from hosts tab .Now select the IP address of the router as target 1 and the victims IP as target 2
5. Now select mitm-arp poisoning and click ok as shown
6. Finally select start-start sniffing .Now when the victim logs into gmail he will be using HTTP and not HTTPS Hence we are able to get the User id ,passwords as shown below
Counter measures:
1. whenever you perform an online transaction such as Credit card payment, Bank login or Email login always ensure that you Use HTTPS
2. Always check the SSL certificate before doing an online transaction
About The Author
This article is writen by John Jeffery, He is the owner of Hackholic where he writes security related stuffs, If you are interested in writting a guest post on RHA, Kindly read the guidelines here
In this tutorial I will teach how to carry out a successful Mitm attack
Concept :-
We Know that HTTP (Hypertext Transfer Protocol )simply sends all the information through plain text .So if we make the victim use HTTP instead of HTTPS to connect sites like Gmail , Pay pal. we will be able to carry out a successful Mitm attack with out causing any suspicion To do this we are going to use a tool called SSL strip
Read More: What is SSL(Secure Socket Layer)
Thing we Need
1. SSL strip: You can search Google for SSL strip it comes both in windows and Linux versions . I will be using the windows version in this tutorial
2. Ettercap to carry out mitm attacks
Demonstration :-
1. Open SSL strip and fill in all the required information for arpsoof, network ,ssl strip, change data .If you don’t know what to enter simply click auto check . remember to check if HTTPS to HTTP is included in Change data , finally click ok
2. Now select the victim’s IP and click open
3. Now open ettercap go to
4. Now select hosts-scan hosts .Once scanning is completed .Open host list from hosts tab .Now select the IP address of the router as target 1 and the victims IP as target 2
5. Now select mitm-arp poisoning and click ok as shown
6. Finally select start-start sniffing .Now when the victim logs into gmail he will be using HTTP and not HTTPS Hence we are able to get the User id ,passwords as shown below
Counter measures:
1. whenever you perform an online transaction such as Credit card payment, Bank login or Email login always ensure that you Use HTTPS
2. Always check the SSL certificate before doing an online transaction
About The Author
This article is writen by John Jeffery, He is the owner of Hackholic where he writes security related stuffs, If you are interested in writting a guest post on RHA, Kindly read the guidelines here
Thursday, March 3, 2011
How to Crack Windows Administrator Passwords
Some times it necessary to know admin passwords in schools ,collages to log in with admin privileges to do various thingsThere are many way to crack passwords. But in this tutorial I will explain a very basic method using a single tool to crack windows password . This might come handy in places like schools ,collages where you cant use your live Linux cds , usb ..etc because your being watched
Things we need :
1. Pwdump or Fgdump to extract password hashes
In this tutorial I will be using Pwdump
Extracting Password hashes :-
1. Open My computer and go to C:\Windows\system32 . now place the Pwdump file which we download earlier
2. Now open command prompt and navigate to C:\Windows\system32 \Pwdump
Using cd command and click enter
Example :-
Cd C:\Windows\system32 \Pwdump
3. Now you can see a list of Pwdump commands as shown
4. Now enter pwdump - localhost >>“ destination of output file “ (for 32 computers) and pwdump -x localhost >> “destination out put file “(for 64 bit computers )
Example :-
Cd C:\Windows\system32 \Pwdump localhost >> C:\hashes.txt
Cd C:\Windows\system32 \Pwdump -x localhost >> C:\hashes.txt
5. Now open the Out put file you can see the names of the different users with password hashes Now copy the hashes corresponding to the admin account
Cracking The Hashes
Considering that we are in school/collage were we cant use tools to crack passwords so as an alternative we are using online password cracking sitesCracking The Hashes
1. Go to online password cracking sites like www.cracker.offensive-security.com , www.onlinehashcrack.com and paste the hash select hash type as LM and click decode
2.By this way we are able to crack windows password using a single tool
Note:- If your not able to crack password hashes online use tools like john the ripper to crack password hashes . You can even copy the hashes and decoded it in your house
About The Author
This article is writen by John Jeffery, He is the owner of Hackholic where he writes security related stuffs, If you are interested in writting a guest post on RHA, Kindly read the guidelines here
Tuesday, March 1, 2011
SQL Injection Tutorial With Havij
According to a survey the most common technique of hacking a website is SQL Injection. SQL Injection is a technique in which hacker insert SQL codes into web Forum to get Sensitive information like (User Name , Passwords) to access the site and Deface it. The traditional SQL injection method is quite difficult, but now a days there are many tools available online through which any script kiddie can use SQL Injection to deface a webite, because of these tools websites have became more vulnerable to these types of attacks.
One of the popular tools is Havij, Havij is an advanced SQL injection tool which makes SQL Injection very easy for you, Along with SQL injection it has a built in admin page finder which makes it very effective.
Supported Databases With Havij
Demonstration
Now i will Show you step by step the process of SQL injection.
Step1: Find SQL injection Vulnerability in tour site and insert the string (like http://www.target.com/index.asp?id=123) of it in Havij as show below.
Step3: Now click on the Analyse button as shown below.
Now if the your Server is Vulnerable the information about the target will appear and the columns will appear like shown in picture below:
Step4: Now click on the Tables button and then click Get Tables button from below column as shown below:
Step5: Now select the Tables with sensitive information and click Get Columns button.After that select the Username and Password Column to get the Username and Password and click on the Get Table button.
Countermeasures:
Here are some of the countermeasures you can take to reduce the risk of SQL Injection
1.Renaming the admin page will make it difficult for a hacker to locate it
3.Use a Intrusion detection system and compose the signatures for popular SQL injection strings
4. One of the best method to protect your website against SQL Injection attacks is to disallow special characters in the admin form, though this will make your passwords more vulnerable to bruteforce attacks but you can implement a capcha to prevent these types of attack.
About Author:
This article was written by Muhammad Haseeb Javed. He blogs at his blog http://www.hackthepc.blogspot.com/ , If you are are also looking forward to write a guest post on RHA, read the guidelines here
One of the popular tools is Havij, Havij is an advanced SQL injection tool which makes SQL Injection very easy for you, Along with SQL injection it has a built in admin page finder which makes it very effective.
Warning - This article is only for education purposes, By reading this article you agree that RHA is not responsible in any way for any kind of damage caused by the information provided in this article.
Supported Databases With Havij
- MsSQL 2000/2005 with error.
- MsSQL 2000/2005 no error union based
- MySQL union based
- MySQL Blind
- MySQL error based
- MySQL time based
- Oracle union based
- MsAccess union based
- Sybase (ASE)
Demonstration
Now i will Show you step by step the process of SQL injection.
Step1: Find SQL injection Vulnerability in tour site and insert the string (like http://www.target.com/index.asp?id=123) of it in Havij as show below.
Step3: Now click on the Analyse button as shown below.
Now if the your Server is Vulnerable the information about the target will appear and the columns will appear like shown in picture below:
Step4: Now click on the Tables button and then click Get Tables button from below column as shown below:
Step5: Now select the Tables with sensitive information and click Get Columns button.After that select the Username and Password Column to get the Username and Password and click on the Get Table button.
Countermeasures:
Here are some of the countermeasures you can take to reduce the risk of SQL Injection
1.Renaming the admin page will make it difficult for a hacker to locate it
3.Use a Intrusion detection system and compose the signatures for popular SQL injection strings
4. One of the best method to protect your website against SQL Injection attacks is to disallow special characters in the admin form, though this will make your passwords more vulnerable to bruteforce attacks but you can implement a capcha to prevent these types of attack.
About Author:
This article was written by Muhammad Haseeb Javed. He blogs at his blog http://www.hackthepc.blogspot.com/ , If you are are also looking forward to write a guest post on RHA, read the guidelines here
Sunday, February 27, 2011
Types Of Server Sides Risks?
People require high security for internet. Most of people find it convenient to manage their bank accounts and business with the help of the internet. In such situation, the web security becomes the most important field in the network security. The interactive forms are written in HTML. Users type the information and send the request to the server to store the information by the user.
The request launches a script on the server that processes the data supplied by the user but the result may be much unexpected which raises the need for server side security. URL Manipulation, unexpected user input, cross site scripting, buffer overflows and heap overruns are all famous known server side risks. All of these risks will be explained in this article.
1. Conventional security
Conventionally, a firewall is placed between the web server and the internet so all the HTTP traffic reaching the web server will be secured. The firewall will allow only that traffic to the web server which fulfills all the requirements of the firewall. In this way, the web server can be saved from attacks to a great extent.
2. URL Manipulation
In URL manipulation, some parameters of URL are changed to get different results. The user id present in the URL can be manipulated to get the access of the account of any other user. If * is placed at the place of user id, one can get the list of all the members listed in the data base. Input of any user can be accessed and manipulated present on the page which is the great threat to security and privacy. If there’s a site about Medifast and Nutrisystem coupons containing personal details of different users, then you can manipulate the URL to access personal details of other users.
3. Unexpected User Input
When the server gets the unexpected user input, crashing of the server is the best reaction. Otherwise it will provide the control of the server to the attacker. The attacker may then use the server for whatever he wants to do. He can corrupt your database, download complete database and delete your database. If you don’t have a backup, what are you going to do?
4. Cross site scripting
In cross site scripting, attackers place malicious script on the trusted host’s end. The user may download that malicious script from the trusted host without realizing that this code is dangerous for the security. Sometimes, the server displays error page but due to malicious code, it may appear as a normal login page to the user. The user will enter the required information which can be misused as it will be sent to the attacker.
5. Buffer Overflow
The attackers may launch the attacks which results in access violation, instability and code injection. It may destruct the data stored in the database, causes the malfunctioning of software and many other destructive actions could be performed.
But what’s the solution then? You need to consider a few points to overcome the server side risks. Cryptography should be used to send the whole data in the query string. On the server side, the user input should be filtered and all the characters which are used in the scripting language should be removed.
About The Author
This article is written by Saksham, he loves loves to write on health and related topics. He writes a blog on diet and weight loss program sites that offer coupon code for Medfast and coupons for Nutrisystem meals.
Saturday, February 26, 2011
Auditing Weak User Accounts On UNIX System
Whenever we talk about auditing weak user accounts on UNIX or UNIX like systems the very first thought that comes to mind is using John The Ripper or L0phtCrack to audit weak passwords.
This is very big misconception among most of the people that weak user accounts only means accounts with weak passwords.
A normal user account isn't that normal if you haven't edited any of the permissions for it. So lets see how many abnormal tasks a normal user can perform if his account is not properly audited. Lets start with creation of user account.
Usually we type following command to create a normal user in UNIX or UNIX like systems.
[root@localhost~]#useradd newuser
[root@localhost~]#passwd newuser
Now what's the problem with this user creation method.
Problem number 1: This user is not member of any group.
Problem number 2: This user will have his own folder in /home directory.
If a user is in shared network environment then it is mandatory that user must be a member of some group and he/she must not have primary group of his own. By creating user by above method you have given him two powers, power to own his own group and next power of having a separate folder. Here's how you should add a user to avoid above problems.
[root@localhost~]# useradd -d /home/group_name -g group_name newuser
[root@localhost~]#passwd newuser
-d: will set default folder for user to /home/group_name
-g: will add user to group_name as primary group member
Now what might be the scope of the user we created about using and accessing disk space and memory? The answer is unlimited. That means newuser can create as many files and folders he/she wants ultimately covering up all disk-space or alternatively he/she can write or run a program that consumes lot of memory, that means if he writes and executes a program which recursively increases its stack or just able to smash its own stack then a normal user can make complete system to crash down and stand still.
And his rights to access any folder can help him hide a script or program that he/she can use to escalate privileges later to become super user without anyone noticing it.
Above problems can be solved by activating disk quota on system. According to the UNIX or Linux system you are using refer its manual to see how to activate disk quota. Once activated you can set disk quota by typing following commands,
[root@localhost~]#set quota -u newuser abc / 8000 10000 400 500
The above command will set 10000 bytes for newuser in ' / ' partition and he/she will be warned if his/her disk usage goes above 8000 bytes. At maximum he/she can create 500 files with warning on 400th file. You can replace ' / ' with directory name where you want to restrict the user.
The next problem is how to restrict user's power to use unlimited memory access? To set restrictions open “/etc/security/limits.conf” file in VI editor or any familiar editor to you. The syntax of file is quite explanatory and will differ according to the version and base kernel of your system.
Last thing that is problematic is life of account. To check it out type following command,
[root@localhost~]#chage -l newuser
Now have a look on output you'll find account expires never, password expires never, days to change password 99999. Believe it or not this is default user account setting in every UNIX and Linux system. If you are smart enough then you can easily figure out how fatal this kind of account can prove to your system if this information is not changed. To change account permissions type
[root@localhost~]change newuser
and set permissions.
There are several steps involved in auditing a UNIX or UNIX like system depending for what system is configured but auditing weak user accounts for their permissions and passwords is common task in all no matter what your motive is. I know an experienced UNIX administrator will find this article is of little help whereas new administrators will find it useful. Anyways I hope RHA readers like this post, thanks for reading, happy hacking.
About The Author
This Article is written by Nrupen Masram, Nrupen is admin of DEVIL'S BLOG ON SECURITY and this is his very first guest post on RHA. If you are are also looking forward to write a guest post on RHA, Read the guidelines here
This is very big misconception among most of the people that weak user accounts only means accounts with weak passwords.
A normal user account isn't that normal if you haven't edited any of the permissions for it. So lets see how many abnormal tasks a normal user can perform if his account is not properly audited. Lets start with creation of user account.
Usually we type following command to create a normal user in UNIX or UNIX like systems.
[root@localhost~]#useradd newuser
[root@localhost~]#passwd newuser
Now what's the problem with this user creation method.
Problem number 1: This user is not member of any group.
Problem number 2: This user will have his own folder in /home directory.
If a user is in shared network environment then it is mandatory that user must be a member of some group and he/she must not have primary group of his own. By creating user by above method you have given him two powers, power to own his own group and next power of having a separate folder. Here's how you should add a user to avoid above problems.
[root@localhost~]# useradd -d /home/group_name -g group_name newuser
[root@localhost~]#passwd newuser
-d: will set default folder for user to /home/group_name
-g: will add user to group_name as primary group member
Now what might be the scope of the user we created about using and accessing disk space and memory? The answer is unlimited. That means newuser can create as many files and folders he/she wants ultimately covering up all disk-space or alternatively he/she can write or run a program that consumes lot of memory, that means if he writes and executes a program which recursively increases its stack or just able to smash its own stack then a normal user can make complete system to crash down and stand still.
And his rights to access any folder can help him hide a script or program that he/she can use to escalate privileges later to become super user without anyone noticing it.
Above problems can be solved by activating disk quota on system. According to the UNIX or Linux system you are using refer its manual to see how to activate disk quota. Once activated you can set disk quota by typing following commands,
[root@localhost~]#set quota -u newuser abc / 8000 10000 400 500
The above command will set 10000 bytes for newuser in ' / ' partition and he/she will be warned if his/her disk usage goes above 8000 bytes. At maximum he/she can create 500 files with warning on 400th file. You can replace ' / ' with directory name where you want to restrict the user.
The next problem is how to restrict user's power to use unlimited memory access? To set restrictions open “/etc/security/limits.conf” file in VI editor or any familiar editor to you. The syntax of file is quite explanatory and will differ according to the version and base kernel of your system.
Last thing that is problematic is life of account. To check it out type following command,
[root@localhost~]#chage -l newuser
Now have a look on output you'll find account expires never, password expires never, days to change password 99999. Believe it or not this is default user account setting in every UNIX and Linux system. If you are smart enough then you can easily figure out how fatal this kind of account can prove to your system if this information is not changed. To change account permissions type
[root@localhost~]change newuser
and set permissions.
There are several steps involved in auditing a UNIX or UNIX like system depending for what system is configured but auditing weak user accounts for their permissions and passwords is common task in all no matter what your motive is. I know an experienced UNIX administrator will find this article is of little help whereas new administrators will find it useful. Anyways I hope RHA readers like this post, thanks for reading, happy hacking.
About The Author
This Article is written by Nrupen Masram, Nrupen is admin of DEVIL'S BLOG ON SECURITY and this is his very first guest post on RHA. If you are are also looking forward to write a guest post on RHA, Read the guidelines here
Wednesday, February 16, 2011
Winners Of Facebook Hacking Course
As I mentioned in the contest declaration article, that I would be only giving two copies of my new Facebook hacking course .
1. Sarwan Baloch(lifelikesarwan@hotmail.com)
2. Hamza Azam
So guys, take some time to congratulate contest Winners. If you're one of them, hearty congratulations to you. If you're not one of them, don't worry, there are many more contests to come
An Introduction to Keyloggers And RATS
I have just finished writing my newest book on keyloggers and RATS and the best part is that it will be free of cost, I will launch it very soon.
Subscribe to:
Posts (Atom)








