Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/msf/core/constants.rb
19591 views
1
# -*- coding: binary -*-
2
###
3
#
4
# This file contains constants that are referenced by the core
5
# framework and by framework modules.
6
#
7
###
8
9
module Msf
10
11
#
12
# Module types
13
#
14
MODULE_ANY = '_any_'
15
MODULE_ENCODER = 'encoder'
16
MODULE_EXPLOIT = 'exploit'
17
MODULE_NOP = 'nop'
18
MODULE_AUX = 'auxiliary'
19
MODULE_PAYLOAD = 'payload'
20
MODULE_POST = 'post'
21
MODULE_EVASION = 'evasion'
22
MODULE_TYPES =
23
[
24
MODULE_ENCODER,
25
MODULE_PAYLOAD,
26
MODULE_EXPLOIT,
27
MODULE_NOP,
28
MODULE_POST,
29
MODULE_AUX,
30
MODULE_EVASION
31
]
32
33
#
34
# Module rankings
35
#
36
ManualRanking = 0
37
LowRanking = 100
38
AverageRanking = 200
39
NormalRanking = 300
40
GoodRanking = 400
41
GreatRanking = 500
42
ExcellentRanking = 600
43
RankingName =
44
{
45
ManualRanking => "manual",
46
LowRanking => "low",
47
AverageRanking => "average",
48
NormalRanking => "normal",
49
GoodRanking => "good",
50
GreatRanking => "great",
51
ExcellentRanking => "excellent"
52
}
53
54
#
55
# Stability traits
56
#
57
58
# Module stability is unknown - this is a sentinel value, and is not a valid stability enum value
59
UNKNOWN_STABILITY = ['unknown-stability']
60
# Module should not crash the service.
61
CRASH_SAFE = 'crash-safe'
62
# Module may crash the service, but the service restarts.
63
CRASH_SERVICE_RESTARTS = 'crash-service-restarts'
64
# Module may crash the service, and the service remains down.
65
CRASH_SERVICE_DOWN = 'crash-service-down'
66
# Module may crash the OS, but the OS restarts.
67
CRASH_OS_RESTARTS = 'crash-os-restarts'
68
# Module may crash the OS, and the OS remains down.
69
CRASH_OS_DOWN = 'crash-os-down'
70
# Module may cause a resource (such as a file or data in a database) to be unavailable for the service.
71
SERVICE_RESOURCE_LOSS = 'service-resource-loss'
72
# Modules may cause a resource (such as a file) to be unavailable for the OS.
73
OS_RESOURCE_LOSS = 'os-resource-loss'
74
75
#
76
# Side-effect traits
77
#
78
79
# Module side effects is unknown - this is a sentinel value, and is not a valid side effect enum value
80
UNKNOWN_SIDE_EFFECTS = ['unknown-side-effects']
81
# Modules leaves a payload or a dropper on the target machine.
82
ARTIFACTS_ON_DISK = 'artifacts-on-disk'
83
# Module modifies some configuration setting on the target machine.
84
CONFIG_CHANGES = 'config-changes'
85
# Module leaves signs of a compromise in a log file (Example: SQL injection data found in HTTP log).
86
IOC_IN_LOGS = 'ioc-in-logs'
87
# Module may cause account lockouts (likely due to brute-forcing).
88
ACCOUNT_LOCKOUTS = 'account-lockouts'
89
# Module may cause an existing valid session to be forced to log out (likely due to restrictions on concurrent sessions).
90
ACCOUNT_LOGOUT = 'account-logout'
91
# Module may show something on the screen (Example: a window pops up).
92
SCREEN_EFFECTS = 'screen-effects'
93
# Module may cause a noise (Examples: audio output from the speakers or hardware beeps).
94
AUDIO_EFFECTS = 'audio-effects'
95
# Module may produce physical effects (Examples: the device makes movement or flashes LEDs).
96
PHYSICAL_EFFECTS = 'physical-effects'
97
98
#
99
# Reliability
100
#
101
102
# Module reliability is unknown - this is a sentinel value, and is not a valid reliability enum value
103
UNKNOWN_RELIABILITY = ['unknown-reliability']
104
# The module tends to fail to get a session on the first attempt.
105
FIRST_ATTEMPT_FAIL = 'first-attempt-fail'
106
# The module is expected to get a shell every time it runs.
107
REPEATABLE_SESSION = 'repeatable-session'
108
# The module isn't expected to get a shell reliably (such as only once).
109
UNRELIABLE_SESSION = 'unreliable-session'
110
# The module may not execute the payload until an external event occurs. For instance, a cron job, machine restart, user interaction within a GUI element, etc.
111
EVENT_DEPENDENT = 'event-dependent'
112
113
module HttpClients
114
IE = "MSIE"
115
FF = "Firefox"
116
SAFARI = "Safari"
117
OPERA = "Opera"
118
CHROME = "Chrome"
119
EDGE = "Edge"
120
GIT = "Git"
121
GIT_LFS = "Git LFS"
122
123
UNKNOWN = "Unknown"
124
end
125
126
module OperatingSystems
127
LINUX = "Linux"
128
MAC_OSX = "Mac OS X"
129
WINDOWS = "Windows"
130
FREEBSD = "FreeBSD"
131
NETBSD = "NetBSD"
132
OPENBSD = "OpenBSD"
133
VMWARE = "VMware"
134
ANDROID = "Android"
135
APPLE_IOS = "iOS"
136
137
module VmwareVersions
138
ESX = "ESX"
139
ESXI = "ESXi"
140
end
141
142
module WindowsVersions
143
NINE5 = "95"
144
NINE8 = "98"
145
NT = "NT"
146
XP = "XP"
147
TWOK = "2000"
148
TWOK3 = "2003"
149
VISTA = "Vista"
150
TWOK8 = "2008"
151
TWOK12 = "2012"
152
SEVEN = "7"
153
EIGHT = "8"
154
EIGHTONE = "8.1"
155
TEN = "10.0"
156
end
157
158
UNKNOWN = "Unknown"
159
160
module Match
161
WINDOWS = /^(?:Microsoft )?Windows/
162
WINDOWS_95 = /^(?:Microsoft )?Windows 95/
163
WINDOWS_98 = /^(?:Microsoft )?Windows 98/
164
WINDOWS_ME = /^(?:Microsoft )?Windows ME/
165
WINDOWS_NT3 = /^(?:Microsoft )?Windows NT 3/
166
WINDOWS_NT4 = /^(?:Microsoft )?Windows NT 4/
167
WINDOWS_2000 = /^(?:Microsoft )?Windows 2000/
168
WINDOWS_XP = /^(?:Microsoft )?Windows XP/
169
WINDOWS_2003 = /^(?:Microsoft )?Windows 2003/
170
WINDOWS_VISTA = /^(?:Microsoft )?Windows Vista/
171
WINDOWS_2008 = /^(?:Microsoft )?Windows 2008/
172
WINDOWS_7 = /^(?:Microsoft )?Windows 7/
173
WINDOWS_2012 = /^(?:Microsoft )?Windows 2012/
174
WINDOWS_8 = /^(?:Microsoft )?Windows 8/
175
WINDOWS_81 = /^(?:Microsoft )?Windows 8\.1/
176
WINDOWS_10 = /^(?:Microsoft )?Windows 10/
177
178
LINUX = /^Linux/i
179
MAC_OSX = /^(?:Apple )?Mac OS X/
180
FREEBSD = /^FreeBSD/
181
NETBSD = /^NetBSD/
182
OPENBSD = /^OpenBSD/
183
VMWARE = /^VMware/
184
ANDROID = /^(?:Google )?Android/
185
APPLE_IOS = /^(?:Apple )?iOS/
186
end
187
end
188
end
189
190
#
191
# Global constants
192
#
193
194
# Licenses
195
MSF_LICENSE = "Metasploit Framework License (BSD)"
196
GPL_LICENSE = "GNU Public License v2.0"
197
BSD_LICENSE = "BSD License"
198
# Location: https://github.com/CoreSecurity/impacket/blob/1dba4c20e0d47ec614521e251d072116f75f3ef8/LICENSE
199
CORE_LICENSE = "CORE Security License (Apache 1.1)"
200
ARTISTIC_LICENSE = "Perl Artistic License"
201
UNKNOWN_LICENSE = "Unknown License"
202
LICENSES =
203
[
204
MSF_LICENSE,
205
GPL_LICENSE,
206
BSD_LICENSE,
207
CORE_LICENSE,
208
ARTISTIC_LICENSE,
209
UNKNOWN_LICENSE
210
]
211
212