Ubuntu Security ยท 4.3

๐Ÿ“ฆ Package Management (apt)

Install, remove, and update software safelyโฑ ~2 min

Ubuntu uses apt (Advanced Package Tool) to manage software. apt downloads software from trusted repositories and handles dependencies automatically. In competition, you'll remove unauthorized software and install security tools.

Core apt Commands

bash
# Update the local package list (always run this first)
sudo apt update
# Upgrade all installed packages to latest version
sudo apt upgrade
# Install a package
sudo apt install package-name
# Remove a package (keeps config files)
sudo apt remove package-name
# Remove package AND its config files
sudo apt purge package-name
# Remove unnecessary dependencies
sudo apt autoremove
# Search for a package
apt search keyword
# List installed packages
dpkg --list
dpkg --list | grep nmap # check if nmap is installed

Competition โ€” Packages to Remove

  • โ€ขnmap / zenmap โ€” network scanners; competition prohibits them: sudo apt purge nmap zenmap
  • โ€ขnetcat (nc) โ€” can be used as a backdoor: sudo apt purge netcat netcat-traditional netcat-openbsd
  • โ€ขjohn / hashcat โ€” password crackers: sudo apt purge john hashcat
  • โ€ขwireshark โ€” packet sniffer: sudo apt purge wireshark
  • โ€ขnikto, aircrack-ng โ€” vulnerability scanners: sudo apt purge nikto aircrack-ng

Competition โ€” Packages to Install

  • โ€ขsudo apt install ufw โ€” firewall (if not already installed)
  • โ€ขsudo apt install auditd โ€” audit daemon for logging
  • โ€ขsudo apt install libpam-pwquality โ€” password complexity enforcement
  • โ€ขsudo apt install fail2ban โ€” blocks IPs after repeated failed logins
๐Ÿ”’ SecurityBefore removing any package, read the competition scenario. Some programs listed above might be part of the authorized software stack. Only remove what the scenario says is unauthorized.
๐Ÿง Quick Checkfirst try = +5 XP

Which command updates all installed packages on Ubuntu?

โญ 0 XP๐Ÿ”ฅ 0 days