metasploit-framework.gemspec 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. # coding: utf-8
  2. # During build, the Gemfile is temporarily moved and
  3. # we must manually define the project root
  4. if ENV['MSF_ROOT']
  5. lib = File.realpath(File.expand_path('lib', ENV['MSF_ROOT']))
  6. else
  7. # have to use realpath as metasploit-framework is often loaded through a symlink and tools like Coverage and debuggers
  8. # require realpaths.
  9. lib = File.realpath(File.expand_path('../lib', __FILE__))
  10. end
  11. $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
  12. require 'metasploit/framework/version'
  13. require 'metasploit/framework/rails_version_constraint'
  14. require 'msf/util/helper'
  15. Gem::Specification.new do |spec|
  16. spec.name = 'metasploit-framework'
  17. spec.version = Metasploit::Framework::GEM_VERSION
  18. spec.authors = ['Metasploit Hackers']
  19. spec.email = ['msfdev@metasploit.com']
  20. spec.summary = 'metasploit-framework'
  21. spec.description = 'metasploit-framework'
  22. spec.homepage = 'https://www.metasploit.com'
  23. spec.license = 'BSD-3-clause'
  24. # only do a git ls-files if the .git folder exists and we have a git binary in PATH
  25. if File.directory?(File.join(File.dirname(__FILE__), ".git")) && Msf::Util::Helper.which("git")
  26. spec.files = `git ls-files`.split($/).reject { |file|
  27. file =~ /^external|^docs|^\.solargraph\.yml/
  28. }
  29. end
  30. spec.bindir = '.'
  31. if ENV['CREATE_BINSTUBS']
  32. spec.executables = [
  33. 'msfconsole',
  34. 'msfd',
  35. 'msfrpc',
  36. 'msfrpcd',
  37. 'msfvenom'
  38. ]
  39. end
  40. spec.test_files = spec.files.grep(%r{^spec/})
  41. spec.require_paths = ["lib"]
  42. spec.required_ruby_version = '>= 2.7'
  43. # Database support
  44. spec.add_runtime_dependency 'activerecord', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION
  45. # Need 3+ for ActiveSupport::Concern
  46. spec.add_runtime_dependency 'activesupport', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION
  47. # Needed for config.action_view for view plugin compatibility for Pro
  48. spec.add_runtime_dependency 'actionpack', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION
  49. # Needed for some admin modules (cfme_manageiq_evm_pass_reset.rb)
  50. spec.add_runtime_dependency 'bcrypt'
  51. # Improves bootup performance by caching expensive computations
  52. spec.add_runtime_dependency 'bootsnap'
  53. # Needed for Javascript obfuscation
  54. spec.add_runtime_dependency 'jsobfu'
  55. # Needed for some admin modules (scrutinizer_add_user.rb)
  56. spec.add_runtime_dependency 'json'
  57. # Metasm compiler/decompiler/assembler
  58. spec.add_runtime_dependency 'metasm'
  59. # Metasploit::Concern hooks
  60. spec.add_runtime_dependency 'metasploit-concern'
  61. # Metasploit::Credential database models
  62. spec.add_runtime_dependency 'metasploit-credential'
  63. # Database models shared between framework and Pro.
  64. spec.add_runtime_dependency 'metasploit_data_models'
  65. # Things that would normally be part of the database model, but which
  66. # are needed when there's no database
  67. spec.add_runtime_dependency 'metasploit-model'
  68. # Needed for Meterpreter
  69. spec.add_runtime_dependency 'metasploit-payloads', '2.0.166'
  70. # Needed for the next-generation POSIX Meterpreter
  71. spec.add_runtime_dependency 'metasploit_payloads-mettle', '1.0.26'
  72. # Needed by msfgui and other rpc components
  73. # Locked until build env can handle newer version. See: https://github.com/msgpack/msgpack-ruby/issues/334
  74. spec.add_runtime_dependency 'msgpack', '~> 1.6.0'
  75. # get list of network interfaces, like eth* from OS.
  76. spec.add_runtime_dependency 'network_interface'
  77. # NTLM authentication
  78. spec.add_runtime_dependency 'rubyntlm'
  79. # Needed by anemone crawler
  80. # Locked until build env can handle newer version due to native compile issue in 1.15.x
  81. spec.add_runtime_dependency 'nokogiri', '~> 1.14.0'
  82. # Needed by db.rb and Msf::Exploit::Capture
  83. spec.add_runtime_dependency 'packetfu'
  84. # For sniffer and raw socket modules
  85. spec.add_runtime_dependency 'pcaprub'
  86. # Used by the Metasploit data model, etc.
  87. # bound to 0.2x for Activerecord 4.2.8 deprecation warnings:
  88. # https://github.com/ged/ruby-pg/commit/c90ac644e861857ae75638eb6954b1cb49617090
  89. spec.add_runtime_dependency 'pg'
  90. # Run initializers for metasploit-concern, metasploit-credential, metasploit_data_models Rails::Engines
  91. spec.add_runtime_dependency 'railties'
  92. # required for OS fingerprinting
  93. spec.add_runtime_dependency 'recog'
  94. # required for bitlocker fvek extraction
  95. spec.add_runtime_dependency 'openssl-ccm'
  96. # Needed for documentation generation - locked unitl Ruby 2.6 support is dropped
  97. spec.add_runtime_dependency 'octokit', '~> 4.0'
  98. spec.add_runtime_dependency 'redcarpet'
  99. # Needed for Microsoft patch finding tool (msu_finder)
  100. spec.add_runtime_dependency 'patch_finder'
  101. # Required for Metasploit Web Services
  102. spec.add_runtime_dependency 'puma'
  103. spec.add_runtime_dependency 'ruby-mysql'
  104. spec.add_runtime_dependency 'thin'
  105. spec.add_runtime_dependency 'sinatra'
  106. spec.add_runtime_dependency 'warden'
  107. spec.add_runtime_dependency 'swagger-blocks'
  108. # Required for JSON-RPC client
  109. spec.add_runtime_dependency 'em-http-request'
  110. # TimeZone info
  111. spec.add_runtime_dependency 'tzinfo-data'
  112. # Gem for dealing with SSHKeys
  113. spec.add_runtime_dependency 'sshkey'
  114. # Library for interpreting Windows error codes and strings
  115. spec.add_runtime_dependency 'windows_error'
  116. # This used to be depended on by nokogiri, depended on by wmap
  117. if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.3.0')
  118. spec.add_runtime_dependency 'xmlrpc'
  119. end
  120. # Gem for handling Cookies
  121. spec.add_runtime_dependency 'http-cookie'
  122. # Needed for some modules (polkit_auth_bypass.rb)
  123. spec.add_runtime_dependency 'unix-crypt'
  124. # Needed for Kerberos structure parsing
  125. spec.add_runtime_dependency 'rasn1'
  126. #
  127. # File Parsing Libraries
  128. #
  129. # Needed by auxiliary/gather/http_pdf_authors module
  130. spec.add_runtime_dependency 'pdf-reader'
  131. spec.add_runtime_dependency 'ruby-macho'
  132. # Needed for mongodb/bson
  133. spec.add_runtime_dependency 'bson'
  134. #
  135. # Protocol Libraries
  136. #
  137. spec.add_runtime_dependency 'dnsruby'
  138. spec.add_runtime_dependency 'mqtt'
  139. spec.add_runtime_dependency 'net-ssh'
  140. spec.add_runtime_dependency 'ed25519' # Adds ed25519 keys for net-ssh
  141. spec.add_runtime_dependency 'bcrypt_pbkdf'
  142. spec.add_runtime_dependency 'ruby_smb', '~> 3.3.3'
  143. spec.add_runtime_dependency 'net-imap' # Used in Postgres auth for its SASL stringprep implementation
  144. spec.add_runtime_dependency 'net-ldap'
  145. spec.add_runtime_dependency 'net-smtp'
  146. spec.add_runtime_dependency 'winrm'
  147. #
  148. # REX Libraries
  149. #
  150. # Core of the Ruby Exploitation Library
  151. spec.add_runtime_dependency 'rex-core'
  152. # Text manipulation library for things like generating random string
  153. spec.add_runtime_dependency 'rex-text'
  154. # Library for Generating Randomized strings valid as Identifiers such as variable names
  155. spec.add_runtime_dependency 'rex-random_identifier'
  156. # library for creating Powershell scripts for exploitation purposes
  157. spec.add_runtime_dependency 'rex-powershell'
  158. # Library for processing and creating Zip compatbile archives
  159. spec.add_runtime_dependency 'rex-zip'
  160. # Library for parsing offline Windows Registry files
  161. spec.add_runtime_dependency 'rex-registry'
  162. # Library for parsing Java serialized streams
  163. spec.add_runtime_dependency 'rex-java'
  164. # Library for C-style structs
  165. spec.add_runtime_dependency 'rex-struct2'
  166. # Library which contains architecture specific information such as registers, opcodes,
  167. # and stack manipulation routines.
  168. spec.add_runtime_dependency 'rex-arch'
  169. # Library for working with OLE.
  170. spec.add_runtime_dependency 'rex-ole'
  171. # Library for creating and/or parsing MIME messages.
  172. spec.add_runtime_dependency 'rex-mime'
  173. # Library for Dynamic Multi-byte x86 NOP generation
  174. spec.add_runtime_dependency 'rex-nop'
  175. # Library for parsing and manipulating executable binaries
  176. spec.add_runtime_dependency 'rex-bin_tools'
  177. # Rex Socket Abstraction Layer
  178. spec.add_runtime_dependency 'rex-socket'
  179. # Library for scanning a server's SSL/TLS capabilities
  180. spec.add_runtime_dependency 'rex-sslscan'
  181. # Library and tool for finding ROP gadgets in a supplied binary
  182. spec.add_runtime_dependency 'rex-rop_builder'
  183. # Library for polymorphic encoders; used for payload encoding
  184. spec.add_runtime_dependency 'rex-encoder'
  185. # Library for exploit development helpers
  186. spec.add_runtime_dependency 'rex-exploitation'
  187. # Command line editing, history, and tab completion in msfconsole
  188. spec.add_runtime_dependency 'rb-readline'
  189. # Needed by some modules
  190. spec.add_runtime_dependency 'rubyzip'
  191. # Needed for some post modules
  192. spec.add_runtime_dependency 'sqlite3', '1.6.6'
  193. # required for Time::TZInfo in ActiveSupport
  194. spec.add_runtime_dependency 'tzinfo'
  195. # Needed so that disk size output isn't horrible
  196. spec.add_runtime_dependency 'filesize'
  197. # Needed for openvas plugin
  198. spec.add_runtime_dependency 'openvas-omp'
  199. # Needed by metasploit nessus bridge
  200. spec.add_runtime_dependency 'nessus_rest'
  201. # Nexpose Gem
  202. spec.add_runtime_dependency 'nexpose'
  203. # Needed for NDMP sockets
  204. spec.add_runtime_dependency 'xdr'
  205. # Needed for ::Msf...CertProvider
  206. spec.add_runtime_dependency 'faker'
  207. # SSH server library with ed25519
  208. spec.add_runtime_dependency 'hrr_rb_ssh-ed25519'
  209. # Needed for irb internal command
  210. spec.add_runtime_dependency 'irb', '~> 1.7.4'
  211. # AWS enumeration modules
  212. spec.add_runtime_dependency 'aws-sdk-s3'
  213. spec.add_runtime_dependency 'aws-sdk-ec2'
  214. spec.add_runtime_dependency 'aws-sdk-iam'
  215. spec.add_runtime_dependency 'aws-sdk-ssm'
  216. # AWS session support
  217. spec.add_runtime_dependency 'aws-sdk-ec2instanceconnect'
  218. # Needed for WebSocket Support
  219. spec.add_runtime_dependency 'faye-websocket'
  220. spec.add_runtime_dependency 'eventmachine'
  221. spec.add_runtime_dependency 'faraday', '2.7.11'
  222. spec.add_runtime_dependency 'faraday-retry'
  223. # Required for windows terminal colors as of Ruby 3.0
  224. spec.add_runtime_dependency 'win32api'
  225. spec.add_runtime_dependency 'zeitwerk'
  226. # Required for PNG payload support.
  227. # WARNING: Chunky_PNG is vulnerable to decompression bomb attacks.
  228. # Do not use this to process untrusted PNG files! This is only to be used
  229. # to generate PNG files, not to parse untrusted PNG files.
  230. spec.add_runtime_dependency 'chunky_png'
  231. # Needed for multiline REPL support for interactive SQL sessions
  232. spec.add_runtime_dependency 'reline'
  233. end