Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/network/detect_burp/module.rb
1154 views
1
#
2
# Copyright (c) 2006-2025 Wade Alcorn - [email protected]
3
# Browser Exploitation Framework (BeEF) - https://beefproject.com
4
# See the file 'doc/COPYING' for copying permission
5
#
6
class Detect_burp < BeEF::Core::Command
7
def post_execute
8
save({ 'result' => @datastore['result'] })
9
10
configuration = BeEF::Core::Configuration.instance
11
return unless configuration.get('beef.extension.network.enable') == true
12
return unless @datastore['results'] =~ /^has_burp=true&response=PROXY ([\d.]+:\d+)/
13
14
ip = Regexp.last_match(1).split(':')[0]
15
port = Regexp.last_match(1).split(':')[1]
16
session_id = @datastore['beefhook']
17
if BeEF::Filters.is_valid_ip?(ip)
18
print_debug("Hooked browser found network service [ip: #{ip}, port: #{port}]")
19
BeEF::Core::Models::NetworkService.create(hooked_browser_id: session_id, proto: 'http', ip: ip, port: port, type: 'Burp Proxy')
20
end
21
end
22
end
23
24