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 check_conn? method in cisco_ironport_enum #7622

Merged
merged 1 commit into from Nov 28, 2016

Conversation

wvu
Copy link
Contributor

@wvu wvu commented Nov 28, 2016

return 1
if res
print_good("#{rhost}:#{rport} - Server is responsive...")
return true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using explicit return statements because it looks weird without...

@@ -60,10 +60,14 @@ def check_conn?
'uri' => '/',
'method' => 'GET'
})
print_good("#{rhost}:#{rport} - Server is responsive...")
return 1
if res
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what the appropriate response code should be. Probably 200. I'm not sure it matters, since the check is already simplistic.

@pbarry-r7
Copy link
Contributor

Verified on both a working/good target and when the target isn't there:

$ ./msfconsole
                                                  
 _                                                    _
/ \    /\         __                         _   __  /_/ __
| |\  / | _____   \ \           ___   _____ | | /  \ _   \ \
| | \/| | | ___\ |- -|   /\    / __\ | -__/ | || | || | |- -|
|_|   | | | _|__  | |_  / -\ __\ \   | |    | | \__/| |  | |_
      |/  |____/  \___\/ /\ \\___/   \/     \__|    |_\  \___\


       =[ metasploit v4.13.3-dev-777d5c1                  ]
+ -- --=[ 1605 exploits - 913 auxiliary - 275 post        ]
+ -- --=[ 458 payloads - 39 encoders - 9 nops             ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]

msf > use auxiliary/scanner/http/cisco_ironport_enum
msf auxiliary(cisco_ironport_enum) > set RHOSTS 127.0.0.1
RHOSTS => 127.0.0.1
msf auxiliary(cisco_ironport_enum) > run

[+] 127.0.0.1:443 - Server is responsive...
[+] 127.0.0.1:443 - Running Cisco IronPort Security Management Appliances (SMA) - AsyncOS v10.2 
[*] 127.0.0.1:443 - Starting login brute force...
[*] 127.0.0.1:443 - [1/1] - Trying username:"admin" with password:"ironport"
[+] 127.0.0.1:443 - SUCCESSFUL LOGIN - "admin":"ironport"
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed

<I killed the IronPort emulation tool at this point to cause a failure>

msf auxiliary(cisco_ironport_enum) > run

[-] 127.0.0.1:443 - Connection failed, Aborting...
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed

@pbarry-r7 pbarry-r7 merged commit 777d5c1 into rapid7:master Nov 28, 2016
@pbarry-r7
Copy link
Contributor

Thanks, @wvu-r7!! 👍

@wvu wvu deleted the beug/ironport branch November 28, 2016 20:20
@pbarry-r7
Copy link
Contributor

pbarry-r7 commented Nov 28, 2016

No release notes needed.

@wvu
Copy link
Contributor Author

wvu commented Dec 1, 2016

For posterity, I was able to replicate a failure scenario in #7611 by closing ncat so that send_request_cgi returns nil.

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

Successfully merging this pull request may close these issues.

None yet

3 participants