An FTP server allows anonymous login and has a world-writable 'incoming' folder; what risks does that create, and how should it be fixed?
answer
- anyone can log in
- any string as password
- free storage for strangers
- staging for a bounce
- write-only drop or nothing
basics
~20 sAnonymous FTP lets anyone log in as 'anonymous' with any password. A world-writable upload folder makes the server free storage for strangers and a staging point for bounce attacks; disable it, or make uploads write-only, unlistable and isolated.
solid answer
~50 sAnonymous FTP, described in RFC 1635 (Informational), is a guest account named `anonymous` that traditionally accepts any password, conventionally `guest` or an e-mail address, and is meant for retrieving public files; RFC 1635 notes such users are not usually allowed to upload. A world-writable, listable `incoming` folder turns that into storage and distribution for anyone: strangers can park and share files through your server, fill its disk, and plant files that internal users later open. RFC 2577 adds that the bounce attack generally needs an uploaded file to send to its target, and lists anonymous FTP that can create files as a historically abused feature. The fix starts with whether anyone needs it: if not, disable anonymous login; if a public drop must stay, make it upload-only, with no listing or download of uploads, no overwrite, rename or delete, a quota and a job that moves files out.
go deeper
Recall that anonymous FTP is a guest login accepting any password, meant for downloads, and that a writable folder lets anyone store files.
Explain the risks of writable, listable anonymous storage and how RFC 2577 links upload areas to the bounce attack.
Decide whether the drop is needed, then specify the write-only, unlistable, quota-bound configuration and move real users to named accounts.
Treat unauthenticated write access as a policy question: who owns public intake, what evidence a review needs, and when the drop is retired.
## What anonymous FTP is **Anonymous FTP** is a convention, written up in **RFC 1635** (Informational), for publishing files to anyone. The server keeps a special account called `anonymous`; the user logs in with that name and, traditionally, any string as the password, commonly `guest` or their e-mail address. RFC 1635's example shows the server asking for the e-mail address with a `331` reply and then answering `230` with a note that access restrictions apply. RFC 1635 describes the intended limits: an anonymous user can log in, list a limited set of directories and retrieve files, and is **not usually allowed to transfer files to the server**. The e-mail password is a courtesy that tells operators who uses the archive; the server cannot verify it, so it authenticates nobody. ## What a world-writable incoming folder adds An `incoming` folder that anonymous users can write to, and especially one they can also list and download from, changes the server's role: - **Free storage and distribution.** Anyone can upload files and hand others the path, using your bandwidth and your address for content you never approved. - **Disk exhaustion.** Without a quota, uploads can fill the filesystem and stop legitimate transfers or other services on the same volume. - **Malicious content inside.** Staff who browse or process the folder may open files planted by strangers. - **Overwrite and tampering.** If anonymous users can overwrite, rename or delete, they can replace a legitimate file another sender left. - **No accountability.** There is no identity behind an anonymous upload, so logs show only a source address. ## How it feeds other attacks RFC 2577, the FTP security considerations, ties writable areas to the **bounce attack**: the attacker generally needs to upload a file to the FTP server and later have the server send it to the target service. A writable anonymous folder supplies that staging step with no credentials at all. The same RFC lists anonymous FTP among features abused in the past, specifically where such a user can read all files on the system or create files. ## Fixing it 1. **Find out who uses it.** Check transfer logs for anonymous logins and uploads. Field offices with nightly uploads should be using named accounts, not the guest account. 2. **If nobody needs it, turn anonymous login off.** That removes the folder's exposure and the bounce staging step together. 3. **If a public drop must stay, lock it down:** - uploads allowed, but no directory listing and no download of uploaded files; - no overwrite, rename or delete for anonymous users; - uploaded files re-owned to a service account on arrival; - a quota or a separate filesystem, so a flood cannot fill the system disk; - a scheduled job that scans and moves files out of the drop area. 4. **Keep the rest of the server read-only** for the anonymous account, confined to its own directory tree. ## Server settings to look for FTP servers expose these as configuration options under their own names; look for the equivalent of each: | Setting | Safe value for a public drop | |---|---| | Anonymous login enabled | off, unless the drop is required | | Global write commands allowed | only where uploads are intended | | Anonymous upload allowed | on only for the drop directory | | Anonymous create, rename, delete | off | | Ownership of anonymous uploads | changed to a service account | | World-readable files only for anonymous downloads | on | ## What TLS does and does not change FTPS does not make an anonymous upload area safe: it encrypts the session, but the uploader is still nobody in particular. RFC 4217 even notes that Clear data protection may suit anonymous servers sending non-sensitive data, and that a server's policy may treat anonymous users differently from named ones. The controls that matter here are who can log in and what they can write. ## In a compliance review Record the finding as "unauthenticated write access", state whether anyone depends on it, and close it either by removing anonymous access or by the write-only drop above. Then move the real users, such as field offices, to named accounts on an encrypted protocol.
- Does asking anonymous FTP users for their e-mail address as a password add any security?No. RFC 1635 describes the e-mail address as a courtesy that tells operators who uses an archive. The server cannot verify it, any string traditionally works, and it travels in clear text over plain FTP. It identifies nobody and authenticates nothing, so it changes none of the controls on what the anonymous account can read or write.
- Why should an anonymous FTP upload folder hide uploaded files from other anonymous users?If uploaders can list and download what others left, the folder becomes a distribution point: one stranger uploads, others fetch, and your server serves content you never approved. It also hands an attacker the upload-then-retrieve pattern RFC 2577 links to the bounce attack. A write-only drop keeps the server a one-way inbox.
- The e-mail password identifies anonymous FTP users
- A writable folder is harmless if the rest is read-only
- Enabling FTPS makes anonymous uploads safe
- Letting anonymous users list uploads is harmless
- Anonymous FTP never matters for the bounce attack