Add support for localhost at NetworkHost

This commit is contained in:
Brendan Coles
2015-02-03 17:40:11 +00:00
parent c28d53aa41
commit c69b6412e0
2 changed files with 161 additions and 2 deletions

View File

@@ -351,6 +351,12 @@ module BeEF
# log a few info of newly hooked zombie in the console
print_info "New Hooked Browser [id:#{zombie.id}, ip:#{zombie.ip}, type:#{browser_name}-#{browser_version}, os:#{os_name}], hooked domain [#{log_zombie_domain}:#{log_zombie_port.to_s}]"
# add localhost as network host
if config.get('beef.extension.network.enable')
print_debug("Hooked browser has network interface 127.0.0.1")
r = BeEF::Core::Models::NetworkHost.new(:hooked_browser_id => session_id, :ip => '127.0.0.1', :hostname => 'localhost', :os => BeEF::Core::Models::BrowserDetails.get(session_id, 'OsName'), :cid => 'init')
r.save
end
# Call autorun modules
if config.get('beef.autorun.enable')