2014-09-16 19:35:57 +00:00
|
|
|
@wip
|
2014-08-13 21:54:29 +00:00
|
|
|
Feature: MS08-067 netapi
|
2014-08-19 20:06:47 +00:00
|
|
|
|
2014-09-02 23:57:55 +00:00
|
|
|
Background:
|
2014-09-11 21:51:49 +00:00
|
|
|
Given a directory named "home"
|
|
|
|
And I cd to "home"
|
|
|
|
And a mocked home directory
|
2014-10-30 20:36:16 +00:00
|
|
|
Given I run `msfconsole` interactively
|
2014-09-02 23:57:55 +00:00
|
|
|
And I wait for stdout to contain "Free Metasploit Pro trial: http://r-7.co/trymsp"
|
2014-10-29 18:21:31 +00:00
|
|
|
|
2014-08-19 20:06:47 +00:00
|
|
|
Scenario: The MS08-067 Module should have the following options
|
2014-08-13 20:55:11 +00:00
|
|
|
When I type "use exploit/windows/smb/ms08_067_netapi"
|
2014-08-19 20:06:47 +00:00
|
|
|
And I type "show options"
|
2014-08-13 19:28:28 +00:00
|
|
|
And I type "exit"
|
2014-09-11 21:51:49 +00:00
|
|
|
Then the output should contain:
|
|
|
|
"""
|
|
|
|
Module options (exploit/windows/smb/ms08_067_netapi):
|
|
|
|
|
|
|
|
Name Current Setting Required Description
|
|
|
|
---- --------------- -------- -----------
|
|
|
|
RHOST yes The target address
|
|
|
|
RPORT 445 yes Set the SMB service port
|
|
|
|
SMBPIPE BROWSER yes The pipe name to use (BROWSER, SRVSVC)
|
|
|
|
|
|
|
|
|
|
|
|
Exploit target:
|
|
|
|
|
|
|
|
Id Name
|
|
|
|
-- ----
|
|
|
|
0 Automatic Targeting
|
2014-10-29 18:21:31 +00:00
|
|
|
|
2014-09-11 21:51:49 +00:00
|
|
|
"""
|
2014-08-19 20:06:47 +00:00
|
|
|
|
|
|
|
Scenario: The MS08-067 Module should have the following advanced options
|
|
|
|
When I type "use exploit/windows/smb/ms08_067_netapi"
|
|
|
|
And I type "show advanced"
|
2014-08-13 19:28:28 +00:00
|
|
|
And I type "exit"
|
2014-09-11 21:51:49 +00:00
|
|
|
Then the output should contain:
|
|
|
|
"""
|
|
|
|
Module advanced options:
|
|
|
|
|
|
|
|
Name : CHOST
|
2014-10-29 18:21:31 +00:00
|
|
|
Current Setting:
|
2014-09-11 21:51:49 +00:00
|
|
|
Description : The local client address
|
|
|
|
|
|
|
|
Name : CPORT
|
2014-10-29 18:21:31 +00:00
|
|
|
Current Setting:
|
2014-09-11 21:51:49 +00:00
|
|
|
Description : The local client port
|
|
|
|
|
|
|
|
Name : ConnectTimeout
|
|
|
|
Current Setting: 10
|
|
|
|
Description : Maximum number of seconds to establish a TCP connection
|
|
|
|
|
|
|
|
Name : ContextInformationFile
|
2014-10-29 18:21:31 +00:00
|
|
|
Current Setting:
|
2014-09-11 21:51:49 +00:00
|
|
|
Description : The information file that contains context information
|
|
|
|
|
|
|
|
Name : DCERPC::ReadTimeout
|
|
|
|
Current Setting: 10
|
|
|
|
Description : The number of seconds to wait for DCERPC responses
|
|
|
|
|
|
|
|
Name : DisablePayloadHandler
|
|
|
|
Current Setting: false
|
|
|
|
Description : Disable the handler code for the selected payload
|
|
|
|
|
|
|
|
Name : EnableContextEncoding
|
|
|
|
Current Setting: false
|
|
|
|
Description : Use transient context when encoding payloads
|
|
|
|
|
|
|
|
Name : NTLM::SendLM
|
|
|
|
Current Setting: true
|
2014-10-29 18:21:31 +00:00
|
|
|
Description : Always send the LANMAN response (except when NTLMv2_session is
|
2014-09-11 21:51:49 +00:00
|
|
|
specified)
|
|
|
|
|
|
|
|
Name : NTLM::SendNTLM
|
|
|
|
Current Setting: true
|
2014-10-29 18:21:31 +00:00
|
|
|
Description : Activate the 'Negotiate NTLM key' flag, indicating the use of
|
2014-09-11 21:51:49 +00:00
|
|
|
NTLM responses
|
|
|
|
|
|
|
|
Name : NTLM::SendSPN
|
|
|
|
Current Setting: true
|
2014-10-29 18:21:31 +00:00
|
|
|
Description : Send an avp of type SPN in the ntlmv2 client Blob, this allow
|
2014-09-11 21:51:49 +00:00
|
|
|
authentification on windows Seven/2008r2 when SPN is required
|
|
|
|
|
|
|
|
Name : NTLM::UseLMKey
|
|
|
|
Current Setting: false
|
2014-10-29 18:21:31 +00:00
|
|
|
Description : Activate the 'Negotiate Lan Manager Key' flag, using the LM key
|
2014-09-11 21:51:49 +00:00
|
|
|
when the LM response is sent
|
|
|
|
|
|
|
|
Name : NTLM::UseNTLM2_session
|
|
|
|
Current Setting: true
|
2014-10-29 18:21:31 +00:00
|
|
|
Description : Activate the 'Negotiate NTLM2 key' flag, forcing the use of a
|
2014-09-11 21:51:49 +00:00
|
|
|
NTLMv2_session
|
|
|
|
|
|
|
|
Name : NTLM::UseNTLMv2
|
|
|
|
Current Setting: true
|
2014-10-29 18:21:31 +00:00
|
|
|
Description : Use NTLMv2 instead of NTLM2_session when 'Negotiate NTLM2' key
|
2014-09-11 21:51:49 +00:00
|
|
|
is true
|
|
|
|
|
|
|
|
Name : Proxies
|
2014-10-29 18:21:31 +00:00
|
|
|
Current Setting:
|
2015-01-19 07:38:47 +00:00
|
|
|
Description : A proxy chain of format type:host:port[,type:host:port][...]
|
2014-09-11 21:51:49 +00:00
|
|
|
|
|
|
|
Name : SMB::ChunkSize
|
|
|
|
Current Setting: 500
|
2014-10-29 18:21:31 +00:00
|
|
|
Description : The chunk size for SMB segments, bigger values will increase
|
2014-09-11 21:51:49 +00:00
|
|
|
speed but break NT 4.0 and SMB signing
|
|
|
|
|
|
|
|
Name : SMB::Native_LM
|
|
|
|
Current Setting: Windows 2000 5.0
|
|
|
|
Description : The Native LM to send during authentication
|
|
|
|
|
|
|
|
Name : SMB::Native_OS
|
|
|
|
Current Setting: Windows 2000 2195
|
|
|
|
Description : The Native OS to send during authentication
|
|
|
|
|
|
|
|
Name : SMB::VerifySignature
|
|
|
|
Current Setting: false
|
|
|
|
Description : Enforces client-side verification of server response signatures
|
|
|
|
|
|
|
|
Name : SMBDirect
|
|
|
|
Current Setting: true
|
|
|
|
Description : The target port is a raw SMB service (not NetBIOS)
|
|
|
|
|
|
|
|
Name : SMBDomain
|
|
|
|
Current Setting: .
|
|
|
|
Description : The Windows domain to use for authentication
|
|
|
|
|
|
|
|
Name : SMBName
|
|
|
|
Current Setting: *SMBSERVER
|
|
|
|
Description : The NetBIOS hostname (required for port 139 connections)
|
|
|
|
|
|
|
|
Name : SMBPass
|
2014-10-29 18:21:31 +00:00
|
|
|
Current Setting:
|
2014-09-11 21:51:49 +00:00
|
|
|
Description : The password for the specified username
|
|
|
|
|
|
|
|
Name : SMBUser
|
2014-10-29 18:21:31 +00:00
|
|
|
Current Setting:
|
2014-09-11 21:51:49 +00:00
|
|
|
Description : The username to authenticate as
|
|
|
|
|
|
|
|
Name : SSL
|
|
|
|
Current Setting: false
|
|
|
|
Description : Negotiate SSL for outgoing connections
|
|
|
|
|
|
|
|
Name : SSLCipher
|
2014-10-29 18:21:31 +00:00
|
|
|
Current Setting:
|
2014-09-11 21:51:49 +00:00
|
|
|
Description : String for SSL cipher - "DHE-RSA-AES256-SHA" or "ADH"
|
|
|
|
|
|
|
|
Name : SSLVerifyMode
|
|
|
|
Current Setting: PEER
|
2014-10-29 18:21:31 +00:00
|
|
|
Description : SSL verification method (accepted: CLIENT_ONCE,
|
2014-09-11 21:51:49 +00:00
|
|
|
FAIL_IF_NO_PEER_CERT, NONE, PEER)
|
|
|
|
|
|
|
|
Name : SSLVersion
|
|
|
|
Current Setting: SSL3
|
2014-10-29 18:21:31 +00:00
|
|
|
Description : Specify the version of SSL that should be used (accepted: SSL2,
|
2014-09-11 21:51:49 +00:00
|
|
|
SSL3, TLS1)
|
|
|
|
|
|
|
|
Name : VERBOSE
|
|
|
|
Current Setting: false
|
|
|
|
Description : Enable detailed status messages
|
|
|
|
|
|
|
|
Name : WORKSPACE
|
2014-10-29 18:21:31 +00:00
|
|
|
Current Setting:
|
2014-09-11 21:51:49 +00:00
|
|
|
Description : Specify the workspace for this module
|
|
|
|
|
|
|
|
Name : WfsDelay
|
|
|
|
Current Setting: 0
|
|
|
|
Description : Additional delay when waiting for a session
|
|
|
|
"""
|
2014-08-19 20:06:47 +00:00
|
|
|
|
|
|
|
@targets
|
2014-08-13 22:22:09 +00:00
|
|
|
Scenario: Show RHOST/etc variable expansion from a config file
|
2014-08-19 20:06:47 +00:00
|
|
|
When I type "use exploit/windows/smb/ms08_067_netapi"
|
2014-08-13 22:22:09 +00:00
|
|
|
When RHOST is WINDOWS
|
2014-08-19 20:06:47 +00:00
|
|
|
And I type "set PAYLOAD windows/meterpreter/bind_tcp"
|
2014-08-13 22:22:09 +00:00
|
|
|
And I type "show options"
|
2014-08-19 20:06:47 +00:00
|
|
|
And I type "run"
|
|
|
|
And I type "exit"
|
2014-08-13 22:22:09 +00:00
|
|
|
And I type "exit"
|
|
|
|
Then the output should match /spider-wxp/
|