Module: Open Source Intelligence
Topic: Meta
Objective
Students will be able to use a metadata viewer to determine information about a photo that was taken.
Prompt
This challenge will give you experience with extracting metadata from an image file. You are given an image with contains metadata and you will need to use a metadata viewer to help answer the questions.
Questions & Answers
- When was the image created? (Round to the nearest minute) Answer: 2015/05/15 02:14
- What is the image size in pixels? (ex: 800x600) Answer: 1024x768
- What is the make of the camera that took the picture? Answer: apple
- What is the model of the camera that took the picture? Answer: iphone 5
- What is the exposure time for the picture? (ex: 1/200) Answer: 1/640
- Where was the picture taken? Please use only positive numbers with 4 decimal places. (ex: 45.4000N, 75.6667W) Possible answers: ● 39.8750N 20.0100E ● 39.8750N, 20.0100E ● 39 deg 52' 30.00" N, 20 deg 0' 36.00" E ● 39 deg 52' 30.00" N 20 deg 0' 36.00" E ● 39.8750 20.0100 ● N 39° 52' 30'' E 20° 0' 36'’ ● Latitude 39:52:30 Longitude 20:0:36 ● 39; 52;30 20;0; 36 ● 39º 52' 30.00" N, 20º 0' 36.00" E Incorrect answers: ● 39.8750 -20.0100 ● -39.8750 -20.0100 ● -39.8750N, 20.0
Extension Activities
Grade level | Extension Activity | Objective | Activity Steps |
6-8 | News Verification Lab | Distinguish between real and fake news using OSINT techniques. | Give students headlines or short articles.
Ask them to: Reverse image search pictures
Check sources
Cross-reference news stories |
9-12 | OSINT Tools Treasure Hunt | Explore safe, open-source tools. | Tools: WHOIS lookup, Google Earth, The Wayback Machine, Social Search Engines (e.g., Social Searcher, IntelX)
Activity: Create a challenge where students have to:
Find who owns a domain
Look at archived versions of a website (use wayback machine)
Track public social posts for patterns |
To find the model of the camera that took the picture, see the “Model” field from the metadata viewer.
Tutorial Video
Watch our full Tutorial Video to learn more about open source intelligence and see a walkthrough of how to solve this challenge:
Topic: Lookup
Objective
Students will be able to find and use a specification document to answer questions about DNS.
Prompt
Answer these questions about DNS. Make sure you enter the record type and not the description of the record type.
Questions & Answers
- What type of DNS record hold the DNSSEC public signing key?
Answer: DNSKEY
- What type of DNS record is used to map hostnames to IPv6 addresses?
Answer: AAAA
- What type of DNS record is used to delegate a DNS zone?
Answer: NS or Name Server
Extension Activities
6-8 | Username Investigation Game | Understand how usernames can reveal a digital trail. | Give a fictional username (e.g., “AlexGamer47”) and have students: Search for it on YouTube, Twitter (using screenshots), or game forums. Record patterns of use: hobbies, interests, locations. Discussion Prompt: Why do people reuse usernames? What can others learn from that? |
9-12 | Social Media Pattern Analysis | Understand how public posts create patterns. | Using a fictional account (set up by the teacher), have students: Map post times and locations Identify potential routines Connect hashtags to interests or communities |
Topic: Threat Intel
Objectives
Students will be able to use search tools to answer questions about security topics.
Prompt
Answer the following questions about security issues.
Questions & Answers
- What is the CVE of the original POODLE attack?
- What version of VSFTPD contained the smiley face backdoor?
- What was the first 1.0.1 version of OpenSSL that was NOT vulnerable to heartbleed?
- What was the original RFC number that described Telnet?
- How large (in bytes) was the SQL Slammer worm?
- Samy is my…
How to solve: The answer to this question can be found on Wikipedia. Answer: CVE-2014-3566
How to solve: The answer to this question can be found on Wikipedia. Answer: 2.3.4
How to solve: The answer to this question can be found on Wikipedia. Answer: 1.0.1g
How to solve: The answer to this question can be found on Wikipedia. You will have to search another linked Wikipedia page for more information related to when Telnet was first developed. Answer: 15
How to solve: The answer to this question can be found on Wikipedia. Answer: 376
How to solve: The answer to this question can be found on Wikipedia. Answer: hero
Extension Activities
6-8 | Build-A-Hacker Workshop (Fictional Personas) | Understand how threat actors gather info. | Given a scenario (e.g., a hacker wants to target a school), students: Use fictional student or staff profiles. Identify what information is publicly available (e.g., school calendar, staff names).Outcome: Students write a short paragraph predicting how the hacker might use the info and how to defend against it. Have students share their writings. |
9-12 | Fake Job Post Scam Breakdown | Understand how cybercriminals target individuals. | Students analyze fake job posts or emails (pre-curated).Use OSINT to check company legitimacy (e.g., WHOIS, company site vs fake URL).Discussion Prompt: How do threat actors use platforms like LinkedIn to customize attacks? |
Topic: HTTP Headers
Objectives
Students will be able to find resources to understand different types of HTTP request headers.
Prompt
Solve these questions about HTTP headers.
Questions & Answers
- What HTTP request header is used to denote what URI linked to the resource being requested?
- What HTTP request header is used to identify the client software that made the HTTP request?
- What HTTP request header is used to identify the acceptable content types that can be returned?
Answer: referer *Note that the official specification for this header has “referrer” spelled incorrectly as “referer”
Answer: user-agent
Answer: accept
Extension Activities
6-8 | "What’s in a Web Request?" – Header Basics Lab | Introduce basic HTTP headers using simplified, printed mockups. | Present a mock HTTP GET request with headers like User-Agent, Host, and Referer. Ask students to decode what device/browser was used, what website was accessed, and where the request came from. Discussion Prompt: How could this data help someone track you online? |
9-12 | OSINT Header Case Study | Analyze how HTTP headers were used in a real-world investigation. | Setup: Use a public case (e.g., website misconfiguration or tech stack leakage). Activity: Provide captured headers from the case. Ask students to infer: Server type, Technologies in use, Possible vulnerabilities. Ethics Discussion: When is it okay to analyze headers? What should be off-limits? |
Topic: WHOIS
Objective
Students will be able to conduct a WHOIS query to learn publicly available information about a domain name.
Prompt
Conduct open source intelligence data collection about cityinthe.cloud. Answer the following questions as they relate to the cityinthe.cloud domain.
Questions & Answers
- Who is the registrar of this domain?
- On what day was this domain first registered?
- What is this domain's registry domain ID?
- What is the Top-Level Domain (TLD) of this domain?
- What organization manages the TLD used by cityinthe.cloud?
Answer: Dynadot
Answer: 2016-02-16
Answer: D15CD1AC4DEB54207A5048A69B9FC0558-ARI
Answer: cloud
Answer: Aruba
Extension Activities
6-8 | WHOIS Mystery Matching Game | Connect WHOIS records to fictional organizations. | Setup: Create 3–4 mock WHOIS records and 3–4 fictional website profiles. Activity: Students analyze clues like registrar location, organization name, or domain age. Match each WHOIS record to the correct fake website. Use cards or slides for a collaborative classroom game. |
9-12 | WHOIS in the Real World: Threat Intelligence Report | Apply WHOIS to a broader investigation. | Assign a simulated incident (e.g., spam email, fake site).Students gather WHOIS data, infer attacker profile traits (e.g., fast-registered domains, offshore registrars).Produce a 1-page “Threat Intel Summary.” |
Topic: PGP Lookup
Objectives
Students will query a public key database to identify the types of information stored there.
Prompt
Individuals use PGP to securely encrypt their emails, can you find out more about the following PGP keys?
Questions & Answers
- What is the key fingerprint for security@cpanel.net?
- What email address is associated with the key fingerprint
7A39A56B73D1E097D57435CFCDE2DE1DCB2077F2? - On what date does the above key expire (in UTC)?
Answer: B6709B4CC6F42077F69841919521BEDCABD94DDF
Answer: hx@liber8tion.cityinthe.cloud
Answer: 2050-12-26
Extension Activities
6-8 | Understanding Digital Signatures | Introduce students to the concept of digital signatures and their role in verifying the authenticity of digital communications. | Discuss the basics of encryption and how digital signatures work. Use a simple analogy (like sealing a letter in an envelope) to explain how PGP ensures message integrity. Provide examples of how digital signatures are used in everyday life (e.g., software downloads, secure emails). |
9-12 | Analyzing PGP Key Metadata | Teach students how to extract and analyze metadata from PGP keys to gather OSINT. | Provide students with sample PGP public keys (ensure these are fictional or anonymized).Guide students through the process of examining key details such as creation date, associated email addresses, and key fingerprints. Discuss how this information can be used in digital investigations and the importance of ethical considerations. |
Topic: SSL
Objectives
Students will use a browser in order to analyze a SSL certificate chain.
Prompt
Solve the following questions about the Cyber Skyline SSL certificate.
Note: If you see references to "BitDefender" in the process of solving this challenge, that means your BitDefender software is intercepting your SSL/TLS connection and will produce incorrect results.
Questions & Answers
- Who is the issuer for Cyber Skyline's SSL certificate?
- How many bits long is the SSL key?
- How many certificates are in the certificate chain?
Possible Answers: sectigo, comodo
Answer: 2048
Answer: 3
Extension Activities
6-8 | “What's in a URL?” Sorting Game | Learn to distinguish between HTTP and HTTPS. | Provide a stack of fake or real URLs.Students sort into “Secure” (HTTPS) and “Not Secure” (HTTP).Discuss what might happen if you send personal data over an insecure connection. |
9-12 | Expired or Misissued Certificate Challenge | Understand how SSL certificate issues may indicate threats. | Provide samples of expired, self-signed, or misconfigured certificates (can be screenshots or from certificate transparency logs).Students determine what’s wrong and how that might signal phishing, misconfiguration, or a suspicious site. |
Topic: Barcode
Objective
Students will be able to use a barcode reader to identify hidden information.
Prompt
We intercepted a barcode we think might be hiding a flag. See if you can find it.
Questions & Answers
- What format does the barcode use?
- What is the flag hidden in the barcode?
Possible Answers: code 39, code39, Code_39, USD-3, Code 3 of 9, Code 3/9, Alpha 39
Answer: SKY-UZLU-5635
Extension Activities
6-8 | Decode the Hidden Message (QR Detective) | Learn what QR codes are and how they encode information. | Students scan teacher-provided QR codes using school devices .Each QR code reveals a clue, message, or safe web link (e.g., a NASA fact, a riddle).Students work in teams to piece together a message or win a classroom scavenger hunt. Discussion: Why do we use QR codes? What kind of information can they hide? |
9-12 | Reverse Lookup of QR/Barcode Data | Investigate a product or web page linked via barcode or QR. | Scan or decode a real or simulated code. Conduct OSINT to find out: Who owns the domain or product? Where the item was manufactured or registered?Is the website or organization legitimate? Use WHOIS, Wayback Machine, and barcode prefix databases for investigation. |
Module: Cryptography
Topic: Number Bases
Objectives
Students will use tools to recognize and convert various number bases.
Prompt
Our analysts have obtained password dumps storing hacker passwords. After obtaining a few plaintext passwords, it appears that they are all encoded using different number bases.
Questions & Answers
User | Cipher Text | Answer |
Nan | 0x73636f7270696f6e | Answer: scorpion |
Elliot | c2NyaWJibGU= | Answer: scribble |
Steve | 01110011 01100101 01100011 01110101 01110010 01100101 01101100 01111001 | Answer: securely |
Daniel | 01100010 01000111 00111001 01110011 01100010 01000111 01101100 01110111 01100010 00110011 01000001 00111101 | Answer: lollipop |
Extension Activities
6-8 | Color Code Encryption (Hex and RGB) | Use hexadecimal to encode color values and relate them to cryptographic codes. | Teach students how hex values map to RGB (e.g., #FF0000 = red).Create a color-coded message where each letter maps to a hex color.Students decode messages using hex charts. |
9-12 | Cryptographic Base Challenge | Understand base conversions and their role in encoding systems like Base64 and hexadecimal hashes. | Provide students with encrypted-looking strings (e.g., hex-encoded, binary). Challenge them to decode messages by identifying and converting base formats. Include layers (binary → decimal → ASCII → message). |
Topic: Shift
Objectives
Students will decode a Ceasar shift cipher.
Prompt
Our analysts have obtained password dumps storing hacker passwords. It seems to be using a pretty simple encryption scheme, see if you can crack them.
Questions & Answers
User | Password Ciphertext | Answer | Solution |
Chris | iveghny ynxr | virtual lake |
Extension Activities
6-8 | Code Wheel Construction & Cipher Fun | Learn letter shifting using a Caesar cipher wheel. | Students build a Caesar cipher wheel from a printable template (inner and outer alphabet circles).Encode a message by rotating the wheel to a shift value (e.g., shift of 3).Partner up: one student encodes, the other decodes. |
9-12 | Caesar Cipher + Frequency Analysis | Understand and exploit the vulnerabilities of shift ciphers. | Provide a Caesar-encrypted message without a known key. Students: Try all 25 possible shifts (“brute-force” method).Perform frequency analysis (e.g., looking for common letters like E or T).Discuss how frequency analysis led to the downfall of simple substitution ciphers. |
Topic: @bash
Objective
Students will decode an atbash shift cipher.
Prompt
Our analysts have obtained password dumps storing hacker passwords. See if you can crack them.
Questions & Answers
User | Password Ciphertext | Answer | Solution |
Christian | hzuvob lyerlfh xzev | safely obvious cave |
Extension Activities
6-8 | Binary to Text Bash Simulation | Explore how computers use binary to represent letters. | Give students ASCII codes in binary. Simulate Bash decoding using a chart or worksheet. Discuss how computers turn data into readable info via shell tools. |
9-12 | Build a Bash Password Vault | Use Bash to securely store and retrieve hashed passwords. | Script idea: Accept a username and password. Hash the password. Store it in a file. Later, compare a login attempt to the stored hash. |
Topic: Beep
Objective
Students will recognize and decode morse code.
Prompt
Our analysts have intercepted an encoded message. See if you can decode it.
Questions & Answers
User | Password Ciphertext | Answer | Solution |
Helen | - .... . / ... . -.-. .-. . - / --- ..-. / --. . - - .. -. --. / .- .... . .- -.. / .. ... / --. . - - .. -. --. / ... - .- .-. - . -.. / ... -.- -.-- / -.. -.- ...- -... / ----. ---.. .---- -.… | THESECRETOFGETTINGAHEADISGETTINGSTARTEDSKYDKVB9816 |
Extension Activities
6-8 | Beep Morse Code Challenge | Encode and decode messages using sound. | Teach students basic Morse code (e.g., A = .-).Use a simple tone generator app, physical buzzer, or your own voice (short/long beeps).In teams, students send coded beeps across the classroom; others decode the message. |
9-12 | Sonic Modem & Tones | Learn how modems used sound for data transfer. | Play samples of old dial-up modem sounds. Discuss how tones carried data across phone lines. Try encoding binary into a sequence of tones using tools like Audacity. Optional: build a tone-to-binary decoder in Python or spreadsheet format. |
Topic: Fencing
Objective
Students will recognize and decode a rail fence cipher.
Prompt
Our analysts have obtained encrypted messages. We saw hand-written notes that indicated the keys as being "3" and "5". See if you can crack them.
Questions & Answers
User | Password Ciphertext | Answer | Solution |
Eve | Cair eruSA-0org sgaeudrpesr K-II98ue cn seYQ3 | Courage is grace under pressure SKY-AIQI-9380 | |
Nan | F daS-eefn n KZ3eheadty.YI8lta oiwy-Q0 r aI2 | Feel the fear and do it anyway. SKY-IQIZ-3802. |
Topic: French
Objective
Students will decrypt a Vigenère cipher.
Prompt
Our analysts have obtained an encrypted message. We know that the key, qizkwcgqbs was used. See if you can crack them.
Questions & Answers
User | Password Ciphertext | Answer | Solution |
Matt | Y ln xkv lubj swlzqvkht, A vmzb pjk bbua we ddgs ILQ-GQYU-8026 | I do not fear computers, I fear the lack of them SKY-QIZK-8026 |
Extension Activities
6-8 | Vigenère Cipher Challenge | Encrypt/decrypt using a repeating keyword | Using a Vigenère square, students pick a keyword and encode a message so each letter shifts differently. They compare it to Caesar and discuss why a repeating key resists simple frequency analysis — a first taste of "polyalphabetic" thinking. |
9-12 | RSA in Real Life (Digital Certificates Demo) | Understand how RSA protects secure websites. | Use a browser to explore HTTPS certificates (lock icon → certificate).Identify the public key and certificate authority. Students answer questions: Who signed it? What does the public key do? |
Module: Linux
Topic: DIR
Objective
Students will use commands via the Linux Command Line (CLI) to analyze files and directories.
Prompt
One of our analysts had their laptop damaged. However, we were able to recover and mount the hard drive. Access the terminal and recover various flags from the disk.
Questions & Answers
- What are the contents of flag1.txt, found in root's home directory?
- What are the contents of flag2.txt, found in the root directory?
- What are the contents of flag3.txt, found in an archive in
/var/log? - What are the contents of flag4.txt, found in the flag user's home directory?
- What flag is printed when you run the flag5 program?
- What is the full path to the flag5 program?
- /usr/bin/flag5
- /usr/bin/
How to solve: Run cat flag1.txt from root’s home directory
Answer: SKY-FNKC-3207
How to solve: Use cd / to navigate to the root directory and then run cat flag2.txt.
Answer: SKY-NPEJ-2501
How to solve: Navigate to /var/log and then run tar -zxvf flag.tar.gz to extract the files from the archive.
Answer: SKY-FVHR-3562
How to solve: Navigate to the /home/flag directory and then run cat flag4.txt.
Answer: SKY-SXIJ-6142
How to solve: Run the flag5 program with the command flag5
Answer: SKY-UDSV-9689
How to solve: Run which flag5
Answers:
Incorrect: ./usr/bin/flag5
Extension Activities
6-8 | Linux Adventure Story | Use commands like dir to progress through a narrative. | Students role-play as secret agents or explorers.Each directory contains parts of a story.Students unlock new parts by listing contents (dir) and making choices (cd cave, cd castle). |
9-12 | Linux Forensics Mini-Challenge | Find files based on clues using dir, ls, find, and grep. | Create a mystery scenario (e.g., “Find who deleted the secret file”).Students navigate directories, list contents (dir), and read logs (cat logfile.txt).Combine clues to solve the case. |
This challenge will give you experience running basic Linux commands. To solve these challenges, you will be using a Linux Command Line Interface (aka terminal or shell).
Background
The command line interface (CLI) functions similarly to File Explorer on Windows or Finder on macOS but relies on a text-based interface rather than a graphical user interface (GUI). Like its GUI counterparts, the CLI enables navigation through directories (folders) and the launching of files or programs. Upon opening the CLI, the prompt and command input line appear.
The prompt can be customized and configured for your personal preference. In this case, the default prompt contains some important information:
root is the name of the user that we are logged in as. On Linux systems, the root user is the default admin account.
dir is the hostname, or the name of the computer.
/home is the path of the directory that we are in. A “path” specifies a directory’s location, similar to how File Explorer displays it in the navigation bar, enabling easy navigation between folders.
Commands entered at the prompt tell the CLI what task to perform; like navigating directories, displaying file contents, or renaming folders. Each action uses a specific program. Typing the program name, supplying any necessary input, and pressing “Enter” runs the command and displays the result. The following includes examples of these commands and outputs.
Guide
List files in a directory: ls
In this challenge, access is provided as the root user, with the session starting in root’s home directory. Running the ls (short for ‘list’) command displays the contents of the current directory. Press enter after typing ls to get the command to run.
Display contents of a file: cat
This directory listing shows that only 1 file. In order to display the contents of a file, run the cat command (short for concatenate) followed by the name of the file you wish to display. This is the output of cat flag1.txt:
Change to another directory: cd
Try navigating to other directories using the cd command (short for change directory). Add the file path you want to go to after the cd command. To navigate to the root directory, simply use a forward slash. After changing to the root directory, the command line prompt has switched from ~ to /. This is the output after running cd / :
The ~ symbol denotes the home directory of the current user, while / indicates the root directory. The term “root” can refer either to the root user (a superuser account) or the root directory (the top-level directory in the system).
In the root directory, running ls lists the files. Running ls in the root directory reveals additional items beyond flag2.txt, most of which are directories.
flag2.txt, appear in white. The lighter blue text represents system directories. Note that these color schemes are customizable and may vary across terminals.Extracting tar files: tar
Use the cd command to navigate to the /var/log directory and use ls to see the files there.
The flag file in this folder is stored as a tar archive, or tarball, indicated by the “.tar” extension. Similar to a zip file, a tarball packages multiple files for easier storage and transfer. Unlike zip files, tarballs are not compressed by default and often rely on gunzip for compression, noted by the “.gz” extension.
To access the files inside, the tar program is used to decompress and extract contents. This requires configuring command line flags which are single-letter options preceded by a hyphen. Each program defines its own flags and usage patterns.
The tar -zxvf flag.tar.gz command will decompress and extract the files from the tarball:
./flag/ denotes a directory. For tar -zxvf flag.tar.gz :
-
zflag enables decompression -
xextracts the archive -
v(optional) activates verbose output (shows you what files are decompressed) -
fsignals that the archive filename to decompress follows
The output includes ./flag/ and ./flag/flag3.txt, indicating that a folder named flag was extracted, containing a file named flag3.txt. The flag folder now appears in the current directory. Change to the flag directory to view the contents of flag3.txt.
Users & Home Directories: ~ or /home/
From the home directory, you can list the private directory of other users (if you have permission). As with Windows or macOS, each user on a Linux system has a private home directory, typically stored under /home/ . You can navigate directly to your own home directory by entering ~. The blue text below indicates a directory for a user named “flag”.
It is not required to switch users to view the contents of the ‘flag’ user’s folder because root is the default admin. However, if it was needed to switch users and become the ‘flag’ user use the su or ‘switch user’ command as follows and enter the password for that user. Notice how the user name changes from root to flag:
Run Programs:
There a couple ways to run programs. One way is to type in the program name and press enter. Running programs in user folders might not work if that user doesn’t have permission to run the program. Navigate back to root user’s home directory (~) or to the root directory (/). Below is the output of running the flag5 program:
Identify file paths: which
Non built-in Linux programs are simply files located somewhere in the file system. While it's possible to navigate directly to their directories, the command line automatically searches a predefined set of directories when a command is entered. The which command can be used to determine the location of a given program.
Useful resources for this challenge and learning more about Linux:
- Linux Journey
- Use our Tutorial Video below
Tutorial Video
Watch our full Tutorial Video to learn more specifics about the Linux command line.
Topic: File Edit
Objective
Students will use nano and Vim via the command line to create and edit files.
Prompt
Learn how to use command line file editors.
NOTE: The terminal session is logged. Please do not perform any denial of service attacks on the Linux server provided, malicious attempts to attack the Cyber Skyline platform will result in disqualification.
Questions & Answers
- What key should you press in addition to the CTRL key to trigger the combination to exit nano?
- What vim mode allows you to write new characters in the file?
- What keyboard combination will save and quit the file with vim?
- :wq
- wq
- What keyboard combination will delete an entire line in vim?
- What command would you use to rename a file?
Answer: x
How to solve: Search online for “vim mode to write new characters”.
Answer: insert
How to solve: Search online for “how to save and quit with vim” and read the descriptions for the different keyboard combinations.
Answers:
How to solve: Search online for “vim delete line” and then read the descriptions for possible keyboard combinations. See the Trove for more detailed guidance.
Answer: dd
How to solve: Search online for “linux how to rename a file” and read about the most common commands. See the Trove for more detailed guidance.
Answer: mv
Extension Activities
6-8 | Echo & Redirect Challenge | Use echo to write text to a file. | Run commands like echo "I love coding!" > myfile.txt.Append text using echo "And Linux!" >> myfile.txt.Display contents with cat myfile.txt.Discussion: What’s the difference between > and >>? |
9-12 | File Permissions and Editing | Explore how permissions affect file editing. | Create files with different permission settings (chmod).Try to edit them and observe what happens.Discuss why permissions are important for security. |
This challenge will give you experience running basic Linux commands. To solve these challenges, you will be using a Linux Command Line Interface (aka terminal or shell).
Editing files in the Command Line Interface (CLI) requires a text-based editor, as graphical tools like Microsoft Word, Textedit, or Notepad aren't available. Common CLI editors include nano, vim, and Emacs. Nano is the simplest, while Vim and Emacs offer more advanced features but come with a steeper learning curve. This guide focuses on nano and Vim.
Guide
Nano
To open nano, simply type nano into the terminal. File names can also be included as the second argument to the command. For example, nano example.txt will create a file named “example.txt” and will launch the application.
When launched, a list of commands is given at the bottom of the screen. Each command is preceded by a caret character ( ^ ) - this represents the “CTRL” or control key on the keyboard. The caret is used as a shorthand for the CTRL key.
Once in nano, type as you normally would in a graphical text editor. However, the mouse can not be used to change the position of the cursor in the document. Use the arrow keys to move your position within the document. A text cursor will highlight your position in the file.
When you are ready to save and exit, press the CTRL + X characters to trigger the exit process. You will be prompted to save the buffer (buffer is referring to the data) and you can press the “Y” key to save or the “N” key to discard your edits.
Vim
Nano can often be too simple for certain tasks, which may be reason to use Vim. Start Vim by using the vim command and optionally providing a filename: vim example.txt
There are various modes in Vim. The default normal mode in Vim functions as read-only. Press i to enter insert mode (indicated by “INSERT” at the bottom left) where standard typing and deletions are enabled. Press Esc to exit insert mode.
Visual mode enables copying and pasting. Press v in normal mode to begin selecting text from the cursor. Use arrow keys to expand the selection, then press y to “yank” it. Paste the copied text using the p character key, which will paste the text immediately after your cursor.
To save changes after editing, ensure you're in normal mode, then enter command mode with a colon. If editing is complete, type wq to write and quit, then press Enter. Vim displays a warning when quitting with unsaved changes. To exit without saving, use :q!.
Vim relies on keyboard commands to perform editing tasks due to the lack of on-screen buttons. Only basic features are covered here. Commands like dd , which deletes lines, or shortcuts <SHIFT> + G , which jumps the cursor to the end of a file, become familiar with practice.
Vim Command | Purpose |
:q | Quit (only if there are no unsaved edits) |
:w | Save the file |
:wq | Save the file and quit |
:q! | Quit without saving |
:dd | Delete whole lines |
Renaming, Copying and Deleting Files
After creating a file with nano or Vim, it can be renamed, copied, or deleted as needed.
Rename a File: mv
Use the mv (move) command to rename a file. Provide the original filename as the first argument and the new name as the second.
For example, mv example.txt newname.txt renames the file in the same directory. Include a different path in the second argument to move the file to another location. Below, the file “example.txt” was renamed to newname.txt, and then was moved to the “/” directory using mv newname.txt /newname.txt.
Copy a File: cp
Use the cp (copy) command to duplicate a file. Specify the original filename first and the name of the copy second. For example, cp example.txt copy.txt creates a duplicate named “copy.txt” in the same directory.
Remove a File: rm
Use the rm (remove) command to delete a file. Specify the filename as the first argument as follows: rm example.txt. This action is permanent and bypasses recovery options like the Recycle Bin. Restoring deleted files typically requires forensic tools.
Useful resources for this challenge and learning about text editors:
- Linux Journey
- Vim adventures
- Use out Tutorial Video below
Tutorial Video
Watch our full Tutorial Video to learn more specifics about the Linux command line.
Topic: Basic Commands
Objective
Use open source tools and Linux command line knowledge to string Linux commands together.
Prompt
Learn the common basic commands used on the Linux command line.
NOTE: The terminal session is logged. Please do not perform any denial of service attacks on the Linux server provided, malicious attempts to attack the Cyber Skyline platform will result in disqualification.
Questions & Answers
- What character can you use to redirect the output of one program as the input to another program?
- What character can you use the redirect the output of a program to a file?
- How many people have a first name of Jordan in names.csv?
How to solve: Search online for this question as-is. Make sure to find an answer that is specific to redirecting from output from one program to another program (and not to a file). See the Trove for additional guidance.
Answer: |
How to solve: Search online for this question as-is. Make sure to find an answer that is specific to redirecting from output from one program to a file (and not to another program). See the Trove for additional guidance.
Answer: >
How to solve: Use cut to grab only the column of first names, then use grep to search for “Jordan” and then use wc -l to get a line count.
cut -d "," -f 1 < names.csv | grep Jordan | wc -l
Answer: 2
Extension Activities
6-8 | Linux Command Bingo | Familiarize with common Linux commands. | Create Bingo cards with commands like ls, pwd, cd, mkdir, rm.Call out definitions or tasks (“Show me files in the folder”), students mark corresponding commands.First to bingo explains one command in detail. |
9-12 | Linux Trivia & Command Line Quiz | Reinforce command knowledge. | Prepare a quiz with multiple choice and practical terminal commands.Use interactive platforms or classroom polling.Include “Identify the command” from output examples. |
This challenge will give you experience running basic Linux commands. To solve these challenges, you will be using a Linux Command Line Interface (aka terminal or shell).
Background
When running a Linux command, different options can be provided to get a specific behavior. One of these is arguments. Arguments always follow the name of the program and could provide information such as the file you wish to run the program on. You may also see arguments referred to as “options” or “flags”.
The syntax for arguments is set by the author of the program. You can often type in the name of the command followed by --help to get information on how to use the program.
For some programs, you can use the man (manual) program to pull up the instructions. If a program has a manual entry, you can open the manual by typing man followed by the name of the program.
Below is the man page for the ls command. You can view it by entering man ls into the command line:
man followed by the command name to get the manual page for a specific command.
If the -a argument is used with the ls command, all of the files, even the hidden ones which start with . , will be listed.
ls -aMultiple arguments can be added together. The -l argument will list the read, write, execute permissions, the users who can access the file, the file size, and the date modified.
ls -la
Some common Linux commands are listed in a table below . Read the manual pages to learn more about different arguments. Understanding how commands can be used is a key part of using Linux.Please note that within the terminals provided by Cyber Skyline, you will only have access to the tools that are pre-installed. You are not able to install tools that are not given in the terminal.
Guide
Standard Streams
The output of one program can be used as the input to another program. This utilizes a system in Linux called standard streams. There are three standard streams in Linux:
standard input (stdin) - data going into a program
standard output (stdout) - data coming out of a program
standard error (stderr) - errors coming out of a program
The greater than symbol is used to redirect stdout data of a command to a file. For example, echo “I Love Linux” > linux.txt will create a file named “linux.txt” (if it doesn’t already exist) and add “I Love Linux” to it.
Entering echo “Penguins are Cool” > linux.txt will overwrite the pre-existing linux.txt file with the new contents.
Using two greater than symbols will allow contents to be added to the current file contents. echo “I Love Linux” >> linux.txt
The less than symbol can be used in a variety of ways. One is to redirect contents of a file (or stdin) to a certain command. Shown below is the stdout of names.csv using the cat command. But the contents of the names.csv file can be re-directed to the cut command. cut -d ',' -f 1 is used below to show the contents of the first column of a file which is determined by using a comma and the separator, or delimiter, of the columns.
Stringing Commands
The stdout of one program can be made into the stdin of another program. This is done by using the pipe operator ( | ), which is represented with the vertical bar, and allows you string commands together.
For example, to find the number of people with the first name of “Jordan” from the names.csv file, try using cut -d "," -f 1 < names.csv | grep Jordan. Here, the grep command takes the output from the first portion of the command and only outputs strings that match “Jordan”:
It would be easier if a number was given as an output instead of needing to count. What if there were thousands of people named Jordan in the file? The number of lines that are output can be counted using wc -l:
cut -d ‘,’ -f1 <names.csv | grep Jordan | wc -l is hiddenChaining multiple Linux commands can become useful in manipulating and analyzing data. Practice running different commands using these different customization tools. Below is a table of common Linux commands.
You should become comfortable and will be expected to search online for command line tools that can help you accomplish a task from the terminal. You can also use the built-in help or manual pages to learn how to use a tool.
Useful tools for this challenge and learning Linux:
Tutorial Video
Watch our full Tutorial Video to learn more specifics about the Linux command line.
Topic: Strings
Objective
Use the strings command to find hidden information in a file.
Prompt
The hackers have hidden a message in this image. Find out what it is.
Questions & Answers
- What is the hidden flag in the image?
How to solve: Run the strings command on the image and search for text that contains “SKY”.
strings STEG1.jpg | grep SKY
Answer: SKY-RCLO-4839
Extension Activities
6-8 | Guess the File Type | Use strings output to guess the type of file. | Give several files without extensions. Students use strings to extract text clues. Guess file types based on the strings (e.g., image metadata, code snippets, document text). |
9-12 | Build Your Own Binary File | Create a file with hidden text and practice extraction. | Use a hex editor or programming language (e.g., Python) to embed text inside a binary file. Use strings to extract it. Reflect on how data can be hidden and recovered. |
This challenge involves using the strings Linux command to find a hidden message. A random portion of the image file was modified to insert the message, which is why there is a distortion in the image. The horizontal distortion that occurs near the eye is a result of the corruption caused by inserting the hidden message randomly within the image data.
Background
Recall from the bases challenge about how data can be converted from one form to another. Some values in binary that are used in files are not convertible to text characters. strings will pull any binary data out of the file that corresponds to a text character. Text characters would include letters (abc), numbers (123), or symbols (&^,*).
Here is the output of the strings command used on the STEG.jpg file:
Guide
Searching Standard Output (stdout) : grep
The output of the strings command can be searched with another command; grep.
grep is a powerful search command that looks for characters matching the exact string entered by the user. grep is often used with the pipe character ( | ) to search the output of other commands or to format the output of grep.
This challenge specifies that a flag is contained in the image, therefore, grep could be used to look for binary data that converts to characters resembling the standard flag format. This can be done using the command below:
strings STEG1.jpg | grep SKYPro Tip
Using strings is a quick way to see if a flag is hidden within the file without needing to open other programs. However, this challenge could also be solved using a hex editor and searching for SKY in the ASCII data as shown below:
🪵 Module: Log Analysis
Topic: SSH
Objective
Students will analyze the contents of an SSH log to identify adversarial behavior.
Prompt
Analyze this SSH log file to answer the following questions.
Questions & Answers
- What is the hostname of the ssh server that was compromised?
- What was the first IP address to attack the server?
- What was the second IP address to attack the server?
- What was the third IP address to attack the server?
- Which user was targeted in the attack?
- From which IP address was the attacker able to successfully log in?
Answer: myraptor
Oct 11 10:12:00 myraptor sshd[29459]: Server listening on 0.0.0.0 port 22.Answer: 169.139.243.218
Oct 11 10:12:25 myraptor sshd[29465]: Failed password for harvey from 169.139.243.218 port 57273 ssh2Answer: 56.13.188.38
Answer: 30.167.206.91
Answer: harvey
Oct 11 10:12:25 myraptor sshd[29465]: Failed password for harvey from 169.139.243.218 port 57273 sshAnswer: 30.167.206.91
Oct 11 10:36:59 myraptor sshd[30003]: Accepted password for harvey from 30.167.206.91 port 55326 ssh2Extension Activities
6-8 | Log Line Match Game | Learn SSH terminology and log meanings. | Match terms like Accepted password, Failed password, port, user, IP to their meanings. Color code log lines by type (green for success, red for failed attempts). |
9-12 | Create Your Own SSH Log Puzzle | Design and share SSH log puzzles with classmates. | Students write their own fake SSH logs with a narrative: attack, success, mistake, etc. Swap puzzles and analyze each other’s scenarios. |
This challenge will give you experience doing a manual analysis of an SSH (Secure Shell Protocol) log file. SSH is a service that allows a device to provide remote terminal access. No additional tools are required to solve this challenge, only the ability to infer the meaning of the data in the log.
To start, look at the content of the log. If you’re unfamiliar with SSH logs, you can query the internet to find out more about how they are structured and what different terms used in the log mean.
The message field will often include warnings or errors. The event details field will include when sessions initiate or authentication attempts.
Guide
The questions for this challenge imply that there is an attack on the server. To understand what that could mean, look at more of the log file. There seem to be a lot of failed password attempts for a certain account trying to connect to the server.
Looking more closely at the messages, it’s evident that connections are coming from various IP addresses for the same user in a very short amount of time. That seems like odd behavior for a legitimate user trying to login; therefore, looking at the “Failed password” attempts is critical to finding which IP addresses are attacking the server and which account is being targeted.
In order to determine which IP address the attacker was successfully able to login from, we need to find a message that communicates a login attempt was successful. Scroll through the log file to find the line that includes “Accepted password”.
Topic: Login
Objective
Students will use command line tools to analyze a custom application log format.
Prompt
Analyze a custom application login event log to help us understand user behavior.
Questions & Answers
- How many total login attempts were made in this log?
- How many unique usernames appear in this log?
- What is the username with the most login attempts?
- How many attempts were made for the username with the most login attempts?
- What is the date with the most login attempts?
- What is the username that had logins from the most unique IP addresses?
How to solve: Get the line count of the log. (Reminder: at the end of the command, that is a lower case ‘L’ not a number 1)
cat login.log | wc -l
Answer: 6063
How to solve: Extract the third field (with the usernames) of the log, sort the usernames, get the unique usernames, and then get a line count of the number of unique usernames.
cat login.log | cut -f 3 | sort | uniq | wc -l
Answer: 1879
How to solve: Extract the third field (with the usernames) of the log, sort the usernames, get a frequency count of each unique username, and then sort the unique usernames by frequency.
cat login.log | cut -f 3 | sort | uniq -c |sort -n
Answer: ntory
cat login.log | cut -f 3 | sort | uniq -c |sort -n
Answer: 124
How to solve: Extract the first field (with the date+time) of the log, extract just the date, sort the dates, get a frequency count of each unique date, and then sort the unique dates by frequency.
cat login.log | cut -f 1 | cut -d " " -f 1 | sort | uniq -c | sort -n
Answer: 2011-03-23
How to solve: Extract the second field (with the IP address) and third field (with the username) of the log, sort the IP/username pairs, get the unique IP/username pairs, then extract just the usernames from each pair, sort the usernames, get a frequency count of how many unique pairs each username has, and then sort by frequency.
cat login.log | cut -f 2,3 | sort | uniq | cut -f 2 | sort | uniq -c | sort -n
Answer: wlfla0190
Extension Activities
6-8 | Login Color Code | Visually interpret log entries. | Print or display several log lines.Students highlight: Green: Successful logins Red: Failed logins Blue: IP addresses Discuss: What can logs tell us about system usage? |
9-12 | User Behavior Profile | Analyze and profile user activity. | Provide anonymized logs for 2–3 users. Students summarize: Login times Access locations (IP)Behavior patterns Discuss: What’s normal vs suspicious? |
This challenge involves analyzing a custom application log format that uses tab-delineated columns. The tab-delineated format is well-suited for the cut tool to extract specific columns from the log. cut can be used in combination with several other Linux command line utilities to obtain the answers to the questions.
To start, use ls to list the files in the directory, you should see login.log. The cat command can be used to display the contents of the file. Sometimes, log files can be quite long, so to avoid having to scroll back up through several lines, use head or tail to just see the first few lines or the last few lines. Used with no arguments, they will display 10 lines by default:
This can be helpful for log files that have column headers - using head instead of cat will display the column names and the first few lines of data.
Guide
The guide for this challenge will use the head command to only output the first few lines of data to avoid giving away the answers to this challenge while also demonstrating what the rest of the command does. Replacing the head command with the cat command will apply the rest of the command to the contents of the entire file.
Piping the wc command (short for word count), along with the -l flag (lower case ‘L’ for “lines”) will count the lines in the output:
head will output. Display only one column with cut:
To display only the usernames, use the cut command with the -f flag to extract field 3 (the username column).
The default delimiter, or way the fields are separated, for cut is a tab space.
Sorting a list alphabetically and displaying unique output:
The usernames can be sorted alphabetically by piping the output through the command sort:
Some usernames are listed twice. To list only the unique entries, use the uniq command.
The -c flag will show the number of times an entry occurs in the output:
Please note that uniq -c without sort will yield a different (and incorrect) result because uniq -c only counts consecutive duplicate lines. If the same line appears multiple times, but not next to each other, uniq -c cannot identify them: sort puts all identical lines next to each other, allowing uniq -c to count them properly.
This list can be sorted again, this time numerically, with the -n flag:
Other features of cut:
The output can be piped throughcut -f 1,3 to display the first column (Date and Time) and the third column (usernames):
To display only the date (without the timestamp), add cut -d " " -f 1. This tells cut to split the line by spaces (instead of the default tab) and extract the first field. In other words, this changes the default delimiter that cut uses and allows you to specify whatever you like to divide the file.
Topic: VSFTPD
Objective
Students will analyze a VSFTPD log file.
Prompt
Analyze a VSFTPD log file that we obtained.
Questions & Answers
- What IP address did "ftpuser" first log in from?
- What is the first directory that ftpuser created?
- What is the last directory that ftpuser created?
- What file extension was the most used by ftpuser?
- What is the username of the other user in this log?
- What IP address did this other user log in from?
- How many total bytes did this other user upload?
- How many total bytes did ftpuser upload?
- How many total bytes did ftpuser download?
- Identify the IP address of the suspicious login (the login with no subsequent activity).
How to solve: Search for any entries that include “ftpuser”. One of these lines should include an IP address. cat vsftpd.log | grep ftpuser
Answer: 10.0.0.123
cat vsftpd.log | grep ftpuser | grep -i mkdir | head -n 1
Answer: TreeSizeFree
cat vsftpd.log | grep ftpuser | grep -i mkdir | tail -n 1
Answer: 110D300S
How to solve: Search for successful file upload entries from ftpuser, extract the file extension for those uploads, and then get the frequency count for each unique file extension
cat vsftpd.log | grep ftpuser | grep 'OK UPLOAD' | awk -F ',' '{print $2 }' | awk -F "." '{print $2}' | sort | uniq -c | sort
Possible Answers: jpeg, jpg, Joint Photographic Experts Group
cat vsftpd.log | awk '{print $8}' | sort | uniq
Answer: jimmy
cat vsftpd.log | grep jimmy
Answer: 10.0.0.214
How to solve: Search for successful file upload entries from jimmy, extract the number of bytes transferred, then sum the bytes cat vsftpd.log | grep jimmy | grep 'OK UPLOAD' | awk -F ',' '{print $3 }' | awk '{s+=$1} END {print s}’
Answer: 105750628 bytes
cat vsftpd.log | grep ftpuser | grep 'OK UPLOAD' | awk -F ',' '{print $3 }' | awk '{s+=$1} END {print s}’
Answer: 13980839165 bytes
cat vsftpd.log | grep ftpuser | grep 'OK DOWNLOAD' | awk -F ',' '{print $3 }' | awk '{s+=$1} END {print s}’
Answer: 6008032 bytes
How to solve: Search for all of the successful login attempts, extract the IP address used to log in, then sort and unique the IP addresses to identify IP addresses for manual inspection
cat vsftpd.log | grep 'OK LOGIN' | awk -F '"' '{print $2 }' | sort | uniq
Answer: 10.3.0.6
Extension Activities
6-8 | FTP Role-Play Activity | Act out FTP log scenarios and decode them. | Assign roles (Client, Server, Logger).Simulate login attempts and file transfers.Logger writes log entries, others guess what actions they represent. |
9-12 | Create Your Own FTP Log Puzzle | Design a VSFTPD log mystery for peers. | Students generate fictitious VSFTPD logs with:Students generate fictitious VSFTPD logs with:One suspicious loginOne normal userA fake attack attemptPeers analyze the log and identify the risky event. |
This challenge involves analyzing the log file of a VSFTPD server. The questions can be solved through manual inspection of the file and by using basic Linux commands to parse the log.
VSFTPD stands for “Very Secure FTP Daemon” and is used on Linux servers to create a secure way to users to upload and download files. This type of server is implemented for different purposes, but the logs created from its use convey similar information like timestamps, process IDs (PID), event types, client IP addresses, as well as usernames.
The guide below will demonstrate how to solve this challenge building on skills from the previous log challenges. While the cut command could be used for some of this challenge, this guide will demonstrate solution paths using a similar command called awk.
awk and cut can sometimes be used interchangeably, however, awk has additional capabilities involving complex formatting and conditional logic which will be helpful for this challenge.
Log files can be quite long. To avoid having to scroll back up through several lines, use head or tail to just see the first few lines or the last few lines. Used with no arguments, they will display 10 lines by default.
Guide
To find an IP address of a specific user, use grep as shown:cat vsftpd.log | grep ftpuser
The actions performed by ftpuser (like making directories) can be filtered by searching the output of the previous command and using the head command to see the first results. Using -i with grep will ignore the case of what you want to search for. cat vsftpd.log | grep ftpuser | grep -i mkdir | head -n 1
The same can be done with tail to see actions performed by the user at a later time:
cat vsftpd.log | grep ftpuser | grep -i mkdir | tail -n 1
Using awk and custom delimiters:
Questions 4, and 7- 10 involve the use of custom delimiters. This allows awk to use whatever you desire as a separator between fields of data.
The default delimiter for awk is a space. This challenge only uses awk with custom delimiters.
To determine what file type was most commonly uploaded, use grep to get an idea of what the uploads look like. This will help determine how to structure a command to filter the log down such that only file extensions are output. cat vsftpd.log | grep ftpuser | grep 'OK UPLOAD'
As shown below, the file path where the file was uploaded contains the file extension. There is a comma used after the file path— this can be used to set a custom delimiter with the awk command. Using awk, the specific column of data segmented by the commas can be printed. The second column has the file path with the file extension.
To use a custom delimiter with awk, use the -F option and enter the keyboard character you want to use as a delimiter between two single quotes (awk -F ',' ). Use single quotes, curly brackets and a dollar sign to indicate what field awk should print, or output ( '{print $2}’ ).
cat vsftpd.log | grep ftpuser | grep 'OK UPLOAD' | awk -F ',' '{print $2}' | head
From that output, lets isolate the file extension using the period as the delimiter. All we need to do is add another use of awk to the previous command. The output needed (the file extension) will come after the period, so be sure to use to tell awk to print the second field. cat vsftpd.log | grep ftpuser | grep 'OK UPLOAD' | awk -F ',' '{print $2}' | awk -F '.' '{print $2}' | head
From here, all that’s needed is to sort and print the unique file types using the following command:
cat vsftpd.log | grep ftpuser | grep 'OK UPLOAD' | awk -F ',' '{print $2 }' | awk -F "." '{print $2}' | sort | uniq -c | sort
awk or cut, but this is was not shown for brevity)To find other users that might be in this log file, look at what column contains the username field— this is in the 8th column. Use awk to filter all log entries for this field. Be sure to use sort and uniq so you can more easily see how many different users are in the log file.
cat vsftpd.log | awk '{print $8}' | sort | uniq
Enter a different command using grep and the username in question to find that user’s IP address.
To identify the IP address associated with a suspicious login, or logins without any other activity, lets grep for successful logins, and then filter out the field with IP addresses.
Use a double quote (”) as the delimiter. Syntax-wise this is used between two single quotes. Don’t forget to sort for unique IP addresses and count the total.
cat vsftpd.log | grep 'OK LOGIN' | awk -F '"' '{print $2 }' | sort | uniq -c
Using awk to calculate a total:
To determine how many bytes are uploaded or downloaded by a particular user, lets grep for the desired user, use grep to determine if we’re looking for uploaded or downloaded files, and then use the commas as a delimiter to see the file size.
Those are just the bytes for each individual file, not the total. awk can be used to get the total bytes using this command: awk '{s+=$1} END {print s}' . This will take the value of the first column ($1) and add it to variable s — creating a running total through each line of the log. When the log file ends (END), awk will print the value of s—the sum of the bytes.
cat vsftpd.log | grep ftpuser | grep 'OK UPLOAD' | awk -F ',' '{print $3}'| awk '{s+=$1} END {print s}’
Topic: Nginx
Objective
Students will analyze an nginx access log.
Prompt
Analyze an nginx access log and answer questions about what happened.
Questions & Answers
- How many different IP addresses reached the server?
- How many requests yielded a 200 code?
- How many requests yielded a 400 code?
- What IP address rang at the doorbell?
- What version of the Googlebot visited the website?
- Which IP address attempted to exploit the shellshock vulnerability?
- What was the most popular version of Firefox used for browsing the website?
- What is the most common HTTP method used?
- What is the second most common HTTP method used?
- How many requests were for \x04\x01\x00P\xC6\xCE\x0Eu0\x00?
Answer: 47
How to solve: Extract the third field after double quotes as the delimiter (which includes the HTTP codes), sort the codes, get the unique values with a count of the occurrences of each. Optional: sort in descending numeric order.
cat access.log | cut -d '"' -f3 | cut -d ' ' -f2 | sort | uniq -c | sort -rn
Answer: 19
cat access.log | cut -d '"' -f3 | cut -d ' ' -f2 | sort | uniq -c | sort -rn
Answer: 38
cat access.log | grep "bell"
Answer: 186.64.69.141
cat access.log | grep "Googlebot"
Answer: 2.1
How to solve: Search online for details about the Shellshock vulnerability. You should be able to find that the presence of this sequence of characters () { :; }; is an indication of an attempted exploitation of this vulnerability. With this knowledge, search the log for any lines with that sequence of characters.
cat access.log | grep '() { :; };'
Answer: 61.161.130.241
How to solve: Search the log for all lines that contain “Firefox” and the following characters which make up the version number, sort those values, and then get a unique count.
cat access.log | grep -o "Firefox/.*" | sort | uniq -c
Answer: Firefox/31.0
How to solve: Extract the 6th field (with the HTTP method), sort, get the unique values with a count of the occurrences of each value, and then sort in descending numeric order.
cat access.log | awk -F " " '{print $6}' | sort | uniq -c | sort -rn
Answer: GET
Incorrect: POST, PUT, HEAD, DELETE, CONNECT
cat access.log | awk -F " " '{print $6}' | sort | uniq -c | sort -rn
Answer: CONNECT
Incorrect: GET, POST, PUT, HEAD, DELETE
Note that that command requires two backslashes for each original backslash to perform a proper escape sequence for the backslash.
cat access.log | grep '\\x04\\x01\\x00P\\xC6\\xCE\\x0Eu0\\x00' | wc -l
Answer: 6
Extension Activities
6-8 | Website Detective | Match access log lines to website actions. | Give students fictional scenarios (e.g., visiting a page, clicking a link).Match them to the correct NGINX access log line. Match errors to mis-clicks (e.g., 404 for broken links). |
9-12 | Traffic Pattern Analysis | Analyze a set of access logs for usage trends. | Provide a few dozen real or simulated NGINX access log lines. Have students: Count total visits Identify top-requested URLs Chart visit frequency over time Use spreadsheets or visual tools for analysis. |
This challenge involves analyzing an nginx access log. The questions can be solved through manual inspection of the file and by using basic Linux commands to parse the log.
Looking through the first few lines of the log, it is apparent that the IP addresses are the first field in each line:
For a more thorough explanation of these commands, refer to the Walkthrough for Log Analysis Challenge Login.
Guide
To answer the first question, the IPs from the first field (or column) need to be extracted, sorted to filter for only unique ones, and counted. This can be done with cut, sort, uniq and wc :
cat access.log | cut -d “ “ -f 1 | sort | uniq | wc -l
Extracting data from a column in a log file:
Looking at the first screenshot, the HTTP return codes are in the fourth field from the last:
The field right before it is enclosed in double quotes, so " can be used as a delimiter with cut. The first field before the " will contain data from the IP address to the timestamp. The second field, starting with GET, is the actual HTTP request. Therefore, the return codes will be the third field when a double quote is used as the delimiter.
*Note: you only need to use one "between two single quotes in the cut command.
A portion of the output of cat access.log | cut -d '"' -f3 is shown here :
To eliminate the second column from this output, the output can be piped through another cut command using a space as the delimiter. It looks like there is a space before the HTTP return codes as well, so the codes will be the second field after the first “space”:
Now that we are working with the HTTP return codes, we can sort and count the code occurrences:
Matching patterns with grep:
The remaining parts of this challenge require using grep , a tool that can be used to search entries for a keyword. Refer to the Linux: Basic Commands Walkthrough for more information on using grep.
Using grep with the -o flag tells grep to print only the part of the line that matches the pattern, instead of the entire line.
cat access.log | grep -o "Firefox/.*" | sort | uniq -c
Extracting columnar data with awk
Before answering the questions about HTTP methods is may be helpful to learn more about them here. Solving the questions about the HTTP methods used can be approached in two ways; using cut or awk.
cut can be used to extract the field containing the HTTP request methods ( the second field enclosed in double quotes). Then cut will be used to extract the first field of that output (which contains the actual HTTP request method). The output of that will be sorted, and counted using uniq.
sort -rn will list the output in reverse numeric order, so the term with the highest number of occurrences is listed at the top.
awk can also be used to get the desired output. It is a powerful text processing tool that treats any amount of whitespace as a single field separator by default, as compared to cut, which treats only a tab space as a default field separator.
For awk, the HTTP Request Method would be the 6th field from the left.
Backslash - Escape character:
The last question prompts us to look for a raw byte sequence in the log file. If grep '\41' access.log was used, the Linux shell is going to convert the byte to ASCII, and look for ‘A’ instead. To prevent the shell from interpreting the backslash as an escape character, it needs to be escaped with another backslash as follows: grep ‘\\41’ access.log. This ensures grep receives the full byte sequence and not the translated character.
grep ‘\\x04’ access.logTutorial Video
Watch our full Tutorial Video to learn more specifics about crafting SQL queries and injections and see a walkthrough of how to solve this challenge:
Topic: History
Objective
Students will use SQL commands to analyze a SQlite database.
Prompt
Analyze a Firefox SQlite history database and answer questions about what happened. It you are not familiar with SQL you may want to learn more about SQL here: https://www.tutorialrepublic.com/sql-tutorial/
Questions & Answers
- What did the user search for on craigslist?
- What was the current price (USD) of bitcoin when the user was browsing?
- What Bitcoin exchange did the user log in to?
- What is the email that was used to log into the exchange?
- What was the ID of the Bitcoin transaction that the user looked at?
- What was the total BTC value of all the inputs of the Bitcoin transaction?
- Which Bitcoin address received the majority of the Bitcoin in the transaction?
Answer: bitcoin
Answer: $239.50
Answer: Coinbase
Answer: b1gbird@gmail.com
Answer: 5274cfba585a4b5681527a37f95c76340428916bb7480cef6c545f0a28dcd2d7 blockchain.info
Answer: 0.22616302
Answer: 18z6bTFjxkXCmhfp8YBetR2wgmoVjXGJZz
Extension Activities
6-8 | Log Story Sequencing Game | Reconstruct a digital activity timeline. | Provide: Cut-out log line cards with mixed-up order. User logs in at 8:00User opens a document. User edits document. User deletes a file User logs out Activity: Students rearrange the cards into the correct order. They write a one-paragraph summary of what happened based on the log. |
9-12 | Command Frequency Analysis | Determine behavior based on command frequency. | Provide a long history list with command repetition. Students: Tally top 5 used commands. Infer the user’s job (developer, admin, attacker?). Discuss what's "normal" vs "abnormal" usage. |
This challenge will give you experience analyzing a SQLite database. The answers can be obtained by using the sqlite3 Linux program or a GUI-based viewer. There are also browser-based SQLite viewers such as https://inloop.github.io/sqlite-viewer/. Below are some commands to get you started with sqlite3.
Use the command sqlite3 browser.sqlite to start the SQLite program.
sqlite> prompt will indicate that the SQLite program has startedUse the command .tables to see all of the database tables available to view.
Use the command SELECT * FROM moz_hosts; (or use any of the other table names) to view the information contained in the tables. The wildcard indicates to select all the columns, and the semicolon at the end of the query signals the end of the query.
Alternatively for this challenge, you can upload the SQLite database file to the
to navigate through a GUI.We strongly recommend solving this challenge WITHOUT using a SQLite Viewer App.
This challenge is meant to give you a basis for understanding SQLite database structures and commands. This is meant to be helpful to learning other concepts such as web application vulnerabilities.
Guide
Searching the internet for information about “Firefox Sqlite Database” can help narrow down which tables to look through for some of the questions for this challenge. This site mentions that moz_places contains the sites visited, so that might be helpful for the first few questions:
There is a way to list of the columns in the moz_places table with PRAGMA table_info(moz_places); :
For the first question, look for the user’s search on craigslist. This information is most likely to be in the ‘url’ column, so we can display that with the query select url from moz_places;
The price of bitcoin when the user was browsing will show up in the “title” column in this table. Search for the $ sign with select * from moz_places where title like '%$%'; :
For question 3, run select url from moz_places; and scroll to see where the user signs in.
To find the user’s gmail account, query the table for any titles containing ‘gmail’ with select * from moz_places where title like '%gmail%'; :
Scrolling further down from the output of select url from moz_places; , we can see the transaction ID that the user looked at:
The remaining questions can be answers by visiting the URLs that are listed inside the database. The URL with id 290 is for a bitcoin transaction listed on blockchain.info. The main page displays the ID as well as the total value of the inputs.
The Bitcoin transaction ID and the amounts that were transferred are all listed on the blockchain.info page.
Useful resources for this challenge:
Tutorial Video
Watch our full Tutorial Video to learn more specifics about SQL databases and see a walkthrough of how to solve this challenge:
Topic: Squid
Objective
Students will analyze a Squid proxy log.
Prompt
Analyze this Squid proxy log to answer the following questions.
Questions & Answers
- In what year was this log saved?
- How many milliseconds did the fastest request take?
- How many milliseconds did the longest request take?
- How many different IP addresses did the proxy service in this log?
- How many GET requests were made?
- How many POST requests were made?
- What company created the antivirus used on the host at 192.168.0.224?
- What URL is used to download an antivirus update?
How to solve: Take any of the Epoch timestamps and convert them into a human-readable date. An online tool, such as Epoch Converter, can be used to do this.
Answer: 2010
How to solve: Extract the second field (the response time) and then sort the results numerically
cat squid_access.log | awk '{print $2}' | sort -n
Answer: 5
How to solve: Same as the question above.
cat squid_access.log | awk '{print $2}' | sort -n
Answer: 41762
How to solve: Extract the third field (the IP address of the proxy client), sort, get the unique values, and then get the line count.
cat squid_access.log | awk '{print $3}' | sort | uniq | wc -l
Answer: 4
How to solve: Extract the 6th field (the HTTP Request type), sort, and then get the unique values with a count of their occurrences. cat squid_access.log | awk '{print $6}' | sort | uniq –c
Answer: 35
Answer: 78
How to solve: The name of the company is found within the URLs of the requests made 192.168.0.224 . cat squid_access.log | grep "192.168.0.224"
Answer: Symantec
How to solve: Use the command from the question above and then find the URL that includes “virus” and “definitions”
Extension Activities
6-8 | URL Scavenger Hunt | Explore responsible internet use. | Provide fake Squid logs with safe and unsafe URLs .Students highlight URLs that are: Educational Entertainment Suspicious or inappropriate Discussion: Why might schools block certain content? |
9-12 | Attack Simulation: Malicious Site Detection | Detect unsafe browsing behavior. | Some logs include suspicious URLs (e.g., phishing sites).Students must: Identify risky URLs Explain why they are suspicious Suggest how the network should respond (block? notify? educate?) |
This challenge involves analyzing a Squid proxy log. Basic scripting knowledge is necessary to complete the challenge in a reasonable amount of time.
Use head to see the first few lines of the log. The first field, commonly the time, is in an odd format of numbers and decimals. This is epoch time. Epoch time is the time in seconds from January 1 1970 at midnight.
Converting a timestamp from Epoch to Unix:
Online tools can be used to convert the timestamp to a human readable Unix format (see tools below) . or you can use the date command to convert it within linux:
Using awk to extract column data:
To answer questions about the speed of the request, looking up the format of a squid log (https://wiki.squid-cache.org/Features/LogFormat) shows that the field after the timestamp represents the time spent by the proxy in processing the client request, shown in milliseconds. To extract this field, use awk '{print $2}' and sort -n to sort numerically.
To answer how many different ip addresses that the proxy serviced in this log, use awk to output the ip addresses found in field 3. awk '{print $3}' | sort | uniq | wc -l.
For other examples of using awk, refer to Log Analysis challenge Nginx.
The GET and POST requests are found in the 6th column. Usecat squid_access.log | awk '{print $6}' | sort | uniq –c to see the number of GET and POST requests made.
To find information about the antivirus used on 192.168.0.224, use grep to find that ip address in the log file: cat squid_access.log | grep "192.168.0.224"
Useful resources and tools for this challenge:
- Epoch Converter
- Understanding how to use
awkto print specific columns - How squid logs are formatted
- Use our Tutorial Video below
Tutorial Video
Watch our full Tutorial Video to learn more specifics about log analysis and see a walkthrough of how to solve this challenge:
📝Introduction Lab Kit CTF Questions & Answer Key
Open Source Intelligence
Meta (Easy)
This challenge has users find and identify information that is stored within pictures that are taken.
Reference: Introduction Lab Kit Instructor Guide - Topic: Meta
Questions
- On what date was this image created? - How to solve: View the metadata using ExifTool or an online meta image viewer like https://exif.tools/ and look for the create date field
- Answer: 2020-10-22
- What is the make of the camera that took the picture?
- How to solve: View the metadata using ExifTool or an online meta image viewer like https://exif.tools/ and look for the “make” field
- Answer: Hackercams
- What is the model of the camera that took the picture?
- How to solve: View the metadata using ExifTool or an online meta image viewer like https://exif.tools/ and look for the “model” field
- Answer: Cyberlens 8400E
- What is the flag hidden in the image?
- How to solve: View the metadata using ExifTool or an online meta image viewer like https://exif.tools/ and use grep to search for the flag
- Answer: SKY-YKFU-8855
Threat Intel
This challenge will give you experience conducting research on common security vulnerabilities. All that is required to solve these questions is to query online search engines and find multiple sources to confirm the answers.
Questions
- What is the CVE for Dirty Cow?
- How to solve: Search google for “dirty cow cve”
- Answer: CVE-2016-5195
- What company was affected by the Cloudbleed vulnerability?
- How to solve: Search google for “Cloudbleed”
- Answer: Cloudflare
- What is the RFC number for TLS 1.2
- How to solve: Search google for “rfc number tls 1.2”
- Answer: 5246
- What is the Metasploit module name that can be used to exploit the CVE-2017-6510 vulnerability?
- How to solve: Search google for “CVE-2017-6510 metasploit module”
- Answer: 15easy_file_sharing_ftp Easy File Sharing FTP
Codes
This is a challenge to look at the different types of barcode-type scannable resources.
Questions
- What barcode format is being used by the first code?
- How to solve: The first Code #1 should be a familiar type of barcode called QR codes, these are commonly used on customer facing products such as flyers, restaurant menus, or general quick access to a website from your phone’s camera.
- Answer: QR (quick response)
- What is the flag hidden in the first code?
- How to solve: Scan the QR code using your phone’s camera or use an online tool like https://zxing.org/w/decode.jspx or https://www.qrcoderaptor.com
- Answer: SKY-QRCD-4499
- What barcode format is being used by the second code?
- How to solve: This is your more “standard” barcode used more primarily by businesses to track products and scan inventory. They can also be scanned by your phone’s camera or mobile apps or online tools like https://demo.dynamsoft.com/barcode-reader/
- Answer: code 128
- What flag is hidden in the second code?
- How to solve: Use a tool like https://demo.dynamsoft.com/barcode-reader/
- Answer: SKY-EBIM-7920
- What barcode format is being used by the third code?
- How to solve: This could be an unfamiliar barcode, so a quick way to find it would be to search “barcode types” and leading to sites like https://www.scandit.com/resources/guides/types-of-barcodes-choosing-the-right-barcode/. While looking through the “13 Common barcodes” you can see the familiar looking “Data Matrix” barcode. Or use a tool like this: https://demo.dynamsoft.com/barcode-reader/
- Answer: data matrix
- What is the flag hidden in the third code?
- How to solve: Scan the barcode using your phone’s camera or mobile app or online tools like https://demo.dynamsoft.com/barcode-reader/
- Answer: SKY-LRVD-8573
Domain Recon
The challenge is to conduct reconnaissance on the cyberskyline.com domain.
Questions
- What is the Registry Domain ID for the domain?
- How to solve: A good place to start for domain related lookups, ICANN is the place to go.https://lookup.icann.org/en/lookupYou can search by domain and in this case. The answer for this question is in the “Domain Information” grouping.
- Answer: cyberskyline.com
1854866838_DOMAIN_COM-VRSN
1854866838
- Who is the registrar for the domain?
- How to solve: https://lookup.icann.org/en/lookup Contact Information > Registrant on the ICANN lookup tool
- Answer: Dynadot
Super Privacy Service
- What is the IANA ID of the registrar for the domain?
- How to solve: https://lookup.icann.org/en/lookup. Registrar Information Grouping
- Answer: 472
- When was the domain first registered (UTC)?
- How to solve: https://lookup.icann.org/en/lookup. In the Domain Information grouping at the top, the Created date will show when the domain was first registered, or created.
- Answer: 2014-04-15 19:03:26 UTC
Company Profile
You are given a company name and logo. The challenge is to gather information about the company to do reconnaissance.
Questions
- How much money has this company raised in its first round of funding?
- How to solve: Searching for “StrongIntro funding rounds” can find the page https://tracxn.com/d/companies/strongintro/__5s_vdrCw--HO28DME7Xx5wZYJ6zZKC-yaM2LxDeoTq0/funding-and-investorsThis shows there only has been 1 round of funding and the amount it was for.
- Answer: $120k
- Incorrect Answers: 120, $120
$120,000
$120000
- On what day did StrongIntro raise its first round of funding?
- How to solve: https://tracxn.com/d/companies/strongintro/__5s_vdrCw--HO28DME7Xx5wZYJ6zZKC-yaM2LxDeoTq0/funding-and-investors Shows the date of funding. Multiple answers are accepted due to potential information differing between sources.
- Answer: 2016-03-22
2016-03-23
2015-11-21
- Who is the founder of StrongIntro?
- How to solve: On the same site, tracxn.com in the “Founders and & Board of Directors” sidebar will show the founder. https://tracxn.com/d/companies/strongintro/__5s_vdrCw--HO28DME7Xx5wZYJ6zZKC-yaM2LxDeoTq0/founders-and-board-of-directors
- Answer: Fouad Matin or Tieshun Roquerre (they are co-founders)
- What programming language is StrongIntro's server written in?
- How to solve: Searching for “StrongIntro Github” is a good start to begin the search for any code they may have available.https://github.com/strongintro/docker-node repo shows their “StrongIntro node.js apps”.
- Answer: Javascript
NodeJS
Compromise Report
This challenge is to research around the malware that was found bundled in the CCleaner installer for version 5.33.
Questions
- What is the name of the malware included in CCleaner?
- How to solve: Searching around for the name of malware can show a timeline of events which reveal the malware name: https://www.bleepingcomputer.com/news/security/avast-clarifies-details-surrounding-ccleaner-malware-incident/
- Answer:Floxif
Nyetya
- How many seconds does the malware wait before starting malicious operations?
- How to solve: Looking at other reports, you can find a Talos Intelligence blog post that breaks down the technical aspects:https://blog.talosintelligence.com/avast-distributes-malware/In the CCBkrdr_GetShellcodeFromC2AndCall section, it shows the wait
- Answer: 601
601 seconds
- What is the DLL that the malware infects?
- How to solve: In the same blog post, you can see it infects CBkrdr.dll https://blog.talosintelligence.com/avast-distributes-malware/
- Answer: CBkrdr.dll
- What is the registry location where the malware stores the DGA IP address?
- How to solve: In the same blog post, in the Command and Control (C2) section, it breaks down the registry locations
- Answer: HKLM\SOFTWARE\Piriform\Agomo:NID
HKEY_LOCAL_MACHINE\SOFTWARE\Piriform\Agomo:NID
HKLM\SOFTWARE\Piriform\Agomo\NID
- What specific IP address does the malware make HTTP POST requests to?
- How to solve: In the Talos Intelligence blog post, there is a diagram in the Command and Control (C2) section that shows the IP that is connected to.
- Answer: 216.126.225.148
- Incorrect Answer: 216.126.255.148
Cryptography
Bashes
This challenge has users identify and convert between different common number bases.
Reference: Introduction Lab Kit Instructor Guide - Topic: Number Bases
Questions
- 01001001 00100000 01100110 01101111 01110101 01101110 01100100 00100000 00110001 00110010 00110110 00100000 01110000 01100001 01110011 01110011 01110111 01101111 01110010 01100100 00100000 01101000 01100001 01110011 01101000 01100101 01110011
- How to solve: Decode from binary
- Answer: I found 1** password hashes
Answer varies according to user, can be 1 followed by any two digits.
- 54686572652061726520333138206f70656e20706f727473
- How to solve: Decode from Hex
- Reference: No access
- Answer: There are 3** open ports
Answer varies according to user, can be 3 followed by any two digits.
- d2UndmUgcmV0cmlldmVkIHRoZSBwaG9uZQ==
- How to solve: Decode from base64
- Answer: we've retrieved the ______
The answer can be computer, iphone, laptop, desktop, table, phone.
- NzQ2ODY1NzkyNzcyNjUyMDcyNzU2ZTZlNjk2ZTY3MjA2MTIwNjY3NDcwMjA3MzY1NzI3NjY5NjM2NTIwNmY2ZTIwNzA2ZjcyNzQyMDMyMzgzNDM5
- How to solve: Convert from base64 and then convert that output from Hex
- Answer: they're running a ftp service on port 2***
The answer can be http, http, ftp, mysql, ssh, smtp, imap, irc and a port number of 2 followed by any three digits.
Shift
This challenge has users identify transposition, or shift ciphers, to decode the ciphertext back into the plaintext.
Reference: Introduction Lab Kit Instructor Guide - Topic: Shift
Questions
- guvf cebonoyl vfag frpher
- How to solve: Use Rot13 to decode it
- Answer: this probably isnt secure
- bpqa qavb uckp jmbbmz
- How to solve: Use Rot18 to decode it
- Answer: this isnt much better
Alphabet
This is a simple letter-number substitution cipher that will have users converting the numerical alphabet positions to letters.
Questions
- 9 19-5-5-13 20-15 8-1-22-5 12-15-19-20 13-25 6-12-1-19-8-4-18-9-22-5
- How to solve: Each letter represents the numerical alphabet character. ‘I’ is the 9th letter in the alphabet, ‘19’ is S and the grouped letter are the different words.
- Answer: I seem to have lost my flash drive
Polyalphabetic
This challenge is encoded using a simple polyalphabetic cipher. Users will have to try different ciphers to find the one that properly decodes the message.
Reference: Introduction Lab Kit Instructor Guide - Topic: @bash
Questions
- gsv szmwluu droo yv yvsrmw gsv nlerv gsvzgvi
- How to solve: Decode using an atbash cipher
- Answer: the handoff will be behind the movie theater
ASCII
This challenge has users decode a hidden message that has been encoded using ASCII numbers.
Questions
- 84 104 101 114 101 32 97 114 101 32 101 105 103 104 116 32 118 117 108 110 101 114 97 98 105 108 105 116 105 101 115 32 111 110 32 116 104 101 32 115 101 114 118 101 114
- How to solve: Each decimal number represents an ASCII character, for example ‘84’ in ASCII represents the letter T. Use a tool like Cyber Chef to convert from decimal to ASCII.
- Answer: There are eight vulnerabilities on the server
Phone
Questions
- What is the plaintext of the message: 555-2-88-66-222-44 8-44-33 7-44-444-7777-44-444-66-4 2-8-8-2-222-55?
- How to solve: This is a Multitap Phone cipher used in mobile phones to type text/SMS on a keyboard with a numeric keypad. You can begin with running the cipher through a cipher identifier like this one: https://www.dcode.fr/cipher-identifier
- Answer: launch the phishing attack
Morse
What is the plaintext message?
- How to solve: This can be done by ear or by looking at the graph of the audio using a tool like audacity. You can also use online tools such as https://morsecode.world/international/decoder/audio-decoder-adaptive.html to decode.
- Reference: Introduction Lab Kit Instructor Guide - Topic: Beep
- Answer: send the bitcoin
Fencing
This challenge has users decode transposition ciphers. This one in particular is a rail fence cipher, the name fencing is a hint toward a rail fence cipher.
Reference: Introduction Lab Kit Instructor Guide - Topic: Fencing
Questions
- whydue r vhc e i o s oecyttedieikdyutnphr
- How to solve: rail fence cipher decode key 3 offset 0
- Answer: which key did you use to encrypt the drive
- u epelh lhotsotg era oredtv
Linux + Log Analysis
Directories
This challenge involves looking traversing a Linux file system. Starting from the user's home directory and eventually changing the user to view other directories.
Reference: Introduction Lab Kit Instructor Guide - Module: Linux
Questions
- What is the absolute file path of the directory you start in when you connect to the terminal? (You can use the "exit" command to quit the terminal and re-enter)
- How to solve: Using the command
pwdyou can print out the directory that you start in. - Answer: /home/basic-user/start
- What is flag1, the flag that is in the home directory?
- How to solve: It solves this first change into the user's home directory using the
cdcommand. You can then uselsto see any files in the directory and cat to view the contents of the flag file. - Answer: SKY-HBHD-9913
- What is flag2, the flag that is in a "temporary" location?
- How to solve: Linux stores temporary files in the /tmp/ directory. You can change into the directory using
cd /tmpthen uselsandcatto find and view the file. - Answer: SKY-YDBJ-9262
- What is flag3, the flag that is located where the logs are?
- How to solve: Linux stores log files in the /var/log/ directory. Navigate to this directory using cd and then use ls and cat to find and view the file:
- Answer: SKY-IKCW-2336
cd /var/log/
ls
cat flag3.txt
- What is flag4, the flag that is in root's home?
- How to solve: You need to be able to switch to the root user. In the starting directory there is a file called README.md Its contents container the root password. Use
su rootand use the password in this file to login as root. Afterwards use the same process as solving question number 2. - Answer: SKY-WIQA-1402
- What is flag5, the flag that is hiding in root's home?
- How to solve: Use
ls -lato show all the files in the root directory. Files that begin with a . (Example .bashrc ) are hidden files and not shown by default. Using-awith thelscommand shows these files. - Answer: SKY-WPEJ-2171
DPKG
This challenge requires analyzing a dpkg log. This log container information about what software has been installed and removed from the system.
Reference: Introduction Lab Kit Instructor Guide - Topic: Nginx
Questions
- What version number of mongodb was installed on the machine?
- How to solve: In the /var/log directory there is a dpkg.log file. If you use
grep mongodb /var/log/dpkg.logyou will see all mongodb related entries. This information includes any version information. - Answer: 3.4.15
- What version of gnupg-utils was installed on the machine?
- How to solve: Use
grep gnupg-utils /var/log/dpkg.logAnd look specifically for when a package is fully installed. This means the line will not include the half-installed indicator. - Answer: 2.10
- Incorrect: 2.2.5-1 2.2.10-1
2.5-1
2.20
- What distribution of Linux is the machine running?
- How to solve: Looking at the
/etc/apt/sources.listfile shows that this distribution is kali, orcat /etc/os-release - Answer: kali
- When was mongodb uninstalled from the machine (round up to the nearest minute)?
- How to solve: Again looking at the dpkg log you can tell when the package is uninstalled by looking for the remove action and using the timestamp at the start of the line.
- Answer: 2018-11-16 04:18
Breach Prevention
The point of the challenge is to extract important data out of a security appliance log file.
Reference: Introduction Lab Kit Instructor Guide - Topic: Nginx
Questions
- How many total attacks were blocked by the breach prevention software?
- How to solve: Run the following command
grep "Blocking reason" breach.log | wc -lThis looks for each block that occurred and gets a total of the number of occurrences - Answer: 340
- What IP address attempted the most attacks?
- How to solve:
grep "IP" breach.log | sort | uniq -cThis commands looks for each IP field, sorts them, and then gets the amount of times each IP occurs. - Answer: 172.16.4.27
- How many remote file inclusion attacks were prevented?
- How to solve:
grep "Blocking reason" breach.log | sort | uniq -cThis command looks at the amount of times each type of prevention worked - Answer: 12
- How many different types of attacks are listed in this log?
- How to solve:
grep "Blocking reason" breach.log | sort | uniq -cThis command looks at the amount of times each type of prevention worked. - Answer: 3
- What software was used by 172.16.4.27 against this server?
- How to solve: How to solve: Since this log file has its entries split across multiple lines, the easiest way to solve this challenge is to open the log file into a text editor, like notepad++, and search for the ip and look at a given entry for it.
- Answer: OpenVAS
Open Vulnerability Assessment System
Open VAS
- How many different IP addresses attempted an attack on this server?
- How to solve:
grep "IP" breach.log | sort | uniq | wc -l - Answer: 5
This command will get the total number of unique ip address that attacked the server.
- What URL was blocked the most often by the direct file inclusion defense?
- How to solve:
- Answer: https://www.dc4-web-portal.cityinthe.cloud/uploadify/uploadify.php?folder=/
- Incorrect: https://dc4-web-portal.cityinthe.cloud/index.php?url=http://116.125.126.111/page.php
cat breach.log | grep -A 3 'Blocking reason: dfishield' | grep 'URL.*:' | sort | uniq -c | sort -n | tail
This will get the counts for how many time each URL appeared in the log.