2014-08-15 11:33:31 -05:00
|
|
|
# coding: utf-8
|
|
|
|
|
|
|
|
|
|
# During build, the Gemfile is temporarily moved and
|
|
|
|
|
# we must manually define the project root
|
|
|
|
|
if ENV['MSF_ROOT']
|
|
|
|
|
lib = File.realpath(File.expand_path('lib', ENV['MSF_ROOT']))
|
2024-05-24 00:30:52 +01:00
|
|
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
|
|
require 'metasploit/framework/version'
|
|
|
|
|
require 'metasploit/framework/rails_version_constraint'
|
|
|
|
|
require 'msf/util/helper'
|
2014-08-15 11:33:31 -05:00
|
|
|
else
|
2024-05-24 00:30:52 +01:00
|
|
|
# XXX: Use explicit calls to require_relative to ensure that static analysis tools such as dependabot work
|
|
|
|
|
require_relative 'lib/metasploit/framework/version'
|
|
|
|
|
require_relative 'lib/metasploit/framework/rails_version_constraint'
|
|
|
|
|
require_relative 'lib/msf/util/helper'
|
2014-08-15 11:33:31 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
Gem::Specification.new do |spec|
|
|
|
|
|
spec.name = 'metasploit-framework'
|
|
|
|
|
spec.version = Metasploit::Framework::GEM_VERSION
|
|
|
|
|
spec.authors = ['Metasploit Hackers']
|
2017-08-20 13:23:54 -05:00
|
|
|
spec.email = ['msfdev@metasploit.com']
|
2014-08-15 11:33:31 -05:00
|
|
|
spec.summary = 'metasploit-framework'
|
|
|
|
|
spec.description = 'metasploit-framework'
|
|
|
|
|
spec.homepage = 'https://www.metasploit.com'
|
|
|
|
|
spec.license = 'BSD-3-clause'
|
|
|
|
|
|
2017-07-10 16:38:10 +02:00
|
|
|
# only do a git ls-files if the .git folder exists and we have a git binary in PATH
|
2017-07-17 09:58:20 +02:00
|
|
|
if File.directory?(File.join(File.dirname(__FILE__), ".git")) && Msf::Util::Helper.which("git")
|
2017-05-26 10:07:49 -05:00
|
|
|
spec.files = `git ls-files`.split($/).reject { |file|
|
2023-05-22 08:28:23 -05:00
|
|
|
file =~ /^external|^docs|^\.solargraph\.yml/
|
2017-05-26 10:07:49 -05:00
|
|
|
}
|
|
|
|
|
end
|
2014-08-15 11:33:31 -05:00
|
|
|
spec.bindir = '.'
|
2015-12-30 11:00:45 -06:00
|
|
|
if ENV['CREATE_BINSTUBS']
|
|
|
|
|
spec.executables = [
|
2014-08-15 11:33:31 -05:00
|
|
|
'msfconsole',
|
|
|
|
|
'msfd',
|
|
|
|
|
'msfrpc',
|
|
|
|
|
'msfrpcd',
|
|
|
|
|
'msfvenom'
|
2015-12-30 11:00:45 -06:00
|
|
|
]
|
|
|
|
|
end
|
2014-08-15 11:33:31 -05:00
|
|
|
spec.test_files = spec.files.grep(%r{^spec/})
|
|
|
|
|
spec.require_paths = ["lib"]
|
|
|
|
|
|
2022-11-22 15:00:12 -06:00
|
|
|
spec.required_ruby_version = '>= 2.7'
|
2019-11-03 09:46:47 -05:00
|
|
|
|
2015-11-09 13:03:26 -06:00
|
|
|
# Database support
|
|
|
|
|
spec.add_runtime_dependency 'activerecord', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION
|
2014-08-15 11:33:31 -05:00
|
|
|
# Need 3+ for ActiveSupport::Concern
|
2014-12-19 13:54:13 -06:00
|
|
|
spec.add_runtime_dependency 'activesupport', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION
|
2014-08-15 11:33:31 -05:00
|
|
|
# Needed for config.action_view for view plugin compatibility for Pro
|
2014-12-19 13:54:13 -06:00
|
|
|
spec.add_runtime_dependency 'actionpack', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION
|
2014-08-15 11:33:31 -05:00
|
|
|
# Needed for some admin modules (cfme_manageiq_evm_pass_reset.rb)
|
2020-07-23 16:33:45 -05:00
|
|
|
spec.add_runtime_dependency 'bcrypt'
|
2023-03-13 11:20:39 +00:00
|
|
|
# Improves bootup performance by caching expensive computations
|
|
|
|
|
spec.add_runtime_dependency 'bootsnap'
|
2014-09-19 19:10:39 -05:00
|
|
|
# Needed for Javascript obfuscation
|
2016-04-15 11:45:43 -05:00
|
|
|
spec.add_runtime_dependency 'jsobfu'
|
2014-08-15 11:33:31 -05:00
|
|
|
# Needed for some admin modules (scrutinizer_add_user.rb)
|
|
|
|
|
spec.add_runtime_dependency 'json'
|
2014-12-22 20:26:30 -06:00
|
|
|
# Metasm compiler/decompiler/assembler
|
2016-04-15 11:45:43 -05:00
|
|
|
spec.add_runtime_dependency 'metasm'
|
2023-12-30 16:26:31 +00:00
|
|
|
# Needed for aarch64 assembler support - as Metasm does not currently support Aarch64 fully
|
|
|
|
|
spec.add_runtime_dependency 'aarch64'
|
2014-09-18 09:33:57 -05:00
|
|
|
# Metasploit::Concern hooks
|
2021-03-19 15:02:12 -05:00
|
|
|
spec.add_runtime_dependency 'metasploit-concern'
|
2015-11-09 13:03:26 -06:00
|
|
|
# Metasploit::Credential database models
|
2021-03-19 15:02:12 -05:00
|
|
|
spec.add_runtime_dependency 'metasploit-credential'
|
2015-11-09 13:03:26 -06:00
|
|
|
# Database models shared between framework and Pro.
|
2021-03-19 15:02:12 -05:00
|
|
|
spec.add_runtime_dependency 'metasploit_data_models'
|
2014-08-15 11:33:31 -05:00
|
|
|
# Things that would normally be part of the database model, but which
|
|
|
|
|
# are needed when there's no database
|
2021-03-19 15:02:12 -05:00
|
|
|
spec.add_runtime_dependency 'metasploit-model'
|
2015-06-22 16:56:54 -05:00
|
|
|
# Needed for Meterpreter
|
2024-02-20 13:35:42 -05:00
|
|
|
spec.add_runtime_dependency 'metasploit-payloads', '2.0.166'
|
2016-05-26 16:17:43 -05:00
|
|
|
# Needed for the next-generation POSIX Meterpreter
|
2024-07-16 11:47:14 -04:00
|
|
|
spec.add_runtime_dependency 'metasploit_payloads-mettle', '1.0.31'
|
2014-08-15 11:33:31 -05:00
|
|
|
# Needed by msfgui and other rpc components
|
2023-05-02 15:53:26 -05:00
|
|
|
# Locked until build env can handle newer version. See: https://github.com/msgpack/msgpack-ruby/issues/334
|
|
|
|
|
spec.add_runtime_dependency 'msgpack', '~> 1.6.0'
|
2015-11-09 13:03:26 -06:00
|
|
|
# get list of network interfaces, like eth* from OS.
|
2016-04-15 11:45:43 -05:00
|
|
|
spec.add_runtime_dependency 'network_interface'
|
2016-07-05 17:05:42 -05:00
|
|
|
# NTLM authentication
|
|
|
|
|
spec.add_runtime_dependency 'rubyntlm'
|
2024-05-22 12:33:11 +01:00
|
|
|
# Needed by for XML parsing
|
|
|
|
|
spec.add_runtime_dependency 'nokogiri'
|
2014-08-15 11:33:31 -05:00
|
|
|
# Needed by db.rb and Msf::Exploit::Capture
|
2017-05-09 11:03:32 -05:00
|
|
|
spec.add_runtime_dependency 'packetfu'
|
2015-11-09 13:03:26 -06:00
|
|
|
# For sniffer and raw socket modules
|
2021-12-23 12:58:25 -06:00
|
|
|
spec.add_runtime_dependency 'pcaprub'
|
2017-06-21 03:13:43 -05:00
|
|
|
# Used by the Metasploit data model, etc.
|
2019-02-11 12:59:51 -05:00
|
|
|
# bound to 0.2x for Activerecord 4.2.8 deprecation warnings:
|
2017-06-21 03:13:43 -05:00
|
|
|
# https://github.com/ged/ruby-pg/commit/c90ac644e861857ae75638eb6954b1cb49617090
|
2020-07-09 15:03:40 -05:00
|
|
|
spec.add_runtime_dependency 'pg'
|
2014-08-15 11:33:31 -05:00
|
|
|
# Run initializers for metasploit-concern, metasploit-credential, metasploit_data_models Rails::Engines
|
|
|
|
|
spec.add_runtime_dependency 'railties'
|
2014-10-29 16:26:36 -05:00
|
|
|
# required for OS fingerprinting
|
2016-04-15 11:45:43 -05:00
|
|
|
spec.add_runtime_dependency 'recog'
|
2015-10-07 11:16:49 +02:00
|
|
|
# required for bitlocker fvek extraction
|
2016-04-15 11:45:43 -05:00
|
|
|
spec.add_runtime_dependency 'openssl-ccm'
|
2022-07-29 07:49:15 -05:00
|
|
|
# Needed for documentation generation - locked unitl Ruby 2.6 support is dropped
|
|
|
|
|
spec.add_runtime_dependency 'octokit', '~> 4.0'
|
2016-03-24 20:43:51 -05:00
|
|
|
spec.add_runtime_dependency 'redcarpet'
|
2016-03-29 23:21:01 -05:00
|
|
|
# Needed for Microsoft patch finding tool (msu_finder)
|
2016-04-15 11:45:43 -05:00
|
|
|
spec.add_runtime_dependency 'patch_finder'
|
2019-01-09 23:40:02 -05:00
|
|
|
# Required for Metasploit Web Services
|
2020-12-01 18:16:26 +00:00
|
|
|
spec.add_runtime_dependency 'puma'
|
2023-08-10 13:29:10 +02:00
|
|
|
spec.add_runtime_dependency 'ruby-mysql'
|
2018-03-06 10:21:22 -06:00
|
|
|
spec.add_runtime_dependency 'thin'
|
|
|
|
|
spec.add_runtime_dependency 'sinatra'
|
2018-06-22 15:09:36 -04:00
|
|
|
spec.add_runtime_dependency 'warden'
|
2021-05-10 13:21:55 +01:00
|
|
|
spec.add_runtime_dependency 'swagger-blocks'
|
2018-10-25 22:30:54 -04:00
|
|
|
# Required for JSON-RPC client
|
|
|
|
|
spec.add_runtime_dependency 'em-http-request'
|
2016-05-17 11:40:25 -05:00
|
|
|
# TimeZone info
|
|
|
|
|
spec.add_runtime_dependency 'tzinfo-data'
|
2016-06-28 16:10:48 -05:00
|
|
|
# Gem for dealing with SSHKeys
|
|
|
|
|
spec.add_runtime_dependency 'sshkey'
|
2016-07-26 16:59:13 -05:00
|
|
|
# Library for interpreting Windows error codes and strings
|
|
|
|
|
spec.add_runtime_dependency 'windows_error'
|
2017-04-13 07:12:38 -05:00
|
|
|
# This used to be depended on by nokogiri, depended on by wmap
|
2017-04-13 17:33:29 -05:00
|
|
|
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.3.0')
|
|
|
|
|
spec.add_runtime_dependency 'xmlrpc'
|
|
|
|
|
end
|
2021-02-24 17:01:57 +00:00
|
|
|
# Gem for handling Cookies
|
|
|
|
|
spec.add_runtime_dependency 'http-cookie'
|
2022-09-29 23:00:15 +10:00
|
|
|
# Needed for some modules (polkit_auth_bypass.rb)
|
2021-06-23 10:58:02 -04:00
|
|
|
spec.add_runtime_dependency 'unix-crypt'
|
2022-09-29 23:00:15 +10:00
|
|
|
# Needed for Kerberos structure parsing
|
|
|
|
|
spec.add_runtime_dependency 'rasn1'
|
2016-05-13 19:00:52 -05:00
|
|
|
|
2017-07-07 11:19:06 +00:00
|
|
|
#
|
|
|
|
|
# File Parsing Libraries
|
|
|
|
|
#
|
|
|
|
|
# Needed by auxiliary/gather/http_pdf_authors module
|
|
|
|
|
spec.add_runtime_dependency 'pdf-reader'
|
2017-12-29 11:13:25 +08:00
|
|
|
spec.add_runtime_dependency 'ruby-macho'
|
2019-07-09 20:12:19 -04:00
|
|
|
# Needed for mongodb/bson
|
|
|
|
|
spec.add_runtime_dependency 'bson'
|
2017-07-07 11:19:06 +00:00
|
|
|
|
2016-07-05 11:08:57 -05:00
|
|
|
#
|
|
|
|
|
# Protocol Libraries
|
|
|
|
|
#
|
2016-10-09 02:34:44 +03:00
|
|
|
spec.add_runtime_dependency 'dnsruby'
|
2017-12-20 12:28:02 -08:00
|
|
|
spec.add_runtime_dependency 'mqtt'
|
2016-07-05 11:08:57 -05:00
|
|
|
spec.add_runtime_dependency 'net-ssh'
|
2018-09-28 16:20:11 -05:00
|
|
|
spec.add_runtime_dependency 'ed25519' # Adds ed25519 keys for net-ssh
|
2017-08-01 15:26:50 -05:00
|
|
|
spec.add_runtime_dependency 'bcrypt_pbkdf'
|
2024-02-27 17:52:19 +00:00
|
|
|
spec.add_runtime_dependency 'ruby_smb', '~> 3.3.3'
|
2023-08-04 11:56:17 +01:00
|
|
|
spec.add_runtime_dependency 'net-imap' # Used in Postgres auth for its SASL stringprep implementation
|
2020-04-14 10:53:07 -05:00
|
|
|
spec.add_runtime_dependency 'net-ldap'
|
2022-03-23 13:05:42 +00:00
|
|
|
spec.add_runtime_dependency 'net-smtp'
|
2024-06-27 09:32:15 +01:00
|
|
|
spec.add_runtime_dependency 'net-sftp'
|
2021-08-11 09:41:11 -04:00
|
|
|
spec.add_runtime_dependency 'winrm'
|
2024-07-23 13:16:59 +01:00
|
|
|
spec.add_runtime_dependency 'ffi', '< 1.17.0'
|
2016-07-05 11:08:57 -05:00
|
|
|
|
2016-06-21 13:56:36 -05:00
|
|
|
#
|
|
|
|
|
# REX Libraries
|
|
|
|
|
#
|
2016-08-26 14:00:13 -05:00
|
|
|
# Core of the Ruby Exploitation Library
|
|
|
|
|
spec.add_runtime_dependency 'rex-core'
|
2016-06-21 13:56:36 -05:00
|
|
|
# Text manipulation library for things like generating random string
|
2018-04-18 10:38:01 -05:00
|
|
|
spec.add_runtime_dependency 'rex-text'
|
2016-06-21 13:56:36 -05:00
|
|
|
# Library for Generating Randomized strings valid as Identifiers such as variable names
|
|
|
|
|
spec.add_runtime_dependency 'rex-random_identifier'
|
|
|
|
|
# library for creating Powershell scripts for exploitation purposes
|
2018-06-21 11:41:16 -05:00
|
|
|
spec.add_runtime_dependency 'rex-powershell'
|
2016-06-21 13:56:36 -05:00
|
|
|
# Library for processing and creating Zip compatbile archives
|
|
|
|
|
spec.add_runtime_dependency 'rex-zip'
|
|
|
|
|
# Library for parsing offline Windows Registry files
|
|
|
|
|
spec.add_runtime_dependency 'rex-registry'
|
2016-06-27 14:52:49 -05:00
|
|
|
# Library for parsing Java serialized streams
|
|
|
|
|
spec.add_runtime_dependency 'rex-java'
|
2016-07-15 16:01:21 -05:00
|
|
|
# Library for C-style structs
|
|
|
|
|
spec.add_runtime_dependency 'rex-struct2'
|
2016-09-27 04:01:05 -05:00
|
|
|
# Library which contains architecture specific information such as registers, opcodes,
|
2016-07-20 16:42:41 -05:00
|
|
|
# and stack manipulation routines.
|
2017-05-29 23:41:10 -05:00
|
|
|
spec.add_runtime_dependency 'rex-arch'
|
2016-07-21 18:07:23 -05:00
|
|
|
# Library for working with OLE.
|
|
|
|
|
spec.add_runtime_dependency 'rex-ole'
|
2016-09-01 11:38:07 -05:00
|
|
|
# Library for creating and/or parsing MIME messages.
|
|
|
|
|
spec.add_runtime_dependency 'rex-mime'
|
2016-09-06 11:27:06 -05:00
|
|
|
# Library for Dynamic Multi-byte x86 NOP generation
|
|
|
|
|
spec.add_runtime_dependency 'rex-nop'
|
2016-08-15 14:01:43 -05:00
|
|
|
# Library for parsing and manipulating executable binaries
|
|
|
|
|
spec.add_runtime_dependency 'rex-bin_tools'
|
2016-08-26 14:00:13 -05:00
|
|
|
# Rex Socket Abstraction Layer
|
2019-08-30 00:01:55 -05:00
|
|
|
spec.add_runtime_dependency 'rex-socket'
|
2016-08-30 10:43:47 -05:00
|
|
|
# Library for scanning a server's SSL/TLS capabilities
|
|
|
|
|
spec.add_runtime_dependency 'rex-sslscan'
|
2016-09-12 16:06:53 -05:00
|
|
|
# Library and tool for finding ROP gadgets in a supplied binary
|
|
|
|
|
spec.add_runtime_dependency 'rex-rop_builder'
|
2016-09-14 12:07:26 -05:00
|
|
|
# Library for polymorphic encoders; used for payload encoding
|
|
|
|
|
spec.add_runtime_dependency 'rex-encoder'
|
2016-10-11 17:40:43 -05:00
|
|
|
# Library for exploit development helpers
|
|
|
|
|
spec.add_runtime_dependency 'rex-exploitation'
|
2017-01-18 08:20:16 -06:00
|
|
|
# Command line editing, history, and tab completion in msfconsole
|
2024-08-13 15:51:09 +01:00
|
|
|
spec.add_runtime_dependency 'reline'
|
|
|
|
|
# Legacy support for FILENAME_COMPLETION_PROC, not present in Reline
|
2017-01-18 08:20:16 -06:00
|
|
|
spec.add_runtime_dependency 'rb-readline'
|
2014-08-15 11:33:31 -05:00
|
|
|
# Needed by some modules
|
2016-04-15 11:45:43 -05:00
|
|
|
spec.add_runtime_dependency 'rubyzip'
|
2014-08-15 11:33:31 -05:00
|
|
|
# Needed for some post modules
|
2024-05-23 15:39:15 +01:00
|
|
|
spec.add_runtime_dependency 'sqlite3', '1.7.3'
|
2014-08-15 11:33:31 -05:00
|
|
|
# required for Time::TZInfo in ActiveSupport
|
|
|
|
|
spec.add_runtime_dependency 'tzinfo'
|
2015-10-29 07:28:33 +10:00
|
|
|
# Needed so that disk size output isn't horrible
|
|
|
|
|
spec.add_runtime_dependency 'filesize'
|
2016-08-18 17:02:46 -05:00
|
|
|
# Needed for openvas plugin
|
|
|
|
|
spec.add_runtime_dependency 'openvas-omp'
|
2016-08-14 17:57:33 +02:00
|
|
|
# Needed by metasploit nessus bridge
|
|
|
|
|
spec.add_runtime_dependency 'nessus_rest'
|
2017-01-25 10:13:28 -06:00
|
|
|
# Nexpose Gem
|
|
|
|
|
spec.add_runtime_dependency 'nexpose'
|
2017-05-24 00:11:06 +12:00
|
|
|
# Needed for NDMP sockets
|
|
|
|
|
spec.add_runtime_dependency 'xdr'
|
2017-12-28 21:00:03 -05:00
|
|
|
# Needed for ::Msf...CertProvider
|
|
|
|
|
spec.add_runtime_dependency 'faker'
|
2021-06-23 12:17:01 -05:00
|
|
|
# SSH server library with ed25519
|
|
|
|
|
spec.add_runtime_dependency 'hrr_rb_ssh-ed25519'
|
2020-05-24 16:26:23 +02:00
|
|
|
# Needed for irb internal command
|
2023-10-06 15:19:45 +01:00
|
|
|
spec.add_runtime_dependency 'irb', '~> 1.7.4'
|
2019-06-11 19:01:22 -05:00
|
|
|
|
|
|
|
|
# AWS enumeration modules
|
|
|
|
|
spec.add_runtime_dependency 'aws-sdk-s3'
|
|
|
|
|
spec.add_runtime_dependency 'aws-sdk-ec2'
|
|
|
|
|
spec.add_runtime_dependency 'aws-sdk-iam'
|
2022-12-30 21:50:15 -05:00
|
|
|
spec.add_runtime_dependency 'aws-sdk-ssm'
|
2019-12-05 17:24:29 -06:00
|
|
|
|
2023-02-09 11:42:29 -06:00
|
|
|
# AWS session support
|
|
|
|
|
spec.add_runtime_dependency 'aws-sdk-ec2instanceconnect'
|
|
|
|
|
|
2019-09-25 15:58:34 -05:00
|
|
|
# Needed for WebSocket Support
|
|
|
|
|
spec.add_runtime_dependency 'faye-websocket'
|
|
|
|
|
spec.add_runtime_dependency 'eventmachine'
|
2019-12-12 10:13:51 -06:00
|
|
|
|
2024-04-18 11:18:07 +01:00
|
|
|
spec.add_runtime_dependency 'faraday', '2.7.11'
|
2022-06-09 02:09:28 +01:00
|
|
|
spec.add_runtime_dependency 'faraday-retry'
|
2019-12-03 17:40:36 +00:00
|
|
|
|
2021-10-06 09:37:14 -05:00
|
|
|
# Required for windows terminal colors as of Ruby 3.0
|
|
|
|
|
spec.add_runtime_dependency 'win32api'
|
|
|
|
|
|
2020-09-22 02:56:51 +01:00
|
|
|
spec.add_runtime_dependency 'zeitwerk'
|
2023-02-20 13:04:47 +00:00
|
|
|
|
2023-03-02 12:47:48 -06:00
|
|
|
# Required for PNG payload support.
|
|
|
|
|
# WARNING: Chunky_PNG is vulnerable to decompression bomb attacks.
|
|
|
|
|
# Do not use this to process untrusted PNG files! This is only to be used
|
|
|
|
|
# to generate PNG files, not to parse untrusted PNG files.
|
2023-02-20 13:04:47 +00:00
|
|
|
spec.add_runtime_dependency 'chunky_png'
|
2023-09-19 10:35:51 +01:00
|
|
|
|
2024-05-23 12:23:27 +01:00
|
|
|
# Standard libraries: https://www.ruby-lang.org/en/news/2023/12/25/ruby-3-3-0-released/
|
|
|
|
|
%w[
|
|
|
|
|
abbrev
|
|
|
|
|
base64
|
|
|
|
|
bigdecimal
|
|
|
|
|
csv
|
|
|
|
|
drb
|
|
|
|
|
getoptlong
|
|
|
|
|
mutex_m
|
|
|
|
|
].each do |library|
|
|
|
|
|
spec.add_runtime_dependency library
|
|
|
|
|
end
|
2014-08-15 11:33:31 -05:00
|
|
|
end
|