Open post
Unshadow the file and dump Linux password

How to Unshadow the file and dump Linux password

Hello friends, welcome again!

In the last post I told about Understanding Linux system security for Users After reading this post you have knowledge about Linux file system, and where username and password are stored in Linux? where you can dump this password? when you dump password, it will be in plain text or encrypted format? so for finding the password, walkthrough this post Unshadow the file and dump Linux password

Unshadow the file and dump password in encrypted format

In this tutorial I am going to show you demo on Ubuntu 14.04 machine to unshadow the files and dump the linux hashes with help of unshadow command. First, boot Ubuntu 14.04 machine with Kali Linux. Next, It is necessary to mount the Linux filesystem for dumping data from /etc/shadow and /etc/passwd files. After boot machine with Kali Linux OS Here is great automatic mounting utility in kali linux, you don’t need to mount manually anymore. You just click on linux filesystem under place menu Linux partition will be mounted automatic. Go into Place>filesystem

Linux system will be automatic mount on /media directory with a specific mounting value. Next, If you want to see mounting point value write the following commad

#ls /media

Go into Ubuntu file system by excuting following command

#cd /media/mounting value/

#cd etc

Copy both file shadow and passwd on Desktop

#cp shadow /root/Desktop

#cp passwd /root/Desktop

Unshadow Utility:

The unshadow tool combines the passwd and shadow files into one file So john can use this file to crack the password hashes.

Use unshadow utility in kali linux to unshadow the password hashes, and dump into new file named unshadow. It is not necessary you can put any name whatever you want but important is to merge both file passwd and shadow into unshadow file

#cd /root/Desktop


#unshadow passwd shadow > unshadow


Next step is cracking the password hashes with help of john the ripper

#john unshadow

John will detect automatic hashes type if you don’t provide formate type.

Dump Linux hashes and crack with John in Kali Linux Offline mode Video Tutorial

Open post
hashcat tutorial for Password Cracking

hashcat tutorial for Password Cracking with GPU Machine

Hashcat Tutorial for beginner

Hello friends, you reading articles on Password cracking under Penetration Testing this article will cover about another tools hashcat tutorial. It is best password cracking tool. and give the best result with GPU Machine.

Description of Hashcat for Password Cracking

According to official website Hashcat is the world’s fastest CPU-based password recovery tool.

While it’s not as fast as its GPU counterpart oclHashcat, large lists can be easily split in half with a good dictionary and a bit of knowledge of the command switches.

Hashcat was written somewhere in the middle of 2009. Yes, there were already close-to-perfect working tools supporting rule-based attacks like “PasswordsPro”, “John The Ripper”. However for some unknown reason, both of them did not support multi-threading. That was the only reason to write Hashcat: To make use of the multiple cores of modern CPUs.

Granted, that was not 100% correct. John the Ripper already supported MPI using a patch, but at that time it worked only for Brute-Force attack. There was no solution available to crack plain MD5 which supports MPI using rule-based attacks.

Hashcat in Kali Linux

Hashcat is preinstalled in Kali Linux, To see more about hashcat execute following code in terminal

#hashcat –h

#hashcat –help | more

Press enter and read about available options for hashcat

Features Of Hashcat :

  • Multi-Threaded
  • Free
  • Multi-Hash (up to 24 million hashes)
  • Multi-OS (Linux, Windows and OSX native binaries)
  • Multi-Algo (MD4, MD5, SHA1, DCC, NTLM, MySQL, …)
  • SSE2, AVXand XOP accelerated
  • All Attack-Modesexcept Brute-Force and Permutation can be extended by rules
  • Very fast Rule-engine
  • Rules compatiblewith JTR and PasswordsPro
  • Possible to resumeor limit session
  • Automatically recognizes recovered hashes from outfile at startup
  • Can automatically generaterandom rules
  • Load saltlistfrom external file and then use them in a Brute-Force Attack variant
  • Able to work in an distributed environment
  • Specify multiple wordlistsor multiple directories of wordlists
  • Number of threads can be configured
  • Threads run on lowest priority
  • Supports hex-charset
  • Supports hex-salt
  • 90+ Algorithm implemented with performance in mind
  • ……and much more

Combinator Attack with hashcat

In this attack hashcat create password list by combinator method in this method each word of a dictionary is appended to each word in a dictionary.

For Example I have following world in my dictionary:

  • Pass
  • 123
  • Rock
  • You


Output we get by hashcat

  • PassPass
  • Pass123
  • passRock
  • PassYou
  • 123Pass
  • 123123
  • 123Rock
  • 123You
  • RockPass
  • Rock123
  • RockRock
  • RockYou
  • YouPass
  • You123
  • YouRock
  • YouYou

