# Hardening checklist

A new CrushMFT server starts without default users and passwords, and with settings that work for everybody, old clients included. Before it faces the internet, go through this list. Each line names where it is done.

## 1. Updates

| Do | Where |
|---|---|
| ☐ Run a current version, and let the server update itself, or update on the day a release is announced | the **Updates** section of Preferences |
| ☐ Sign up for the vendor's emergency notices | the support pages of crushftp.com |
| ☐ Know how to check that the installed files are genuine | **Validate**, in [About](Admin-About.md) |

Nearly every break-in into a server like this uses a hole that had already been fixed. Nothing else on this page matters as much.

## 2. Administration

| Do | Where |
|---|---|
| ☐ No administrator named `crushadmin`, `admin`, `administrator` or `root` | the [User Manager](Users.md) |
| ☐ Administrators only from your own networks: take `*` out of **IPs allowed to administer** | [Banning](Prefs-Banning.md#ip-restrictions-and-bans) |
| ☐ A second factor for everybody who administers | [Two-factor sign-in](Security-Two-Factor.md) |
| ☐ A person each, no shared admin account | |
| ☐ Roles instead of full administration, wherever a part is enough | [Roles and access](Security-Roles.md) |
| ☐ Few people who may read the settings at all: a full administrator can read stored passwords | [Secrets on disk](Security-Secrets-at-Rest.md) |

## 3. Ports

| Do | Where |
|---|---|
| ☐ Remove the plain HTTP listeners, or leave one that only redirects to HTTPS, or bind them to `127.0.0.1` | [HTTP and HTTPS ports](Ports-HTTP.md) |
| ☐ Remove FTP if nobody needs it. Otherwise: **Require Encryption** and **Require data channel to be secure** | [FTP, FTPS and FTPES ports](Ports-FTP.md) |
| ☐ Only the listeners you use | [IP / Servers](Ports.md) |
| ☐ No API, no WebDAV on ports that do not need them | the listener's **Advanced** tab |
| ☐ Listeners for partners restricted to the partners' addresses | [IP restrictions of a port](Ports-IP-Restrictions.md) |
| ☐ In the firewall: only these ports, towards the server | |

## 4. Encryption on the way

| Do | Where |
|---|---|
| ☐ A real certificate in place of the built-in one | [Getting and installing certificates](Security-SSL-Certificates.md) |
| ☐ Only current TLS versions and strong ciphers | [SSL](Prefs-Encryption-SSL.md), [Ciphers](Prefs-Encryption-Ciphers.md) |
| ☐ SFTP on the set **Recommended** or **Strict**; no DSA host key; no SHA-1 signatures | [SSH host keys, ciphers and key exchange](Ports-SFTP-Keys-and-Ciphers.md) |
| ☐ The security headers at their defaults, with only the outside hosts you need | [Content Security Policy](Prefs-WebInterface-CSP.md) |
| ☐ HSTS on, once every name has a good certificate | the same |

## 5. Users

| Do | Where |
|---|---|
| ☐ Password rules on `default`: length, history | [Passwords and password rules](Security-Passwords.md) |
| ☐ Passwords stored with the current method | [How passwords are stored](Prefs-Encryption-Passwords.md) |
| ☐ Keys for everything that is a program | [SSH keys](Security-SSH-Keys.md) |
| ☐ A second factor for people, where their tools allow | [Two-factor sign-in](Security-Two-Factor.md) |
| ☐ The narrowest folders and the fewest permissions | [Permissions](VFS-Permissions.md) |
| ☐ An end date on every account for a guest or a project | [Password and account expiry](Users-Restrictions-Password-Expiry.md) |
| ☐ No `anonymous` user unless you mean it; then **Ignore web anonymous** on | [WebInterface](Prefs-WebInterface.md#anonymous-access) |
| ☐ The `default` user has no admin rights and no folders. Do not delete it: it only carries settings and cannot log in. | [The default user and templates](Users-Templates.md) |

## 6. Keeping people out

| Do | Where |
|---|---|
| ☐ The hammering limits on; your own networks and your load balancer on **Never ban these IPs** | [Bans and hammering](Security-Bans.md) |
| ☐ Countries you never deal with shut out, if that fits your business | [Banning by country](Prefs-Banning-Countries.md) |
| ☐ Behind a load balancer: real client addresses passed on | [The PROXY protocol on a port](Ports-PROXY-Protocol.md) |
| ☐ Upload filters for file types you never want | [File name filters](Prefs-Restrictions-Filename-Filters.md) |

## 7. On the machine

| Do | Why |
|---|---|
| ☐ Run the server as an account of its own, not as root or Local System where it can be avoided | a hole in the server is then not a hole in the machine |
| ☐ The server's folder readable and writable for that account only | it holds users, keys and settings |
| ☐ A key of the server's own for stored secrets | [Secrets on disk](Security-Secrets-at-Rest.md) |
| ☐ Users' files on a disk or share apart from the server's folder | |
| ☐ The machine's own updates, and nothing else running on it | |
| ☐ The clock kept right by a time service | certificates, codes and Kerberos depend on it |

## 8. A DMZ server

Where the licence includes it, put a DMZ server in front. The machine the internet reaches then holds no users, no files and no settings; it passes connections inward over a link the **internal** server opens. Both of the large attacks on earlier versions did not reach servers behind a DMZ server.

## 9. Seeing what happens

| Do | Where |
|---|---|
| ☐ Alerts for bans, for a blocked certificate pin, for new administrators, for a login of an administrator | [Alerts](Prefs-Alerts.md) |
| ☐ Logs kept long enough to look back, and sent to a system the server cannot change | [Logging](Prefs-Logging.md), [Log targets](Prefs-Logging-Targets.md) |
| ☐ The log level back at 0 after every fault hunt | [What never reaches a log](Security-Log-Privacy.md) |
| ☐ A look, now and then, at the list of administrators and of access tokens | the User Manager |

## 10. Backups

| Do | Why |
|---|---|
| ☐ Back up the server's folder: settings, users, keys, jobs | the server makes copies of its users and settings by itself in `backup`; that folder is on the same disk |
| ☐ Keep the secret key apart from that backup | a backup with both is readable by whoever finds it |
| ☐ Try a restore, once | |

## If you think the server was broken into

Take it off the network, keep a copy of its folder as it is, and go to [Security advisories](Security-Advisories.md#if-you-were-broken-into).
