Professor Franklin
Accessibility settings

Preferences are saved in this browser when storage is available.

Getting Started
Introduction to Cybersecurity

Server Lockdown

Ubuntu 24.04 hardening CTF · 25 challenges · 5300 points

Go-live is Monday

The registrar’s new self-service portal runs on regportal-01, an Ubuntu server a contractor built and handed over on Friday. Before students can sign in, the server must pass the campus security baseline. You have an administrator account with sudo and a terminal session.

The contractor made choices that kept the build moving and left the server exposed. Find each one, fix it without breaking the portal, and prove it with a flag.

How to play

  1. Start with cat HANDOFF.txt. Type challenges for the full list, or read the board.
  2. Find challenges ask for a value you discover. Enter submit ID ANSWER.
  3. Fix challenges ask you to harden the server. Run hardencheck ID. A passing control prints a FLAG{...} to submit.
  4. Stuck? hint ID gives a nudge at no cost. help lists every command.

The terminal works like bash: Tab completes commands and paths (press it twice to list matches), ↑ and ↓ recall history, Ctrl+R searches it, Ctrl+C cancels the line and Ctrl+L clears the screen. Press Esc then Tab to move focus out of the terminal.

Challenges can be done in any order. Your progress is saved in this browser, and reset --confirm starts over.

0/25 solved · 0/5300 points

Time 00:00:00

Terminal: analyst@localhost: ~

Challenge board

Accounts and sudo 0/3

Security+ 4.5 · Identity and access management

  • ACCT-01 Easy · 100 Find Open

    A second root

    Two accounts on this server have UID 0, which makes both of them root. One is root itself. Submit the name of the other account.

    Answer: An account name

  • ACCT-02 Medium · 200 Fix Open

    Offboard the contractor

    The contractor engagement ended Friday. Remove the contractor account from every group that grants administrative rights and stop it from signing in by any method, including SSH keys. Keep the account and its home directory for the records request.

    Answer: Flag from hardencheck

  • ACCT-03 Hard · 300 Fix Open

    Accountable root

    Root access should belong to named, accountable people. Remove the duplicate UID 0 account and every sudo rule that grants all commands without a password.

    Answer: Flag from hardencheck

File permissions 0/3

Security+ 4.1 · Hardening techniques

  • PERM-01 Easy · 100 Find Open

    Readable hashes

    Password hashes live in /etc/shadow, which ordinary users should never be able to read. Submit the file’s current permissions in octal.

    Answer: Three octal digits, for example 750

  • PERM-02 Medium · 200 Fix Open

    Lock down shadow

    Restore /etc/shadow to the Ubuntu default so ordinary users cannot read it: owner root, group shadow, readable by owner and group only, writable only by root.

    Answer: Flag from hardencheck

  • PERM-03 Hard · 300 Fix Open

    Anyone can edit root’s job

    One script that root’s cron runs every night can be modified by any user on the system. Find it and remove that write access without deleting the script or stopping it from running.

    Answer: Flag from hardencheck

Remote access 0/3

Security+ 4.5 · Secure protocols

  • SSH-01 Easy · 100 Find Open

    Off the usual port

    The contractor moved SSH off its default port during the build. Submit the TCP port that sshd is actually listening on.

    Answer: A port number

  • SSH-02 Medium · 200 Fix Open

    No direct root logins

    Disallow direct root logins over SSH. Change the SSH server configuration and apply it to the running service.

    Answer: Flag from hardencheck

  • SSH-03 Hard · 300 Fix Open

    Keys, not passwords

    Require key-based SSH logins by turning off password authentication. Confirm the effective setting the server uses, not just the line you edited.

    Answer: Flag from hardencheck

Host firewall 0/3

Security+ 4.5 · Firewalls and ports

  • FW-01 Easy · 100 Find Open

    Drafted, never enforced

    The firewall is installed but switched off. The contractor drafted rules for it anyway. Submit the port number of the drafted rule that would expose the database to the entire internet.

    Answer: A port number

  • FW-02 Medium · 200 Fix Open

    Default deny

    Switch the firewall on with a default-deny inbound policy. The portal must stay reachable over HTTPS, and administrators must still reach SSH on the port it actually uses.

    Answer: Flag from hardencheck

  • FW-03 Hard · 300 Fix Open

    Database for the app tier only

    Only the application servers in 10.40.2.0/24 need PostgreSQL. Make the database port accept connections from that subnet and from nowhere else.

    Answer: Flag from hardencheck

Services and exposure 0/3

Security+ 4.1 · Attack surface reduction

  • SVC-01 Easy · 100 Find Open

    Cleartext listener

    A cleartext file-transfer service is listening on the network. Submit the name of the process that owns that listener.

    Answer: A process name

  • SVC-02 Medium · 200 Fix Open

    Retire the migration service

    The data migration that needed that file-transfer service is finished. Stop the service now and make sure it does not start again at boot.

    Answer: Flag from hardencheck

  • SVC-03 Hard · 300 Fix Open

    Cache on loopback

    The portal uses Redis as a local cache only, but Redis is listening on every interface with no password. Restrict it to the loopback interface and keep it running.

    Answer: Flag from hardencheck

Patching 0/3

Security+ 4.3 · Vulnerability remediation

  • PKG-01 Easy · 100 Find Open

    What’s pending

    Refresh the package lists. How many upgradable packages come from the noble-security pocket?

    Answer: A number

  • PKG-02 Medium · 200 Fix Open

    Patch without waiting

    Security fixes should not wait for someone to remember them. Turn on automatic daily package-list refreshes and unattended security upgrades.

    Answer: Flag from hardencheck

  • PKG-03 Hard · 300 Fix Open

    Held back

    Install every pending security update. Something is keeping one of them back. Find out what and resolve it.

    Answer: Flag from hardencheck

Logging 0/3

Security+ 4.4 · Monitoring and log sources

  • LOG-01 Easy · 100 Find Open

    Logs that vanish

    Logs that exist only in memory disappear at every reboot. Check how the systemd journal stores logs on this host and submit the current Storage= value.

    Answer: A single word

  • LOG-02 Medium · 200 Fix Open

    Survive a reboot

    Make the systemd journal keep logs across reboots and apply the change to the running journal service.

    Answer: Flag from hardencheck

  • LOG-03 Hard · 300 Fix Open

    Silent sign-ins

    /var/log/auth.log has not received an entry in weeks, though people sign in and use sudo every day. Restore authentication logging, apply it, and confirm that a new entry arrives.

    Answer: Flag from hardencheck

Auditing and integrity 0/4

Security+ 4.4 · Monitoring and drift

  • AUD-01 Easy · 100 Find Open

    Borrowed privileges

    SUID programs run with their owner’s privileges. One SUID-root program on this host does not belong to any installed package. Submit its full path.

    Answer: An absolute path

  • AUD-02 Medium · 200 Fix Open

    Keep the tool, drop the privilege

    Registrar staff still need that program, but not with root’s privileges. Remove its SUID bit without deleting it.

    Answer: Flag from hardencheck

  • AUD-03 Hard · 300 Fix Open

    Watch the identity files

    Configure auditd to record every write or attribute change to /etc/passwd and /etc/shadow. The rules must survive a reboot and be loaded now.

    Answer: Flag from hardencheck

  • AUD-04 Extreme · 500 Fix Open

    Configuration drift

    Some of your fixes may not stay fixed. Find the scheduled job that keeps undoing the baseline and neutralize it without stopping cron. Then make sure everything it changed is compliant again.

    Answer: Flag from hardencheck