Skip to content

Fix FTP anonymous login detection when ANONYMOUS_LOGIN option is enabled#21375

Open
kuro-toji wants to merge 1 commit intorapid7:masterfrom
kuro-toji:fix/ftp-anonymous-login-workaround
Open

Fix FTP anonymous login detection when ANONYMOUS_LOGIN option is enabled#21375
kuro-toji wants to merge 1 commit intorapid7:masterfrom
kuro-toji:fix/ftp-anonymous-login-workaround

Conversation

@kuro-toji
Copy link
Copy Markdown

Description

The scanner/ftp/ftp_login module was not properly handling anonymous login detection when ANONYMOUS_LOGIN option was enabled. Users reported that enabling ANONYMOUS_LOGIN true with ftp_login scanner failed to detect anonymous FTP access that the scanner/ftp/anonymous module correctly detected.

Root Cause

  1. The anonymous_creds method only checked RECORD_GUEST option, not ANONYMOUS_LOGIN
  2. The FTP connect_login method rejected empty username/password pairs with early return

Changes

  • modules/auxiliary/scanner/ftp/ftp_login.rb: Updated anonymous_creds to also add blank username/password when ANONYMOUS_LOGIN is true
  • lib/metasploit/framework/ftp/client.rb: Updated connect_login to allow empty username/password (for true anonymous FTP)

Fixes #21096

The scanner/ftp/ftp_login module was not properly handling anonymous login
detection when ANONYMOUS_LOGIN option was enabled because:

1. The anonymous_creds method only checked RECORD_GUEST, not ANONYMOUS_LOGIN
2. The FTP connect_login method rejected empty username/password pairs

This fix:
- Updates anonymous_creds to also add blank username/password when ANONYMOUS_LOGIN is true
- Updates connect_login to allow empty username/password (for true anonymous FTP)

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

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

scanner/ftp/ftp_login: ANONYMOUS_LOGIN failing

2 participants