Checklists

MUD Security checklist for MUDs

This checklist provides a technical framework for securing a MUD server environment, protecting player data, and hardening legacy codebases against common exploits and network abuse.

MUD Security checklist for MUDs hero illustration
Progress0 / 30 complete (0%)

Host and Operating System Hardening

0/5
  • Non-Privileged Service User

    critical

    Verify the MUD process runs under a dedicated user account with no sudo privileges and restricted shell access.

  • SSH Hardening

    critical

    Disable root login, enforce SSH key-based authentication, and move the SSH port from the default 22.

  • Firewall Configuration

    critical

    Configure iptables or ufw to drop all incoming traffic except for the game port, SSH port, and necessary web ports.

  • Fail2Ban Implementation

    recommended

    Deploy Fail2Ban to monitor game logs and SSH logs for brute-force patterns, automatically banning offending IPs.

  • Automated Security Updates

    recommended

    Enable unattended-upgrades for the host OS to ensure kernel and library security patches are applied automatically.

Legacy Code Memory Safety

0/5
  • Safe String Function Migration

    critical

    Replace all instances of strcpy, strcat, and sprintf with strlcpy, strlcat, and snprintf to prevent buffer overflows.

  • Stack Protection Compilation

    recommended

    Compile the codebase using GCC flags -fstack-protector-all and -D_FORTIFY_SOURCE=2 to detect stack smashing.

  • Input Buffer Validation

    critical

    Ensure every command input buffer has a hard character limit that matches the MAX_INPUT_LENGTH defined in the headers.

  • Valgrind Memory Audit

    recommended

    Run the MUD through Valgrind in a staging environment to identify and fix invalid memory writes and leaks.

  • Format String Protection

    critical

    Audit all log and send_to_char calls to ensure user-provided input is never used as the format string argument.

Player Data and Password Security

0/5
  • Modern Password Hashing

    critical

    Migrate from plaintext or MD5 passwords to Argon2 or bcrypt with unique per-player salts.

  • Pfile Directory Permissions

    critical

    Set player file (pfile) directory permissions to 700 and file permissions to 600, owned by the MUD service user.

  • PII Encryption

    recommended

    Encrypt sensitive player data like email addresses at rest using AES-256 if stored in the pfile or database.

  • ANSI Escape Sanitization

    recommended

    Strip ANSI escape sequences from player-provided strings like titles or descriptions to prevent terminal hijacking.

  • Session Termination

    recommended

    Ensure the 'quit' command explicitly clears sensitive session data from memory and properly closes the socket.

Network Security and DDoS Mitigation

0/5
  • Per-IP Connection Limits

    critical

    Implement a limit on the number of concurrent connections allowed from a single IP address to prevent socket exhaustion.

  • Connection Rate Limiting

    recommended

    Throttle the rate of new connection attempts to the game port to mitigate automated connection flooding.

  • Telnet TLS Support

    recommended

    Enable Telnet over SSL/TLS (MUDTLS) to protect player credentials from packet sniffing on open networks.

  • Incomplete Negotiation Timeout

    recommended

    Set a timeout for Telnet negotiations; drop connections that fail to complete the handshake within 10 seconds.

  • External DDoS Proxy

    optional

    Route game traffic through a proxy or GRE tunnel to hide the origin server's IP address from public view.

In-Game Exploit Prevention

0/5
  • Atomic Item Transfers

    critical

    Verify that item 'give', 'get', and 'put' operations use atomic logic to prevent duplication via interrupted transactions.

  • Command Injection Filtering

    critical

    If using system() or popen() for external scripts, escape all shell characters or use execv() with an argument array.

  • Crash-Dupe Protection

    recommended

    Implement an automated save of both the source and target player files immediately following a high-value item transfer.

  • Container Depth Limits

    recommended

    Enforce a maximum nesting depth for containers to prevent stack overflow crashes during recursive inventory lookups.

  • Social Command Cooldowns

    recommended

    Apply global rate limits to resource-intensive commands like 'who', 'where', and global socials to prevent CPU spiking.

Auditing and Incident Response

0/5
  • Immortal Command Logging

    critical

    Log every command executed by players with elevated privileges (Wizards/Immortals) to a read-only external log.

  • Currency Transfer Monitoring

    recommended

    Create an automated alert for any gold or currency transfer exceeding 25% of the average player wealth.

  • Off-Site Backups

    critical

    Automate a nightly encrypted backup of player files and world data to a geographically separate storage location.

  • Core Dump Restriction

    recommended

    Configure the OS to restrict core dump access to the admin group to prevent memory inspection by unauthorized users.

  • Integrity Checking

    optional

    Maintain a list of SHA-256 hashes for game binaries and critical data files to detect unauthorized modifications.