Skip to content

Commit d8c03d6

Browse files
committed
Avoid failures due to bad payload selection
1 parent 91e5dc3 commit d8c03d6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/exploits/multi/http/apache_mod_cgi_bash_env_exec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ def check
6868
end
6969

7070
def exploit
71+
# Cannot use generic/shell_reverse_tcp inside an elf
72+
# Checking before proceeds
73+
if generate_payload_exe.blank?
74+
fail_with(Failure::BadConfig, "#{peer} - Failed to store payload inside executable, please select a native payload")
75+
end
76+
7177
execute_cmdstager(:linemax => datastore['CMD_MAX_LENGTH'])
7278
end
7379

0 commit comments

Comments
 (0)