Spike: Fold rex-mime into rapid7/metasploit-framework
A long long time ago in an internet far far away, Metasploit was split into many gems. The intention at the time was to facilitate a Ruby based community of projects. Over the years, this never came to pass and as it stands now, is an extra layer of complexity and effort that we the core maintainers and open source contributors have to subject ourselves to while making trivial changes.
Currently if 1 gem needs to be updated:
- The developer clones rapid7/metasploit-framework
- The developer clones rapid7/rex-whatever
- The developer makes necessary code changes
- The developer makes a PR to rapid7/rex-whatever
- The developer updates their Gemfile with the incantation to load their PR'ed changes
- The developer makes a PR to rapid7/metasploit-framework
- Changes are reviewed and iterated on until ready to be merged
- A maintainer merges the changes to rapid7/rex-whatever, cutting a release
- The developer reverts the changes from step 4 and adds a commit to bump the gem
- A maintainer merges the changes to rapid7/metasploit-framework
The intention of this ticket is to spike our ability to bring some of these gems into the framework tree to allow changes to be made to their source code directly, in parallel / the same repo. That would ideally eliminate steps 2, 4, 5, 8, and 9. Of course not all of these steps are the same level of effort, but that is half the number of steps. Ideally, Metasploit would load the local gem changes, and any bumps would be handled by Jenkins automatically on merge. If possible, we should continue to publish the gems as we go to make testing and distribution easier, as well as maintain the git history.
Based on the dependency graph today, rex-mime seems like a reasonable candidate to use as a test subject.
graph BT
classDef terminal fill:#fff8c5,stroke:#333,stroke-width:2px
classDef msfOnly fill:#b6f3c2,stroke:#333
classDef disqualified fill:#ffffff,stroke:#888
rex_arch["rex-arch"]:::disqualified
rex_bin_tools["rex-bin_tools"]:::msfOnly
rex_core["rex-core"]:::disqualified
rex_encoder["rex-encoder"]:::msfOnly
rex_exploitation["rex-exploitation"]:::msfOnly
rex_java["rex-java"]:::msfOnly
rex_mime["rex-mime"]:::msfOnly
rex_nop["rex-nop"]:::msfOnly
rex_ole["rex-ole"]:::msfOnly
rex_powershell["rex-powershell"]:::msfOnly
rex_random_identifier["rex-random_identifier"]:::msfOnly
rex_registry["rex-registry"]:::msfOnly
rex_rop_builder["rex-rop_builder"]:::msfOnly
rex_socket["rex-socket<br/>ext: lacewing"]:::disqualified
rex_sslscan["rex-sslscan"]:::msfOnly
rex_struct2["rex-struct2"]:::msfOnly
rex_text["rex-text<br/>ext: lacewing, rise-cli"]:::disqualified
rex_zip["rex-zip"]:::msfOnly
metasploit_framework["metasploit-framework"]:::terminal
metasploit_credential["metasploit-credential"]:::msfOnly
metasploit_data_models["metasploit_data_models"]:::msfOnly
metasploit_concern["metasploit-concern<br/>ext: wg-metasploit_data_models"]:::disqualified
metasploit_model["metasploit-model<br/>ext: wg-metasploit_data_models"]:::disqualified
metasploit_payloads["metasploit-payloads"]:::msfOnly
metasploit_payloads_mettle["metasploit_payloads-mettle"]:::msfOnly
metasploit_erd["metasploit-erd"]:::disqualified
metasploit_yard["metasploit-yard<br/>ext: wg-metasploit_data_models"]:::disqualified
metasploit_aggregator["metasploit-aggregator"]:::disqualified
metasploit_version["metasploit-version"]:::disqualified
yard_metasploit_erd["yard-metasploit-erd<br/>ext: wg-metasploit_data_models"]:::disqualified
rex_arch --> rex_text
rex_bin_tools --> rex_arch
rex_bin_tools --> rex_core
rex_bin_tools --> rex_struct2
rex_bin_tools --> rex_text
rex_encoder --> rex_arch
rex_encoder --> rex_text
rex_exploitation --> rex_arch
rex_exploitation --> rex_encoder
rex_exploitation --> rex_text
rex_mime --> rex_text
rex_nop --> rex_arch
rex_ole --> rex_text
rex_powershell --> rex_random_identifier
rex_powershell --> rex_text
rex_random_identifier --> rex_text
rex_rop_builder --> rex_core
rex_rop_builder --> rex_text
rex_socket --> rex_core
rex_sslscan --> rex_core
rex_sslscan --> rex_socket
rex_sslscan --> rex_text
rex_zip --> rex_text
metasploit_framework --> metasploit_concern
metasploit_framework --> metasploit_credential
metasploit_framework --> metasploit_data_models
metasploit_framework --> metasploit_model
metasploit_framework -->|"= 2.0.34"| metasploit_payloads
metasploit_framework -->|"= 1.0.6"| metasploit_payloads_mettle
metasploit_framework --> rex_arch
metasploit_framework --> rex_bin_tools
metasploit_framework --> rex_core
metasploit_framework --> rex_encoder
metasploit_framework --> rex_exploitation
metasploit_framework --> rex_java
metasploit_framework --> rex_mime
metasploit_framework --> rex_nop
metasploit_framework --> rex_ole
metasploit_framework --> rex_powershell
metasploit_framework --> rex_random_identifier
metasploit_framework --> rex_registry
metasploit_framework --> rex_rop_builder
metasploit_framework --> rex_socket
metasploit_framework --> rex_sslscan
metasploit_framework --> rex_struct2
metasploit_framework --> rex_text
metasploit_framework --> rex_zip
metasploit_credential --> metasploit_concern
metasploit_credential -->|">= 5.0.0"| metasploit_data_models
metasploit_credential --> metasploit_model
metasploit_credential --> rex_socket
metasploit_data_models --> metasploit_concern
metasploit_data_models -->|">= 5.0.4"| metasploit_model
metasploit_aggregator --> rex_arch
yard_metasploit_erd --> metasploit_erdSource: rapid7/metasploit-framework