Files
metasploit-gs/lib/msf/core/constants.rb
T

199 lines
5.2 KiB
Ruby
Raw Normal View History

# -*- coding: binary -*-
2005-05-21 17:57:00 +00:00
###
#
# This file contains constants that are referenced by the core
2005-05-21 17:57:00 +00:00
# framework and by framework modules.
#
###
module Msf
#
# Module types
#
MODULE_ANY = '_any_'
2005-05-21 17:57:00 +00:00
MODULE_ENCODER = 'encoder'
MODULE_EXPLOIT = 'exploit'
MODULE_NOP = 'nop'
2006-04-27 05:16:03 +00:00
MODULE_AUX = 'auxiliary'
2005-05-22 07:23:25 +00:00
MODULE_PAYLOAD = 'payload'
MODULE_POST = 'post'
MODULE_EVASION = 'evasion'
MODULE_TYPES =
2013-08-30 16:28:33 -05:00
[
MODULE_ENCODER,
MODULE_PAYLOAD,
MODULE_EXPLOIT,
MODULE_NOP,
MODULE_POST,
MODULE_AUX,
MODULE_EVASION
2013-08-30 16:28:33 -05:00
]
2005-05-21 17:57:00 +00:00
#
# Module rankings
#
2006-09-12 05:34:58 +00:00
ManualRanking = 0
LowRanking = 100
AverageRanking = 200
NormalRanking = 300
GoodRanking = 400
GreatRanking = 500
ExcellentRanking = 600
RankingName =
2013-08-30 16:28:33 -05:00
{
ManualRanking => "manual",
LowRanking => "low",
AverageRanking => "average",
NormalRanking => "normal",
GoodRanking => "good",
GreatRanking => "great",
ExcellentRanking => "excellent"
}
#
# Stability traits
#
2018-09-27 12:31:04 -05:00
# Module should not crash the service
CRASH_SAFE = 'crash-safe'
2018-09-27 12:31:04 -05:00
# Module may crash the service, but the service restarts.
CRASH_SERVICE_RESTARTS = 'crash-service-restarts'
2018-09-27 12:31:04 -05:00
# Module may crash the service, and the service remains down.
2018-09-26 21:13:37 -05:00
CRASH_SERVICE_DOWN = 'crash-service-down'
2018-09-27 12:31:04 -05:00
# Module may crash the OS, but the OS restarts.
CRASH_OS_RESTARTS = 'crash-os-restarts'
2018-09-27 12:31:04 -05:00
# Module may crash the OS, and the OS remains down.
2018-09-26 21:13:37 -05:00
CRASH_OS_DOWN = 'crash-os-down'
2018-09-27 12:31:04 -05:00
# Module may cause a resource (such as a file or data in database) to be unavailable for the service.
SERVICE_RESOURCE_LOSS = 'service-resource-loss'
2018-09-27 12:31:04 -05:00
# Modules may cause a resource (such as a file) to be unavailable for the OS.
OS_RESOURCE_LOSS = 'os-resource-loss'
#
# Side-effect traits
#
# Modules leaves payload or a dropper on the target machine
2019-03-05 12:58:17 -06:00
ARTIFACTS_ON_DISK = 'artifacts-on-disk'
# Module modifies some config file on the target machine
2019-03-05 12:58:17 -06:00
CONFIG_CHANGES = 'config-changes'
2018-09-27 12:32:43 -05:00
# Module leaves signs of a compromise in a log file (Example: SQL injection data found in HTTP log)
2019-03-05 12:58:17 -06:00
IOC_IN_LOGS = 'ioc-in-logs'
# Module may cause account lockouts (likely due to brute-forcing)
2019-03-05 12:58:17 -06:00
ACCOUNT_LOCKOUTS = 'account-lockouts'
2018-10-04 14:20:26 -05:00
# Module may show something on the screen (Example: a window pops up)
2019-03-05 12:58:17 -06:00
SCREEN_EFFECTS = 'screen-effects'
2018-10-05 16:03:09 -05:00
# Module may cause a noise (Examples: audio output from the speakers or hardware beeps)
2019-03-05 12:58:17 -06:00
AUDIO_EFFECTS = 'audio-effects'
2018-10-05 16:03:09 -05:00
# Module may produce physical effects (Examples: the device makes movement or flashes LEDs)
2019-03-05 12:58:17 -06:00
PHYSICAL_EFFECTS = 'physical-effects'
#
# Reliability
#
2018-09-26 21:13:37 -05:00
# The module tends to fail to get a session at first attempt
FIRST_ATTEMPT_FAIL = 'first-attempt-fail'
# The module is expected to get a shell every time it fires
REPEATABLE_SESSION = 'repeatable-session'
2019-03-05 12:58:17 -06:00
# The module isn't expected to get a shell reliably (such as only once)
UNRELIABLE_SESSION = 'unreliable-session'
module HttpClients
2013-08-30 16:28:33 -05:00
IE = "MSIE"
FF = "Firefox"
SAFARI = "Safari"
OPERA = "Opera"
CHROME = "Chrome"
2017-01-04 22:20:42 -05:00
EDGE = "Edge"
2013-08-30 16:28:33 -05:00
UNKNOWN = "Unknown"
end
module OperatingSystems
2013-08-30 16:28:33 -05:00
LINUX = "Linux"
MAC_OSX = "Mac OS X"
WINDOWS = "Windows"
2013-08-30 16:28:33 -05:00
FREEBSD = "FreeBSD"
NETBSD = "NetBSD"
OPENBSD = "OpenBSD"
VMWARE = "VMware"
ANDROID = "Android"
APPLE_IOS = "iOS"
2012-02-15 21:25:56 -06:00
2013-08-30 16:28:33 -05:00
module VmwareVersions
ESX = "ESX"
ESXI = "ESXi"
end
2013-08-30 16:28:33 -05:00
module WindowsVersions
2014-05-28 14:35:22 -05:00
NINE5 = "95"
NINE8 = "98"
2013-08-30 16:28:33 -05:00
NT = "NT"
XP = "XP"
TWOK = "2000"
TWOK3 = "2003"
VISTA = "Vista"
TWOK8 = "2008"
TWOK12 = "2012"
2013-08-30 16:28:33 -05:00
SEVEN = "7"
2013-11-13 11:38:27 -06:00
EIGHT = "8"
EIGHTONE = "8.1"
TEN = "10.0"
2013-08-30 16:28:33 -05:00
end
2013-08-30 16:28:33 -05:00
UNKNOWN = "Unknown"
2014-05-28 14:35:22 -05:00
module Match
WINDOWS = /^(?:Microsoft )?Windows/
WINDOWS_95 = /^(?:Microsoft )?Windows 95/
WINDOWS_98 = /^(?:Microsoft )?Windows 98/
WINDOWS_ME = /^(?:Microsoft )?Windows ME/
WINDOWS_NT3 = /^(?:Microsoft )?Windows NT 3/
WINDOWS_NT4 = /^(?:Microsoft )?Windows NT 4/
WINDOWS_2000 = /^(?:Microsoft )?Windows 2000/
WINDOWS_XP = /^(?:Microsoft )?Windows XP/
WINDOWS_2003 = /^(?:Microsoft )?Windows 2003/
WINDOWS_VISTA = /^(?:Microsoft )?Windows Vista/
WINDOWS_2008 = /^(?:Microsoft )?Windows 2008/
WINDOWS_7 = /^(?:Microsoft )?Windows 7/
WINDOWS_2012 = /^(?:Microsoft )?Windows 2012/
WINDOWS_8 = /^(?:Microsoft )?Windows 8/
WINDOWS_81 = /^(?:Microsoft )?Windows 8\.1/
WINDOWS_10 = /^(?:Microsoft )?Windows 10/
2014-05-28 14:35:22 -05:00
LINUX = /^Linux/i
2014-05-28 14:40:09 -05:00
MAC_OSX = /^(?:Apple )?Mac OS X/
2014-05-28 14:35:22 -05:00
FREEBSD = /^FreeBSD/
NETBSD = /^NetBSD/
OPENBSD = /^OpenBSD/
VMWARE = /^VMware/
2014-05-28 14:40:09 -05:00
ANDROID = /^(?:Google )?Android/
2014-05-28 14:35:22 -05:00
APPLE_IOS = /^(?:Apple )?iOS/
end
end
2005-05-21 17:57:00 +00:00
end
2006-01-16 02:59:47 +00:00
#
# Global constants
#
# Licenses
2008-09-26 04:25:44 +00:00
MSF_LICENSE = "Metasploit Framework License (BSD)"
2006-01-21 22:10:20 +00:00
GPL_LICENSE = "GNU Public License v2.0"
2006-05-06 17:13:22 +00:00
BSD_LICENSE = "BSD License"
2018-03-16 11:03:08 -05:00
# Location: https://github.com/CoreSecurity/impacket/blob/1dba4c20e0d47ec614521e251d072116f75f3ef8/LICENSE
CORE_LICENSE = "CORE Security License (Apache 1.1)"
2006-01-21 22:10:20 +00:00
ARTISTIC_LICENSE = "Perl Artistic License"
UNKNOWN_LICENSE = "Unknown License"
2006-10-20 14:24:02 +00:00
LICENSES =
2013-08-30 16:28:33 -05:00
[
MSF_LICENSE,
GPL_LICENSE,
BSD_LICENSE,
2018-03-16 11:03:08 -05:00
CORE_LICENSE,
2013-08-30 16:28:33 -05:00
ARTISTIC_LICENSE,
UNKNOWN_LICENSE
]