Closed zeroSteiner closed 1 month ago
I believe this PR causes acceptance tests to fail:
https://github.com/rapid7/metasploit-framework/pull/19543
1) Meterpreter java staged java/meterpreter/reverse_tcp windows post/test/search windows/java meterpreter successfully opens a session for the "java/meterpreter/reverse_tcp" payload and passes the "post/test/search" tests
For visibility to @dledda-r7 - as I'm not sure you've seen these modules or not, but there's some docs on how to run the post module tests against sessions locally over here: https://docs.metasploit.com/docs/development/quality/loading-test-modules.html
Just a second question - was it possible to recreate the crash against a fresh env locally too? If so is it possible to extend our session tests to include this scenario to ensure the other meterpreters also work as expected? 🤞
I wasn't able to reproduce the issue locally. I can, however, now reproduce the post/test/search failures with the changes that I introduced, so I'll look at getting those fixed.
This intends to fix rapid7/metasploit-framework#19496.
File.list can return an array with null members. In this case File.listFiles will fail entirely. This updates uses to use File.list and to check for and skip null members when they occur. It's important to note that both instances with and with wildcards required separate fixes. The wildcard versions dispatch to
stdapi_fs_search
while the a simple ls without wildcards is handled bystdapi_ls_search
, both needed to be updated.Old and Broken
New and Fixed