Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions .github/workflows/shared_meterpreter_acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ jobs:
- name: Checkout metasploit-payloads
uses: actions/checkout@v4
with:
repository: rapid7/metasploit-payloads
repository: zeroSteiner/metasploit-payloads
path: metasploit-payloads
ref: ${{ inputs.metasploit_payloads_commit }}
ref: fix/met/php-udp-sockets-2

- name: Build Meterpreter payloads
run: |
Expand All @@ -67,7 +67,7 @@ jobs:
fail-fast: false
matrix:
os:
- macos-13
- macos-15
- windows-2022
- ubuntu-latest
ruby:
Expand All @@ -78,11 +78,10 @@ jobs:
- { name: python, runtime_version: 3.11 }

# Java
- { name: java, runtime_version: 8 }
- { name: java, runtime_version: 11 }
- { name: java, runtime_version: 21 }

# PHP
- { name: php, runtime_version: 5.3 }
- { name: php, runtime_version: 7.4 }
- { name: php, runtime_version: 8.3 }
include:
Expand All @@ -92,7 +91,7 @@ jobs:
# - { meterpreter: { name: windows_meterpreter }, ruby: '3.4', os: windows-2025 }

# Mettle
- { meterpreter: { name: mettle }, os: macos-13 }
- { meterpreter: { name: mettle }, os: macos-15 }
- { meterpreter: { name: mettle }, os: ubuntu-latest }

runs-on: ${{ matrix.os }}
Expand All @@ -112,19 +111,20 @@ jobs:
if: runner.os == 'Linux'
run: sudo apt-get -y --no-install-recommends install libpcap-dev graphviz

- uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231
- uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1
if: ${{ matrix.meterpreter.name == 'php' }}
with:
php-version: ${{ matrix.meterpreter.runtime_version }}
tools: none
extensions: sockets

- name: Set up Python
if: ${{ matrix.meterpreter.name == 'python' }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.meterpreter.runtime_version }}

- uses: actions/setup-java@v4
- uses: actions/setup-java@v5
if: ${{ matrix.meterpreter.name == 'java' }}
with:
distribution: temurin
Expand Down Expand Up @@ -192,10 +192,14 @@ jobs:
ref: ${{ inputs.metasploit_framework_commit }}

# https://github.com/orgs/community/discussions/26952
- name: Support longpaths
- name: Support longpaths when running on Windows
if: runner.os == 'Windows'
run: git config --system core.longpaths true

- name: Install PostgreSQL client libraries when running on MacOS
if: runner.os == 'macos'
run: brew install postgresql

- name: Setup Ruby
env:
# Introduces flakiness when downloading zlib etc: https://github.com/sparklemotion/nokogiri/issues/3521
Expand Down Expand Up @@ -255,9 +259,9 @@ jobs:
if: ${{ inputs.build_metasploit_payloads && matrix.meterpreter.name != 'mettle' }}
uses: actions/checkout@v4
with:
repository: rapid7/metasploit-payloads
repository: zeroSteiner/metasploit-payloads
path: metasploit-payloads
ref: ${{ inputs.metasploit_payloads_commit }}
ref: fix/met/php-udp-sockets-2

- name: Build Windows payloads via Visual Studio 2019 Build (Windows)
shell: cmd
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ PATH
metasploit-concern
metasploit-credential
metasploit-model
metasploit-payloads (= 2.0.237)
metasploit-payloads (= 2.0.238)
metasploit_data_models (>= 6.0.7)
metasploit_payloads-mettle (= 1.0.45)
mqtt
Expand Down Expand Up @@ -352,7 +352,7 @@ GEM
drb
mutex_m
railties (~> 7.0)
metasploit-payloads (2.0.237)
metasploit-payloads (2.0.238)
metasploit_data_models (6.0.9)
activerecord (~> 7.0)
activesupport (~> 7.0)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE_GEMS
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ metasploit-concern, 5.0.5, "New BSD"
metasploit-credential, 6.0.19, "New BSD"
metasploit-framework, 6.4.101, "New BSD"
metasploit-model, 5.0.4, "New BSD"
metasploit-payloads, 2.0.237, "3-clause (or ""modified"") BSD"
metasploit-payloads, 2.0.238, "3-clause (or ""modified"") BSD"
metasploit_data_models, 6.0.9, "New BSD"
metasploit_payloads-mettle, 1.0.45, "3-clause (or ""modified"") BSD"
method_source, 1.1.0, MIT
Expand Down
4 changes: 2 additions & 2 deletions lib/rex/post/meterpreter/extensions/stdapi/railgun/library.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def build_packet_and_layouts(packet, function, args, arch)
when ARCH_X86
native = 'V'
else
raise NotImplementedError, 'Unsupported architecture (must be ARCH_X86 or ARCH_X64)'
raise NotImplementedError, 'Unsupported architecture for railgun (must be ARCH_X86 or ARCH_X64)'
end

