rapid7/metasploit-framework — pull request #1444 by dmaloney-r7 (2013-02-04 23:00:50+00:00)
Title: Rex HTTP Invisible Auth

Invisible auth support for Rex HTTP. Rex HTTP will now automaticaly handle authentication for you if you supply a username and password. No more needing to know what form of authentication to use

Test Case 1:
Set up a Web server with folders for Basic, Negotiate, NTLM, and Digest auth.
Use send_request_cgi with the 'username' and 'password' opts supplied to request each resource.
It should handle the auth and return the final response to your call of send_request_cgi for each one

Test Case 2:
Using the same webserver, target the http_login scanner module against each resource.
It should find the correct creds for each one

Test Case 3:
fire up the Metasploitable2 Linux vm
turn on tomcat5.5 (/etc/init.d/tomcat start)
use the tomcat_mgr_deploy exploit
set rhost to point to the Metasploitable box
set RPORT to 8180
set username to 'tomcat'
set password to 'tomcat'
Hit exploit
It should complete the exploit and get a shell

Test Case 4:
have a Windows Server 2008 r2 box
Enable WinRM with the winrm quickconfig command
Set 'AllowUnencrypted' to true (winrm set wsman/config/service @{AllowUnencrypted="true"})
Fire up the winrm_script_exec exploit
Target the vm
supply the admin username and password
hit exploit
the exploit should work just as it did before the change