hashcat is that cpu hashcat does the combination of the plains given in a single dictionary file (word list) This implies that one should specify only and exactly 1 (dictionary) file within the command line for hashcat (besides the hash file).
Example of combinatory attack
The combinator attack hence will combine each and every word within the single dictionary file.

#hashcat -m 0 -a 1 hash.txt dict.txt

crack the hashes using hashcat


Brute-Force Attack with Hashcat Tutorial

Tries all combinations from a given Keyspace. It is the easiest of all the attacks.

In Brute-Force we specify a Charset and a password length range. The total number of passwords to try is Number of Chars in Charset ^ Length. This attack is outdated. The Mask-Attack fully replaces it.

Dictionary Attack with hashcat tutorial

The dictionary attack is a very simple attack mode. It is also known as a “Wordlist attack”.

All that is needed is to read line by line from a textfile (called “dictionary” or “wordlist”) and try each line as a password candidate.

combinator atack

Mask Attack with hashcat tutorial

Try all combinations from a given keyspace just like in Brute-Force attack, but more specific.

The reason for doing this and not to stick to the traditional Brute-Force is that we want to reduce the password candidate keyspace to a more efficient one.

Here is a single example. We want to crack the password: Julia1984

In traditional Brute-Force attack we require a charset that contains all upper-case letters, all lower-case letters and all digits (aka “mixalpha-numeric”). The Password length is 9, so we have to iterate through 62^9 (13.537.086.546.263.552) combinations. Lets say we crack with a rate of 100M/s, this requires more than 4 years to complete.

In Mask attack we know about humans and how they design passwords. The above password matches a simple but common pattern. A name and year appended to it. We can also configure the attack to try the upper-case letters only on the first position. It is very uncommon to see an upper-case letter only in the second or the third position. To make it short, with Mask attack we can reduce the keyspace to 52*26*26*26*26*10*10*10*10 (237.627.520.000) combinations. With the same cracking rate of 100M/s, this requires just 40 minutes to complete.

Built-in charsets

built in charset hashcat

Custom charsets

costum charset

Examples of Mask Attack

The following commands all define the same custom charset that consists of the chars “abcdefghijklmnopqrstuvwxyz0123456789” (aka “lalpha-numeric”):

-1 abcdefghijklmnopqrstuvwxyz0123456789

-1 abcdefghijklmnopqrstuvwxyz?d

-1 ?l0123456789

-1 ?l?d

-1 loweralpha_numeric.hcchr # file that contains all digits + chars (abcdefghijklmnopqrstuvwxyz0123456789)

The following command defines a charset that consists of the chars “0123456789abcdef”:

-1 ?dabcdef

The following command defines a full 7-bit ascii charset (aka “mixalpha-numeric-all-space”):

-1 ?l?d?s?u

The following command sets the first custom charset (-1) to russian language specific chars:

-1 charsets/special/Russian/ru_ISO-8859-5-special.hcchr


The following commands creates the following password candidates:

mask Attack by hashcat

command: -a 3 ?l?l?l?l?l?l?l?l

keyspace: aaaaaaaa – zzzzzzzz

command: -a 3 -1 ?l?d ?1?1?1?1?1

keyspace: aaaaa – 99999

command: -a 3 password?d

keyspace: password0 – password9

command: -a 3 -1 ?l?u ?1?l?l?l?l?l19?d?d

keyspace: aaaaaa1900 – Zzzzzz1999

command: -a 3 -1 ?dabcdef -2 ?l?u ?1?1?2?2?2?2?2

keyspace: 00aaaaa – ffZZZZZ

command: -a 3 -1 efghijklmnop ?1?1?1

keyspace: eee – ppp

Password length increment

A Mask attack is always specific to a password length. For example, if we use the mask “?l?l?l?l?l?l?l?l” we can only crack a password of the length 8. But if the password we try to crack has the length 7 we will not find it. Thats why we have to repeat the attack several times, each time with one placeholder added to the mask. This is transparently automated by using the “–increment” flag.










Open post
Most used Password cracking techniques by Cain and Abel Software

Most used Password cracking techniques by Cain and Abel Software

Password cracking techniques by Cain and Abel

Hello Friends, Welcome again!

In the last post Cain and Abel software for cracking hashes you have read about basics of Cain and Abel, and in the end of post I write about password cracking. When the cain captures some password hashes it sends to cracker tab automatically. When you gets password hashes you can use many Password cracking techniques by Cain and Abel Software. 

Right click on the desired user name, you want to obtain password. As you right click on the username you will find all possible techniques for cracking password.

There are mostly three techniques to crack the password

Dictionary attack

Dictionary attack is a type of attack, in which Attacker uses a word list contain lots of words or possible passwords. Tools checks login credential with every word from list. if the password is consist in the word list, attacker get success if not, he fails. This attack can be performed by Cain and abel further more detail Dictionary attack For Cracking passwords using Cain and Abel This tool checks all the entries into dictionary (wordlist) when hashes got match it will stop the attack. and attacker will find his result. If passphrase is not into dictionary then you will be unable.

