This is just a simple PoC for embedding an HTML file inside an SVG using JavaScript and base64 encoding with XOR obfuscation. The SVG file contains JS that decodes and downloads the HTML file when the SVG is opened in a browser.
- Prepare your HTML file (phish.html as an example)
- Make sure to POST to the right address (127.0.0.1 is just a placeholder!)
- Prepare your SVG template (dropper.svg as an example)
- Change XOR key if you want to or feel free to implement better obfuscation mechanism
- Variable "LeberkasSorte" is the embedded HTML (will be created using the python script)
- You can change everything after the
</script>tag as you wish.
- Run the embed_html.py script to create the SVG with embedded HTML:
python3 embed_html.py phish.html dropper.svg
- There should now be a working dropper svg in the output folder.
Always use for educational purposes. We are not responsible for what you do with it. This PoC is meant to educate blue teamers!