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.

Host and Operating System Hardening
0/5Non-Privileged Service User
criticalVerify the MUD process runs under a dedicated user account with no sudo privileges and restricted shell access.
SSH Hardening
criticalDisable root login, enforce SSH key-based authentication, and move the SSH port from the default 22.
Firewall Configuration
criticalConfigure iptables or ufw to drop all incoming traffic except for the game port, SSH port, and necessary web ports.
Fail2Ban Implementation
recommendedDeploy Fail2Ban to monitor game logs and SSH logs for brute-force patterns, automatically banning offending IPs.
Automated Security Updates
recommendedEnable unattended-upgrades for the host OS to ensure kernel and library security patches are applied automatically.
Legacy Code Memory Safety
0/5Safe String Function Migration
criticalReplace all instances of strcpy, strcat, and sprintf with strlcpy, strlcat, and snprintf to prevent buffer overflows.
Stack Protection Compilation
recommendedCompile the codebase using GCC flags -fstack-protector-all and -D_FORTIFY_SOURCE=2 to detect stack smashing.
Input Buffer Validation
criticalEnsure every command input buffer has a hard character limit that matches the MAX_INPUT_LENGTH defined in the headers.
Valgrind Memory Audit
recommendedRun the MUD through Valgrind in a staging environment to identify and fix invalid memory writes and leaks.
Format String Protection
criticalAudit 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/5Modern Password Hashing
criticalMigrate from plaintext or MD5 passwords to Argon2 or bcrypt with unique per-player salts.
Pfile Directory Permissions
criticalSet player file (pfile) directory permissions to 700 and file permissions to 600, owned by the MUD service user.
PII Encryption
recommendedEncrypt sensitive player data like email addresses at rest using AES-256 if stored in the pfile or database.
ANSI Escape Sanitization
recommendedStrip ANSI escape sequences from player-provided strings like titles or descriptions to prevent terminal hijacking.
Session Termination
recommendedEnsure the 'quit' command explicitly clears sensitive session data from memory and properly closes the socket.
Network Security and DDoS Mitigation
0/5Per-IP Connection Limits
criticalImplement a limit on the number of concurrent connections allowed from a single IP address to prevent socket exhaustion.
Connection Rate Limiting
recommendedThrottle the rate of new connection attempts to the game port to mitigate automated connection flooding.
Telnet TLS Support
recommendedEnable Telnet over SSL/TLS (MUDTLS) to protect player credentials from packet sniffing on open networks.
Incomplete Negotiation Timeout
recommendedSet a timeout for Telnet negotiations; drop connections that fail to complete the handshake within 10 seconds.
External DDoS Proxy
optionalRoute game traffic through a proxy or GRE tunnel to hide the origin server's IP address from public view.
In-Game Exploit Prevention
0/5Atomic Item Transfers
criticalVerify that item 'give', 'get', and 'put' operations use atomic logic to prevent duplication via interrupted transactions.
Command Injection Filtering
criticalIf using system() or popen() for external scripts, escape all shell characters or use execv() with an argument array.
Crash-Dupe Protection
recommendedImplement an automated save of both the source and target player files immediately following a high-value item transfer.
Container Depth Limits
recommendedEnforce a maximum nesting depth for containers to prevent stack overflow crashes during recursive inventory lookups.
Social Command Cooldowns
recommendedApply global rate limits to resource-intensive commands like 'who', 'where', and global socials to prevent CPU spiking.
Auditing and Incident Response
0/5Immortal Command Logging
criticalLog every command executed by players with elevated privileges (Wizards/Immortals) to a read-only external log.
Currency Transfer Monitoring
recommendedCreate an automated alert for any gold or currency transfer exceeding 25% of the average player wealth.
Off-Site Backups
criticalAutomate a nightly encrypted backup of player files and world data to a geographically separate storage location.
Core Dump Restriction
recommendedConfigure the OS to restrict core dump access to the admin group to prevent memory inspection by unauthorized users.
Integrity Checking
optionalMaintain a list of SHA-256 hashes for game binaries and critical data files to detect unauthorized modifications.