Browse Source

add initial module automation tests

Jeffrey Martin 1 year ago
parent
commit
cf4d9130a9
No account linked to committer's email address

+ 68
- 0
test/modules/auxiliary/scanner/smb/smb_login.json View File

@@ -0,0 +1,68 @@
1
+{
2
+	"TEST_NAME": 			"smb_login test",
3
+	"REPORT_PREFIX":		"SmbLoginTest",
4
+	"FRAMEWORK_BRANCH": 		"upstream/master",
5
+	"HTTP_PORT":			5309,
6
+	"STARTING_LISTENER":		30000,
7
+	"CREDS_FILE":			"../JSON/creds.json",
8
+	"MSF_HOSTS":
9
+	[
10
+		{
11
+			"TYPE":			"VIRTUAL",
12
+			"METHOD":		"VM_TOOLS_UPLOAD",
13
+			"HYPERVISOR_CONFIG":    "../JSON/esxi_config.json",
14
+			"NAME": 		"APT_MSF_HOST",
15
+			"MSF_ARTIFACT_PATH":	"/home/msfuser/rapid7/test_artifacts",
16
+			"MSF_PATH":		"/home/msfuser/rapid7/metasploit-framework"
17
+		}
18
+	],
19
+
20
+	"TARGETS":
21
+	[
22
+		{
23
+			"TYPE":			"VIRTUAL",
24
+			"METHOD":		"EXPLOIT",
25
+			"NAME": 		"Win2008r2x64sp1",
26
+			"MODULES":	
27
+			[
28
+				{
29
+					"NAME":		"auxiliary/scanner/smb/smb_login",
30
+					"SETTINGS":	[
31
+								"smbuser=vagrant",
32
+								"smbpass=vagrant"
33
+							]
34
+				}
35
+			]
36
+		},
37
+		{
38
+			"TYPE":			"VIRTUAL",
39
+			"METHOD":		"EXPLOIT",
40
+			"NAME": 		"Win2012x64",
41
+			"MODULES":	
42
+			[
43
+				{
44
+					"NAME":		"auxiliary/scanner/smb/smb_login",
45
+					"SETTINGS":	[
46
+								"smbuser=vagrant",
47
+								"smbpass=vagrant"
48
+							]
49
+				}
50
+			]
51
+		}
52
+	],
53
+	"TARGET_GLOBALS":
54
+	{
55
+			"TYPE":			"VIRTUAL",
56
+			"HYPERVISOR_CONFIG":	"../JSON/esxi_config.json",
57
+			"METHOD":		"VM_TOOLS_UPLOAD",
58
+			"PAYLOAD_DIRECTORY":	"C:\\payload_test",
59
+			"TESTING_SNAPSHOT":	"TESTING_BASE",
60
+			"PYTHON":		"C:\\software\\x86\\python27\\python.exe",
61
+			"METERPRETER_PYTHON":	"C:\\software\\x86\\python27\\python.exe",
62
+			"METERPRETER_JAVA":	"C:\\software\\x86\\java\\bin\\java.exe"
63
+	},
64
+	"COMMAND_LIST": [],
65
+	"SUCCESS_LIST": [
66
+		"- Success:"
67
+	]
68
+}

+ 99
- 0
test/modules/exploits/windows/smb/ms17_010_eternalblue.json View File

@@ -0,0 +1,99 @@
1
+{
2
+	"FRAMEWORK_BRANCH": 		"upstream/master",
3
+	"HTTP_PORT":			5309,
4
+	"STARTING_LISTENER":		30000,
5
+	"CREDS_FILE":                   "../JSON/creds.json",
6
+	"MSF_HOSTS":
7
+	[
8
+		{
9
+			"TYPE":			"VIRTUAL",
10
+			"METHOD":		"VM_TOOLS_UPLOAD",
11
+			"HYPERVISOR_CONFIG":	"../JSON/esxi_config.json",
12
+			"NAME": 		"APT_MSF_HOST",
13
+			"MSF_PATH":		"/home/msfuser/rapid7/metasploit-framework",
14
+			"MSF_ARTIFACT_PATH":	"/home/msfuser/rapid7/test_artifacts"
15
+		}
16
+	],
17
+        "TARGET_GLOBALS":
18
+        {
19
+                        "TYPE":                 "VIRTUAL",
20
+                        "HYPERVISOR_CONFIG":    "../JSON/esxi_config.json",
21
+                        "METHOD":               "VM_TOOLS_UPLOAD",
22
+                        "PAYLOAD_DIRECTORY":    "C:\\payload_test",
23
+                        "TESTING_SNAPSHOT":     "TESTING_BASE",
24
+                        "PYTHON":               "C:\\software\\x86\\python27\\python.exe",
25
+                        "METERPRETER_PYTHON":   "C:\\software\\x86\\python27\\python.exe",
26
+                        "METERPRETER_JAVA":     "C:\\software\\x86\\java\\bin\\java.exe"
27
+        },
28
+	"TARGETS":
29
+	[
30
+		{
31
+			"TYPE":                 "VIRTUAL",
32
+			"METHOD":		"EXPLOIT",
33
+			"NAME": 		"Win7x64"
34
+		}
35
+	],
36
+        "MODULES":
37
+        [
38
+                {
39
+                        "NAME":         "exploit/windows/smb/ms17_010_eternalblue",
40
+                        "SETTINGS":
41
+                        [
42
+                                "SMBUser=vagrant",
43
+                                "SMBPass=vagrant"
44
+                        ]
45
+                }
46
+        ],
47
+	"PAYLOADS": 
48
+	[
49
+		{	
50
+			"NAME":		"windows/x64/meterpreter/reverse_tcp",
51
+			"SETTINGS":	[]
52
+		}
53
+	],
54
+	"COMMAND_LIST": [
55
+		"<ruby>",
56
+		"sleep(60)",
57
+		"</ruby>",
58
+		"sessions -C sessions -l",
59
+		"<ruby>",
60
+		"sleep(60)",
61
+		"</ruby>",
62
+		"sessions -C sysinfo",
63
+		"<ruby>",
64
+		"sleep(10)",
65
+		"</ruby>",
66
+		"sessions -C sysinfo",
67
+		"<ruby>",
68
+		"sleep(10)",
69
+		"</ruby>",
70
+		"sessions -C sysinfo",
71
+		"<ruby>",
72
+		"sleep(10)",
73
+		"</ruby>",
74
+		"sessions -C sysinfo",
75
+		"<ruby>",
76
+		"sleep(10)",
77
+		"</ruby>",
78
+		"sessions -C sysinfo",
79
+		"<ruby>",
80
+		"sleep(10)",
81
+		"</ruby>",
82
+		"sessions -C sysinfo",
83
+		"<ruby>",
84
+		"sleep(10)",
85
+		"</ruby>",
86
+		"sessions -C sysinfo",
87
+		"<ruby>",
88
+		"sleep(10)",
89
+		"</ruby>",
90
+		"sessions -C sysinfo",
91
+		"sessions -C ifconfig",
92
+		"sessions -C sessions -l",
93
+		"sessions -C getuid",
94
+		"sessions -C exit"
95
+	],
96
+	"SUCCESS_LIST": [
97
+		"Session 1 created in the background"
98
+	]
99
+}

Loading…
Cancel
Save