CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/msf/core/constants.rb
Views: 1904
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 should not crash the service.
59
CRASH_SAFE = 'crash-safe'
60
# Module may crash the service, but the service restarts.
61
CRASH_SERVICE_RESTARTS = 'crash-service-restarts'
62
# Module may crash the service, and the service remains down.
63
CRASH_SERVICE_DOWN = 'crash-service-down'
64
# Module may crash the OS, but the OS restarts.
65
CRASH_OS_RESTARTS = 'crash-os-restarts'
66
# Module may crash the OS, and the OS remains down.
67
CRASH_OS_DOWN = 'crash-os-down'
68
# Module may cause a resource (such as a file or data in a database) to be unavailable for the service.
69
SERVICE_RESOURCE_LOSS = 'service-resource-loss'
70
# Modules may cause a resource (such as a file) to be unavailable for the OS.
71
OS_RESOURCE_LOSS = 'os-resource-loss'
72
73
#
74
# Side-effect traits
75
#
76
77
# Modules leaves a payload or a dropper on the target machine.
78
ARTIFACTS_ON_DISK = 'artifacts-on-disk'
79
# Module modifies some configuration setting on the target machine.
80
CONFIG_CHANGES = 'config-changes'
81
# Module leaves signs of a compromise in a log file (Example: SQL injection data found in HTTP log).
82
IOC_IN_LOGS = 'ioc-in-logs'
83
# Module may cause account lockouts (likely due to brute-forcing).
84
ACCOUNT_LOCKOUTS = 'account-lockouts'
85
# Module may show something on the screen (Example: a window pops up).
86
SCREEN_EFFECTS = 'screen-effects'
87
# Module may cause a noise (Examples: audio output from the speakers or hardware beeps).
88
AUDIO_EFFECTS = 'audio-effects'
89
# Module may produce physical effects (Examples: the device makes movement or flashes LEDs).
90
PHYSICAL_EFFECTS = 'physical-effects'
91
92
#
93
# Reliability
94
#
95
96
# The module tends to fail to get a session on the first attempt.
97
FIRST_ATTEMPT_FAIL = 'first-attempt-fail'
98
# The module is expected to get a shell every time it runs.
99
REPEATABLE_SESSION = 'repeatable-session'
100
# The module isn't expected to get a shell reliably (such as only once).
101
UNRELIABLE_SESSION = 'unreliable-session'
102
# 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.
103
EVENT_DEPENDENT = 'event-dependent'
104
105
module HttpClients
106
IE = "MSIE"
107
FF = "Firefox"
108
SAFARI = "Safari"
109
OPERA = "Opera"
110
CHROME = "Chrome"
111
EDGE = "Edge"
112
GIT = "Git"
113
GIT_LFS = "Git LFS"
114
115
UNKNOWN = "Unknown"
116
end
117
118
module OperatingSystems
119
LINUX = "Linux"
120
MAC_OSX = "Mac OS X"
121
WINDOWS = "Windows"
122
FREEBSD = "FreeBSD"
123
NETBSD = "NetBSD"
124
OPENBSD = "OpenBSD"
125
VMWARE = "VMware"
126
ANDROID = "Android"
127
APPLE_IOS = "iOS"
128
129
module VmwareVersions
130
ESX = "ESX"
131
ESXI = "ESXi"
132
end
133
134
module WindowsVersions
135
NINE5 = "95"
136
NINE8 = "98"
137
NT = "NT"
138
XP = "XP"
139
TWOK = "2000"
140
TWOK3 = "2003"
141
VISTA = "Vista"
142
TWOK8 = "2008"
143
TWOK12 = "2012"
144
SEVEN = "7"
145
EIGHT = "8"
146
EIGHTONE = "8.1"
147
TEN = "10.0"
148
end
149
150
UNKNOWN = "Unknown"
151
152
module Match
153
WINDOWS = /^(?:Microsoft )?Windows/
154
WINDOWS_95 = /^(?:Microsoft )?Windows 95/
155
WINDOWS_98 = /^(?:Microsoft )?Windows 98/
156
WINDOWS_ME = /^(?:Microsoft )?Windows ME/
157
WINDOWS_NT3 = /^(?:Microsoft )?Windows NT 3/
158
WINDOWS_NT4 = /^(?:Microsoft )?Windows NT 4/
159
WINDOWS_2000 = /^(?:Microsoft )?Windows 2000/
160
WINDOWS_XP = /^(?:Microsoft )?Windows XP/
161
WINDOWS_2003 = /^(?:Microsoft )?Windows 2003/
162
WINDOWS_VISTA = /^(?:Microsoft )?Windows Vista/
163
WINDOWS_2008 = /^(?:Microsoft )?Windows 2008/
164
WINDOWS_7 = /^(?:Microsoft )?Windows 7/
165
WINDOWS_2012 = /^(?:Microsoft )?Windows 2012/
166
WINDOWS_8 = /^(?:Microsoft )?Windows 8/
167
WINDOWS_81 = /^(?:Microsoft )?Windows 8\.1/
168
WINDOWS_10 = /^(?:Microsoft )?Windows 10/
169
170
LINUX = /^Linux/i
171
MAC_OSX = /^(?:Apple )?Mac OS X/
172
FREEBSD = /^FreeBSD/
173
NETBSD = /^NetBSD/
174
OPENBSD = /^OpenBSD/
175
VMWARE = /^VMware/
176
ANDROID = /^(?:Google )?Android/
177
APPLE_IOS = /^(?:Apple )?iOS/
178
end
179
end
180
end
181
182
#
183
# Global constants
184
#
185
186
# Licenses
187
MSF_LICENSE = "Metasploit Framework License (BSD)"
188
GPL_LICENSE = "GNU Public License v2.0"
189
BSD_LICENSE = "BSD License"
190
# Location: https://github.com/CoreSecurity/impacket/blob/1dba4c20e0d47ec614521e251d072116f75f3ef8/LICENSE
191
CORE_LICENSE = "CORE Security License (Apache 1.1)"
192
ARTISTIC_LICENSE = "Perl Artistic License"
193
UNKNOWN_LICENSE = "Unknown License"
194
LICENSES =
195
[
196
MSF_LICENSE,
197
GPL_LICENSE,
198
BSD_LICENSE,
199
CORE_LICENSE,
200
ARTISTIC_LICENSE,
201
UNKNOWN_LICENSE
202
]
203
204