Kali Linux
Kali Linux
Kali Linux
Version 1.1
Table of Contents
1. Installing Kali Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1. Installing Kali Linux as a VM (Example performed on MacOS with Parallels Desktop). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3. WireShark Usage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Depending on the requirements and intended tasks for your Kali Linux pen test machine, a reasonably sized VM would have the
following components:
• 4vCPU
• 4GB RAM
• 60GB HDD
Obviously, if you are using Kali to generate passwords or attempting to crack some types of security/test effectiveness, you will
want to allow move vCPUs and more RAM to allow for quicker results.
Kali Linux can be obtained from https://www.kali.org/. The most current version should be downloaded as it will have the most
up-to-date tools. The direct download link is https://www.kali.org/downloads/.
1 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 1.1. Installing Kali Linux as a VM (Example performed on MacOS with Parallels Desktop)
1.1. Installing Kali Linux as a VM (Example performed on MacOS with Parallels Desktop)
Create the VM with at least a minimum set of resources of 4vCPU, 4GB RAM, and 60GB HDD.
1. Open Paralells Desktop and Click "File ⇒ New" to bring up the new VM installation assistant.
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 2
Chapter 1. Installing Kali Linux
2. Select the "Install Windows or another OS from a DVD or image file" and click "Continue"
3 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 1.1. Installing Kali Linux as a VM (Example performed on MacOS with Parallels Desktop)
3. Give the machine a name and select "Customize settings before installation" then click "Create"
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 4
Chapter 1. Installing Kali Linux
4. Click on the Hardware tab and allocate the appropriate resources (in this case 4GB RAM and 4vCPU).
5 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 1.1. Installing Kali Linux as a VM (Example performed on MacOS with Parallels Desktop)
5. Click the red X to close the customization dialog box, then click "Contintue".
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 6
Chapter 1. Installing Kali Linux
6. Kali Linux installation dialog box will show up, select "Install" in order to install to the VM.
7 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 1.1. Installing Kali Linux as a VM (Example performed on MacOS with Parallels Desktop)
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 8
Chapter 1. Installing Kali Linux
9 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 1.1. Installing Kali Linux as a VM (Example performed on MacOS with Parallels Desktop)
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 10
Chapter 1. Installing Kali Linux
11 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 1.1. Installing Kali Linux as a VM (Example performed on MacOS with Parallels Desktop)
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 12
Chapter 1. Installing Kali Linux
12. Leave the default route, DNS blank, and setup the hostname to be Kali.
13 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 1.1. Installing Kali Linux as a VM (Example performed on MacOS with Parallels Desktop)
13. Continue through installation, leaving the domain name empty and selecting the appropriate password and timezone.
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 14
Chapter 1. Installing Kali Linux
15. Accept defaults and move through using entire disk as one partition.
15 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 1.1. Installing Kali Linux as a VM (Example performed on MacOS with Parallels Desktop)
16. Accept and write changes to disk. Don’t use the network mirror for installation.
17. Allow GRUB to write to master bootloader. Select your drive, in this case SDA.
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 16
Chapter 1. Installing Kali Linux
17 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 1.1. Installing Kali Linux as a VM (Example performed on MacOS with Parallels Desktop)
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 18
Chapter 2. Setting up Services on Kali Linux
Nessus is provided https://www.tenable.com/downloads by Tenable software. The Nessus Vulnerability Scanner. It will require
registration to be able to use the system for personal use.
Kali Linux is a Debian-based distribution, so you will want to download the Debian package for installation.
1. Download the Debian package and install from the directory with the apt command.
19 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 2.1. Installing Nessus
root@kali:~#
3. Configure the Nessus scanner - Open web browser (Ice Weasel on Kali) and go https://kali:8834/, then click "Continue"
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 20
Chapter 2. Setting up Services on Kali Linux
21 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 2.1. Installing Nessus
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 22
Chapter 2. Setting up Services on Kali Linux
Nessus has now been activated and can be used for basic network scanning.
Always remember to start the NESSUSD service before attempting to run the Nessus scanning service.
Kali Linux is based on the Debian Linux distribution and therefore it uses the "APT" form of package management with "apt-get"
being the primary method of installing and obtaining software.
Be sure to connect the Kali Linux VM to the network so it has Internet access in order to be able to
download and install packages.
It is necessary to run apt-get update to download and update the package lists from the repositories to
ensure the newest version of packages and dependencies are available. This process will re-synchronize
package index files from their sources.
23 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 2.3. Installing and Configuring a Web Server
local_enable=YES
write_enable=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
anonymous_enable=NO
The Apache2 package provides the basic Apache HTTP webserver to Debian systems. By default, the content directory location
is /var/www/html. We will leave settings at default based on simplicity and ease of use. For the purpose of this workshop we will
use a directory called "Demo" under the webserver source directory.
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 24
Chapter 3. WireShark Usage
3. WireShark Usage
The Wireshark application allows analyzing package captures as well as performing packet captures with the PCAP library. One
of the easiest ways to perform analysis and packet captures is to have Wireshark installed on one side of the connection and use
the default network card to capture all traffic. Capturing all network traffic can be difficult to sort through results, but filters and
other items can make sorting the packet capture easier. Additionally, on larger enterprise networks, a network sniffing machine
can be used on the switch on a mirror port or some other network infiltration port that allows the Wiresharl packet capture utility
to see all traffic on the network.
For this demo, we will use the Wireshark application in Legacy Mode. (easier for me as that is what I am used to).
25 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 3.1. Starting WireShark and Packet Capture
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 26
Chapter 3. WireShark Usage
2. Click "Capture ⇒ Interfaces" and select the Network Interface, then click "Start"
27 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 3.2. Analyzing a Packet Capture of FTP Session
At this point, Wireshark is capturing all network traffic on the selected interface. Any network traffic captured can be filtered and
analyzed during the capture or it can be saved to a file for later analysis. The next step will be to generate network traffic and as
part of this workshop, the next lab and steps will be to launch an FTP Client to generate network traffic and packets for analysis.
Launch an FTP client and begin the login process and file transfer. Remember that the FTP protocol has two TCP connections
made between the client and the server. FTP sessions have a command TCP stream and a data TCP stream. When tracing an
FTP session, it is possible to gain Username/Password combinations from the command portions as FTP traffic is transmitted in
the clear. The tracing of the DATA session and packets will allow rebuilding of the packets to reveal the files which were
transmitted.
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 28
Chapter 3. WireShark Usage
29 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 3.2. Analyzing a Packet Capture of FTP Session
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 30
Chapter 3. WireShark Usage
At this point there will be a great deal of traffic to sort through and the file will be fairly large.
In order to successfully examine the FTP session, it is good to follow some of the TCP streams. Locate the first FTP packet
captured and select follow TCP stream.
1. Look for the first FTP packet, right click and select "Follow TCP Stream"
31 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 3.2. Analyzing a Packet Capture of FTP Session
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 32
Chapter 3. WireShark Usage
Close that TCP stream and look for the Data TCP Stream and Command Stream for the Data. Look for the FTP packet before
FTP-DATA as this will be the command stream for the DATA transferred. This will give the filename and type to be used for the
DATA packet capture.
2. Look for the FTP packet just before FTP-DATA and select "Follow TCP Stream"
33 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 3.2. Analyzing a Packet Capture of FTP Session
Based on the information collected from the packet capture, a file named "graduate_penguin.png" was transferred. The next step
will be to follow the TCP stream of the FTP DATA connection.
The FTP DATA connection in this instance is useless to read as indicated from the COMMAND analysis earlier, the file being
transferred and the MODE is BINARY. Also, when saving the file, use the filename from the COMMAND FTP TCP stream to save
the file back to the original name.
1. Select the first FTP DATA package and then select "Follow TCP Stream"
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 34
Chapter 3. WireShark Usage
35 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 3.2. Analyzing a Packet Capture of FTP Session
2. Click "Save As" and specify the filename obtained from the analysis of the COMMAND stream.
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 36
Chapter 3. WireShark Usage
37 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 3.2. Analyzing a Packet Capture of FTP Session
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 38
Chapter 4. Using Nessus to Scan Systems for Vulnerabilities
39 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 40
Chapter 4. Using Nessus to Scan Systems for Vulnerabilities
41 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section
6. Complete the necessary fields on what you will be scanning and click Save.
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 42
Chapter 4. Using Nessus to Scan Systems for Vulnerabilities
7. Begin the scan by clicking the "Play" button to the right of the name.
43 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 44
Chapter 4. Using Nessus to Scan Systems for Vulnerabilities
The critical findings are the most likely places to begin looking for an exploit/hack.
45 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section
You can see the two critical vulnerabilities as MS08-067 and MS09-001. It can also be shown that the
system is Windows XP Service Pack 3.
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 46
Chapter 4. Using Nessus to Scan Systems for Vulnerabilities
MS08-067 is a well-known vulnerability that existed even in Windows XP SP3. There are several exploits
and payloads that can be used against MS08-067, but the most popular is “Meterpreter.”
https://docs.microsoft.com/en-us/security-updates/securitybulletins/2008/ms08-067
At this point, the network has been scanned and several systems have been found with vulnerabilities. The next step is to see if
the vulnerabilities can be exploited and what effects that might have on the system and possible ways to defend against it.
47 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 5.1. Starting the MSF Console
Metasploit can be started two ways, first, you can use the launch shortcuts within the Kali Linux desktop and the second method
is to open a terminal and run "msfconsole" command. It should be noted that MSF depends on a back-end database to be
running so if you are launching MSF from the console, you must first start the MSF Database.
Once started, the MSF Database will continue to run on the system until a reboot or the database is stopped
with the mfsdb stop command.
=[ metasploit v4.11.5-2016010401 ]
+ -- --=[ 1517 exploits - 875 auxiliary - 257 post ]
+ -- --=[ 437 payloads - 37 encoders - 8 nops ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]
msf >
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 48
Chapter 5. Using the Metasploit Framework (MSF) and Meterpreter
49 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 5.2. Metasploit Usage
Metasploit has multiple packages and pieces for use in pen testing and compromising of systems. Most notably are the MSF
Console, meterpreter, and msfvenom to perform or create exploits based on compromised or unpatched systems/software.
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 50
Chapter 5. Using the Metasploit Framework (MSF) and Meterpreter
In the demonstration being performed as part of this lab, we will be using Metasploit and the information we gathered from the
results of a Nessus vulnerability scan. Nessus revealed critical vulnerability (MS08-067) in the scan performed earlier.
The MS08-067 vulnerability was published October 23, 2008. It essentially allows remote code execution
using a specially crafted RPC request. A work-around to the issue was to disable the Computer Browser
and Server service on affected systems.
Matching Modules
================
3. Load a payload
51 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 5.2. Metasploit Usage
Exploit target:
Id Name
-- ----
0 Automatic Targeting
Exploit target:
Id Name
-- ----
0 Automatic Targeting
5. Once options have been set, perform the exploit with the exploit directive
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 52
Chapter 5. Using the Metasploit Framework (MSF) and Meterpreter
meterpreter > ?
Core Commands
=============
Command Description
------- -----------
? Help menu
background Backgrounds the current session
bgkill Kills a background meterpreter script
--- Content Omitted ---
migrate Migrate the server to another process
quit Terminate the meterpreter session
--- Content Omitted ---
kill
ps
reboot
Terminate a process
List running processes
Reboots the remote computer
reg Modify and interact with the remote registry
rev2self Calls RevertToSelf() on the remote machine
shell Drop into a system command shell
shutdown Shuts down the remote computer
steal_token Attempts to steal an impersonation token from the target process
suspend Suspends or resumes a list of processes
sysinfo Gets information about the remote system, such as OS
--- Content omitted ---
Stdapi: Webcam Commands
=======================
Command Description
------- -----------
record_mic Record audio from the default microphone for X seconds
webcam_chat Start a video chat
webcam_list List webcams
webcam_snap Take a snapshot from the specified webcam
webcam_stream Play a video stream from the specified webcam
--- Content omitted ---
At this point, the system has been successfully exploited and a connection has been established. The next steps are to use
Meterpreter to perform various tasks on the compromised machine. For this workshop, we will use several portions of MSF and
Meterpreter by capturing keystrokes, taking over the webcam, and capturing a screenshot of the desktop.
Capturing Keystrokes
The keyscan directives for meterpreter allow you to capture all keystrokes from the victim machine. In the example below, you
will migrate the explorer.exe process, which will allow capturing keystrokes from the Windows session. In the example, some
basic text will be entered in the Notepad.exe application and captured in Meterpreter.
53 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 5.2. Metasploit Usage
meterpreter > ps
Process List
============
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 54
Chapter 5. Using the Metasploit Framework (MSF) and Meterpreter
meterpreter >
meterpreter >
Capturing Screenshots
The screenshot directive can capture a screenshot of whatever is on the victim computer. All screenshots will be captured to the
local Kali directory and will be given randomized names.
55 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 5.2. Metasploit Usage
Controlling Webcams
The webcam_snap and webcam_stream directives can capture a snapshots or send live video of whatever is available from the
webcam on the victim computer. All webcam snaps will be captured to the local Kali directory and will be given randomized
names. The live video will be displayed using a video player on Kali Linux.
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 56
Chapter 5. Using the Metasploit Framework (MSF) and Meterpreter
Exploit target:
Id Name
-- ----
0 Automatic Targeting
meterpreter >
57 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 5.2. Metasploit Usage
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 58
Chapter 5. Using the Metasploit Framework (MSF) and Meterpreter
59 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 5.2. Metasploit Usage
One of the most universal target vectors are machines running JAVA. The JAVA Runtime Environment and JAVA applications
typically have many security holes and the JAVA JDK/JRE applications are updated and patched frequently. The most interesting
thing about JAVA is that JAVA applications and therefore vulnerabilities exist based on the JAVA JRE/JDK applications and can
cross platform boundaries (Windows/Linux/MacOS). In the next portion of the workshop, we will use MSF to launch a dummy web
application which will result in a malicious JAVA application to run on the unsuspecting Victim machine.
First, as with previous walkthroughs we will want to launch the MSF Console.
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 60
Chapter 5. Using the Metasploit Framework (MSF) and Meterpreter
root@kali:~# msfconsole
=[ metasploit v4.11.5-2016010401 ]
+ -- --=[ 1517 exploits - 875 auxiliary - 257 post ]
+ -- --=[ 437 payloads - 37 encoders - 8 nops ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]
msf >
Once the MSF Console has been launched, the next step is to load an exploit for use.
Listing 28. Load the JAVA JRE Exploit in the MSF Console
After an exploit has been loaded, it is necessary to view and set appropriate options to use as part of the successful exploit/attack
of the victim computers.
Listing 29. Load the JAVA JRE Exploit in the MSF Console
Exploit target:
Id Name
-- ----
0 Generic (Java Payload)
Compatible Payloads
===================
61 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 5.2. Metasploit Usage
Exploit target:
Id Name
-- ----
0 Generic (Java Payload)
Exploit target:
Id Name
-- ----
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 62
Chapter 5. Using the Metasploit Framework (MSF) and Meterpreter
Once the payload and all options have been selected and setup, the next step is to exploit the system and wait for unsuspecting
victims.
Active sessions
===============
No active sessions.
Active sessions
===============
63 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 5.2. Metasploit Usage
meterpreter >
MSF Venom is a portion of MSF that allows creation of exploits with payloads for unsuspecting people (end-users) to download
from the Internet. Using this function of MSF, a pen tester can establish dangers than users present to a system.
In the walkthrough below, we will be generating an exploit file called WindowsPatch that will be automatically placed in the root
directory of our web server. When the file is executed, it will create a remote shell back to our MSF console and notify us that the
victim machine has is ready for takeover.
root@kali:~#
Now that the malicious executable has been generated and placed on the website we will get our MSF console ready for the
unsuspecting users of the Internet. We will need to start the MSF console and launch the proper handlers for our deployed
package.
root@kali:~# msfconsole
=[ metasploit v4.11.5-2016010401 ]
+ -- --=[ 1517 exploits - 875 auxiliary - 257 post ]
+ -- --=[ 437 payloads - 37 encoders - 8 nops ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]
msf >
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 64
Chapter 5. Using the Metasploit Framework (MSF) and Meterpreter
After the handlers have been selected, a payload needs to be loaded to interact with the malicious executable. In this case we
are wanting to take advantage of the Reverse TCP functionality
Now that the payload has been selected, the various options will need to be setup to provide the correct parameters to the
payload.
65 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 5.2. Metasploit Usage
Exploit target:
Id Name
-- ----
0 Wildcard Target
Exploit target:
Id Name
-- ----
0 Wildcard Target
The next step is to run the exploit and wait for someone to download and launch the executable.
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 66
Chapter 5. Using the Metasploit Framework (MSF) and Meterpreter
Once the victim machine successfully connects, you can use MSF and Meterpreter to perform basic verifications and whatever
other commands (similar to the Windows XP demo).
67 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 5.2. Metasploit Usage
Example 6. Screenshot
During this demonstration, a freshly installed (out-of-the-box) RHEL 7.4 server. By default, there are no security settings in place
and SSHD as well as root login are enabled and running. As part of this demo, Kali Linux and Meterpreter wil be used to
leverage the SSH Login Check/Scanner module. This module will use a brute-force attack method and a provided dictionary to
attempt logging into the box and gaining the credentials of the root user.
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 68
Chapter 5. Using the Metasploit Framework (MSF) and Meterpreter
The exploit being run will rotate through a password dictionary until it reaches the end of the file or gets the
correct password. At that point, there will be a session established in Meterpreter that will allow shell access
to the victim computer.
root@kali:~# msfconsole
69 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 5.2. Metasploit Usage
Matching Modules
================
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 70
Chapter 5. Using the Metasploit Framework (MSF) and Meterpreter
The box to be compromised IP address, the username, and the password dictionary must be selected.
71 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 5.2. Metasploit Usage
Based on the previous step, the exploit was successfully run revealing the password for root to be password. It also shows that
there is a session that has been created.
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 72
Chapter 5. Using the Metasploit Framework (MSF) and Meterpreter
Active sessions
===============
ls
anaconda-ks.cfg
Desktop
Documents
Downloads
initial-setup-ks.cfg
Music
Pictures
Public
Templates
Videos
hostname
localhost.localdomain
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:1c:42:98:2c:d3 brd ff:ff:ff:ff:ff:ff
inet 10.1.1.4/24 brd 10.1.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::f113:ab09:e1ee:e139/64 scope link
valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN qlen 1000
link/ether 52:54:00:fc:c7:5a brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 1000
link/ether 52:54:00:fc:c7:5a brd ff:ff:ff:ff:ff:ff
It should be noted that interacting with the shell in the manner above is difficult as not all sides of the shell
are seen. It is possible to upgrade and take control in order to use a full shell.
73 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section 5.2. Metasploit Usage
In order to have a full shell, it is necessary to use the Upgrade module to get a true shell session.
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 74
Chapter 5. Using the Metasploit Framework (MSF) and Meterpreter
Active sessions
===============
Active sessions
===============
sh-4.2#
sh-4.2# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:1c:42:98:2c:d3 brd ff:ff:ff:ff:ff:ff
inet 10.1.1.4/24 brd 10.1.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::f113:ab09:e1ee:e139/64 scope link
valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN qlen 1000
link/ether 52:54:00:fc:c7:5a brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 1000
link/ether 52:54:00:fc:c7:5a brd ff:ff:ff:ff:ff:ff
sh-4.2#
75 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 76
Chapter Appendix B: User Creation
# useradd travis
# passwd travis
# mkdir /home/travis
# chown travis:travis /home/travis
77 Pen Testing and System Security Concepts with Kali Linux Version: 1.1
Section
2. Load Vulnerability
3. Load Payload
4. Show Options
5. Set Options
7. Perform Exploit
Version: 1.1 Pen Testing and System Security Concepts with Kali Linux 78
Chapter Appendix D: Multiple Networks and Setup on the Mac Parallels Environment
79 Pen Testing and System Security Concepts with Kali Linux Version: 1.1