Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #4132 - msfvenom undefined method fullname for NilClass #4161

Merged
merged 1 commit into from
Nov 10, 2014

Conversation

wchen-r7
Copy link
Contributor

@wchen-r7 wchen-r7 commented Nov 9, 2014

See #4132

The bug is caused by a bad payload name.

  • To verify: without the patch, if you do the following, you will get the undef method error:
./msfvenom -p payload/python/meterpreter/reverse_tcp -o LHOST=192.168.130.1 -f raw
  • With the patch, it should say invalid payload.
  • Now, try with a valid payload name: ./msfvenom -p python/meterpreter/reverse_tcp -o LHOST=192.168.130.1 -f raw
  • It should show you the payload options this time.

@wchen-r7 wchen-r7 added the bug label Nov 9, 2014
@wvu wvu self-assigned this Nov 9, 2014
@kernelsmith
Copy link
Contributor

So in your second example, there should be no payload right?

@wchen-r7
Copy link
Contributor Author

Yeah, never begin w/ "payload" Copy and paste fail.

@wvu
Copy link
Contributor

wvu commented Nov 10, 2014

I was gonna ask about that, but I guess @kernelsmith did! I tested without the "payload," anyway. However, I'm running into a separate bug:

wvu@kharak:~/metasploit-framework:(detached from upstream/pr/4161)$ ./msfvenom -p python/meterpreter/reverse_tcp -o LHOST=192.168.130.1 -f raw 
/home/wvu/metasploit-framework/lib/rex/text.rb:1400:in `compress': undefined method `gsub' for #<Array:0x000000055eae98> (NoMethodError)
        from /home/wvu/metasploit-framework/lib/msf/base/serializer/readable_text.rb:340:in `dump_payload_module'
        from /home/wvu/metasploit-framework/lib/msf/base/serializer/readable_text.rb:24:in `dump_module'
        from ./msfvenom:292:in `<main>'
wvu@kharak:~/metasploit-framework:(detached from upstream/pr/4161)$ 

Near as I can tell, the description is a string, not an array...

wvu added a commit that referenced this pull request Nov 10, 2014
@wvu
Copy link
Contributor

wvu commented Nov 10, 2014

Doh! I merged #4160 and accidentally tagged it as #4161, which is this PR. Please see 0e772cc#commitcomment-8495600. Thanks!

@wchen-r7
Copy link
Contributor Author

@wvu-r7 I'm not seeing what you're seeing:

aus-mac-1039:msf wchen$ git checkout upstream/pr/4161
HEAD is now at 7980a70... Fix #4132 - msfvenom undefined method fullname for NilClass
aus-mac-1039:msf wchen$ ./msfvenom -p python/meterpreter/reverse_tcp -o LHOST=192.168.130.1 -f raw 
Options for payload/python/meterpreter/reverse_tcp


       Name: Python Meterpreter, Python Reverse TCP Stager
     Module: payload/python/meterpreter/reverse_tcp
   Platform: Python
       Arch: python
Needs Admin: No
 Total size: 342
       Rank: Normal

Provided by:
    Spencer McIntyre

Basic options:
Name   Current Setting  Required  Description
----   ---------------  --------  -----------
LHOST                   yes       The listen address
LPORT  4444             yes       The listen port

Description:
  Run a meterpreter server in Python. Supported Python versions are 
  2.5 - 2.7 and 3.1 - 3.4. . Connect back to the attacker


aus-mac-1039:msf wchen$

@wvu
Copy link
Contributor

wvu commented Nov 10, 2014

@wchen-r7: Ruby 2.1.4?

@wchen-r7
Copy link
Contributor Author

1.9.3.

@wvu
Copy link
Contributor

wvu commented Nov 10, 2014

I'm on 2.1.4. That might be it.

@wvu
Copy link
Contributor

wvu commented Nov 10, 2014

Works on 1.9.3. Merging.

wvu added a commit to wvu/metasploit-framework that referenced this pull request Nov 10, 2014
@wvu wvu merged commit 7980a70 into rapid7:master Nov 10, 2014
@wchen-r7
Copy link
Contributor Author

Oh boy, that breakage with 2.1.4 looks like something new. In 1.9.3 the description is a string, in 2.1.4 the description is an array that contains the string (description). I'll file another issue for this. Nice catch @wvu-r7

@wvu
Copy link
Contributor

wvu commented Nov 10, 2014

Yeah, as far as I can tell, it's unrelated to this fix, so it looks like a new issue is in order.

@wchen-r7
Copy link
Contributor Author

Filed that one as: #4163

@wchen-r7 wchen-r7 deleted the fix_4132 branch August 22, 2016 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants