msf exploit(freesshd_authbypass) > exploit
[] Started reverse TCP handler on 192.168.1.104:4444
[] 192.168.1.103:45 - Trying username 'user'
[] 192.168.1.103:45 - Uploading payload, this may take several minutes...
[-] 192.168.1.103:45 - Exploit failed: Errno::ENOENT No such file or directory @ rb_sysopen - /usr/share/metasploit-framework/data/exploits/cmdstager/vbs_b64
[] Exploit completed, but no session was created.
Should have attempted to open a meterpreter shell with the target
Returns error: Exploit failed: Errno::ENOENT No such file or directory @ rb_sysopen - /usr/share/metasploit-framework/data/exploits/cmdstager/vbs_b64
Kali Linux Rolling
Framework: 4.14.1-dev
Console : 4.14.1-dev
I'm able to reproduce, definitely looks like the decoder file isn't being generated as-expected.
It appears that the module is failing to correctly locate vbs_b64 because it's not using the Exploit::CmdStager mixin, which knows that this file no longer lives in MSF's data/exploits/cmdstager/ directory but rather in the rex-exploitation gem.
I need to drop off for a bit, but I'll have a small PR when I get back if you're available to test that it works, @pentesterd...
I should be available to test it in about 7 hours :-) Hitting the bed now. You can post instructions. I'll test it when I am back up.
Hey @pentesterd, I'd be interested if the following steps work for you:
mkdir -p /root/.msf4/modules/exploits/windows/sshcurl https://raw.githubusercontent.com/pbarry-r7/metasploit-framework/4e32c80e8ed9c5714a5fcb2f7bc4a237d155fa86/modules/exploits/windows/ssh/freesshd_authbypass.rb > /root/.msf4/modules/exploits/windows/ssh/freesshd_authbypass.rbThx!
@pbarry-r7 Tested this and can confirm that this works
@pentesterd: Please see #8095. Thanks!
Appreciate the feedback, @pentesterd. That module ended up needing a few more changes than what I had made, and I just merged in some updates from @wvu-r7 if you'd be interested/willing to try them out. Would be the same steps as I gave above, with a slight change to the second step:
curl https://raw.githubusercontent.com/pbarry-r7/metasploit-framework/bc9aa141531cc5ea8f9d4d496d39df262456c33e/modules/exploits/windows/ssh/freesshd_authbypass.rb > /root/.msf4/modules/exploits/windows/ssh/freesshd_authbypass.rbThx!
@pbarry-r7 Tried the revised module. Works as expected.
Thanks, @pentesterd. The fix has been merged into master.
Most helpful comment
Thanks, @pentesterd. The fix has been merged into
master.