Reader small image

You're reading from  Kali Linux Cookbook - Second Edition

Product typeBook
Published inSep 2017
Publisher
ISBN-139781784390303
Edition2nd Edition
Right arrow
Authors (2):
Corey Schultz
Corey Schultz
author image
Corey Schultz

Corey P. Schultz is a technologist focusing on security research, Internet of Things, and the impact of technology on education and learning. He has over 20 years of experience in the security industry doing security architecture, penetration testing, incident response, and forensic analysis. Corey is currently a technical solutions architect for Cisco Systems Global Security Sales Organization. He works on a daily basis with large environments on designing and architecting secure enterprise networks. You can also find Corey active on Twitter @cschultz0000, where you can also see his schedule of speaking engagements and appearances.
Read more about Corey Schultz

Bob Perciaccante
Bob Perciaccante
author image
Bob Perciaccante

Bob Perciaccante is seasoned information security practitioner who has been in the security field for almost 20 years. Currently, he is a consulting systems engineer for Cisco Systems in Pennsylvania where he has worked for the last 10 years focusing on network and data security, network access control, and secure network architectures. His primary day-to-day responsibilities focus on designing secure network solutions for his customers and working to train customers and partners on security solution implementations and daily operations to get the most out of their infrastructure. When not involved in security activities, Bob enjoys eclectic hobbies such as working on cars, 3D printing, and camping. Collaborating with his Cisco peer, Corey P. Schultz, this book is his first security publication.
Read more about Bob Perciaccante

View More author details
Right arrow

Password Cracking

In this chapter, we will cover the following topics:

  • Resetting local Windows machine password
  • Cracking remote Windows machine passwords
  • Windows domain password attacks
  • Cracking local Linux password hashes
  • Cracking password hashes with a wordlist
  • Brute force password hashes
  • Cracking FTP passwords
  • Cracking Telnet and SSH passwords
  • Cracking RDP and VNC passwords
  • Cracking ZIP file passwords

Introduction

Password cracking has its own uses, often times you may be able to access and recover password databases but they are encrypted and on other times to escalate privilege or gain access, you may have to use a password attack.

Resetting local Windows machine password

In this recipe, we will crack the local Windows machine passwords with direct access to the computer.

In this recipe, we will also simulate booting off a CD-ROM in order to reset the local password.

Getting ready

Let's ensure the following prerequisites:

  • Your Windows workstation is powered down
  • You have recently downloaded the Kali ISO
  • Have a local standard user on the Windows workstation with a password

How to do it...

We will now reset the Windows password using Kali boot media:

  1. With your Windows machine off, start by...

Cracking remote Windows machine passwords

In this recipe, we will crack a remote Windows machine password. In this case, we will assume we have already launched the attack through Armitage and have taken the hashes we need. Please refer to Chapter 4, Finding Exploits in the Target and the Advanced attacks with Armitage recipe if needed.

Getting ready

Let's ensure the following prerequisites:

  • Your Kali machine is powered up
  • You have started Armitage up and it's running
  • You have collected the needed hashes already from the remote machine

How to do it...

We will...

Windows domain password attacks

In this recipe, we will try to crack the active directory database from a Windows domain controller. We will assume you have already recovered the needed files, the system file, and NTDS.dit files from the computer through other exploitation means.

Getting ready

Let's ensure the following prerequisites:

  • Your Kali machine is powered up
  • Your domain controller has some sample accounts on it
  • You have collected the system file and the NTDS.dit files through other means

How to do it...

We will now recover passwords from a windows domain...

Cracking local Linux password hashes 

In this recipe, we will crack Linux passwords using John the Ripper.

In this recipe, we will also simulate booting off a CD-ROM in order to crack the passwords using John the Ripper.

Getting ready

Let's ensure the following prerequisites:

  • Your Kali machine is powered up
  • You have some sample users and passwords setup on your Linux machine

How to do it...

We will now crack Linux password with John the Ripper:

  1. With your Windows machine off start by going into VirtualBox, clicking on the Linux VM, and click on Settings:
...

Cracking password hashes with a wordlist

In this recipe, we will crack hashes using John the Ripper and the password lists. We will also work with a local shadow file from a Linux machine and we will try to recover passwords based off wordlists.

Getting ready

