-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Adds support for resolving multiple host ips #18499
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
Adds support for resolving multiple host ips #18499
Conversation
|
It'd be good to update the test notes to verify that an ipv6 target works as expected |
|
Will attic for now until we can pick this up again in the new year when we've got the other priorities out for this year 👍 |
|
Thanks for your contribution to Metasploit Framework! We've looked at this pull request, and we agree that it seems like a good addition to Metasploit, but it looks like it is not quite ready to land. We've labeled it What does this generally mean? It could be one or more of several things:
We would love to land this pull request when it's ready. If you have a chance to address all comments, we would be happy to reopen and discuss how to merge this! |
22529d6 to
5a005b2
Compare
fc42a9e to
5379488
Compare
f89ae86 to
02b2435
Compare
|
If we throw in this code to enhance the diff --git a/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/net.rb b/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/net.rb
index 01818ae2d7..573fc2f8cf 100644
--- a/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/net.rb
+++ b/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/net.rb
@@ -654,10 +654,13 @@ class Console::CommandDispatcher::Stdapi::Net
)
response.each do |result|
- if result[:ip].nil?
+ if result[:ips].empty?
table << [result[:hostname], '[Failed To Resolve]']
else
- table << [result[:hostname], result[:ip]]
+ require 'pry-byebug'; binding.pry
+ result[:ips].each do |ip|
+ table << [result[:hostname], ip]
+ end
end
endUsage: |
02b2435 to
9bad611
Compare
|
It'd be great to rebase against master, and have a run through of the test suite pointing towards your payload PR(s) since the test suite is failing |
|
I'm not sure if it's your PR or not, but looks like it fails against unresolved hosts with a python exception which I don't think is expected Whilst with php: |
94dadf4 to
3b5cee1
Compare
29d2362 to
35f35cc
Compare
b3a596a to
726ed8c
Compare
726ed8c to
252ddc2
Compare
|
Attic'ing this again; Everything appeared to be working other than failing OSX support and some extra verification on Python - comment above, some of the language runtimes seem to inconsistently handle ipv6. If this gets revived again in the future, we'll want to spend the cycles on that 👍 |
|
Thanks for your contribution to Metasploit Framework! We've looked at this pull request, and we agree that it seems like a good addition to Metasploit, but it looks like it is not quite ready to land. We've labeled it What does this generally mean? It could be one or more of several things:
We would love to land this pull request when it's ready. If you have a chance to address all comments, we would be happy to reopen and discuss how to merge this! |
Note
Ensure the following PR has been landed before landing this one. This PR will also require a rebase before landing.
Remove hardcoded branches and repos before merging.
This PR is in conjunction with a PR in metasploit-payloads.
This PR updates the
resolve_hostandresolve_hoststo now support resolving multiple host IPs.The changes support backwards compatibility for old Meterpreter sessions by checking for TLV types off
TLV_TYPE_IPthat follows the existing logic, as well as the newTLV_TYPE_RESOLVE_HOST_ENTRYTLV.Verification
Needs to be tested in tandem with the metasploit-payloads PR.
resolve_host
msfconsoleuse php/meterpreter/reverse_tcpirb -e "framework.sessions.values.last.net.resolve.resolve_host 'rapid7.com'"resolve_hosts
msfconsoleuse php/meterpreter/reverse_tcpirb -e "framework.sessions.values.last.net.resolve.resolve_hosts ['rapid7.com', 'google.com']"