by SystemOut · 4y ago · 0 comments
Turns out there was an undocumented Windows API function along the lines of "AliasCsToDsRegister" or something like that - I've tried to find a reference to it but I can't find it. It allowed me write into the code segment (the CS was global and read only - as it was shared among all processes) and replace the first few bytes of the connect function call with a jump to my code which would then put it back, make the call to the socks server, do some other magic, put my jump hook back in and the return to the caller. Good times!
Kind of surprised I remember this and more so that it actually worked.
Some other functions had similarly great names:
>>Anyway, I am not sure what type of person writes a function called "BozosLiveHere" and puts it into USER.EXE
>This started out life with a non-bozo name as an undocumented function in Windows 3.0.
>Windows 3.1 removed the undocumented function, but we found that some programs were using the undocumented function and started crashing.
>So we reluctantly put the function back, but changed its name to "BozosLiveHere" so that nobody else would use it in the future.
>A similar story exists for "TabTheTextOutForWimps".
KnowledgeBase Archive
An Archive of Early Microsoft KnowledgeBase Articles
Q89560: Creating Dynamic Code Segments Using PrestoChangoSelector