Wednesday, February 22, 2017

Deauthentication attack on a WiFi network & cracking its password.

Is it possible to crack a WPA/WPA2 secured WiFi password?
Yes! Until & unless you have a fairly strong password which is a combination of letters, numbers and special characters which will make it very very difficult to launch a dictionary attack against your password.
So is it really that simple to break into someone's WiFi network?
Not really, but a little knowledge about a few software can make it quite simple.

Lets have a look at the anatomy of the attack. There are a few steps to gain access to a WiFi network:
1. We need to put our WiFi adapter in monitor moderead more ] so that we can capture EVERY wifi packet around us.
2. Note the MAC ADDRESS of the target Access Point & the target machine using "airmon-ng" software.
3. Deauthenticate the target user from the Access Point ( WiFi Network )  it is connected to...using aireplay-ng.
4. The above step will force the user to reconnect to the AccessPoint and at that moment we will capture the WPA handshake read more ] using airodump-ng.
Do not be excited, as this WPA handshake is not human readable. We need to further crack it using aircrack-ng with the help of a dictionary or a text file containing many many combinations of passwords. And if the text file contains the passphrase ( the WiFi password ) it will show up on the screen.

*This is just for educational purpose and building your knowledge. I request you to NOT/NEVER use such technique to break into someone's WiFi network. 
Today you might be an attacker but someday you can be a victim as it is almost impossible to prevent deauthentication attack. 
So lets not misuse it.

Below I will show the attack in detail on How it is actually performed.

I am sorry if you are using Windows. It is always better to have Linux installed on your system to practice such kinds of attack. If you don't have Linux I would suggest you to download from the internet. It is always FREE.
If you are using Linux, most probably you will be having the necessary software already installed. ie: airmon-ng, airodump-ng, aireplay-ng, aircrack-ng.
If NOT, you can type the following command which should work:
On your terminal:
type: sudo apt-get install aircrack-ng
This command should install all the software we need for the attack.

First we will need to put our WiFi adapter in monitor mode.
Command:   airmon-ng start wlan0*   [ this commands tells the network adapter to run into monitor mode ]
Explanation: *wlan0 is the name of my WiFi adapter. Your WiFi adapter name may differ. [ Please check using the command "ifconfig"] .
After running this command you will have one more interface called mon0 in addition to wlan0. mon0 is the same interface as wlan0 but in monitor mode.

After putting our interface in monitor mode, we need to know the BSSID ( MAC address ) of the AccessPoint and also the MAC address of the target machine. We can find all this information by running the following:
Command: airodump-ng mon0 --write "fileName"    [ you can replace 'fileName' with whatever name you wish ]
Explanation: Running this command will show something like this:

..image here..


Also we have provided " --write " option to the airodump-ng command so that we can capture all the packets in  a ' .cap ' file.
*Note: We can provide --bssid "AccessPoint's MAC address" option to airodump command so that it will capture only packets belonging to specific AccessPoint.

eg: airodump-ng mon0 --bssid 00:AA:BB:22:CC:DD  --write newFile 
This command will capture network packets only belonging to the MAC Address provided ( AccessPoint ). 

Tip: How to find a WiFi Network's MAC address? 
        run the command sudo iwlist wlan0 scan
A list will be displayed from which you can get the target AccessPoint's MAC address.

moving on....

Now we are all set up. Network adapter is in monitor mode. Capturing the network packets belonging to the target AccessPoint.
Only thing remains is the last step: De authenticate the user connected to that AccessPoint.

To accomplish this, run the following:
Command: aireplay-ng --deauth 24 -a "AccessPoint's MAC Address" -c "Clients MAC Address" mon0 
Explanation: By mentioning --deauth 24  we tell aireplay to send 24 [ you can send as much packet you wish ]  spoofed deauthentication packets to the access point which we define by the option  -a followed by the AccessPoint's MAC address.  Which MAC address to spoof? That we mention by using the -c option followed by the victim's MAC address.
After running this command it will show something like this:

..image here..

By this we can be assured that the victim has been disconnected from the AccessPoint.
And when the victim tries to reconnect to the AccessPoint we would have captured the "WPA 4 way handshake" [ more on this here ]. After this you can press CNTRL+D ( interrupt )  airodump-ng as we have already captured the packet containing the passphrase.
Now that we have captured the WPA handshake [ which contains the passphrase ] its time to crack it using aircrack-ng.
Command: aircrack-ng newFile -w dictionary.txt 
Explanation: Running aircrack-ng mentioning the filename in which we have captured the network packets earlier. The -w command tells aircrack to use the passwords in the text file [ dictionary.txt ] to crack the passphrase. When it matches the passphrase it will show up on the screen like this:

..image here..

For testing purpose you can try to break into your own WiFi network by making a text file containing your own password along with some random names so that you understand how aircrack successfully cracks the passphrase.

