Newest Post: Eikidankai Project: Formal Introduction

Good evening, my readers. Some of them already noticed the Eikidankai word is now reserved for my projects site, but then, what is the current whereabouts?  Contrary to expectations, I have been using most of my free time to work on this personal space, while slowly developing the fundamentals of my world-building. ... That is why I have not had enough time to introduce Eikidankai Project to you all. I found this occassion to be the right time to do it, so let's get started! And nope,  I did never leave the cheap community, but it is not my main focus for now. What's Eikidankai Project? It is the formal name given to my projects site. A personal space, seperated from my main blog, intended to feature original creations. Well, not 'original' in the most literal sense, but quite different from the usual. I have now the necessary knowledge and motivation for trying to keep moving forward. The existence's name where all my characters and stories take place will be ment...

M.U.G.E.N Engine Researches: State Filepath Overflow

Good evening, readers. 
It has been a while since the last blog entry was created, but well, life things.

For this occassion, we are going to talk about the latest vulnerability discovered in M.U.G.E.N Engine, which has been used by SuperNull characters like "On The Verge of Death" or "Qvorda", so let's begin.

State Filepath Overflow, also known as "STBOF" or "ST.Path", is an engine vulnerability that allows for arbitrary code execution during character selection, making it a good alternative to use for SuperNull characters.

The discovery of this vulnerability was born out of Nomi's ideas about trying to overflow the ST Filepath textline in WinMUGEN, which was impossible to perform, as only 255 bytes can be used per text string.

However, it could feasibly be used on the 1.xx engine versions due to their increased textline size limit(4095 bytes), so I decided to investigate it further.

"St" is the entry filepath the engine uses to load Constants/States before St0 ~ St9, so it cannot be omitted, as doing so will cause the engine to raise an error message.

The most interesting detail about this filepath section is that when any state file except for the character's definition file is placed, the engine will copy the source filepath into a buffer with no max size limit before loading, which renders it vulnerable to buffer overflow.

M.U.G.E.N Engine being debugged

After investigating the possibilities of a buffer overflow attack, I have finally noticed 0xB04 bytes(1.1b only) were necessary to overwrite the parser's return address, resulting in arbitrary code execution.

Yet, a ROP chain is required in order to make your shellcode executable before jumping into it, as the NX Bit is enabled by default in these engine versions, so reusing the stack region for pivoting is a good idea.

At this point, shellcode should be executed with no problem, as this character was used as Proof-of-Concept for it:

Qvorda's Exploit
A code template that uses the engine vulnerability can be downloaded via this blog entry.
Well, this is all for today. Have a nice day.

Comments