Skip to content

Vulnenv week10 - #11

Merged
Nayeraneru merged 8 commits into
vulnenvfrom
vulnenv-week10
Aug 23, 2026
Merged

Vulnenv week10#11
Nayeraneru merged 8 commits into
vulnenvfrom
vulnenv-week10

Conversation

@Nayeraneru

@Nayeraneru Nayeraneru commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Refering to rapid7#20506
GSoC 2026 — Week 10 deliverables for the Automated Vulnerable Environment Provisioning project.

Summary
Adds exploit/multi/misc/apache_activemq_rce_cve_2023_46604 as a third reference module, proving activemq.yml works as genuine shared config across independent modules/CVEs and new environment definitions & other reference modules

Changes

  • New module: apache_activemq_rce_cve_2023_46604.rb (OpenWire deserialization RCE), patched with VulnerableEnvironment metadata.
  • activemq.yml: added 5.18.2 as a second variant (this CVE only affects 5.18.0–5.18.2, patched in 5.18.3 — incompatible with Module 1's 5.18.6). Image sourced from dinifarb/activemq after confirming the official apache/activemq-classic org doesn't publish that patch tag.
  • activemq.yml: added broker-only as a second profile (type: tcp health check against the broker port), replacing what was initially a module-level overrides.health_check. Represents a real deployment state — web console firewalled off, broker still reachable — matching the schema's own Decision Matrix guidance ("different health check type → new profile") rather than treating it as one module's quirk.
  • Module-level overrides now contains only what's genuinely module-specific: TARGET => 1, since this module's DefaultTarget is Windows (index 0), unlike every other reference module.

Duplication eliminated
Between the two ActiveMQ modules, only port_mapping, default_variant, profile, and one TARGET override differ. Image family, credentials, ci.exploit's payload recommendation, and both health-check definitions are written once and shared.

New environment definitions

  • data/vuln_envs/httpd.yml
  • data/vuln_envs/openssh.yml

New reference modules (patched with VulnerableEnvironment)

  • auxiliary/scanner/http/http_versionhttpd definition
  • auxiliary/scanner/http/http_headerhttpd definition
  • auxiliary/scanner/http/robots_txthttpd definition
  • auxiliary/scanner/ssh/ssh_versionopenssh definition

Testing Results:

msf > load test_env
[*] TestEnv plugin loaded. Runtime: podman
[*] Rootless Podman verified — pasta networking available.
[*] Successfully loaded plugin: test_env
msf > use auxiliary/scanner/ssh/ssh_version
msf auxiliary(scanner/ssh/ssh_version) > test_env build
[*] Resolving environment for auxiliary/scanner/ssh/ssh_version...
[*] Definition: openssh | Variant: 7.2 | Profile: default
[*] Image: docker.io/rastasheep/ubuntu-sshd:16.04
[*] Pulling image docker.io/rastasheep/ubuntu-sshd:16.04...
[+] Image pulled successfully.
[*] Starting container...
[+] Container started: 6a9408e45816
[*] Waiting for health check (TCP)...
[*]   Attempt 1/10...
[+] Health check passed.
[+] Environment ready.
[*] Environment ID: 1
[*]    RHOSTS       => 127.0.0.1
[*]    RPORT        => 49152
[*] Suggested: run RHOSTS=127.0.0.1 RPORT=49152
msf auxiliary(scanner/ssh/ssh_version) > test_env exec 1
[*] Using auxiliary/scanner/ssh/ssh_version...
RHOSTS => 127.0.0.1
RPORT => 49152
[*] Executing: run RHOSTS=127.0.0.1 RPORT=49152
[*] 127.0.0.1 - SSH server version: SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.4
[*] 127.0.0.1 - Server Information and Encryption
=================================

  Type                     Value                                 Note
  ----                     -----                                 ----
  encryption.compression   none
  encryption.compression   zlib@openssh.com
  encryption.encryption    chacha20-poly1305@openssh.com
  encryption.encryption    aes128-ctr
  encryption.encryption    aes192-ctr
  encryption.encryption    aes256-ctr
  encryption.encryption    aes128-gcm@openssh.com
  encryption.encryption    aes256-gcm@openssh.com
  encryption.hmac          umac-64-etm@openssh.com
  encryption.hmac          umac-128-etm@openssh.com
  encryption.hmac          hmac-sha2-256-etm@openssh.com
  encryption.hmac          hmac-sha2-512-etm@openssh.com
  encryption.hmac          hmac-sha1-etm@openssh.com
  encryption.hmac          umac-64@openssh.com
  encryption.hmac          umac-128@openssh.com
  encryption.hmac          hmac-sha2-256
  encryption.hmac          hmac-sha2-512
  encryption.hmac          hmac-sha1
  encryption.host_key      ssh-rsa
  encryption.host_key      rsa-sha2-512
  encryption.host_key      rsa-sha2-256
  encryption.host_key      ecdsa-sha2-nistp256                   Weak elliptic curve
  encryption.host_key      ssh-ed25519
  encryption.key_exchange  curve25519-sha256@libssh.org
  encryption.key_exchange  ecdh-sha2-nistp256
  encryption.key_exchange  ecdh-sha2-nistp384
  encryption.key_exchange  ecdh-sha2-nistp521
  encryption.key_exchange  diffie-hellman-group-exchange-sha256
  encryption.key_exchange  diffie-hellman-group14-sha1
  fingerprint_db           ssh.banner
  openssh.comment          Ubuntu-4ubuntu2.4
  os.cpe23                 cpe:/o:canonical:ubuntu_linux:16.04
  os.family                Linux
  os.product               Linux
  os.vendor                Ubuntu
  os.version               16.04
  service.cpe23            cpe:/a:openbsd:openssh:7.2p2
  service.family           OpenSSH
  service.product          OpenSSH
  service.protocol         ssh
  service.vendor           OpenBSD
  service.version          7.2p2

[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf auxiliary(scanner/http/http_version) > test_env build
[*] Resolving environment for auxiliary/scanner/http/http_version...
[*] Definition: httpd | Variant: 2.4.57 | Profile: default
[*] Image: docker.io/library/httpd:2.4.57
[*] Pulling image docker.io/library/httpd:2.4.57...
[+] Image pulled successfully.
[*] Starting container...
[+] Container started: 97b73176b0dd
[*] Waiting for health check (HTTP)...
[*]   Attempt 1/10...
[+] Health check passed.
[+] Environment ready.
[*] Environment ID: 2
[*]    RHOSTS       => 127.0.0.1
[*]    RPORT        => 49153
[*] Suggested: run RHOSTS=127.0.0.1 RPORT=49153
msf auxiliary(scanner/http/http_version) > test_env exec 2
[*] Using auxiliary/scanner/http/http_version...
RHOSTS => 127.0.0.1
RPORT => 49153
[*] Executing: run RHOSTS=127.0.0.1 RPORT=49153
[+] 127.0.0.1:49153 Apache/2.4.57 (Unix)
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf auxiliary(scanner/http/http_header) > test_env build
[*] Resolving environment for auxiliary/scanner/http/http_header...
[*] Definition: httpd | Variant: 2.4.57 | Profile: default
[*] Image: docker.io/library/httpd:2.4.57
[*] Pulling image docker.io/library/httpd:2.4.57...
[+] Image pulled successfully.
[*] Starting container...
[+] Container started: 5303ab574a48
[*] Waiting for health check (HTTP)...
[*]   Attempt 1/10...
[+] Health check passed.
[+] Environment ready.
[*] Environment ID: 3
[*]    RHOSTS       => 127.0.0.1
[*]    RPORT        => 49154
[*] Suggested: run RHOSTS=127.0.0.1 RPORT=49154
msf auxiliary(scanner/http/http_header) > test_env exec 3
[*] Using auxiliary/scanner/http/http_header...
RHOSTS => 127.0.0.1
RPORT => 49154
[*] Executing: run RHOSTS=127.0.0.1 RPORT=49154
[+] 127.0.0.1:49154      : CONTENT-TYPE: text/html
[+] 127.0.0.1:49154      : LAST-MODIFIED: Mon, 11 Jun 2007 18:53:14 GMT
[+] 127.0.0.1:49154      : SERVER: Apache/2.4.57 (Unix)
[+] 127.0.0.1:49154      : detected 3 headers
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed

@Nayeraneru Nayeraneru changed the title Demonstration of 2 modules across one shared definition file Vulnenv week10 Aug 16, 2026
@h00die

h00die commented Aug 17, 2026

Copy link
Copy Markdown

relatively easy week :)

@Nayeraneru

Nayeraneru commented Aug 17, 2026

Copy link
Copy Markdown
Owner Author

relatively easy week :)