Note: It is very difficult to simply break into any WiFi network out there. People have become very careful & cautious regarding their WiFi passwords. This attack is to demonstrate how simple it is to break in to a WiFi network which uses a poor WiFi password, for example simple dictionary words, name of person, name of places, celebrity names etc.




Monday, February 20, 2017

The Dark Web [ a small part of the DEEP WEB ]

How much knowledge do we have about the Internet/Web?

"" In the year 2000, Michael K. Bergman said how searching on the Internet can be compared to dragging a net across the surface of the ocean: a great deal may be caught in the net, but there is a wealth of information that is deep and therefore missed. Most of the web's information is buried far down on sites, and standard search engines do not find it. ""
Source: wikipedia


So today, I thought of having a glimpse of this unknown face of the Internet. It is very easy to visit these kind of websites. Only thing you need to have is TOR browser and enough caution. You really don't have any idea where you can land up. There is a term known as "onionland" which is referred to these websites/areas on the internet which forms the dark web.
These websites uses TOR network to make it "nearly impossible" to find the actual host. Also it becomes double secure as it needs a user to be using TOR network to get access to these websites. These websites have a different top level domain unlike the .com, .net, .org etc... They use  ' .onion ' and you see.. that is where the name "onionland" comes from.

So why do they need to hide from the world? There is only one answer to this question: because they are illegal. You must be wondering that there are already many illegal work going on the internet so why hide? Because you can not imagine the magnitude of the illegal services they provide.

From selling illegal drugs like LSD, DMT, cannabis, cocaine, heroine etc etc to the most sophisticated weapons.. you can find just everything that you can not get on your Google search.
That is what the dark web is about.
Fake  identity proof, fake passports, banking/financial services, hacked credit card numbers, hacked paypal/entropay/neteller/payoneer accounts, counterfeit currencies, foreign currency exchange, hacking services, pornography, escort services,  Hitmen services, military, supply of weapons, stolen items etc etc...

I was totally astonished after watching all this. Hitmen service? Really? WOW! I remember I had bought a game called Hitmen Codename 47 but I never even imagined of buying a real hitmen from the internet.
I wonder how all these even work. Because I would never spend a penny on these services.
I think there is a very less chances of all these websites being genuine. But there are people out there who monitor these websites about the quality of it to let other users know whether it is a scam or genuine. That is how they work...a little money & a leap of faith.

There is a LOT MORE than what I have written here.  But I guess I have given a brief idea about what dark web is all about.

Saturday, February 18, 2017

Linux vs Windows

Which operating system do you prefer?
Linux or aWindows ?
Lets talk about both the operating systems.

I won't go very deep about their technical details because I myself don't have vast knowledge about both operating system.. :D

But I will always prefer Linux over Windows as long as I don't have to play Games. For games I use Windows, though now a days Linux is being supported to run even the high-end games..

If you are a Computer Science student and love programming ( even if you don't ) I suggest you to learn Linux. It is a wonderful operating system on which you have complete* control of the system.

*if you are a superuser/root

So why do most of the Computer geek love Linux?
First of all  IT IS COMPLETELY FREE. You can download the OS from a wide variety of Linux Distribution available online and install it on your computer. It does not require a very high end computer config. Linux will happily run even if it has a 1GB RAM, 25 GB Hard Disk, No Graphic Card...
It also depends upon your usage. Obviously you can not run a web server using such config. But yes, you can learn about Linux,  Terminal (command line), file system, Bash programming etc..
The best part of Linux is it always comes with all the basic software package installed. ie: almost all famous programming languages like C++, Python, Java, Perl, PHP etc and some services like Apache web server, MySQL, SSH and sometimes DNS servers like bind9...etc..

One feature about Linux that I loved the most is IF you are not root/superuser you can not change ANY configuration files, password etc... or lets say in simple words that if you are not root you can not edit any important files on the system. To edit system files you need to become root using the command "su - " or simply "su" which will then ask you to enter the password. After entering the correct password the prompt will change and you will come to know that you now possess root privilege.

*Be careful. root CAN DO/CHANGE/DELETE ANYTHING & the system won't even warn before changing even the most IMPORTANT configuration files of the system. Because root is root. :D

Because of this feature it becomes very hard to hack into a Linux system until & unless the malicious user gets to know your root password as Linux won't allow any user other than root to edit or delete system important files.
Also you don't have to worry much about viruses affecting your Linux system. There are hardly any Linux viruses out there as compared to Windows.


Linux Terminal: As the name seems, Terminal is considered as the heart of the Linux operating system. You can almost do ANYTHING from the Terminal. It is equivalent to Windows command prompt but is considerably more reliable and powerful than the Windows CMD.
In fact almost every user has a Terminal window open while running Linux as it is useful to do just anything on the Linux OS. Want to install chrome? firefox? programming languages? web services? move files, create folders, delete files.. etc etc.... everything can be done from the command line.
And all of this is possible because of a very powerful command line interpreter (CLI) called Bash (Bourne Again SHell). Bash is the most popular and widely used shell as compared to other shells like ksh, csh/tcsh.
It is itself a programming language. Imagine a programming language running on a command line? How powerful and useful it can be.
Linux is very vash. We can never have the complete knowledge of it. We can keep on learning new things every new day.
So if you really love computers, programming and want to know how a computer ACTUALLY works then search for a good Linux distro today itself, install it and start exploring. I assure you that your love towards computers will be doubled.

Talking about Windows..
Windows is a wonderful operating system. Very simple & elegant. Very good for users with less technical knowledge about computers. Loads very quick when freshly installed but gradually becomes a little slow while loading. At least for me it works this way.
I love Windows because it was the operating system that I used after getting my first desktop PC back in 1997. It can run any games, softwares ( exe files), movies, etc etc.. After all it was made for these  kind of uses. Unlike Linux which runs on super computers/web servers etc. I have hardly heard about any web server or super computer running Windows OS/Server.

Talking about its safety... To be honest after using Linux I am a bit scared to even touch those .exe  files. I have learnt what potential threat those exe file may contain.
There are billions of exe files all over the web/Internet waiting to be downloaded by a user which contains malware, adware, viruses, etc.
Because of this threat it has become a necessity to have a "good Antivirus" installed on your computer running Windows. There are 60-70% of computer users running Windows on their system which makes it the top & easy target of Hackers/Attackers.
Windows users are free to download & install any software from anywhere on the internet/websites which makes it a major security issue. Unlike Linux where there are very few chances of a software being affected by malware/virus as we almost all of the time download software package from its own advanced package tool ( apt ) which are mostly updated and checked by millions of "good users" which eventually makes it impossible to affect your OS.

Talking about basic programs/programming languages, Windows still does not come with any  programming language or any web server installed. Other important services like SSH, DNS, Databases are far out of question.

And to be honest I have never ever in my life used the command prompt of Windows other than these commands:  getmac ( know your PC's MAC address), ipconfig ( know your Internet Protocol settings)
Because it is not even close to the word "powerful" as compared to Linux's Bash Terminal.
In fact I can write a whole new post of hundred pages on Linux Bash Terminal but can not do the same for the Windows CMD prompt, thought I agree it is capable of doing many system related task. But still never that good.

As far as running games, developing/editing movies/images are concerned I think Windows still remain the *best choice* for doing all these kind of work.

PS: best choice against Linux. Because there is always an Apple iMAC to develop/edit images/videos far better than Windows. :P

Thursday, February 16, 2017

TOR - The Onion Router | Browse anonymously

Ever wanted to browse the internet without anyone tracking you? or Did you ever thought if there can be something which will allow you to browse websites which your ISP is not allowing you to visit or... the websites which your government has blocked permanently or wanted to post something very  very bad on some website but afraid of being tracked?
Whatever the reason is, there is something which allows you to do JUST WHAT YOU WANT, browse ANONYMOUSLY.
No! This is not some cheap software for 29$/yearly....etc..etc...
This is "The Onion Router" short for TOR.
It is totally free to use and at the same time help other users like you to browse internet with privacy.
Also there are many private and hidden services running on the internet using such type of network .  That part of the web is known as "dark web". As the name seems this area of the web works in the dark, which means one can not simply search for them on search engines neither are they indexed on search engines. They have different domains unlike the .com, .net, etc... Some have good purpose while others are illegal.

For more details on dark web visit dark web


You can download TOR for windows from their website  TOR.
or if you are using Linux you can download from TOR for Linux.

More on TOR: more details
Setting up TOR as a exit/non-exit relay: click here [ for advanced users ]

Sunday, February 12, 2017

Retrieving data from corrupt WindowsOS

Has it ever happened that your Windows OperatingSystem somehow managed to crash because of Virus, Malware etc..etc.., you are not able to load the operating system and you are worried about the important data you might lose? It would be very pleasing for you to hear that "your" data in the hard disk is always safe UNLESS your hard disk has got corrupted. Thus it is always useful to keep a bootable USB drive containing the Windows OS or Linux Live OS.

It is more handy to have a Bootable Linux USB. It can help you to get your data even if you are not able to load WindowsOS completely.

Every Linux distribution that you download also has a Live format. You simply have to download the .ISO image file  of a Linux that you like and make a bootable USB/CD/DVD using a software like RUFUS (Windows), UNetbootin (Linux/Windows/MacOS).

Live Linux helps you load the Linux operating system directly without installation. Later you have an option on the diesktop to Install Linux on your hard disk.

Linux Mint is most widely & famous Linux distribution used all over the world. Also it is very simple for beginners.
You can download it for free from their site below:

 Also it can help you repair your file system to a certain extent if it has any bad sector. You can run fsck (files system consistency check) command in Linux terminal by typing:
fsck /dev/sdaX
to run a consistency check of your hard disk.
(sda X is the name/label for your hard disk. Usually it is name sda or sda1)

Link to download RUFUS: https://rufus.akeo.ie/

Link to download UNebootin: https://unetbootin.github.io/