Vulnenv week8 - #9
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refering to rapid7#20506
GSoC 2026 — Week 8 deliverables for the Automated Vulnerable Environment Provisioning project.
test_env exec <ID>:cmd_test_env_exec— loads the target module by fullname (independent of currentusecontext), applies stored datastore + recommended payload, runs viadriver.run_single, reusing the console's own exploit/session-reporting path instead of reimplementing itPayload resolution:
build_resolve_environmentapplies a definition'sci.exploit.payloadat build time, overriding module defaults known to be incompatible with a given imageexecindependently re-resolves the sameci.exploitconfig, sincetarget.datastoredoesn't persist payload selectionError handling:
execvalidates environment exists and is running before acting, with specific messages per failure (not found / not running / module load failure)free_local_port) forSRVPORT/FETCH_SRVPORTeach run, eliminatingRex::BindFailedfrom stale listeners on repeated runsConfig fixes (found during testing):
LHOST: 127.0.0.1fromwordpress.yml/activemq.yml— loopback is meaningless inside the target's container namespace and silently broke every callback since the target runs inside a container network namespace, so a hardcoded 127.0.0.1 resolves to the container itself, not the host - the payload can never call back. Metasploit's own outbound-interface auto-detection (used when LHOST is left unset) correctly picks the host's real reachable IP, which is what actually works.wordpress.yml: payload →php/reverse_php(target's PHP has no OpenSSL, so Meterpreter can never complete TLV negotiation)activemq.yml: payload →cmd/linux/http/x64/meterpreter/reverse_tcp(module's FTP-variant default isn't a supported fetch protocol)Testing Result:
In another terminal: