Font size
WorksheetsCybersecurity PBQ Quiz
Total questions: 25
Worksheet time: 13mins
What does this command do? chmod 600 private.key
Makes the file readable only by the owner
Allows group and others to execute the file
Denies access to everyone
Grants full access to owner
What does this command do? nmap -sV 10.0.0.5
Detect open ports
Bypass firewalls
Identify services and versions
Spoof IP address
Which command blocks inbound SMTP traffic on port 25?
iptables -A INPUT -p tcp --dport 25 -j DROP
iptables -A OUTPUT -p tcp --dport 25 -j ACCEPT
iptables -P INPUT DROP
iptables -F
What does this command do? scp file.txt user@10.0.0.10:/tmp/
Copies file from remote to local
Sends file.txt to a remote machine via SSH
Deletes the file after sending
Works without SSH access
What is the effect of this command? chmod 755 script.sh
Grants execute permission to owner, group, and others
Gives full access to all users
Makes the script readable, written by owner and executable by all
See restrictive permissions denying access to others
What is the purpose of this command?
netstat -a
Displays active listening ports
Lists user login history
Shows hidden processes
Disables network traffic
What does the following command do? chown user1 file.txt
Changes file owner to user1
Adds user1 to the file’s access control list (ACL)
Changes the file’s permissions to match user1’s default
Changes permissions to 777
Which command is used to view the system hostname?
hostname
whoami
uname -r
id
What does this command do? ssh user@10.0.0.5
Establishes a remote login session
Sends a file via SCP
Scans ports on the host
Starts a web server
Which command shows the current working directory?
pwd
cd
ls -la
ls -a
Which command lists currently logged in users?
who
id
groups
hostname
What does this command do? tcpdump -i eth0
Captures packets on the eth0 interface
Disables the firewall
Starts network scanning
Closes all TCP ports
Which nmap command performs a basic TCP scan on a target host at 192.168.1.1?
nmap -sS 192.168.1.1
nmap -A -p 443 192.168.1.1
nmap -u 192.168.1.1
nmap -Pn 192.168.1.1/24
What does this command do? sudo systemctl restart ssh
Restarts the SSH service
Reboots the system
Deletes SSH configuration
Logs the user out
What does the 'ls -l' command show?
Long listing of files with permissions
Files in alphabetical order
Only directories
Hidden files only
What is the output of 'whoami'?
Current logged-in username
Computer hostname
Group ID
Home directory
Which command sets the default permissions mask for new files?
umask
chmod
chown
passwd
What does this command do? ls -la /home/user/
Lists all files including hidden ones in long format
Removes all files in /home/user/
Changes file ownership
Shows running processes
What does the following command do?
netstat -an | grep LISTEN
Lists all active network connections with IP addresses only
Displays all services currently listening for incoming connections
Shows the names of users running network services
Filters all traffic
Which command is used to change directories?
cd
chmod
pwd
ls
What does this command do? sudo systemctl restart apache2
Restarts the Apache2 service
Uninstalls Apache2
Checks Apache logs
Creates a backup of Apache
What does this command accomplish?
id user1
Shows UID and groups for user1
Deletes user1
Changes user1 password
Switches to user1 account
Which command initiates a ping request?
ping 8.8.8.8
tcpdump 8.8.8.8
nmap 8.8.8.8
traceroute 8.8.8.8
What should you select to define a single IP address in a firewall rule?
Any host
Network range
Single host or alias
Multiple hosts
Which iptables command allows incoming HTTP traffic on port 80?
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -D INPUT -p tcp --dport 80 -j DROP
iptables -A OUTPUT -p tcp --sport 80 -j ACCEPT
iptables -A INPUT -p udp --dport 80 -j ACCEPT