# We transmit the immediate stack and three heap-buffers:
Expand Down Expand Up @@ -285,7 +285,7 @@ def build_response(packet, function, layouts, client)
when ARCH_X86
native = 'V'
else
raise NotImplementedError, 'Unsupported architecture (must be ARCH_X86 or ARCH_X64)'
raise NotImplementedError, 'Unsupported architecture for railgun (must be ARCH_X86 or ARCH_X64)'
end

rec_inout_buffers = packet.get_tlv_value(TLV_TYPE_RAILGUN_BACK_BUFFERBLOB_INOUT)
Expand Down
2 changes: 1 addition & 1 deletion metasploit-framework.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Gem::Specification.new do |spec|
# are needed when there's no database
spec.add_runtime_dependency 'metasploit-model'
# Needed for Meterpreter
spec.add_runtime_dependency 'metasploit-payloads', '2.0.237'
spec.add_runtime_dependency 'metasploit-payloads', '2.0.238'
# Needed for the next-generation POSIX Meterpreter
spec.add_runtime_dependency 'metasploit_payloads-mettle', '1.0.45'
# Needed by msfgui and other rpc components
Expand Down
116 changes: 0 additions & 116 deletions spec/support/acceptance/session/php.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,48 +18,6 @@ module Acceptance::Session
}
],
module_tests: [
{
name: "post/test/services",
platforms: [
[
:linux,
{
skip: true,
reason: "Windows only test"
}
],
[
:osx,
{
skip: true,
reason: "Windows only test"
}
],
[
:windows,
{
skip: [
:meterpreter_runtime_version,
:==,
"php5.3"
],
reason: "Skip PHP 5.3 as the tests timeout - due to cmd_exec taking 15 seconds for each call. Caused by failure to detect feof correctly - https://github.com/rapid7/metasploit-payloads/blame/c7f7bc2fc0b86e17c3bc078149c71745c5e478b3/php/meterpreter/meterpreter.php#L1127-L1145"
}
]
],
skipped: false,
lines: {
linux: {
known_failures: []
},
osx: {
known_failures: []
},
windows: {
known_failures: []
}
}
},
{
name: "post/test/cmd_exec",
platforms: [:linux, :osx, :windows],
Expand Down Expand Up @@ -151,80 +109,6 @@ module Acceptance::Session
}
}
},
{
name: "post/test/railgun",
platforms: [:linux, :osx, :windows],
skipped: false,
lines: {
linux: {
known_failures: []
},
osx: {
known_failures: []
},
windows: {
known_failures: []
}
}
},
{
name: "post/test/railgun_reverse_lookups",
platforms: [:linux, :osx, :windows],
skipped: false,
lines: {
linux: {
known_failures: []
},
osx: {
known_failures: []
},
windows: {
known_failures: []
}
}
},
{
name: "post/test/registry",
platforms: [
[
:linux,
{
skip: true,
reason: "Windows only test"
}
],
[
:osx,
{
skip: true,
reason: "Windows only test"
}
],
[
:windows,
{
skip: [
:meterpreter_runtime_version,
:==,
"php5.3"
],
reason: "Skip PHP 5.3 as the tests timeout - due to cmd_exec taking 15 seconds for each call. Caused by failure to detect feof correctly - https://github.com/rapid7/metasploit-payloads/blame/c7f7bc2fc0b86e17c3bc078149c71745c5e478b3/php/meterpreter/meterpreter.php#L1127-L1145"
}
]
],
skipped: false,
lines: {
linux: {
known_failures: []
},
osx: {
known_failures: []
},
windows: {
known_failures: []
}
}
},
{
name: "post/test/search",
platforms: [:linux, :osx, :windows],
Expand Down
26 changes: 22 additions & 4 deletions spec/support/acceptance/session/python.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,17 @@ module Acceptance::Session
},
{
name: "post/test/railgun",
platforms: [:linux, :osx, :windows],
platforms: [
:linux,
[
:osx,
{
skip: true,
reason: "Unavailable on macOS ARM runners"
}
],
:windows
],
skipped: false,
lines: {
linux: {
Expand All @@ -197,9 +207,17 @@ module Acceptance::Session
linux: {
known_failures: []
},
osx: {
known_failures: []
},
platforms: [
:linux,
[
:osx,
{
skip: true,
reason: "Unavailable on macOS ARM runners"
}
],
:windows
],
windows: {
known_failures: []
}
Expand Down
Loading