-
Notifications
You must be signed in to change notification settings - Fork 675
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 support for ipconfig
in php meterpreter
#720
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't working for me. It seems to be complaining about net_get_interfaces
.
Evaling stdapi
PHP Fatal error: Uncaught Error: Undefined constant "net_get_interfaces" in /tmp/meterpreter.php(1) : eval()'d code(530) : eval()'d code:1272
Stack trace:
#0 /tmp/meterpreter.php(1) : eval()'d code(530): eval()
#1 /tmp/meterpreter.php(1) : eval()'d code(945): core_loadlib()
#2 /tmp/meterpreter.php(1) : eval()'d code(1525): create_response()
#3 /tmp/meterpreter.php(1): eval()
#4 {main}
thrown in /tmp/meterpreter.php(1) : eval()'d code(530) : eval()'d code on line 1272
Oops, fixed in a7a10d6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still isn't working for me. Can you please test it and post the output of a successful run? Even after making the change I suggested to rename the function, I'm getting a stack trace on the Metasploit side.
meterpreter > ipconfig
[-] Error while running command ipconfig: undefined method `each_byte' for nil:NilClass
Call stack:
/home/smcintyre/Repositories/metasploit-framework/lib/rex/post/meterpreter/extensions/stdapi/net/interface.rb:46:in `pretty'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/net.rb:231:in `block in cmd_ipconfig'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/net.rb:230:in `each'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/net.rb:230:in `cmd_ipconfig'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:582:in `run_command'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/post/meterpreter/ui/console.rb:102:in `run_command'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:531:in `block in run_single'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:525:in `each'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:525:in `run_single'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/post/meterpreter/ui/console.rb:64:in `block in interact'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/ui/text/shell.rb:160:in `block in run'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/ui/text/shell.rb:309:in `block in with_history_manager_context'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/ui/text/shell/history_manager.rb:35:in `with_context'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/ui/text/shell.rb:306:in `with_history_manager_context'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/ui/text/shell.rb:133:in `run'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/post/meterpreter/ui/console.rb:62:in `interact'
/home/smcintyre/Repositories/metasploit-framework/lib/msf/base/sessions/meterpreter.rb:582:in `_interact'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/ui/interactive.rb:53:in `interact'
/home/smcintyre/Repositories/metasploit-framework/lib/msf/ui/console/command_dispatcher/core.rb:1749:in `cmd_sessions'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:582:in `run_command'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:531:in `block in run_single'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:525:in `each'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:525:in `run_single'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/ui/text/shell.rb:165:in `block in run'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/ui/text/shell.rb:309:in `block in with_history_manager_context'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/ui/text/shell/history_manager.rb:35:in `with_context'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/ui/text/shell.rb:306:in `with_history_manager_context'
/home/smcintyre/Repositories/metasploit-framework/lib/rex/ui/text/shell.rb:133:in `run'
/home/smcintyre/Repositories/metasploit-framework/lib/metasploit/framework/command/console.rb:54:in `start'
/home/smcintyre/Repositories/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
./msfconsole:23:in `<main>'
meterpreter >
if (is_callable('net_get_interfaces')) { | ||
register_command('stdapi_net_config_get_interfaces', COMMAND_ID_STDAPI_NET_CONFIG_GET_INTERFACES); | ||
} | ||
function stdapi_net_config_get_arp_interfaces($req, &$pkt) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be: stdapi_net_config_get_interfaces
No description provided.