Let's ensure the following prerequisites:

  • Your Kali machine is powered up
  • You have some sample users and passwords setup on your Linux machine
  • You copied the shadow file to your Kali root directory

How to do it...

We will now attempt to crack passwords using a pre-defined wordlist:

  1. Verify you have the shadow...

Brute force password hashes

In this recipe, we will crack hashes using John the Ripper in brute force mode. We will work with a local shadow file from a Linux machine and we will try to recover passwords by brute forcing them.

Getting ready

Let's ensure the following prerequisites:

  • Your Kali machine is powered up
  • You have some sample users and passwords setup on your Linux machine add some more and make a couple accounts with random 4 character passwords.
  • You copied the shadow file to your Kali root directory

How to do it...

We will use a brute force method of attack...

Cracking FTP passwords

In this recipe, we will try and crack FTP passwords.

Cracking FTP passwords is a great way to both access the system through FTP and get the username and passwords against other systems and services. For this recipe, we will use hydra to test the system.

Getting ready

Let's ensure the following prerequisites:

  • Your Kali machine is powered up
  • Your Metasploitable machine is powered up
  • Validate the IP address of the Metasploitable machine

How to do it...

Let's attempt to crack an FTP server passwords:

  1. Let's start by logging into...

Cracking Telnet and SSH passwords

In this recipe, we will try and crack Telnet and SSH passwords.

Cracking Telnet and SSH passwords can be used against systems as well as infrastructures. With this, you have the ability to try and penetrate into switches, firewalls, routers, pretty much any network equipment and most often Linux machines will have this method of access enabled.

Getting ready

Let's ensure the following prerequisites:

  • Your Kali machine is powered up
  • Your Metasploitable machine is powered up
  • Validate the IP address of the Metasploitable machine

How to do it...

...

Cracking RDP and VNC passwords

In this recipe, we will try and crack RDP and VNC passwords on our Windows machine.

Cracking into either RDP or VNC can be a very powerful method to access any system. While RDP is restricted to Windows systems VNC is a cross platform remote control utility covering Windows, Mac, and Linux. You can use your previous scanning to look for open VNC ports even on Windows machines.

Getting ready

Let's ensure the following prerequisites:

  • Your Kali machine is powered up
  • Your Windows machine is powered up on the NAT network
  • Validate internet connectivity
  • You have some valid users on the system with RDP enabled for them
...

Cracking ZIP file passwords

In this recipe, we will try and crack a ZIP file password.

Sometimes, you will come across ZIP files that have a password on them. Normally, you can easily crack these passwords with a simple dictionary attack.

Getting ready

Let's ensure the following prerequisites:

  • Your Kali machine is powered up

How to do it...

We will now crack a ZIP files password and recover it's contents:

  1. Open a terminal window in Kali by clicking the icon.
  2. Enter the following commands to create an encrypted ZIP file:
cd 
mkdir 6.10
cd 6.10
touch one two three...
lock icon
The rest of the chapter is locked
You have been reading a chapter from
Kali Linux Cookbook - Second Edition
Published in: Sep 2017Publisher: ISBN-13: 9781784390303
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Corey Schultz

Corey P. Schultz is a technologist focusing on security research, Internet of Things, and the impact of technology on education and learning. He has over 20 years of experience in the security industry doing security architecture, penetration testing, incident response, and forensic analysis. Corey is currently a technical solutions architect for Cisco Systems Global Security Sales Organization. He works on a daily basis with large environments on designing and architecting secure enterprise networks. You can also find Corey active on Twitter @cschultz0000, where you can also see his schedule of speaking engagements and appearances.
Read more about Corey Schultz

author image
Bob Perciaccante

Bob Perciaccante is seasoned information security practitioner who has been in the security field for almost 20 years. Currently, he is a consulting systems engineer for Cisco Systems in Pennsylvania where he has worked for the last 10 years focusing on network and data security, network access control, and secure network architectures. His primary day-to-day responsibilities focus on designing secure network solutions for his customers and working to train customers and partners on security solution implementations and daily operations to get the most out of their infrastructure. When not involved in security activities, Bob enjoys eclectic hobbies such as working on cars, 3D printing, and camping. Collaborating with his Cisco peer, Corey P. Schultz, this book is his first security publication.
Read more about Bob Perciaccante