Posted on

Complete guide to Stegcracker

Hello, aspiring ethical hackers. In our previous blogposts, you learnt what is steganography, it’s uses and how to hide secret data in an image using the tool Steghide. In this blogpost, you will learn about a tool that can retrieve hidden data from an image. The tool’s name is Stegcracker.

Stegcracker is a steganography brute-force utility to uncover hidden data inside files. Let’s see how this tool works. For this article, we will be using Kali Linux as our attacker system as this tool is available by default in its repositories. For performing steganography attack, we will be using same image in which we have hidden data using Steghide “Volcano_with_Secret,jpg”.

Stegcracker 1
Volcano With Secret

Check version (-v)

It is a good practice to check the version of the tool first before doing anything with the tool. You can check the version of Stegcracker using this option.

Stegcracker 0

All you need to retrieve the hidden information from the image with this tool is to just supply the path of the image as shown below.

Stegcracker 2
Stegcracker 3
Stegcracker 4

As you can see in the above image, Stegcracker cracked the password (123456) of this file and successfully retrieved the hidden data too. The retrieved data from the image is saved in a file named . By default, Stegcracker uses rockyou.txt wordlist to brute-force the password.

Specify a different wordlist

We can even specify a different dictionary or wordlist if needed as shown below.

Stegcracker 5
Stegcracker 6

Verbose output (-V)

This option can be used to get detailed output from stegcracker.

Stegcracker 7
Stegcracker 8

Quiet mode(-q)

On the contrary, you can run Stegcracker in quiet mode. Running in this mode will just display the cracked password of the file as shown below and of course retrieve the hidden data. Status updates or other output is not displayed.

Stegcracker 9

Number of threads (-t)

By default, stegcracker user 16 threads while running. Increasing the number of threads can lead to better performance. Threads can be increased or decreased using this option. For example, let’s increase the number of threads to 32.

Stegcracker 10

Saving the output (-o)

As you already read at the beginning of this article, stegcracker saves retrieved hidden data to a file named “.out”. However this can be changed using the “-o” option.

Stegcracker 11

For example, let’s save the retrieved data to a file named “secret.txt” as shown below.

Stegcracker 12
Posted on

Beginners guide to Ophcrack

Hello, aspiring ethical hackers. In our previous blogpost, you learnt about password cracking. In this article, you will learn about a tool that cracks Windows log-in passwords offline. The name of this tool is Ophcrack.

Ophcrack is a free, open-source program that uses rainbow tables to crack Windows log-in passwords. It can import hashes in a variety of formats and can even dump them from SAM files of Windows. It can usually crack any password within minutes. It can be downloaded from here. Ophcrack is also available as a a LiveCD distribution that automatically retrieves, decrypts and cracking of passwords from a Windows system. LiveCD’s are available for Windows XP, Windows Vista and Windows 7.

Let’s see how Ophcrack works. For this tool to work, you need to have physical access to the computer whose password you want to crack. Let’s download Ophcrack-XP- live cd for this tutorial since I am testing this on a WIndows XP target. After downloading, you need to make a USB boot device out of this image. Then you need to boot from this USB device. This is what you will see as soon as Ophcrack boots.

Ophcrack 1
Ophcrack 2

Then, Ophcrack automatically starts loading and cracking hashes of passwords of the user accounts from the target system.

Ophcrack 3
Ophcrack 4

As you can see, Ophcrack cracked the password of user “Administrator”. The password is ‘123456’. All this happens automatically. On the statistics tab, you can see the stats of this tool.

Ophcrack 5

On the preferences tab, you can set the preferences for this tool.

Ophcrack 6

You can even load a single hash, PWDUMP file, session file or encrypted SAM file as shown below.

Ophcrack 7
Ophcrack 8

You have read at the beginning of this article that this tool this uses rainbow tables to crack Windows passwords. In the “Tables” option, you can see all the tables installed. You can also download and install other tables as required.

Ophcrack 9

You can save the file with cracked passwords using “save” option. On the Ophcrack logout option, you can see cracked passwords or you can shutdown or reboot the system.

Ophcrack 10

Posted on

Beginners guide to PHPSploit

Hello, aspiring ethical hackers. In our previous blogpost, you have learnt what is backdoor. In this blogpost, you will learn about PHPSploit, a backdoor for web servers. PHPSploit is a fully featured command & control (C&C) framework that is used for persistence on web servers after gaining access. Let’s see how PHPSploit works and learn about its functions.

For this, we will be using Kali Linux as PHPSploit is available for download on Kali’s repositories by default. As target system, we will be using Metasploitable2 as part of our virtual hacking lab. Let’s see how it works.

Phpsploit 1

PHPSploit can be started using the command shown below.

phpsploit
Phpsploit 2
Phpsploit 3
Phpsploit 4
Phpsploit 5

To place the PHPSploit backdoor on any target system, all you have to do is insert a PHP one liner into the code of the website. The PHP one liner is given below.


I copy the above script into a PHP file named “bd.php” and upload this file to the target web server after web server hacking.

