This commit is contained in:
25
arerules/enabled/lan_port_scan.json
Normal file
25
arerules/enabled/lan_port_scan.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{"name": "LAN Port Scan",
|
||||
"author": "aburro & aussieklutz",
|
||||
"browser": "ALL",
|
||||
"browser_version": "ALL",
|
||||
"os": "ALL",
|
||||
"os_version": "ALL",
|
||||
"modules": [
|
||||
{"name": "get_internal_ip_webrtc",
|
||||
"condition": null,
|
||||
"code": null,
|
||||
"options": {}
|
||||
},
|
||||
{"name": "port_scanner",
|
||||
"condition": "status==1",
|
||||
"code": "var s=get_internal_ip_webrtc_mod_output.split('.');var start = s[0]+'.'+s[1]+'.'+s[2]+'.'+s[3]; var mod_input = start;",
|
||||
"options": {
|
||||
"ipHost":"<<mod_input>>",
|
||||
#"port":"80,8080"
|
||||
}
|
||||
}
|
||||
],
|
||||
"execution_order": [0, 1],
|
||||
"execution_delay": [0, 0],
|
||||
"chain_mode": "nested-forward"
|
||||
}
|
||||
@@ -22,6 +22,7 @@ module BeEF
|
||||
|
||||
#
|
||||
# @note Get online and offline hooked browsers details (like name, version, os, ip, port, ...)
|
||||
# When websockets are enabled this will allow the ws_poll_timeout config to be used to check if the browser is online or not.
|
||||
#
|
||||
get '/' do
|
||||
if config.get('beef.http.websocket.enable') == false
|
||||
@@ -35,6 +36,13 @@ module BeEF
|
||||
offline_hooks = hb_to_json(BeEF::Core::Models::HookedBrowser.where('lastseen <= ?', (Time.new.to_i - timeout)))
|
||||
end
|
||||
|
||||
else
|
||||
timeout = (config.get('beef.http.websocket.ws_poll_timeout').to_i / 1000) + 5
|
||||
online_hooks = hb_to_json(BeEF::Core::Models::HookedBrowser.where('lastseen >= ?', (Time.new.to_i - timeout)))
|
||||
offline_hooks = hb_to_json(BeEF::Core::Models::HookedBrowser.where('lastseen <= ?', (Time.new.to_i - timeout)))
|
||||
end
|
||||
|
||||
>>>>>>> 6ebb8a0e04541f26c0aeb5f9034b7c99695c6ddd
|
||||
output = {
|
||||
'hooked-browsers' => {
|
||||
'online' => online_hooks,
|
||||
|
||||
Reference in New Issue
Block a user