Cyber Fundamentals AP Cybersecurity
๐Ÿ”“ Rookie ยท 0/9
Start here

Get comfortable in the terminal first

Every task in the tabs above assumes you're not afraid to type instead of click. This page teaches the handful of commands you actually need. Read a section, try it in the terminal on the right, then move to the next one.

You already know how to do this

Every terminal command below is something you've already done a hundred times by clicking. Here's the exact same task, two ways:

File Explorer
๐Ÿ“ This PC  โ€บ  agent7  โ€บ  Documents
๐Ÿ“„ case_log.txt
๐Ÿ“ reports
Double-click "Documents" to open it, then look at what's inside.
=
agent7@workstation
agent7@workstation:~$ cd Documents agent7@workstation:~/Documents$ ls case_log.txt reports/
Type the folder name to open it, then list what's inside.
If you'd normally...In the terminal, that's...
Double-click a folder to open itcd foldername
Click the back / up arrowcd ..
Look at what's in the current windowls
Turn on "Show hidden files"ls -a
Right-click โ†’ Properties / Get Infols -l
Double-click a text file to read itcat filename
Use the search bar to find a file by namefind . -name "..."
Use Ctrl+F inside a documentgrep "..." filename
The address bar showing where you arepwd

pwd โ€” where am I?

Unlike a file explorer with folders you can see, the terminal only shows you one thing at a time: whatever directory you're currently "in." pwd (print working directory) just tells you where that is.

pwd
Type pwd in the terminal now.

ls โ€” what's here?

ls lists everything in your current directory. Folders show up with a trailing slash. Add -a and you'll also see hidden files โ€” anything starting with a dot.

ls ls -a
Try ls, then ls -a.

cd โ€” moving around

cd <folder> moves you into that folder. cd .. moves you back up one level. cd by itself (or cd ~) teleports you straight back home.

cd Documents cd .. cd ~
Move into Documents, then check pwd.

cat โ€” read a file

cat <filename> dumps a file's entire contents straight into the terminal.

cat welcome.txt
Read the welcome message.

ls -l โ€” permissions

Add -l and you get a permission string like -rwxr--r--: three chunks of three for owner, group, everyone else โ€” read, write, execute. A file that's rwxrwxrwx means anyone can read, edit, and run it โ€” usually a red flag.

ls -la
Check Downloads โ€” one file's permissions look unusually open.

find โ€” search by filename

find <where> -name "<pattern>" searches an entire folder tree for files matching a name. Use * as a wildcard.

find . -name "*.txt" find . -name "flag.txt"
From home, search for every .txt file at once.

grep โ€” search inside a file

grep "<text>" <file> searches inside a file's contents. Where find searches file names, grep searches what's written inside them.

grep "hidden" Documents/case_log.txt
Search the case log for "hidden".

Quick primer: IP addresses & ports

You won't type these into this terminal, but you'll need them for Tasks B and C:

IP address

A device's address on a network โ€” like a street address, but for computers. Looks like 192.168.1.14.

Port

A number (0-65535) identifying which service on that device you're talking to. Port 80 = unencrypted web traffic, 443 = encrypted web traffic, 22 = remote terminal access.

Why it matters this week

nmap scans a device to find out which ports are open โ€” "what's this machine actually running?" Wireshark captures the actual traffic on an IP/port, so you can see what's really being said.

๐Ÿšฉ Now find the flag

Use ls, cd, cat, ls -a, find, grep to track down a hidden FLAG{...}.

agent7@workstation
agent7@workstation:~$
Task A ยท Day 2

The breach is confirmed. Find out what happened.

Yesterday's workstation was compromised for real. IT pulled logs and files onto this machine for you to review. Use the same commands from Terminal Basics โ€” nobody's showing you where to look this time.

Question 1
Check access_summary.txt in your home directory. There's one login that doesn't belong. What time did it happen?
Try cat access_summary.txt from your home directory. Look for the line without a badge scan.
Question 2
What account was used for that suspicious login?
It's the same file as Question 1 โ€” check the "user:" column. IT's memo in Documents/ mentions this account by name too.
Question 3
There's a script somewhere on this system with dangerously open permissions โ€” the kind of thing ls -l should make you suspicious of. What's the filename?
The scan report in Documents/reports mentions that automated scans don't check one specific kind of file. Go look at that kind of file with ls -l.
Try find . -name "*.sh" from home, then ls -l the folder it's in.

๐Ÿšฉ Final flag

Somewhere on this system, whoever did this left a message. Find it.

Whoever left it wouldn't want it found easily. Try ls -a from your home directory.
agent7@workstation
agent7@workstation:~$
Task B

Packet Detective

Below is a captured slice of network traffic โ€” the same kind of data Wireshark shows you, just simplified. Someone logged into a company portal. Click any row to see more detail, then answer the questions.

No.TimeSourceDestinationProtocolLengthInfo
Click a packet above to see its detail.
Question 1
What username was used to log in? (Check the POST request to /login.)
Click packet #6 (POST /login) and look at the reconstructed payload.
Question 2
What password went along with it?
Same packet as Question 1 โ€” it's right there in plain text.
Question 3 โ€” think about it
You could just read that password. Why is that possible here, and what would prevent it on a real, properly secured site?
This login happened over plain HTTP (port 80), which sends everything โ€” including form data โ€” as readable text. Anyone capturing traffic on the same network can see it. HTTPS (port 443) encrypts the connection so the contents are scrambled to anyone except the two ends talking to each other.
Question 4 โ€” think about it
Near the end of the capture, traffic starts flowing to a new IP on port 4444. What's suspicious about that, specifically?
Port 4444 is a well-known default port for Metasploit's Meterpreter โ€” a common tool for controlling a compromised machine remotely. New traffic to an unfamiliar external IP on that exact port, right after credentials were captured, is a classic sign of a follow-on compromise, not a coincidence.
Task C

Network Recon

nmap scans a target and reports which ports are open โ€” which tells you what services that machine is actually running. Three targets below are on the same small network. Scan all three.

Enter a target above and click "Run nmap scan" to begin.
Targets on this network: 10.0.5.12 ยท 10.0.5.30 ยท 10.0.5.45
Question 1
Scan all three targets. One of them has a port open that isn't on the standard list (22/80/443). Which IP is it?
22 = SSH, 80 = HTTP, 443 = HTTPS. Anything else in the list is worth a second look.
Question 2
What's the unusual port number on that host?
Question 3 โ€” think about it
Scan 10.0.5.45 โ€” almost everything comes back "filtered" instead of "closed." What's the practical difference between those two words?
"Closed" means the port actually responded and said nobody's listening there. "Filtered" means nmap couldn't get any response at all โ€” usually because a firewall is silently dropping the probe rather than replying to it. A host that shows mostly "filtered" is often a well-secured one, since it's not giving an outside scanner much to work with.
Your progress

๐Ÿ† Certificate of Completion

Every correct answer across all four tasks counts here โ€” no matter which tab you're on when you solve it. Rank up as you go.

๐Ÿ”“ Rookie
0 / 9
๐Ÿ›ก๏ธ
Academy at Palumbo ยท AP Cybersecurity
has reached the rank of
Rookie
0 of 9 challenges solved across Terminal Basics, Task A, Task B, and Task C.