Phpsploit 6

After uploading this file to the target web server, open PHPSploit on attacker system (Kali) and set the URL of the PHP backdoor as target as shown below. Then we have to run the command “exploit”. This gives us access as shown below.

Phpsploit 7

Once the exploit is successful, the interface of PHPSploit shows the target IP address or the domain name on which we installed the backdoor. To view all the commands PHPSploit supports, type command “help”.

Phpsploit 8

For example, let’s try “phpinfo” command that gives us the information about the web server.

Phpsploit 9

To know the user account with whose privileges you compromised the target system, you have to use the “whoami” command.

Phpsploit 10

PHPSploit also supports file system commands like cd, pwd, cat, ls etc.

Phpsploit 12
Phpsploit 13

Cat command can be used to view the contents of files on the target system. For example, let’s view the “/etc/passwd” file on the target Metasploitable2 system.

Phpsploit 11

We can also download files from the target web server. For example, let’s download “/etc/passwd” file from the target system to the “/tmp” directory of our attacker system.

Phpsploit 15

Here is the downloaded file.

Phpsploit 16

Similarly, we can also upload files to the target system using the “upload” command. For example, let’s upload the meterpreter binary to the target system as shown below.

Phpsploit 17
Phpsploit 18

Posted on

Beginners guide to Socat

Hello, aspiring ethical hackers. In our previous blogpost, you learnt how to use netcat for various purposes in ethical hacking. In this blogpost, you will learn about another such tool named Socat.

Socat, shortcut for SOcket CAT is a command line utility that enables bidirectional data transfer between two independent data channels. Actually, it can provide multiple functions. It supports many protocols like TCP, UDP, SOCKS4 and OpenSSL.

Bind and Reverse shells

The use of socat tool comes after you completed gaining access to target network or device. Here, it helps you in maintaining access as channel for communication.

Let’s see how to create bind shells with socat (learn about different types of shells). For this, we will be using Metasploitable2 as target system in our virtual hacking lab. Note that socat should be installed on both target and attacker systems for this to work. To create a bind shell, run this command on the target system as shown below.

Socat 2

Then on the attacker system, we need to run this command.

Socat 3

Here’s our bind shell.

Socat 4

To create reverse shell, the above commands should be run on attacker and target system respectively.

Socat 5
Socat 6

Here’s our reverse shell.

Socat 7

Encrypted bind and reverse shell with socat

The above shells, although they are good, the data between them is transferred in plain text and is susceptible to sniffing and detection. No problems though. Socat can create an encrypted shell using OpenSSL.

To create an encrypted shell, first, we need to create a SSL key as shown below. Two files with extensions “.crt” and “.key” are created as shown below.

Socat 8
Socat 9

Then, we need to join this two files into one file with “.pem” file as shown below.

Socat 10
Socat 11
Socat 12

Now this file should be on the system on which we start our listener. For example, to create a bind shell, the “ssl.pem” should be on the target system. Then we need to run command as shown below.

Socat 13

Then, on attacker system we should run this command shown below.

Socat 14

Here’s the shell.

Socat 15

Similarly, we can also create a reverse shell.

Socat 16
Socat 17
Socat 18

File transfer

Socat can also be used to transfer files between two machines. For example, to transfer that SSL certificate we created above from attacker system to target system, the command to be run on the attacker system is shown below.

Socat 19

Then on the target system, we should run this command.

Socat 20
Socat 21
Socat 22

Posted on

Beginners guide to msfpc

Hello, aspiring ethical hackers. In our previous blogpost, you learnt how to create payloads with msfvenom. In this blogpost, you will learn about MSFPC (MSFvenom payload creator), a tool that simplifies generation of Metasploit payloads with msfvenom.

MSFvenom payload creator (MSFPC) is a wrapper to generate multiple types of payloads based on users choice. The concept of this tool is to be as simple as possible while generating a payload.

Let’s see how to use this tool. For this, we will be using Kali Linux, as msfpc is installed by default on Kali Linux.

The simplest way to create a payload using MSFPC is to specify the type of payload you want. MSFPC can generate APK, ASP, ASPx, bash (-sh), Java (.jsp), Linux (.elf), OSX (macOS), Perl (.pl), PHP, PowerShell (.ps1), Python, Tomcat (.war) and Windows (.exe or dll) payloads.

For example, let’s see how to generate an exe payload.

Msfpc 1
Msfpc 2
Msfpc 3
Msfpc 4
Msfpc 5

The only option we need to set to create a payload with msfpc is the attacker system’s IP address or the listener address which can be selected from the given options. All other options are automatically set.

By default, this tool creates a reverse shell payload. We can also create a bind shell payload as shown below.

Msfpc 6
Msfpc 7

By default the listening port of the generated payload is set to 443. This can be changed as shown below.

Msfpc 8
Msfpc 9

We can also create payloads with this tool by specifying the target operating system.

MSFPC creates staged payloads by default. We can also create stageless payload as as shown below.

Msfpc 10
Msfpc 11A
Msfpc 11 1