Skip to content

Commit

Permalink
Fix empty banner (never set) issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nrathaus committed Apr 5, 2024
1 parent 4ecd106 commit 705cfb5
Showing 1 changed file with 6 additions and 2 deletions.
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

0 comments on commit 705cfb5

Please sign in to comment.