Skip to content

ftp: Fix STAT due to unexpected response#21425

Merged
adfoster-r7 merged 1 commit intorapid7:masterfrom
g0tmi1k:ftp_stat
May 8, 2026
Merged

ftp: Fix STAT due to unexpected response#21425
adfoster-r7 merged 1 commit intorapid7:masterfrom
g0tmi1k:ftp_stat

Conversation

@g0tmi1k
Copy link
Copy Markdown
Contributor

@g0tmi1k g0tmi1k commented May 8, 2026

Before, it would only checking for "space at position 3" to signal "end".
After, it checks still for space AND a 3x numbers/digits at the start as well.

Demo

$ nc 10.0.0.10 21
220 (vsFTPd 2.3.4)
USER anonymous
331 Please specify the password.
PASS anonymous
230 Login successful.
STAT
211-FTP server status:
     Connected to 10.0.0.1
     Logged in as ftp
     TYPE: ASCII
     No session bandwidth limit
     Session timeout in seconds is 300
     Control connection is plain text
     Data connections will be plain text
     vsFTPd 2.3.4 - secure, fast, stable
211 End of status

This came about due to:

Comment thread lib/msf/core/exploit/remote/ftp.rb
@github-project-automation github-project-automation Bot moved this from Todo to In Progress in Metasploit Kanban May 8, 2026
@adfoster-r7 adfoster-r7 merged commit 550a8cb into rapid7:master May 8, 2026
48 of 49 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Metasploit Kanban May 8, 2026
@adfoster-r7
Copy link
Copy Markdown
Contributor

Release Notes

Fixes a bug when parsing FTP server responses

@adfoster-r7 adfoster-r7 added the rn-fix release notes fix label May 8, 2026
@g0tmi1k g0tmi1k deleted the ftp_stat branch May 8, 2026 13:05
@g0tmi1k
Copy link
Copy Markdown
Contributor Author

g0tmi1k commented May 8, 2026

Thanks @adfoster-r7 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rn-fix release notes fix

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants