DojoLab-CompTIA-Security-ebook-updated
DojoLab-CompTIA-Security-ebook-updated
CompTIA
SY0-601 Security+
Practice Exams
PBQs & Labs
by DojoLab
2
Contents
3
DojoLab’s CompTIA Security+ (SY0-601) Written by DojoLab
Ltd.
Copyright © 2022 by DojoLab Ltd.
https://www.dojolab.org
All rights reserved. No part of this book may be reproduced or
transmitted in any form or by any means, electronic or mechan-
ical, including photocopying, recording, or by any information
storage and retrieval system, without written permission from
the publisher.
Trademark Acknowledgments
All product names and trademarks are the property of their re-
spective owners, and are in no way associated or a liated with
DojoLab Ltd.
4
fi
ffi
The CompTIA SY0-601 Security+ Certi cation
5
fi
fi
fi
fi
fi
PRACTICE EXAM A (QUESTIONS)
Performance-Based Questions
6
2. Match the description with the most accurate attack type.
Attack types:
Smishing Phishing
Attack types:
Typosquatting Whaling
Tailgating Pharming
8
4. Match the cryptographic concepts to the implementa-
tion.
Cryptographic concepts:
Hashing Salting
9
5. Refer to the following rewall table:
Destination
Rule# Source IP Port Allow/Block
IP
Destination
Rule# Source IP Port Allow/Block
IP
10
fi
ffi
fi
fi
Categorize the following tra c flows as ALLOWED or BLOCKED
through the rewall:
Destination
Rule# Source IP Port Allow/Block
IP
11
fi
fi
fi
ffi
ffi
_________ Request an unsecured web page on 20.5.30.140
8. Fill in the blank with the BEST malware type for the de-
scription.
Bluesnarfing Disassociation
12
An attacker setting up a
fraudulent wireless access
point that mimics the
characteristics of a legitimate
Select a wireless
AP. Users may connect
network attack
automatically to the evil twin
or do so thinking the
fraudulent AP is part of a
trusted wifi network
A type of Denial Of Services
Attack, which is used to
disconnect an access point
Select a wireless
(mobile device in this case)
network attack
from a router by sending
disassociation packets to the
device
An attacker gains unautho-
rized access to a wireless de-
vice via a Bluetooth connec-
tion. Once the hacker has ac-
Select a wireless
cess to the device, they can
network attack
steal sensitive user informa-
tion, including personal pho-
tos, contact lists, emails, and
passwords
A hacking method that lets a
person send unsolicited
messages (typically flirtatious Select a wireless
but can also be malicious) to network attack
any Bluetooth-enabled device
within his own device’s range
13
10. Match the appropriate programming language to each
script. Each programming language will be used once.
Programming languages:
function greeting() {
str="Hello, $name"
echo $str }
string1 = "Dojo"
string2 = "Lab"
Select a programming
joined_string = string1 +
language
string2
print(joined_string)
$tls10 = 'HKLM:\SYSTEM\Cur-
rentCntrSet
14
11. Con gure the following stateful rewall rules:
1. Allow the File Server to access the Database Server using LDAP
2. Block the Storage Server to transfer les to the Web Server using
FTP
3. Allow the FTP Server to transfer les to the Mail Server over HTTPS
Destination
Rule# Source IP Port Allow/Block
IP
15
fi
fi
fi
fi
12. Con gure the following stateful rewall rules:
1. Block the Web Server to access the Database Server using LDAP
2. Allow the Storage Server to transfer les to the Web Server using
SFTP
3. Allow the Mail Server to transfer emails to the Storage Server us-
ing SMTP
Destination
Rule# Source IP Port Allow/Block
IP
16
fi
fi
fi
13. Match the device to the description.
Devices:
Network-based intrusion
Proxy
detection system
A device intelligently
distributed within networks
that passively inspect traffic Select device
traversing the devices on
which they sit
A way to map multiple local
private addresses to a public
Select device
one before transferring the
information
17
14. Match the description with the most accurate malware.
Malware:
A piece of often-malicious
code that is intentionally
inserted into the software. It is
Select malware
activated upon the host
network only when certain
conditions are met
A method by which
authorized and unauthorized
users are able to get around
Select malware
normal security measures and
gain root access to a
computer system
A type of malware that allows
threat actors to use someone
Select malware
else's computer or server to
mine for cryptocurrencies
A malware program that gives
an intruder administrative
Select malware
control over a target
computer
18
15. Fill in the blank with the BEST password attack for the
description.
19
ff
PRACTICE EXAM A (ANSWERS)
Performance-Based Questions - Answers
20
2. Match the description with the most accurate attack type.
Attack types:
Smishing Phishing
Attack types:
Typosquatting Whaling
Tailgating Pharming
22
4. Match the cryptographic concepts to the implementa-
tion.
Cryptographic concepts:
Hashing Salting
23
5. Refer to the following rewall table:
Destination
Rule# Source IP Port Allow/Block
IP
Destination
Rule# Source IP Port Allow/Block
IP
24
fi
ffi
fi
fi
Categorize the following tra c flows as ALLOWED or BLOCKED
through the rewall:
Destination
Rule# Source IP Port Allow/Block
IP
25
fi
fi
fi
ffi
ffi
Allowed Request an unsecured web page on 20.5.30.140
8. Fill in the blank with the BEST malware type for the de-
scription.
Bluesnarfing Disassociation
26
An attacker setting up a
fraudulent wireless access
point that mimics the
characteristics of a legitimate
AP. Users may connect Evil twin
automatically to the evil twin
or do so thinking the
fraudulent AP is part of a
trusted wifi network
A type of Denial Of Services
Attack, which is used to
disconnect an access point
(mobile device in this case) Disassociation
from a router by sending
disassociation packets to the
device
An attacker gains unautho-
rized access to a wireless de-
vice via a Bluetooth connec-
tion. Once the hacker has ac-
cess to the device, they can Bluesnarfing
steal sensitive user informa-
tion, including personal pho-
tos, contact lists, emails, and
passwords
A hacking method that lets a
person send unsolicited
messages (typically flirtatious
Bluejacking
but can also be malicious) to
any Bluetooth-enabled device
within his own device’s range
27
10. Match the appropriate programming language to each
script. Each programming language will be used once.
Programming languages:
function greeting() {
str="Hello, $name"
echo $str }
string1 = "Dojo"
string2 = "Lab"
Python script
joined_string = string1 + string2
print(joined_string)
$tls10 = 'HKLM:\SYSTEM\Current-
CntrSet
28
11. Con gure the following stateful rewall rules:
1. Allow the File Server to access the Database Server using LDAP
2. Block the Storage Server to transfer les to the Web Server using
FTP
3. Allow the FTP Server to transfer les to the Mail Server over HTTPS
Destination
Rule# Source IP Port Allow/Block
IP
29
fi
fi
fi
fi
12. Con gure the following stateful rewall rules:
1. Block the Web Server to access the Database Server using LDAP
2. Allow the Storage Server to transfer les to the Web Server using
SFTP
3. Allow the Mail Server to transfer emails to the Storage Server us-
ing SMTP
Destination
Rule# Source IP Port Allow/Block
IP
30
fi
fi
fi
13. Match the device to the description.
Devices:
Network-based intrusion
Proxy
detection system
A device intelligently
distributed within networks
Network-based intrusion
that passively inspect traffic
detection system
traversing the devices on
which they sit
A way to map multiple local
private addresses to a public Network Address
one before transferring the Translation
information
31
14. Match the description with the most accurate malware.
Malware:
A piece of often-malicious
code that is intentionally
inserted into the software. It is
Logic bombs
activated upon the host
network only when certain
conditions are met
A method by which
authorized and unauthorized
users are able to get around
Backdoor
normal security measures and
gain root access to a
computer system
A type of malware that allows
threat actors to use someone
Crypto malware
else's computer or server to
mine for cryptocurrencies
A malware program that gives
an intruder administrative
Remote access Trojan
control over a target
computer
32
15. Fill in the blank with the BEST password attack for the
description.
33
ff
PRACTICE EXAM B (QUESTIONS)
Performance-Based Questions
PKI components:
34
fi
fi
2. You are at a Windows 10 workstation and have a com-
mand prompt open. Type the command to view resource
record information on a particular DNS server.
C:\> ______________
student@dojolab:~$ ______________
C:\> ______________
35
5. You are troubleshooting a faulty network. You need to il-
lustrate the route packets take through the inter-network
in order to identify the weak spot. Assuming you are work-
ing on a Windows environment, type the command to nd
where the packets are dropped.
C:\> ______________
C:\> ______________
student@dojolab:~$ ______________
36
fi
fi
8. Match the characteristic to the attack type.
Attack types:
Phishing DoS
An attacker impersonates an
authorized device or user to
steal data, spread malware, or Select an Attack type
bypass access control
systems
An attack that shuts down a
machine or network, making it
Select an Attack type
inaccessible to its intended
users
A type of social engineering
where an attacker sends a
fraudulent ("spoofed") mes-
sage designed to trick a hu- Select an Attack type
man victim into revealing sen-
sitive information to the at-
tacker
The act of changing the
registration of a domain name
Select an Attack type
without the permission of the
original owner
37
9. Type the Windows command-line utility that produces
the following output.
C:\> ______________
C:\> ______________
38
11. Type the Windows command-line utility that produces
the following output.
C:\> ______________
C:\> ______________
39
fi
13. You need to perform a nmap scan using the hostname
server1.dojolab.org to nd out all open ports, services and
MAC address on that system. Type the command to initiate
the scan.
student@dojolab:~$ ______________
C:\> ______________
student@dojolab:~$ ______________
40
fi
fi
PRACTICE EXAM B (ANSWERS)
Performance-Based Questions - Answers
PKI components:
41
fi
fi
2. You are at a Windows 10 workstation and have a com-
mand prompt open. Type the command to view resource
record information on a particular DNS server.
C:\> nslookup
# tcpdump -i eth0
tcpdump: verbose output suppressed, use -v or -vv
for full protocol decode
listening on eth0, link-type EN10MB (Ethernet),
capture size 65535 bytes
11:33:31.976358 IP 172.16.25.126.ssh >
172.16.25.125.apwi-rxspooler: Flags [P.], seq
3500440357:3500440553, ack 3652628334, win 18760,
length 196
11:33:31.976603 IP 172.16.25.125.apwi-rxspooler >
172.16.25.126.ssh: Flags [.], ack 196, win 64487,
length 0
11:33:31.977243 ARP, Request who-has tecmint.com
tell 172.16.25.126, length 28
11:33:31.977359 ARP, Reply tecmint.com is-at
00:14:5e:67:26:1d (oui Unknown), length 46
11:33:31.977367 IP 172.16.25.126.54807 > tecmint.-
com: 4240+ PTR? 125.25.16.172.in-addr.arpa. (44)
11:33:31.977599 IP tecmint.com >
172.16.25.126.54807: 4240 NXDomain 0/1/0 (121)
11:33:31.977742 IP 172.16.25.126.44519 > tecmint.-
com: 40988+ PTR? 126.25.16.172.in-addr.arpa. (44)
11:33:32.028747 IP 172.16.20.33.netbios-ns >
172.16.31.255.netbios-ns: NBT UDP PACKET(137):
QUERY; REQUEST; BROADCAST
43
11:33:32.112045 IP 172.16.21.153.netbios-ns >
172.16.31.255.netbios-ns: NBT UDP PACKET(137):
QUERY; REQUEST; BROADCAST
11:33:32.115606 IP 172.16.21.144.netbios-ns >
172.16.31.255.netbios-ns: NBT UDP PACKET(137):
QUERY; REQUEST; BROADCAST
11:33:32.156576 ARP, Request who-has 172.16.16.37
tell old-oraclehp1.midcorp.mid-day.com, length 46
11:33:32.348738 IP tecmint.com >
172.16.25.126.44519: 40988 NXDomain 0/1/0 (121)
.
C:\> arp -a
Using the arp command allows you to display and modify the Ad-
dress Resolution Protocol (ARP) cache. An ARP cache is a simple
mapping of IP addresses to MAC addresses. Each time a comput-
er’s TCP/IP stack uses ARP to determine the Media Access Control
(MAC) address for an IP address, it records the mapping in the ARP
cache so that future ARP lookups go faster.
If you use the arp command without any parameters, you get a list
of the command’s parameters. To display the ARP cache entry for a
speci c IP address, use an -a switch followed by the IP address. For
example:
C:>arp -a 192.168.168.22
Interface: 192.168.168.21 --- 0x10004
44
fi
Internet Address Physical Address
Type
192.168.168.22 00-60-08-39-e5-a1
dynamic
C:>
You can display the complete ARP cache by using -a without speci-
fying an IP address, like this:
C:>arp -a
Interface: 192.168.168.21 --- 0x10004
Internet Address Physical Address
Type
192.168.168.9 00-02-e3-16-e4-5d
dynamic
192.168.168.10 00-50-04-17-66-90
dynamic
192.168.168.22 00-60-08-39-e5-a1
dynamic
192.168.168.254 00-40-10-18-42-49
dynamic
45
5. You are troubleshooting a faulty network. You need to il-
lustrate the route packets take through the inter-network
in order to identify the weak spot. Assuming you are work-
ing on a Windows environment, type the command to nd
where the packets are dropped.
C:\> tracert
C:\> arp -d
46
ff
fi
7. You are working at a Linux command prompt. You need
to nd the A record from the website dojolab.org to trou-
bleshoot DNS-related issues. Type the command to display
the records from the dojolab DNS server.
Attack types:
Phishing DoS
47
fi
An attacker impersonates an
authorized device or user to
steal data, spread malware, or Spoofing
bypass access control
systems
An attack that shuts down a
machine or network, making it
DoS
inaccessible to its intended
users
A type of social engineering
where an attacker sends a
fraudulent ("spoofed") mes-
sage designed to trick a hu- Phishing
man victim into revealing sen-
sitive information to the at-
tacker
The act of changing the
registration of a domain name
Domain hijacking
without the permission of the
original owner
48
C:\> tracert
C:\> netstat
49
ff
The netstat command displays active TCP connections, ports on
which the computer is listening, Ethernet statistics, the IP routing
table, IPv4 statistics (for the IP, ICMP, TCP, and UDP protocols), and
IPv6 statistics (for the IPv6, ICMPv6, TCP over IPv6, and UDP over
IPv6 protocols). Used without parameters, this command displays
active TCP connections.
You can also use this command to test both the computer name
and the IP address of the computer. If pinging the IP address is suc-
cessful, but pinging the computer name isn’t, you might have a
name resolution problem. In this case, make sure the computer
name you are specifying can be resolved through the local Hosts
le, by using Domain Name System (DNS) queries, or through Net-
BIOS name resolution techniques.
C:\> ipconfig/all
51
fi
fi
fi
fi
fi
fi
Parameter Description
The Nmap tool o ers various methods to scan a system. In this ex-
ample, we are performing a scan using the hostname server1.dojo-
lab.org to nd out all open ports, services and MAC address on the
system.
C:\> netstat -r
53
The netstat command is used to show network status. Tradi-
tionally, it is used more for problem determination than for per-
formance measurement. However, the netstat command can
be used to determine the amount of tra c on the network to
ascertain whether performance problems are due to network
congestion and can display the routing table.
student@dojolab:~$ ifconfig
54
fi
fi
fi
fi
ffi
PRACTICE EXAM C (QUESTIONS)
Performance-Based Questions
student@dojolab:~$ ______________
student@dojolab:~$ ______________
student@dojolab:~$ ______________
55
fi
fi
4. You have been tasked to present the content of two log
les. First, you need to display the content of the le
named log le1.txt and then the content of the le named
log le2.txt. Type the command to display the content of
the two les.
student@dojolab:~$ ______________
student@dojolab:~$ ______________
student@dojolab:~$ ______________
C:\> ______________
56
fi
fi
fi
fi
fi
fi
fi
fi
fi
8. Type the command to retrieve only email-related DNS
records for the domain dojolab.org using the -query=mx
option.
student@dojolab:~$ ______________
9. You have been tasked to scan ONLY for open ports in the
range 20-80 on the server 10.11.10.1 using netcat. The re-
sults of the scan should provide verbose information. Type
the command to complete the task.
student@dojolab:~$ ______________
student@dojolab:~$ ______________
student@dojolab:~$ ______________
57
fi
12. You are working at a Kali Linux command prompt. You
want to launch a DoS attack to a testing environment with
IP 195.12.11.10. You are allowed to use only the hping3 com-
mand to send ICMP packets. Type the command to initiate
a DoS attack.
student@dojolab:~$ ______________
student@dojolab:~$ ______________
14. Type the command to add entries into the Linux system
log so that they will be sent to your security information
and event management (SIEM) device when speci c
scripted events occur.
student@dojolab:~$ ______________
58
fi
15. Type the command to add entries into the Linux system
log so that they will be sent to your security information
and event management (SIEM) device when speci c
scripted events occur.
C:\> ______________
59
fi
PRACTICE EXAM C (ANSWERS)
Performance-Based Questions - Answers
60
ff
The switch -d speci es the website you want to gather infor-
mation from.
61
fi
fi
fi
fi
fi
fi
fi
student@dojolab:~$ grep "done$" tasks.doc
62
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
5. You need to search and display the total number of times
that the tag “h1” appears in a le named main.html using
grep. Type the Linux command for it.
The grep can report the number of times that the pattern has
been matched for each le using the -c (count) option.
The syntax is as follow:
grep ‘word’ lename
The tail command reads a le, and outputs the last part of it
(the “tail”).
63
fi
fi
fi
fi
fi
fi
fi
fi
The tail command can also monitor data streams and open
les, displaying new information as it is written. For example, it’s
a useful way to monitor the newest events in a system log in
real time.
C:\> tracert
9. You have been tasked to scan ONLY for open ports in the
range 20-80 on the server 10.11.10.1 using netcat. The re-
sults of the scan should provide verbose information. Type
the command to complete the task.
Scanning ports is one of the most common uses for Netcat. You
can scan a single port or a port range.
nc -z -v 20.20.1.1 100-443
65
The -z option will tell nc to only scan for open ports, without
sending any data to them and the -v option to provide more
verbose information.
66
Use DNSenum to scan your server to see which information is
publicly available.
While hping was mainly used as a security tool in the past, it can
be used in many ways by people that don’t care about security
to test networks and hosts.
69
ffi
fi
14. Type the command to add entries into the Linux system
log so that they will be sent to your security information
and event management (SIEM) device when speci c
scripted events occur.
student@dojolab:~$ logger
15. Type the command to add entries into the Linux system
log so that they will be sent to your security information
and event management (SIEM) device when speci c
scripted events occur.
71
fi
Continue your journey on
dojolab.org
72
fi