Brute force attack

Brute force attack attempt to get access by trying different password words, or letter ( alphabet, number and symbol). In simple attack may have a dictionary with common used password with in software. another hand complex attack uses every key combination ( alphabet, number and symbol) for finding correct password.
it can take several hours, days,months and year for success depends on password and encryption complexity.

For more detail Brute Force Attack for Cracking Passwords using Cain and Abel

Cryptanalysis attack (Using Rainbow Table)

Using rainbow table attacker can crack 14 character long password within 160 second. It is much faster than dictionary attack and brute force attack Rainbow table is dictionary stored plain text password and encrypted password hashes we can say it is pre compiled and pre calculated hashes.
In this process tools matches  hashes with rainbow table. If matched, it shows in plain text. other wise failed in process. you can generate your own rainbow table using winrtgen 

More detail: Rainbow Tables Attack (Cryptanalysis attack) and winrtgen


Cain and Abel is a powerful tool that does a great job in password cracking. It can crack almost all kinds of passwords, and it’s usually just a matter of time before you get it.


Open post
Brute Force Attack for Cracking Passwords using Cain and Abel

Brute Force Attack for Cracking Passwords using Cain and Abel

Hello friends, Welcome again!

We are discussing about Penetration Testing Tutorial and this article under section cracking passwords and hashes cracking.

Brute force attack with cain and abel

In my previous post Cain and Abel software for cracking hashes tutorial you have learnt about basic features or cain and abel. In the last of post I wrote about cracking passwords and how you dump NTLM hashes from local PC. After getting passwrod hashes our next task to crack password by using difference techniques, Brute Force attack one of them. In this tutorial you will learn how to perform brute force attack for cracking hashes by Cain and Abel

Brute Force Attack Definition

From Wikipedia: “In cryptography, a brute-force attack, or exhaustive key search, is a cryptanalytic attack that can, in theory, be used against any encrypted data (except for data encrypted in an information-theoretically secure manner). Such an attack might be utilized when it is not possible to take advantage of other weaknesses in an encryption system (if any exist) that would make the task easier. It consists of systematically checking all possible keys until the correct key is found. In the worst case, this would involve traversing the entire search space.

The key length used in the cipher determines the practical feasibility of performing a brute-force attack, with longer keys exponentially more difficult to crack than shorter ones. A cipher with a key length of N bits can be broken in a worst-case time proportional to 2N and an average time of half that. Brute-force attacks can be made less effective by obfuscating the data to be encoded, something that makes it more difficult for an attacker to recognize when he/she has cracked the code. One of the measures of the strength of an encryption system is how long it would theoretically take an attacker to mount a successful brute-force attack against it.”

Cracking password by brute force attack using Cain and Abel:

  1. Right click on the desired user.
  2. Brute-force Attack
    Right click on the user
  3. Click on NTLM Hashes: A new window will be open, Here you need to set following things
    1. Charset: under this section there are two option first predefined charset or custom, where you can use character, numbers and sysmbles according yourself.
    2. Password length: Define minimum and maximum length of password
      brute force attack
  4. Click and start.
  5. You will get result.
    password cracked
Open post
Cracking passwords by Dictionary attack using Cain and Abel

Dictionary attack For Cracking passwords using Cain and Abel

Dictionary attack

From Wikipedia: “A dictionary attack uses a targeted technique of successively trying all the words in an exhaustive list called a dictionary (from a pre-arranged list of values). In contrast with a brute force attack, where a large proportion key space is searched systematically, a dictionary attack tries only those possibilities which are most likely to succeed, typically derived from a list of words for example a dictionary (hence the phrase dictionary attack). Generally, dictionary attacks succeed because many people have a tendency to choose passwords which are short (7 characters or fewer), single words found in dictionaries or simple, easily predicted variations on words, such as appending a digit. However these are easy to defeat. Adding a single random character in the middle can make dictionary attacks untenable.”

Cracking passwords by Dictionary attack using Cain and Abel:

To perform dictionary attack for cracking passwords by using cain and abel first you will import the NTLM hashes. Then in cracker tab you find all imported username and hashes. Select desired user and follow the steps

  1. Right click on the user
  2. Select dictionary attack
    Right click on the user
  3. NTLM hashes
    New window will be popup

    1. Right click on top blank area.
    2. Add to list
    3. Browse dictionary or wordlist file
      add a dictionary
  4. Click on the start


it checks all the entries into dictionary when hashes matched it will stop the attack. You will find your result. If pass phrase is not into dictionary then you will be unable.

Open post

Cain and Abel software for cracking hashes tutorial

Description of Cain and Abel Software

