Linux Anonymous FTP Access Enabled - Security Misconfiguration

漏洞信息

漏洞名称: Linux Anonymous FTP Access Enabled - Security Misconfiguration

漏洞类型: 配置问题

漏洞等级: 高危

漏洞描述: 该漏洞涉及Linux系统中匿名FTP访问被启用的安全配置问题。FTP(文件传输协议)是一种广泛用于文件共享的协议,而匿名FTP允许用户无需认证即可访问服务器上的文件。这种配置在需要公开共享文件的场景下常见,但若配置不当,可能导致严重的安全风险。

漏洞的技术根源在于系统管理员未能正确禁用匿名FTP访问,或未对匿名用户进行适当的权限限制。具体表现为/etc/passwd文件中存在FTP用户条目,或vsFTPD、ProFTPD配置文件中启用了匿名访问(如anonymous_enable=YES或UserAlias anonymous ftp)。这种配置问题使得恶意用户能够匿名登录并可能上传恶意文件,甚至利用系统漏洞执行本地攻击。

此漏洞的影响极为严重,因为它可能导致未授权的文件访问、数据泄露,甚至服务器被完全控制。由于匿名FTP不需要任何认证,攻击者可以轻松利用此漏洞进行自动化攻击。此外,如果匿名用户被允许上传文件,攻击者还可能上传恶意脚本或程序,进一步危害系统安全。因此,强烈建议系统管理员检查并禁用不必要的匿名FTP访问,或至少限制匿名用户的权限,以减轻潜在的安全风险。

产品名称: Linux FTP

来源: https://github.com/projectdiscovery/nuclei-templates/blob/1dc5e4c5a7e3689548a72d7cb2a00b803fccc824/misconfiguration%2Flinux%2Flinux-anonymous-ftp-disabled.yaml

类型: projectdiscovery/nuclei-templates:github issues

POC详情

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

id: linux-anonymous-ftp-disabled

info:
name: Linux Anonymous FTP Access Enabled - Security Misconfiguration
author: songyaeji
severity: high
description: >
If the anonymous FTP account is enabled, malicious users may exploit it to log in anonymously
and write to directories, potentially gaining unauthorized access or executing local exploits
against the system. This template checks for signs that anonymous FTP is enabled
via /etc/passwd, vsFTPD, or ProFTPD configuration files.
reference:
- https://isms.kisa.or.kr
- Cloud Vulnerability Assessment Guide(2024) by KISA
tags: linux,ftp,anonymous,vsftpd,proftpd,misconfiguration,local
metadata:
verified: true
os: linux
max-request: 1
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H
cvss-score: 8.6
cwe-id: CWE-200

self-contained: true

code:
- engine:
- bash
source: |
ftp_user=$(grep -E '^ftp:' /etc/passwd)
vsftp_enabled=$(grep -i 'anonymous_enable' /etc/vsftpd/vsftpd.conf 2>/dev/null | grep -i yes)
proftp_alias=$(grep -i 'UserAlias[[:space:]]\+anonymous' /etc/proftpd/proftpd.conf 2>/dev/null)

if [ -n "$ftp_user" ]; then
echo "[VULNERABLE] FTP user exists in /etc/passwd"
fi

if [ -n "$vsftp_enabled" ]; then
echo "[VULNERABLE] anonymous_enable=YES is set in vsftpd.conf"
fi

if [ -n "$proftp_alias" ]; then
echo "[VULNERABLE] 'UserAlias anonymous ftp' found in proftpd.conf"
fi

if [ -z "$ftp_user" ] && [ -z "$vsftp_enabled" ] && [ -z "$proftp_alias" ]; then
echo "[SAFE] Anonymous FTP is properly disabled"
fi
matchers:
- type: word
part: code_1_response
words:
- "[VULNERABLE]"


Linux Anonymous FTP Access Enabled - Security Misconfiguration
http://example.com/2025/07/29/github_2012083945/
作者
lianccc
发布于
2025年7月29日
许可协议