Path: blob/master/lib/msf/core/constants.rb
19591 views
# -*- coding: binary -*-1###2#3# This file contains constants that are referenced by the core4# framework and by framework modules.5#6###78module Msf910#11# Module types12#13MODULE_ANY = '_any_'14MODULE_ENCODER = 'encoder'15MODULE_EXPLOIT = 'exploit'16MODULE_NOP = 'nop'17MODULE_AUX = 'auxiliary'18MODULE_PAYLOAD = 'payload'19MODULE_POST = 'post'20MODULE_EVASION = 'evasion'21MODULE_TYPES =22[23MODULE_ENCODER,24MODULE_PAYLOAD,25MODULE_EXPLOIT,26MODULE_NOP,27MODULE_POST,28MODULE_AUX,29MODULE_EVASION30]3132#33# Module rankings34#35ManualRanking = 036LowRanking = 10037AverageRanking = 20038NormalRanking = 30039GoodRanking = 40040GreatRanking = 50041ExcellentRanking = 60042RankingName =43{44ManualRanking => "manual",45LowRanking => "low",46AverageRanking => "average",47NormalRanking => "normal",48GoodRanking => "good",49GreatRanking => "great",50ExcellentRanking => "excellent"51}5253#54# Stability traits55#5657# Module stability is unknown - this is a sentinel value, and is not a valid stability enum value58UNKNOWN_STABILITY = ['unknown-stability']59# Module should not crash the service.60CRASH_SAFE = 'crash-safe'61# Module may crash the service, but the service restarts.62CRASH_SERVICE_RESTARTS = 'crash-service-restarts'63# Module may crash the service, and the service remains down.64CRASH_SERVICE_DOWN = 'crash-service-down'65# Module may crash the OS, but the OS restarts.66CRASH_OS_RESTARTS = 'crash-os-restarts'67# Module may crash the OS, and the OS remains down.68CRASH_OS_DOWN = 'crash-os-down'69# Module may cause a resource (such as a file or data in a database) to be unavailable for the service.70SERVICE_RESOURCE_LOSS = 'service-resource-loss'71# Modules may cause a resource (such as a file) to be unavailable for the OS.72OS_RESOURCE_LOSS = 'os-resource-loss'7374#75# Side-effect traits76#7778# Module side effects is unknown - this is a sentinel value, and is not a valid side effect enum value79UNKNOWN_SIDE_EFFECTS = ['unknown-side-effects']80# Modules leaves a payload or a dropper on the target machine.81ARTIFACTS_ON_DISK = 'artifacts-on-disk'82# Module modifies some configuration setting on the target machine.83CONFIG_CHANGES = 'config-changes'84# Module leaves signs of a compromise in a log file (Example: SQL injection data found in HTTP log).85IOC_IN_LOGS = 'ioc-in-logs'86# Module may cause account lockouts (likely due to brute-forcing).87ACCOUNT_LOCKOUTS = 'account-lockouts'88# Module may cause an existing valid session to be forced to log out (likely due to restrictions on concurrent sessions).89ACCOUNT_LOGOUT = 'account-logout'90# Module may show something on the screen (Example: a window pops up).91SCREEN_EFFECTS = 'screen-effects'92# Module may cause a noise (Examples: audio output from the speakers or hardware beeps).93AUDIO_EFFECTS = 'audio-effects'94# Module may produce physical effects (Examples: the device makes movement or flashes LEDs).95PHYSICAL_EFFECTS = 'physical-effects'9697#98# Reliability99#100101# Module reliability is unknown - this is a sentinel value, and is not a valid reliability enum value102UNKNOWN_RELIABILITY = ['unknown-reliability']103# The module tends to fail to get a session on the first attempt.104FIRST_ATTEMPT_FAIL = 'first-attempt-fail'105# The module is expected to get a shell every time it runs.106REPEATABLE_SESSION = 'repeatable-session'107# The module isn't expected to get a shell reliably (such as only once).108UNRELIABLE_SESSION = 'unreliable-session'109# 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.110EVENT_DEPENDENT = 'event-dependent'111112module HttpClients113IE = "MSIE"114FF = "Firefox"115SAFARI = "Safari"116OPERA = "Opera"117CHROME = "Chrome"118EDGE = "Edge"119GIT = "Git"120GIT_LFS = "Git LFS"121122UNKNOWN = "Unknown"123end124125module OperatingSystems126LINUX = "Linux"127MAC_OSX = "Mac OS X"128WINDOWS = "Windows"129FREEBSD = "FreeBSD"130NETBSD = "NetBSD"131OPENBSD = "OpenBSD"132VMWARE = "VMware"133ANDROID = "Android"134APPLE_IOS = "iOS"135136module VmwareVersions137ESX = "ESX"138ESXI = "ESXi"139end140141module WindowsVersions142NINE5 = "95"143NINE8 = "98"144NT = "NT"145XP = "XP"146TWOK = "2000"147TWOK3 = "2003"148VISTA = "Vista"149TWOK8 = "2008"150TWOK12 = "2012"151SEVEN = "7"152EIGHT = "8"153EIGHTONE = "8.1"154TEN = "10.0"155end156157UNKNOWN = "Unknown"158159module Match160WINDOWS = /^(?:Microsoft )?Windows/161WINDOWS_95 = /^(?:Microsoft )?Windows 95/162WINDOWS_98 = /^(?:Microsoft )?Windows 98/163WINDOWS_ME = /^(?:Microsoft )?Windows ME/164WINDOWS_NT3 = /^(?:Microsoft )?Windows NT 3/165WINDOWS_NT4 = /^(?:Microsoft )?Windows NT 4/166WINDOWS_2000 = /^(?:Microsoft )?Windows 2000/167WINDOWS_XP = /^(?:Microsoft )?Windows XP/168WINDOWS_2003 = /^(?:Microsoft )?Windows 2003/169WINDOWS_VISTA = /^(?:Microsoft )?Windows Vista/170WINDOWS_2008 = /^(?:Microsoft )?Windows 2008/171WINDOWS_7 = /^(?:Microsoft )?Windows 7/172WINDOWS_2012 = /^(?:Microsoft )?Windows 2012/173WINDOWS_8 = /^(?:Microsoft )?Windows 8/174WINDOWS_81 = /^(?:Microsoft )?Windows 8\.1/175WINDOWS_10 = /^(?:Microsoft )?Windows 10/176177LINUX = /^Linux/i178MAC_OSX = /^(?:Apple )?Mac OS X/179FREEBSD = /^FreeBSD/180NETBSD = /^NetBSD/181OPENBSD = /^OpenBSD/182VMWARE = /^VMware/183ANDROID = /^(?:Google )?Android/184APPLE_IOS = /^(?:Apple )?iOS/185end186end187end188189#190# Global constants191#192193# Licenses194MSF_LICENSE = "Metasploit Framework License (BSD)"195GPL_LICENSE = "GNU Public License v2.0"196BSD_LICENSE = "BSD License"197# Location: https://github.com/CoreSecurity/impacket/blob/1dba4c20e0d47ec614521e251d072116f75f3ef8/LICENSE198CORE_LICENSE = "CORE Security License (Apache 1.1)"199ARTISTIC_LICENSE = "Perl Artistic License"200UNKNOWN_LICENSE = "Unknown License"201LICENSES =202[203MSF_LICENSE,204GPL_LICENSE,205BSD_LICENSE,206CORE_LICENSE,207ARTISTIC_LICENSE,208UNKNOWN_LICENSE209]210211212