According to the official website , Cain and Abel software is a password recovery tool for Microsoft Operating Systems. It allows easy recovery of various kinds of passwords by sniffing the network, cracking hashes passwords using Dictionary, Brute-Force and Cryptanalysis attacks, recording VoIP conversations, decoding scrambled passwords, recovering wireless network keys, revealing password boxes, uncovering cached passwords and analysing routing protocols.

cain and abel software

The latest version is faster and contains a lot of new features like APR (ARP Poison Routing) which enables Sniffing on switched LANs and  man in the middle attacks. The sniffer in this version can also analyze encrypted protocols such as SSH-1 and HTTPS and contains filters to capture credentials from a wide range of authentication mechanisms. The new version also ships routing protocols authentication monitors and routes extractors, dictionary and brute-force crackers for all common hashing algorithms and for several specific authentications, password/hash calculators, cryptanalysis attacks, password decoders and some not so common utilities related to network and system security.

Who should use Cain and abel software?

Cain and abel has been develepod in the hope that it will be use full for Network administrator, teachers, security counsultants/professional, forensecc staff, security software vender, professional penetration tester, and everyone else that plans to use it for ethical reason.

The system requirements to setup Cain & Abel

The minimum system requirements to use cain and abel are following

– Minimum 10MB hard disk space

– Microsoft Windows OS 2000/XP/2003/Vista OS

– Winpcap Packet Driver (v2.3 or above).

– Airpcap Packet Driver (for passive wireless sniffer / WEP cracker).

cain and abel system requirements

Cain and Abel download and Installation 

First we need to download Cain and Abel, go on given link to download Cain and Abel

Installation Cain and Abel is very easy just double click self run executable file and follow the instruction.  

Usage Of Cain and Abel software:

After installation complete launch and configure the application, after launching application click on configure option in upper menu.

Usage of Cain and abel software

Now let’s go through the configuration dialog tabs and take a brief look at most of them:

Sniffer Tab:

In this Tab you find all the connected Ethernet interface, you can select Ethernet interface card use for sniffing.

ARP Tab:

This tab allows users to configure ARP poison routing to perform ARP poisoning attack, this trick used the MITM (Man in the Middle Attack).

Filters and Ports Tab:

This tab has the most standard services with their default port running on.You can change the port by right-clicking on the service whose port you want to change and then enabling or disabling it.

Cain’s sniffer filters and application protocol TCP/UDP port.

HTTP Fields Tab:

There are some extreme usefull features of Cain that grab the  information from web pages surfed by the victim such as LSA Secrets dumper, HTTP Sniffer and ARP-HTTPS,so the more fields you add to the username and passwords fields, the more you capture HTTP usernames and passwords from HTTP and HTTPS requests.

Traceroute Tab:

Traceroute is a technique to find out the path between two points by counting how many hops the packet will travel from the source device to reach the destination device. Cain also adds more functionality that allows hostname resolution, Net mask resolution, and Whois information gathering.

Certificate Spoofing Tab:

This tab will allow Certificate spoofing.From Wikipedia:

“In cryptography, a public key certificate (also known as a digital certificate or identity certificate) is an electronic document that uses a digital signature to bind a public key with an identity — information such as the name of a person or an organization, their address, and so forth. The certificate can be used to verify that a public key belongs to an individual.

In a typical public key infrastructure (PKI) scheme, the signature will be of a certificate authority (CA). In a web of trust scheme, the signature is of either the user (a self-signed certificate) or other users (“endorsements”). In either case, the signatures on a certificate are attestations by the certificate signer that the identity information and the public key belong together.”

We can simply think of it as some sort of data (cipher suites & Public key and some other information about the owner of the certificate) that has information about the destination server and is encrypted by trusted companies (CA) that are authorized for creating these types of data.The server sends its own certificate to the client application to make sure it’s talking to the right server.

Certificate Collector Tab:

This tab will collect all certificates back and forth between servers and clients by setting proxy IPs and ports that listen to it.


Here you can set the custom challenge value to rewrite into NTLM authentications packets. This feature can be enabled quickly from Cain’s toolbar and must be used with APR. A fixed challenge enables cracking of NTLM hashes captured on the network by means of Rainbow Tables.

Password Cracking

You find  cracker tab at the top menu ,the most important feature of Cain.When Cain captures some LM and NTLM hashes or any kind of passwords, Cain sends these passwords into  to the Cracker tab automatically. We will import a local SAM file just for demonstration purposes to illustrate this point. Here is how to import the SAM file. When you click on + sign in blue color new window will be popup. Here you will find three options

  1. Import hashes from local system: this menu allow user to import hashes from SAM Database of local System.
  2. Import hashes from text file: this option work when you have already dumped hashses into a text file.
  3. Import hashes from SAM database: in this option you required two files one file contain boot key and another have SAM database.

For demonstration select first option and click Next for next process.


Scroll to top