PDF 2-8
PDF 2-8
Note: In real work experience, you use the rsync command to backup your data to
remote servers or external storage media, not in the same system.
Check that AbuDhabi directory has been backed up in rsync-backup directory. Write the
command you have used: Click or tap here to enter text.
3. Backup the local directory ADMC to the local directory HCT. HCT will end up with a
copy of ADMC, except it will contain the directory ADMC/rdiff-backup-data, which will
allow rdiff-backup to restore previous states.
4. Create new directories ADMC and HCT in the HCT home directory and one file called
test1 in the ADMC.
rdiff-backup ADMC HCT
5. Restoring:
We have run rdiff-backup ADMC HCT, with both ADMC and HCT as local directories. Say
we accidentally deleted ADMC and now want to restore it from HCT.
Since rdiff-backup makes a mirror, we can retrieve files using standard commands like cp.
cp -a HCT ADMC
The primary function of the Unix/Linux tar command is to create backups/archives. It is used to
create a ‘tape archive’ of a directory tree that could be backed up and restored from a tape-based
storage device. The term ‘tar’ also refers to the file format of the resulting archive file. The
archive format preserves the directory structure and the file system attributes such as permissions
and dates.
Tar Syntax:
Tar options:
The tar command supports the following functions:
• tar -c: Create a new archive.
• tar -A: Append a tar file to another archive.
• tar -r: Append a file to an archive.
• tar -u: Update files in an archive if the one in the filesystem is newer.
• tar -d: Find the diff between an archive and the filesystem.
• tar -t: List the contents of an archive.
• tar -x: Extract the contents of an archive.
B. Verify that the files test1 and test2 have been archived as a tar file.
D. Extract the contents of archive.tar to the Tar-Backup directory using the following
commands:
Cd /home/hct/Tar-Backup
tar xvf /home/hct/Tar-Backup/archive.tar
Questions:
1. Write the rsync command to backup the directory /tmp to /home/hct/rsync-backup with
the following options:
A.Verbose.
B. Compress file data during the transfer.
Click or tap here to enter text.
Use the following command to properly shutdown your Security Onion machine: sudo init 0
2. Search the internet about rsnapshot backup, write a brief description, and compare it to
rsync.
Click or tap here to enter text.
3. Search the internet about the difference between full, incremental, and differential
backup. Write your finding below. (This topic will be covered later)
Click or tap here to enter text.
5. Type hct to be the username for Sguil, Squert, and ELSA. Click on OK.
Note: The alert IDs used in this lab are for example only. The alert IDs on your VM may be different
b. All the alerts you currently see are related to the Operating System Security (OSSEC).
c. Open a Terminal Emulator by clicking the start icon on the upper right corner, then select
Terminal Emulator as shown below:
d. Create a directory called Pcap-Files in the hct home directory using the following
command: mkdir /home/hct/Pcap-Files
e. Copy example.com-3.pcap from /opt/samples to /home/hct/Pcap-Files using the
following command: cp /opt/examples/samples.com-3.pcap /home/hct/Pcap-Files
Question Answer
What is the source IP? 192.168.10.128
What is the destination IP? 72.20.34.145
What is the source port number? 36012
What is the destination port number? 6881
What is the rule class-type? 2008581
What is the transport protocol used in the UDP
generated traffic?
2. Replay the traffic in the example.com-4.pcap file using the following command:
Sudo tcpreplay –I eth0 -t /home/hct/Pcap-Files/example.com-4.pcap
3. Locate the alert with the event message “ET INFO .exe File requested over FTP, and
answer the following questions:
1. How do you resize columns in Sguil? by right-clicking on the column heading in the Sguil
client. ·
2. Now you know what Sguil is. Search the Internet. What is Squert? s a web application
that is used to query and view event data stored
End of the lab ☺
Do not forget to shutdown the Security Onion VM by using the command sudo init 0
What is Squert?
"Squert is a web application that is used to query and view event data stored in a Sguil database
(typically IDS alert data). 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" (Wikipedia).
Task 1: Copy the necessary file
Copy bredolab-sample.pcap file from /opt/samples to /home/hct/Pcap-Files directory using
the following command:
cp /opt/samples/example/bredolab /home/hct/Pcap-Files
More details will appear below when you click this number (12 in this case), including the
associated IDS event's source and destination IP addresses.
Note: These events have the same source and destination IP addresses. They appear
more than one time, because the pcap file has been run multiple times.
Question Answer
What is the destination IP address, and what 195.2.253.92 Romania
country does it belong to?
Is the source IP address public or private, and Private because it started with 192.168
why?
What are the source and destination port Source ports 1032 destination port 80
numbers? (Hint: Click on the event ID to get
the pcap transcript via capMe)
What is the source hostname? Acxerox.com
What is the class-type of this attack? Trojan-activity
When was the metadata created? 2010_7_30
Based on the Microsoft reference URL given Is a trojan family that downloads and executes
in the rule, what is the threat (Harnig) arbitrary files in the system
behavior?
Based on the Microsoft reference URL given Tries to connect to a remote server to download and
in the rule, How does the Harnig work? (Hint: execute arbitrary files in the local machine. Saves
downloaded files to root of the C: drive with a
look at the payload section) randomly generated file name.
Questions
When Squert first opens, you will see a list of all the events. Squert's visualization tools will help
identify suspicious sessions or behaviors without knowing too much about the data and events.
1. Navigate both SUMMARY and VIEWS tabs are write the benefits of these tabs:
Summary tab: provides the summary of all the alerts on the system, and separate those source ip address
that has the highest traffic received from a specified location
B. List the interfaces and their respective IP addresses displayed in the ifconfig output:
Click or tap here to enter text.
C. Create a new directory name Lab05 in the hct home’s directory, and then change the
current directory to Lab05 directory.
D. Starts tcpdump and records network traffic on the eth0 interface by using the
following command: sudo tcpdump –i eth0 –s 0 –w httpdumpLab5.pcap
This command starts tcpdump and records network traffic on the eth0 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 (0-65535).
You should limit snaplen (Snapshot Length) to the smallest number that will capture the
protocol information in which you are interested.
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.
E. Open The Chromium web browser within the Security Onion. Navigate to
http://www.webscantest.com/login.php
F. Enter a username of admin with a password of admin and click login.
2. After Wireshark load the httpdumpLab05.pcap file, filter for http and click Apply.
3. Browse through the different HTTP messages and select the POST message.
Task3: NetworkMiner
NetworkMiner is a Network Forensic Analysis Tool (NFAT) for Windows. NetworkMiner can
be used as a passive network sniffer/packet capturing tool in order to detect operating systems,
sessions, hostnames, open ports, etc, without putting any traffic on the network (NetreseC).
1. Start Networkminer.
Questions
1. What are the advantages of using HTTPS instead of HTTP? Click or tap here to enter text.
2. 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 yes or no, and why. Click or tap
here to enter text.
3. Tcpdump has an option to set Snapshot Length called _________________.
☐ A. Snapin
☐ B. Snaplimit
☐ C. Snapbit
☒ D. Snaplen
4. Are all websites that use HTTPS considered trustworthy? Click or tap here to enter text.
Required Resources:
• Security Onion virtual machine
• Internet access
Student Name: shouq Abdalla
Student ID: h00422778
What is Xplico?
Xplico is a network forensics analysis tool (NFAT), which reconstructs the contents of
acquisitions performed with a packet sniffer (e.g., Wireshark, tcpdump, Netsniff-ng).
The goal of Xplico is to extract the internet traffic to capture the data of the application
contained. For example, from a pcap file Xplico extracts each email (POP, IMAP, and SMTP
protocols), all HTTP contents, each VoIP call (SIP, RTP), IRC, MSN…Xplico is able to classify more
than 140 (application) protocols. (Wikipedia)
Task1: Install Xplico:
1. To install Xplico, run the following command:
sudo apt-get install xplico
It shows the Xplico is running. Just in case it showed that Xplico is not running, you need to run
the following command to start it to make it running:
sudo service xplico start
3. Create a new directory in the HCT home directory call it Xplico (mddir
/home/hct/Xplico)
4. Copy the file snort.log.1362864654 from /opt/samples/pnsm/ch10 to the Xplico
directory.
cp /opt/samples/pnsm/ch10/snort.log.1362864654 /home/hct/Xplico
2. After the Lab6 case has been created, click on it as shown below to create a new
session.
5. Now click on the session name to upload the captured file (snort.log.1362864654) that
you copied to the Xplico directory.
6. Click Choose File, then browse to the Xplico directory, select the File
snort.log.1362864654, and then click on Upload.
7. Make sure that it says File uploaded, wait start decoding … (It is doing the magic)
10. Click on Undecoded on the left side, and then select TCP-UDP.
The screen below shows the destination IP, port, date, time, connection duration and
contains more details of info.xml. Captured destination IP addresses are colored in red;
you can see more information by clicking on the IP address.
11. Click on the first destination IP address (in red) and observe the output.
12. On the left side, click on Graphs then Arp, and answer the following questions:
A. What type of information can you get from this window? Click or tap here to enter
text.
Add a new session in the Lab6 case and name it Lab6BR and Upload Lab6.pcap. After Xplico
finishes decoding the Pcap file, answer the following questions:
Question Answer
What is the IP address associated with the MAC 192.168.1.111
address 00:04:75:ea:13:01?
What is the IP address of the host webmail.aol.com Click or tap here to enter text.
What is the webmail sender address with the subject Click or tap here to enter text.
“Welcome to Your New Email Account?”
Was there any file(s) downloaded using FTP? If yes, Click or tap here to enter text.
who downloaded the file(s)?
What is the layer 7 protocol used for remote Click or tap here to enter text.
connection and the username used?
Task 6: Reassemble a captured Session Initiation Protocol (SIP) voice using Xplico
1. Create a new case and session as follows:
A. Case name: SIP1
B. External reference: Phone-Call
C. Session name: Lab6-Session
2. Upload the Lab6SIP1.pcap you downloaded in step 1.
3. After Xplico finishes decoding, click on Voip >> Sip and click on the duration time as
shown below to play the captured file.
4. You will not be able to play this phone conversation because the Adobe flash add-on is
not installed (Adobe flash is not supported anymore).
5. Still, you can play SIP messages using the Xplio web-based tool by accessing the
following link: https://pcap2wav.xplico.org/ from your laptop/PC or the Azure windows
VM, but NOT security Onion. You need to download Lab6SIP1.pcap and Lab6SIP2.pcap
file from your email to the same machine where you access this website.
6. Click on Create a new session.
4. Click on Start and make sure that it says listening at the interface you selected.
5. Open the Chromium web browser and type www.cnn.com. Wait for a while to see some
captured data, especially under Dns, Arp –Icmpv6.
6. If too much data has been captured, as shown below, you can search for what you are
looking for by typing a keyword in the search field.
What is the IP address of www.cnn.com? Answers may vary Click or tap here to enter text.
Questions
1. What is the difference between Xplico and Wireshark? Click or tap here to enter text.
2. Explain how to capture traffic in Xplico: Click or tap here to enter text.
4. After you hit enter, Chaosreader will trace all the TCP and UDP sessions available in the
Lab07.pcap file.
Note: Chaosreader breaks every session/stream with its respective protocol (E.g. session/steam
number 0236 used the protocol http, and session/stream number 0894 used the protocol https)
5. List the Lab07 directory contents using the command ls to see all the traced sessions files.
6. Open the Chromium internet browser in Security Onion and type the following in the
URL field: file:///home/hct/LabFiles/Lab07/index.html to view all the traced sessions.
7. The Chaosreader report above shows some TCP/UDP sessions information captured in
the Lab07.pcap file, such as date/time stamp, length, source and destination IP addresses,
the protocol used, size, and output.
8. Answer the following questions regarding the telnet session after you click on as HTML
(Session 1020):
Question Answer
What is the source IP address that the telnet Click or tap here to enter text.
session was initiated from?
What is the port number that was used by Click or tap here to enter text.
telnet?
What is the correct password used in this Click or tap here to enter text.
telnet session
What is the username used in this telnet Click or tap here to enter text.
session?
What is the website that the user pinged? Click or tap here to enter text.
What is the first command that was issued Click or tap here to enter text.
after login?
What is the last command that was issued in Click or tap here to enter text.
this telnet session?
Note: To return to the index page, click the browser’s back button.
A. What is the source and destination IP address, along with their respective port numbers?
Click or tap here to enter text.
B. What is the date and time when the image was accessed? Click or tap here to enter text.
Task3: Replay traced sessions from the command line (Terminal)
Alternatively, you can replay this entire session from the command line so that you
can see exactly what has been done. Look for the file named
session_1020.telnet.replay, which we will use to view the telnet session from the
command line. Any file created by Chaosreader that has a replay extension can be
replayed from the command line, as you are about to do.
Minimize the browser and restore the terminal window you minimized earlier.
Type ./session_1020.telnet.replay. Your screen should look similar to what is shown
in the figure below. After you press Enter, you will now see the Telnet session
replayed in its entirety from the command line. Moreover, this will give you a better
understanding of what has been done in real-time.
Questions
Write a brief reflection about what you have learned from this lab. Click or tap here to enter text.
After you click on the "+" sign, all the available ports will be displayed.
9. Click "Stream Control" and change the value in the Number of Packets = 30
12. (1) Click on port 10 (lo). (2) Click on Port 0-10 to highlight the column. (3) Click on the
Start Capture icon labeled 3. (4) Click on Start Tx icon labeled 4.
13. Click on the Stop Tx labeled 1 first, and then click on View Capture Buffer labeled 2.
15. Once Wireshark starts and displays the frames, apply the filter as below in the expression
bar. ip.addr == 1.1.1.1
16. We can see the packets we crafted for this lab, proving we were successful in our efforts.
17. Observe the first frame was sent by 1.1.1.1 in the Wireshark and answer the following
questions. (Answers may vary from student to student)
Question Answer
Frame Length Click or tap here to enter text.
Destination IP address Click or tap here to enter text.
Source port number Click or tap here to enter text.
Window size value Click or tap here to enter text.
TCP payload value Click or tap here to enter text.
Sequence number Click or tap here to enter text.
Protocol Click or tap here to enter text.
Questions
1. What is the difference between Ostinato and Wireshark? Click or tap here to enter text.
2. What is the difference between packet crafter and packet generator? Click or tap here to enter
text.