diff --git a/core/main/constants/os.rb b/core/main/constants/os.rb
index 15a9752ab..9abdbe00d 100644
--- a/core/main/constants/os.rb
+++ b/core/main/constants/os.rb
@@ -29,7 +29,7 @@ module BeEF
OS_IOS_UA_STR = 'iOS'
OS_IOS_IMG = 'ios.png'
OS_IPHONE_UA_STR = 'iPhone'
- OS_WEBOS_UA_STR = 'webos.png'
+ OS_WEBOS_IMG = 'webos.png'
OS_AROS_UA_STR = 'AROS'
OS_AROS_IMG = 'icaros.png'
OS_IPHONE_IMG = 'iphone.jpg'
diff --git a/core/main/handlers/browserdetails.rb b/core/main/handlers/browserdetails.rb
index 8b4ced2d0..f289d6b84 100644
--- a/core/main/handlers/browserdetails.rb
+++ b/core/main/handlers/browserdetails.rb
@@ -101,6 +101,8 @@ module BeEF
BD.set(session_id, 'IP', ip_str)
# geolocation
+ BD.set(session_id, 'LocationCity', 'Unknown')
+ BD.set(session_id, 'LocationCountry', 'Unknown')
if config.get('beef.geoip.enable')
require 'geoip'
geoip_file = config.get('beef.geoip.database')
diff --git a/core/main/models/browserdetails.rb b/core/main/models/browserdetails.rb
index 4ed6e6919..83d30178a 100644
--- a/core/main/models/browserdetails.rb
+++ b/core/main/models/browserdetails.rb
@@ -57,89 +57,7 @@ module Models
browserdetails
end
-
- #
- # Returns the icon representing the browser type the
- # hooked browser is using (i.e. Firefox, Internet Explorer)
- #
- def self.browser_icon(session_id)
-
- browser = get(session_id, 'BrowserName')
-
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_IE_IMG if browser.eql? 'IE' # Internet Explorer
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_EDGE_IMG if browser.eql? 'E' # Microsoft Edge
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_FIREFOX_IMG if browser.eql? 'FF' # Firefox
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_EPIPHANY_IMG if browser.eql? 'EP' # Epiphany
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_SAFARI_IMG if browser.eql? 'S' # Safari
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_CHROME_IMG if browser.eql? 'C' # Chrome
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_OPERA_IMG if browser.eql? 'O' # Opera
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_MIDORI_IMG if browser.eql? 'MI' # Midori
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_ODYSSEY_IMG if browser.eql? 'OD' # Odyssey
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_BRAVE_IMG if browser.eql? 'BR' # Brave
-
-
- BeEF::Extension::AdminUI::Constants::Agents::AGENT_UNKNOWN_IMG
- end
-
- #
- # Returns the icon representing the os type the
- # zombie is running (i.e. Windows, Linux)
- #
- def self.os_icon(session_id)
-
- ua_string = get(session_id, 'BrowserReportedName')
-
- return BeEF::Core::Constants::Os::OS_UNKNOWN_IMG if ua_string.nil?
- return BeEF::Core::Constants::Os::OS_WINDOWS_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_WINDOWS_UA_STR
- return BeEF::Core::Constants::Os::OS_ANDROID_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_ANDROID_UA_STR
- return BeEF::Core::Constants::Os::OS_LINUX_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_LINUX_UA_STR
- return BeEF::Core::Constants::Os::OS_QNX_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_QNX_UA_STR
- return BeEF::Core::Constants::Os::OS_SUNOS_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_SUNOS_UA_STR
- return BeEF::Core::Constants::Os::OS_BEOS_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_BEOS_UA_STR
- return BeEF::Core::Constants::Os::OS_OPENBSD_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_OPENBSD_UA_STR
- return BeEF::Core::Constants::Os::OS_WEBOS_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_WEBOS_UA_STR
- return BeEF::Core::Constants::Os::OS_AROS_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_AROS_UA_STR
- return BeEF::Core::Constants::Os::OS_IOS_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_IPHONE_UA_STR
- return BeEF::Core::Constants::Os::OS_IOS_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_IPAD_UA_STR
- return BeEF::Core::Constants::Os::OS_IOS_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_IPOD_UA_STR
- return BeEF::Core::Constants::Os::OS_MAEMO_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_MAEMO_UA_STR
- return BeEF::Core::Constants::Os::OS_MAC_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_MAC_UA_STR
- return BeEF::Core::Constants::Os::OS_BLACKBERRY_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_BLACKBERRY_UA_STR
-
- BeEF::Core::Constants::Os::OS_UNKNOWN_IMG
- end
-
- #
- # Returns the icon representing the hardware the
- # zombie is running on (i.e. iPhone, BlackBerry)
- #
- def self.hw_icon(session_id)
-
- ua_string = get(session_id, 'BrowserReportedName')
- hardware = get(session_id, 'Hardware')
- return BeEF::Core::Constants::Hardware::HW_VM_IMG if hardware =~ /Virtual Machine/
- return BeEF::Core::Constants::Hardware::HW_LAPTOP_IMG if hardware =~ /Laptop/
- return BeEF::Core::Constants::Hardware::HW_UNKNOWN_IMG if ua_string.nil?
-
- return BeEF::Core::Constants::Hardware::HW_WINPHONE_IMG if ua_string.include? BeEF::Core::Constants::Hardware::HW_WINPHONE_UA_STR
- return BeEF::Core::Constants::Hardware::HW_ZUNE_IMG if ua_string.include? BeEF::Core::Constants::Hardware::HW_ZUNE_UA_STR
- return BeEF::Core::Constants::Hardware::HW_BLACKBERRY_IMG if ua_string.include? BeEF::Core::Constants::Hardware::HW_BLACKBERRY_UA_STR
- return BeEF::Core::Constants::Hardware::HW_IPHONE_IMG if ua_string.include? BeEF::Core::Constants::Hardware::HW_IPHONE_UA_STR
- return BeEF::Core::Constants::Hardware::HW_IPAD_IMG if ua_string.include? BeEF::Core::Constants::Hardware::HW_IPAD_UA_STR
- return BeEF::Core::Constants::Hardware::HW_IPOD_IMG if ua_string.include? BeEF::Core::Constants::Hardware::HW_IPOD_UA_STR
- return BeEF::Core::Constants::Hardware::HW_KINDLE_IMG if ua_string.include? BeEF::Core::Constants::Hardware::HW_KINDLE_UA_STR
- return BeEF::Core::Constants::Hardware::HW_NOKIA_IMG if ua_string.include? BeEF::Core::Constants::Hardware::HW_NOKIA_UA_STR
- return BeEF::Core::Constants::Hardware::HW_MOTOROLA_IMG if ua_string.include? BeEF::Core::Constants::Hardware::HW_MOTOROLA_UA_STR
- return BeEF::Core::Constants::Hardware::HW_HTC_IMG if ua_string.include? BeEF::Core::Constants::Hardware::HW_HTC_UA_STR
- return BeEF::Core::Constants::Hardware::HW_GOOGLE_IMG if ua_string.include? BeEF::Core::Constants::Hardware::HW_GOOGLE_UA_STR
- return BeEF::Core::Constants::Hardware::HW_ERICSSON_IMG if ua_string.include? BeEF::Core::Constants::Hardware::HW_ERICSSON_UA_STR
-
- BeEF::Core::Constants::Hardware::HW_UNKNOWN_IMG
-
- end
-
end
-
end
end
end
diff --git a/core/main/models/hookedbrowser.rb b/core/main/models/hookedbrowser.rb
index 2c48461a1..572780809 100644
--- a/core/main/models/hookedbrowser.rb
+++ b/core/main/models/hookedbrowser.rb
@@ -38,43 +38,7 @@ module Models
def count!
if not self.count.nil? then self.count += 1; else self.count = 1; end
end
-
- # Returns the icon representing the browser type the hooked browser is using (i.e. Firefox, Internet Explorer)
- # @return [String] String constant containing browser icon path
- def browser_icon
- agent = JSON.parse(self.httpheaders)['user-agent'].to_s || nil
-
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_UNKNOWN_IMG if agent.nil?
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_IE_IMG if agent.include? BeEF::Extension::AdminUI::Constants::Agents::AGENT_IE_UA_STR
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_EDGE_IMG if agent.include? BeEF::Extension::AdminUI::Constants::Agents::AGENT_EDGE_UA_STR
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_FIREFOX_IMG if agent.include? BeEF::Extension::AdminUI::Constants::Agents::AGENT_FIREFOX_UA_STR
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_MOZILLA_IMG if agent.include? BeEF::Extension::AdminUI::Constants::Agents::AGENT_MOZILLA_UA_STR
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_SAFARI_IMG if agent.include? BeEF::Extension::AdminUI::Constants::Agents::AGENT_SAFARI_UA_STR
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_KONQ_IMG if agent.include? BeEF::Extension::AdminUI::Constants::Agents::AGENT_KONQ_UA_STR
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_CHROME_IMG if agent.include? BeEF::Extension::AdminUI::Constants::Agents::AGENT_CHROME_UA_STR
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_OPERA_IMG if agent.include? BeEF::Extension::AdminUI::Constants::Agents::AGENT_OPERA_UA_STR
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_MIDORI_IMG if agent.include? BeEF::Extension::AdminUI::Constants::Agents::AGENT_MIDORI_UA_STR
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_ODYSSEY_IMG if agent.include? BeEF::Extension::AdminUI::Constants::Agents::AGENT_ODYSSEY_UA_STR
- return BeEF::Extension::AdminUI::Constants::Agents::AGENT_BRAVE_IMG if agent.include? BeEF::Extension::AdminUI::Constants::Agents::AGENT_BRAVE_UA_STR
-
- BeEF::Extension::AdminUI::Constants::Agents::AGENT_UNKNOWN_IMG
- end
-
- # Returns the icon representing the os type the hooked browser is running (i.e. Windows, Linux)
- # @return [String] String constant containing operating system icon path
- def os_icon
- agent = JSON.parse(self.httpheaders)['user-agent'].to_s || nil
-
- return BeEF::Core::Constants::Os::OS_UNKNOWN_IMG if agent.nil?
- return BeEF::Core::Constants::Os::OS_WINDOWS_IMG if agent.include? BeEF::Core::Constants::Os::OS_WINDOWS_UA_STR
- return BeEF::Core::Constants::Os::OS_LINUX_IMG if agent.include? BeEF::Core::Constants::Os::OS_LINUX_UA_STR
- return BeEF::Core::Constants::Os::OS_MAC_IMG if agent.include? BeEF::Core::Constants::Os::OS_MAC_UA_STR
-
- BeEF::Core::Constants::Os::OS_UNKNOWN_IMG
- end
-
end
-
end
end
end
diff --git a/extensions/admin_ui/controllers/panel/panel.rb b/extensions/admin_ui/controllers/panel/panel.rb
index ab38a0467..e8d86bf09 100644
--- a/extensions/admin_ui/controllers/panel/panel.rb
+++ b/extensions/admin_ui/controllers/panel/panel.rb
@@ -79,10 +79,7 @@ module BeEF
browser_name = BeEF::Core::Models::BrowserDetails.get(hooked_browser.session, 'BrowserName')
browser_version = BeEF::Core::Models::BrowserDetails.get(hooked_browser.session, 'BrowserVersion')
- browser_icon = BeEF::Core::Models::BrowserDetails.browser_icon(hooked_browser.session)
- os_icon = BeEF::Core::Models::BrowserDetails.os_icon(hooked_browser.session)
os_name = BeEF::Core::Models::BrowserDetails.get(hooked_browser.session, 'OsName')
- hw_icon = BeEF::Core::Models::BrowserDetails.hw_icon(hooked_browser.session)
hw_name = BeEF::Core::Models::BrowserDetails.get(hooked_browser.session, 'Hardware')
domain = BeEF::Core::Models::BrowserDetails.get(hooked_browser.session, 'HostName')
has_flash = BeEF::Core::Models::BrowserDetails.get(hooked_browser.session, 'HasFlash')
@@ -90,6 +87,8 @@ module BeEF
has_webrtc = BeEF::Core::Models::BrowserDetails.get(hooked_browser.session, 'HasWebRTC')
has_activex = BeEF::Core::Models::BrowserDetails.get(hooked_browser.session, 'HasActiveX')
date_stamp = BeEF::Core::Models::BrowserDetails.get(hooked_browser.session, 'DateStamp')
+ city = BeEF::Core::Models::BrowserDetails.get(hooked_browser.session, 'LocationCity')
+ country = BeEF::Core::Models::BrowserDetails.get(hooked_browser.session, 'LocationCountry')
return {
'session' => hooked_browser.session,
@@ -98,16 +97,15 @@ module BeEF
'port' => hooked_browser.port.to_s,
'browser_name' => browser_name,
'browser_version' => browser_version,
- 'browser_icon' => browser_icon,
- 'os_icon' => os_icon,
'os_name' => os_name,
- 'hw_icon' => hw_icon,
'hw_name' => hw_name,
'has_flash' => has_flash,
'has_web_sockets' => has_web_sockets,
'has_webrtc' => has_webrtc,
'has_activex' => has_activex,
'date_stamp' => date_stamp,
+ 'city' => city,
+ 'country' => country,
'hb_id' => hooked_browser.id
}
diff --git a/extensions/admin_ui/media/css/base.css b/extensions/admin_ui/media/css/base.css
index 114fdef37..b2be706c0 100644
--- a/extensions/admin_ui/media/css/base.css
+++ b/extensions/admin_ui/media/css/base.css
@@ -72,6 +72,75 @@
background-image: url(../images/statusbar/accept.png);
}
+/*
+ * Zombie Tree
+ ****************************************/
+.x-tree-node-leaf .x-tree-node-icon {
+ width: 13px;
+ height: 13px;
+ padding-left: 3px;
+ padding-top: 3px;
+}
+
+/*
+ * Zombie Tree Icons
+ ****************************************/
+.zombie-tree-icon {
+ padding-left: 3px;
+ padding-top: 3px;
+ width: 13px;
+ height: 13px;
+ border: 0;
+}
+
+/* these aren't used at the moment, but should be used rather than img tags */
+.zombie-tree-icon-browser-ff {
+ background-image: url(../images/icons/firefox.png) no-repeat;
+}
+
+.zombie-tree-icon-browser-ie {
+ background-image: url(../images/icons/msie.png) no-repeat;
+}
+
+.zombie-tree-icon-browser-e {
+ background-image: url(../images/icons/edge.png) no-repeat;
+}
+
+.zombie-tree-icon-browser-ep {
+ background-image: url(../images/icons/epiphany.png) no-repeat;
+}
+
+.zombie-tree-icon-browser-s {
+ background-image: url(../images/icons/safari.png) no-repeat;
+}
+
+.zombie-tree-icon-browser-c {
+ background-image: url(../images/icons/chrome.png) no-repeat;
+}
+
+.zombie-tree-icon-browser-o {
+ background-image: url(../images/icons/opera.ico) no-repeat;
+}
+
+.zombie-tree-icon-browser-mi {
+ background-image: url(../images/icons/midori.png) no-repeat;
+}
+
+.zombie-tree-icon-browser-od {
+ background-image: url(../images/icons/odyssey.png) no-repeat;
+}
+
+.zombie-tree-icon-browser-br {
+ background-image: url(../images/icons/brave.png) no-repeat;
+}
+
+.zombie-tree-icon-browser-unknown {
+ background-image: url(../images/icons/unknown.png) no-repeat;
+}
+
+/*
+ * Zombie Tree Context Menu
+ ****************************************/
.zombie-tree-ctxMenu-proxy {
background-image: url(../images/icons/proxy.gif);
}
@@ -92,13 +161,6 @@
background-repeat: no-repeat;
}
-.x-tree-node-leaf .x-tree-node-icon {
- width: 13px;
- height: 13px;
- padding-left: 3px;
- padding-top: 3px;
-}
-
/*
* Network Panel
****************************************/
diff --git a/extensions/admin_ui/media/javascript/ui/panel/ZombiesMgr.js b/extensions/admin_ui/media/javascript/ui/panel/ZombiesMgr.js
index fe81ab640..72f5d37ef 100644
--- a/extensions/admin_ui/media/javascript/ui/panel/ZombiesMgr.js
+++ b/extensions/admin_ui/media/javascript/ui/panel/ZombiesMgr.js
@@ -16,45 +16,28 @@ var ZombiesMgr = function(zombies_tree_lists) {
var session = zombie_array[index]["session"];
var browser_name = zombie_array[index]["browser_name"];
var browser_version = zombie_array[index]["browser_version"];
- var browser_icon = zombie_array[index]["browser_icon"];
- var os_icon = zombie_array[index]["os_icon"];
var os_name = zombie_array[index]["os_name"];
var hw_name = zombie_array[index]["hw_name"];
- var hw_icon = zombie_array[index]["hw_icon"];
var domain = zombie_array[index]["domain"];
var port = zombie_array[index]["port"];
- var has_flash = zombie_array[index]["has_flash"];
- var has_web_sockets = zombie_array[index]["has_web_sockets"];
- var has_webrtc = zombie_array[index]["has_webrtc"];
- var has_activex = zombie_array[index]["has_activex"];
+ var city = zombie_array[index]["city"];
+ var country = zombie_array[index]["country"];
var date_stamp = zombie_array[index]["date_stamp"];
- var hb_id = zombie_array[index]["hb_id"];
-
- text = " ";
- text+= "
";
- text+= "
";
- text+= ip;
-
- balloon_text = "IP: " + ip;
- balloon_text+= "
Origin: " + domain + ":" + port;
- balloon_text+= "