0

I am using metasploit to exploit a vulnerable version of Samba on a remote host. Samba version 2.2.8, downloaded directly from the cve site.

But when I use trans2open exploit with payload (generic/shell_reverse_tcp) I get the following error:

Exploit failed [no-access]: Rex::Proto::SMB::Exceptions::LoginError Login Failed: undefined local variable or method `args' for #<Rex::Proto::SMB::Client:0x000055d1b5205828>
[*] Exploit completed, but no session was created.

This is how my variables are set:

show options

I am running two virtual machines on AWS. One with kali linux and the other is the one with samba. And yes all firewalls are disabled.

  • The error appears to be a local error with the args you set in metasploit. – schroeder Aug 22 '18 at 15:26
  • I just did exactly the same as the tutorial videos I saw... do you have any idea what arg it could be? – user8955046 Aug 22 '18 at 16:16
  • I edited the question with a picture showing details – user8955046 Aug 22 '18 at 18:00
1

This is an issue for all "older" samba exploits, e.g. lsa_transnames_heap, chain_reply and trans2open. It always gives the error "undefined local variable or method 'args'"

I just found the solution for this:

If you have/want to fix this manually, you have to go to the library file of the smb-client (/usr/share/metasploit-framework/lib/rex/proto/smb/client.rb)

There you have to change line 657 from return session_setup_clear(*args) to return session_setup_clear(user, pass, domain) and it should work again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.