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

add reverse_tcp handler to fix bug in latest update #7399

Merged
merged 1 commit into from Oct 4, 2016
Merged

add reverse_tcp handler to fix bug in latest update #7399

merged 1 commit into from Oct 4, 2016

Conversation

tkisason
Copy link
Contributor

@tkisason tkisason commented Oct 4, 2016

Verification

List the steps needed to make sure this thing works

  • Start msfconsole
  • Verify the thing does not do what it should not

The payload was missing require 'msf/core/handler/reverse_tcp', latest update pulled with msfupdate broke the startup of the framework, where you got this kind of an error:

!master ~/4tools/metasploit-framework> msfconsole
/home/tony/4tools/metasploit-framework/modules/payloads/singles/android/meterpreter_reverse_tcp.rb:28:in initialize': uninitialized constant Msf::Handler::ReverseTcp (NameError) from /home/tony/4tools/metasploit-framework/lib/msf/core/payload_set.rb:198:innew'
from /home/tony/4tools/metasploit-framework/lib/msf/core/payload_set.rb:198:in add_module' from /home/tony/4tools/metasploit-framework/lib/msf/core/module_manager/loading.rb:71:inon_module_load'
from /home/tony/4tools/metasploit-framework/lib/msf/core/modules/loader/base.rb:182:in load_module' from /home/tony/4tools/metasploit-framework/lib/msf/core/modules/loader/base.rb:237:inblock in load_modules'
from /home/tony/4tools/metasploit-framework/lib/msf/core/modules/loader/directory.rb:55:in block (2 levels) in each_module_reference_name' from /var/lib/gems/2.3.0/gems/rex-core-0.1.2/lib/rex/file.rb:127:inblock in find'
from /var/lib/gems/2.3.0/gems/rex-core-0.1.2/lib/rex/file.rb:126:in catch' from /var/lib/gems/2.3.0/gems/rex-core-0.1.2/lib/rex/file.rb:126:infind'
from /home/tony/4tools/metasploit-framework/lib/msf/core/modules/loader/directory.rb:46:in block in each_module_reference_name' from /home/tony/4tools/metasploit-framework/lib/msf/core/modules/loader/directory.rb:34:inforeach'
from /home/tony/4tools/metasploit-framework/lib/msf/core/modules/loader/directory.rb:34:in each_module_reference_name' from /home/tony/4tools/metasploit-framework/lib/msf/core/modules/loader/base.rb:236:inload_modules'
from /home/tony/4tools/metasploit-framework/lib/msf/core/module_manager/loading.rb:117:in block in load_modules' from /home/tony/4tools/metasploit-framework/lib/msf/core/module_manager/loading.rb:115:ineach'
from /home/tony/4tools/metasploit-framework/lib/msf/core/module_manager/loading.rb:115:in load_modules' from /home/tony/4tools/metasploit-framework/lib/msf/core/module_manager/module_paths.rb:41:inblock in add_module_path'
from /home/tony/4tools/metasploit-framework/lib/msf/core/module_manager/module_paths.rb:40:in each' from /home/tony/4tools/metasploit-framework/lib/msf/core/module_manager/module_paths.rb:40:inadd_module_path'
from /home/tony/4tools/metasploit-framework/lib/msf/base/simple/framework/module_paths.rb:50:in block in init_module_paths' from /home/tony/4tools/metasploit-framework/lib/msf/base/simple/framework/module_paths.rb:49:ineach'
from /home/tony/4tools/metasploit-framework/lib/msf/base/simple/framework/module_paths.rb:49:in init_module_paths' from /home/tony/4tools/metasploit-framework/lib/msf/ui/console/driver.rb:204:ininitialize'
from /home/tony/4tools/metasploit-framework/lib/metasploit/framework/command/console.rb:62:in new' from /home/tony/4tools/metasploit-framework/lib/metasploit/framework/command/console.rb:62:indriver'
from /home/tony/4tools/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in start' from /home/tony/4tools/metasploit-framework/lib/metasploit/framework/command/base.rb:82:instart'
from /home/tony/4tools/metasploit-framework/msfconsole:48:in `

'

The payload was missing require 'msf/core/handler/reverse_tcp', latest update pulled with msfupdate broke the startup of the framework, where you got this kind of an error:

!master ~/4tools/metasploit-framework> msfconsole 
/home/tony/4tools/metasploit-framework/modules/payloads/singles/android/meterpreter_reverse_tcp.rb:28:in `initialize': uninitialized constant Msf::Handler::ReverseTcp (NameError)
	from /home/tony/4tools/metasploit-framework/lib/msf/core/payload_set.rb:198:in `new'
	from /home/tony/4tools/metasploit-framework/lib/msf/core/payload_set.rb:198:in `add_module'
	from /home/tony/4tools/metasploit-framework/lib/msf/core/module_manager/loading.rb:71:in `on_module_load'
	from /home/tony/4tools/metasploit-framework/lib/msf/core/modules/loader/base.rb:182:in `load_module'
	from /home/tony/4tools/metasploit-framework/lib/msf/core/modules/loader/base.rb:237:in `block in load_modules'
	from /home/tony/4tools/metasploit-framework/lib/msf/core/modules/loader/directory.rb:55:in `block (2 levels) in each_module_reference_name'
	from /var/lib/gems/2.3.0/gems/rex-core-0.1.2/lib/rex/file.rb:127:in `block in find'
	from /var/lib/gems/2.3.0/gems/rex-core-0.1.2/lib/rex/file.rb:126:in `catch'
	from /var/lib/gems/2.3.0/gems/rex-core-0.1.2/lib/rex/file.rb:126:in `find'
	from /home/tony/4tools/metasploit-framework/lib/msf/core/modules/loader/directory.rb:46:in `block in each_module_reference_name'
	from /home/tony/4tools/metasploit-framework/lib/msf/core/modules/loader/directory.rb:34:in `foreach'
	from /home/tony/4tools/metasploit-framework/lib/msf/core/modules/loader/directory.rb:34:in `each_module_reference_name'
	from /home/tony/4tools/metasploit-framework/lib/msf/core/modules/loader/base.rb:236:in `load_modules'
	from /home/tony/4tools/metasploit-framework/lib/msf/core/module_manager/loading.rb:117:in `block in load_modules'
	from /home/tony/4tools/metasploit-framework/lib/msf/core/module_manager/loading.rb:115:in `each'
	from /home/tony/4tools/metasploit-framework/lib/msf/core/module_manager/loading.rb:115:in `load_modules'
	from /home/tony/4tools/metasploit-framework/lib/msf/core/module_manager/module_paths.rb:41:in `block in add_module_path'
	from /home/tony/4tools/metasploit-framework/lib/msf/core/module_manager/module_paths.rb:40:in `each'
	from /home/tony/4tools/metasploit-framework/lib/msf/core/module_manager/module_paths.rb:40:in `add_module_path'
	from /home/tony/4tools/metasploit-framework/lib/msf/base/simple/framework/module_paths.rb:50:in `block in init_module_paths'
	from /home/tony/4tools/metasploit-framework/lib/msf/base/simple/framework/module_paths.rb:49:in `each'
	from /home/tony/4tools/metasploit-framework/lib/msf/base/simple/framework/module_paths.rb:49:in `init_module_paths'
	from /home/tony/4tools/metasploit-framework/lib/msf/ui/console/driver.rb:204:in `initialize'
	from /home/tony/4tools/metasploit-framework/lib/metasploit/framework/command/console.rb:62:in `new'
	from /home/tony/4tools/metasploit-framework/lib/metasploit/framework/command/console.rb:62:in `driver'
	from /home/tony/4tools/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in `start'
	from /home/tony/4tools/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
	from /home/tony/4tools/metasploit-framework/msfconsole:48:in `<main>'
@bcook-r7 bcook-r7 merged commit 691a250 into rapid7:master Oct 4, 2016
bcook-r7 pushed a commit that referenced this pull request Oct 4, 2016
@bcook-r7 bcook-r7 self-assigned this Oct 4, 2016
@tkisason
Copy link
Contributor Author

tkisason commented Oct 4, 2016

Thanks 👍 :)

@bcook-r7
Copy link
Contributor

bcook-r7 commented Oct 4, 2016

Thanks @tkisason! Due to the random order that modules can load, these do crop up occasionally. Not everyone is affected due to sort order on disk, OS, etc.

@jmartin-r7 @darkbushido something good to resurrect is the test project that loads every module (including payloads) 1-by-1 to find implicit load order dependencies between modules.

@tdoan-r7
Copy link
Contributor

tdoan-r7 commented Oct 4, 2016

Release Notes

This fix resolves an issue with a missing require, 'msf/core/handler/reverse_tcp', in the Android Meterpreter reverse TCP payload, which caused an error when you tried to start up msfconsole.

@tdoan-r7 tdoan-r7 added bug rn-fix release notes fix labels Oct 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug rn-fix release notes fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants