Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty banner (never set) issue #19059

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions data/exploits/psnuffle/pop3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ def parse(pkt)
case s[:last]
when nil
# Its the first +OK must include the banner, worst case its just +OK

# Strip the banner, so that we don't need to do it multiple times
# We can improve the banner by removing the +OK part
s[:banner] = matches.strip
s[:info] = matches
s[:proto] = "tcp"
s[:name] = "pop3"
Expand All @@ -62,7 +66,7 @@ def parse(pkt)
:proof => s[:extra],
:status => Metasploit::Model::Login::Status::SUCCESSFUL
)
print_status("Successful POP3 Login: #{s[:session]} >> #{s[:user]} / #{s[:pass]} (#{s[:banner].strip})")
print_status("Successful POP3 Login: #{s[:session]} >> #{s[:user]} / #{s[:pass]} (#{s[:banner]})")

# Remove it form the session objects so freeup
sessions.delete(s[:session])
Expand Down Expand Up @@ -91,7 +95,7 @@ def parse(pkt)
:proof => s[:extra],
:status => Metasploit::Model::Login::Status::INCORRECT
)
print_status("Invalid POP3 Login: #{s[:session]} >> #{s[:user]} / #{s[:pass]} (#{s[:banner].strip})")
print_status("Invalid POP3 Login: #{s[:session]} >> #{s[:user]} / #{s[:pass]} (#{s[:banner]})")
s[:pass]=""
end
when nil
Expand Down
Loading