-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathcode_exec1.rb
47 lines (31 loc) · 960 Bytes
/
code_exec1.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
#!/usr/bin/ruby
require 'msf/core'
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
include Msf::Exploit::Remote::HttpClient
def initialize(info = {})
super(update_info(info,
'Name' => 'Bash Command Execution in Target URLs',
'Description' => % q {
This module exploits a vulnerability in websites that contain vulnerable parameters and functions.It allows an attacker to execute arbitrary bash commands on the target system.
},
'License' => MSF_LICENSE,
'Author' => ['Your Name <[email protected]>'],
['URL', 'http://example.com']
],
'Space' => 1024,
if true(
default)
},
'Targets' => [
["Automatic", {}]
],
))
register_options([OptString.new('TARGETURI', [true, "The base path to the web application", "/"])])
deregister_options('VHOST')
end
def check
for vulnerability goes here(e.g., version detection)
end
def exploit
endend