yup, done most of it in the earlier weeks😃

@h00die

h00die commented Aug 19, 2026

Copy link
Copy Markdown

Do you have instructions to test the new http modules? Just want this PR to be self contained (as opposed to looking back at previous weeks)

Comment thread plugins/test_env.rb Outdated
%w[SRVPORT FETCH_SRVPORT].each do |opt|
free_port = free_local_port
driver.run_single("set #{opt} #{free_port}")
if mod.type != 'auxiliary'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious about the guard here. FETCH_SRVPORT would, I'm pretty sure, always be a payload option that could be added to an exploit if the exploit is using a fetch payload. The FETCH_SRVPORT option should be independent of the target though since it's the port we're listening on. I guess in theory there could be an instance where we don't control the SRVPORT that the target sends credentials to or something that may not match a listening service.

There's a fair number of auxiliary modules that will need to listen on a particular port though to say collect credentials, e.g. modules/auxiliary/server/capture/*

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, right.
I dropped the if mod.type != 'auxiliary' guard entirely. now it just checks mod.options.include?(opt) for both SRVPORT and FETCH_SRVPORT, so capture server aux modules get a fresh port too, and fetch-payload exploits still get FETCH_SRVPORT when they need it

@Nayeraneru
Nayeraneru merged commit 2785de1 into vulnenv Aug 23, 2026
82 of 84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants