Charmve / PyStegosploit

PoC - Exploit Delivery via Steganography and Polyglots, CVE-2014-0282
https://www.youtube.com/watch?v=O9vSSQIZPlI
GNU General Public License v3.0
45 stars 14 forks source link
browser-exploits charmve cve decoder encoded-images exp exploits html-png-polyglot jpeg jpg jpg-html-polyglot poc steganography stego xss-vulnerability

PyStegosploit - Exploit Delivery via Steganography and Polyglots

[video1] | [video2] | [page]

by Charmve - yidazhang1 [at] gmail[dot]com, @Charmve @therealsaumil @amichael

May 2021

stego_imajs.png

Stegosploit creates a new way to encode "drive-by" browser exploits and deliver them through image files. These payloads are undetectable using current means. This paper discusses two broad underlying techniques used for image based exploit delivery - Steganography and Polyglots. Drive-by browser exploits are steganographically encoded into JPG and PNG images. The resultant image file is fused with HTML and Javascript decoder code, turning it into an HTML+Image polyglot. The polyglot looks and feels like an image, but is decoded and triggered in a victim's browser when loaded.

A Tour of the Stegosploit Toolkit [1]

Stegosploit comprises of tools that let a user analyse images, steganographically encode exploit data onto JPG and PNG files, and turn the encoded images into polyglot files that can be rendered as HTML or executed as Javascript.

The current version of Stegosploit is 0.2 and can be found in Issue 0x08 of the International Journal of Proof-of-Concept or Get The Fuck Out (Poc||GTFO). Note that you will have to read through the end of the article in PoC||GTFO to find the hint on how to extract the toolkit.

🔍 Browse Folders

jpegdump.c is written by Ralph Giles and can be downloaded from https://svn.xiph.org/experimental/giles/jpegdump.c

In this repo, importantly, project-stegosploit is key part, which show how to hidden Exploit Code into image, to encode/decode, and to execute the meterpreter framework.

🔧 How Stegosploit Works

The exploit code is inserted within the pixels of the image so that the image contains the exploit code. IMAJS then creates a polyglot image that will be read as an image and contains a decoder that will extract and run the javascript exploit.

The exploit that we will use is an Internet Explorer Use-after-free exploit (CVE-2014-0282).

🔨 Requirements

msfconsole.png

📆 What we have done so far

Highlights:

📝 Checklist

✨ Related Works Stegosploit

My repo

❕ Disclaimer

📎 References

[1] https://stegosploit.info/

[2] https://conference.hitb.org/hitbsecconf2015ams/sessions/stegosploit-hacking-with-pictures/

[3] https://www.vulnerability-db.com/?q=articles/2015/06/17/exploit-delivery-steganography-using-stegosploit-tool-v02

[4] https://www.blackhat.com/docs/eu-15/materials/eu-15-Shah-Stegosploit-Exploit-Delivery-With-Steganography-And-Polyglots.pdf

[5] https://stackoverflow.com/questions/4110964/how-does-heap-spray-attack-work

[6] https://www.youtube.com/watch?time_continue=1&v=6lYUtIZHlJA

[7] https://www.owasp.org/images/0/01/OWASL_IL_2010_Jan_-_Moshe_Ben_Abu_-_Advanced_Heapspray.pdf

[8] https://en.wikipedia.org/wiki/Heap_spraying

[9] https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/

🎧 Related job

video

✉️ Contact

yidazhang1[#]gmail[dot]com


Zhang Wei (Charmve)