expose detailed results for each module match
This commit is contained in:
@@ -791,6 +791,12 @@ def rpc_analyze_host(xopts)
|
||||
{
|
||||
mtype: mod.type,
|
||||
mname: mod.fullname,
|
||||
state: result.to_s,
|
||||
options: {
|
||||
required: result.required,
|
||||
invalid: result.invalid,
|
||||
missing: result.missing
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
|
||||
+212
-12
@@ -466,16 +466,117 @@ RSpec.describe "Metasploit's json-rpc" do
|
||||
address: host_ip,
|
||||
modules: [
|
||||
{
|
||||
mtype: 'exploit',
|
||||
mname: 'exploit/windows/smb/ms17_010_eternalblue'
|
||||
mname: "exploit/windows/smb/ms17_010_eternalblue",
|
||||
mtype: "exploit",
|
||||
options: {
|
||||
invalid: [],
|
||||
missing: [],
|
||||
required: [
|
||||
"RPORT",
|
||||
"SSLVersion",
|
||||
"ConnectTimeout",
|
||||
"VERIFY_TARGET",
|
||||
"VERIFY_ARCH",
|
||||
"ProcessName",
|
||||
"GroomAllocations",
|
||||
"MaxExploitAttempts",
|
||||
"GroomDelta"
|
||||
]
|
||||
},
|
||||
state: "ready for testing"
|
||||
},
|
||||
{
|
||||
mtype: 'exploit',
|
||||
mname: 'exploit/windows/smb/ms17_010_psexec',
|
||||
mname: "exploit/windows/smb/ms17_010_psexec",
|
||||
mtype: "exploit",
|
||||
options: {
|
||||
invalid: [],
|
||||
missing: [ "credential" ],
|
||||
required: [
|
||||
"RPORT",
|
||||
"SSLVersion",
|
||||
"ConnectTimeout",
|
||||
"DCERPC::max_frag_size",
|
||||
"DCERPC::ReadTimeout",
|
||||
"NTLM::UseNTLMv2",
|
||||
"NTLM::UseNTLM2_session",
|
||||
"NTLM::SendLM",
|
||||
"NTLM::UseLMKey",
|
||||
"NTLM::SendNTLM",
|
||||
"NTLM::SendSPN",
|
||||
"SMB::pipe_evasion",
|
||||
"SMB::pipe_write_min_size",
|
||||
"SMB::pipe_write_max_size",
|
||||
"SMB::pipe_read_min_size",
|
||||
"SMB::pipe_read_max_size",
|
||||
"SMB::pad_data_level",
|
||||
"SMB::pad_file_level",
|
||||
"SMB::obscure_trans_pipe_level",
|
||||
"SMBName",
|
||||
"SMB::VerifySignature",
|
||||
"SMB::ChunkSize",
|
||||
"SMB::Native_OS",
|
||||
"SMB::Native_LM",
|
||||
"SMB::AlwaysEncrypt",
|
||||
"SERVICE_PERSIST",
|
||||
"NAMED_PIPES",
|
||||
"LEAKATTEMPTS",
|
||||
"DBGTRACE",
|
||||
"Powershell::persist",
|
||||
"Powershell::prepend_protections_bypass",
|
||||
"Powershell::strip_comments",
|
||||
"Powershell::strip_whitespace",
|
||||
"Powershell::sub_vars",
|
||||
"Powershell::sub_funcs",
|
||||
"Powershell::exec_in_place",
|
||||
"Powershell::exec_rc4",
|
||||
"Powershell::remove_comspec",
|
||||
"Powershell::noninteractive",
|
||||
"Powershell::encode_final_payload",
|
||||
"Powershell::encode_inner_payload",
|
||||
"Powershell::wrap_double_quotes",
|
||||
"Powershell::no_equals",
|
||||
"Powershell::method",
|
||||
"SHARE",
|
||||
"ALLOW_GUEST"
|
||||
]
|
||||
},
|
||||
state: "credentials are required"
|
||||
},
|
||||
{
|
||||
mtype: 'exploit',
|
||||
mname: 'exploit/windows/smb/smb_doublepulsar_rce',
|
||||
mname: "exploit/windows/smb/smb_doublepulsar_rce",
|
||||
mtype: "exploit",
|
||||
options: {
|
||||
invalid: [],
|
||||
missing: [],
|
||||
required: [
|
||||
"RPORT",
|
||||
"SSLVersion",
|
||||
"ConnectTimeout",
|
||||
"NTLM::UseNTLMv2",
|
||||
"NTLM::UseNTLM2_session",
|
||||
"NTLM::SendLM",
|
||||
"NTLM::UseLMKey",
|
||||
"NTLM::SendNTLM",
|
||||
"NTLM::SendSPN",
|
||||
"SMB::pipe_evasion",
|
||||
"SMB::pipe_write_min_size",
|
||||
"SMB::pipe_write_max_size",
|
||||
"SMB::pipe_read_min_size",
|
||||
"SMB::pipe_read_max_size",
|
||||
"SMB::pad_data_level",
|
||||
"SMB::pad_file_level",
|
||||
"SMB::obscure_trans_pipe_level",
|
||||
"SMBName",
|
||||
"SMB::VerifySignature",
|
||||
"SMB::ChunkSize",
|
||||
"SMB::Native_OS",
|
||||
"SMB::Native_LM",
|
||||
"SMB::AlwaysEncrypt",
|
||||
"DefangedMode",
|
||||
"ProcessName"
|
||||
]
|
||||
},
|
||||
state: "ready for testing"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -512,16 +613,115 @@ RSpec.describe "Metasploit's json-rpc" do
|
||||
address: host_ip,
|
||||
modules: [
|
||||
{
|
||||
mtype: 'exploit',
|
||||
mname: 'exploit/windows/smb/ms17_010_eternalblue'
|
||||
mname: "exploit/windows/smb/ms17_010_eternalblue",
|
||||
mtype: "exploit",
|
||||
options: {
|
||||
invalid: [],
|
||||
missing: [ "payload_match" ],
|
||||
required: [
|
||||
"RPORT",
|
||||
"SSLVersion",
|
||||
"ConnectTimeout",
|
||||
"VERIFY_TARGET",
|
||||
"VERIFY_ARCH",
|
||||
"ProcessName",
|
||||
"GroomAllocations",
|
||||
"MaxExploitAttempts",
|
||||
"GroomDelta"
|
||||
]
|
||||
},
|
||||
state: "none of the requested payloads match"
|
||||
},
|
||||
{
|
||||
mtype: 'exploit',
|
||||
mname: 'exploit/windows/smb/ms17_010_psexec',
|
||||
mname: "exploit/windows/smb/ms17_010_psexec",
|
||||
mtype: "exploit",
|
||||
options: {
|
||||
invalid: [],
|
||||
missing: [ "credential", "payload_match" ],
|
||||
required: [
|
||||
"RPORT",
|
||||
"SSLVersion",
|
||||
"ConnectTimeout",
|
||||
"DCERPC::max_frag_size",
|
||||
"DCERPC::ReadTimeout",
|
||||
"NTLM::UseNTLMv2",
|
||||
"NTLM::UseNTLM2_session",
|
||||
"NTLM::SendLM",
|
||||
"NTLM::UseLMKey",
|
||||
"NTLM::SendNTLM",
|
||||
"NTLM::SendSPN",
|
||||
"SMB::pipe_evasion",
|
||||
"SMB::pipe_write_min_size",
|
||||
"SMB::pipe_write_max_size",
|
||||
"SMB::pipe_read_min_size",
|
||||
"SMB::pipe_read_max_size",
|
||||
"SMB::pad_data_level",
|
||||
"SMB::pad_file_level",
|
||||
"SMB::obscure_trans_pipe_level",
|
||||
"SMBName", "SMB::VerifySignature",
|
||||
"SMB::ChunkSize", "SMB::Native_OS",
|
||||
"SMB::Native_LM",
|
||||
"SMB::AlwaysEncrypt",
|
||||
"SERVICE_PERSIST",
|
||||
"NAMED_PIPES",
|
||||
"LEAKATTEMPTS",
|
||||
"DBGTRACE",
|
||||
"Powershell::persist",
|
||||
"Powershell::prepend_protections_bypass",
|
||||
"Powershell::strip_comments",
|
||||
"Powershell::strip_whitespace",
|
||||
"Powershell::sub_vars",
|
||||
"Powershell::sub_funcs",
|
||||
"Powershell::exec_in_place",
|
||||
"Powershell::exec_rc4",
|
||||
"Powershell::remove_comspec",
|
||||
"Powershell::noninteractive",
|
||||
"Powershell::encode_final_payload",
|
||||
"Powershell::encode_inner_payload",
|
||||
"Powershell::wrap_double_quotes",
|
||||
"Powershell::no_equals",
|
||||
"Powershell::method",
|
||||
"SHARE",
|
||||
"ALLOW_GUEST"
|
||||
]
|
||||
},
|
||||
state: "credentials are required, none of the requested payloads match"
|
||||
},
|
||||
{
|
||||
mtype: 'exploit',
|
||||
mname: 'exploit/windows/smb/smb_doublepulsar_rce',
|
||||
mname: "exploit/windows/smb/smb_doublepulsar_rce",
|
||||
mtype: "exploit",
|
||||
options: {
|
||||
invalid: [],
|
||||
missing: ["payload_match"],
|
||||
required: [
|
||||
"RPORT",
|
||||
"SSLVersion",
|
||||
"ConnectTimeout",
|
||||
"NTLM::UseNTLMv2",
|
||||
"NTLM::UseNTLM2_session",
|
||||
"NTLM::SendLM",
|
||||
"NTLM::UseLMKey",
|
||||
"NTLM::SendNTLM",
|
||||
"NTLM::SendSPN",
|
||||
"SMB::pipe_evasion",
|
||||
"SMB::pipe_write_min_size",
|
||||
"SMB::pipe_write_max_size",
|
||||
"SMB::pipe_read_min_size",
|
||||
"SMB::pipe_read_max_size",
|
||||
"SMB::pad_data_level",
|
||||
"SMB::pad_file_level",
|
||||
"SMB::obscure_trans_pipe_level",
|
||||
"SMBName",
|
||||
"SMB::VerifySignature",
|
||||
"SMB::ChunkSize",
|
||||
"SMB::Native_OS",
|
||||
"SMB::Native_LM",
|
||||
"SMB::AlwaysEncrypt",
|
||||
"DefangedMode",
|
||||
"ProcessName"
|
||||
]
|
||||
},
|
||||
state: "none of the requested payloads match"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user