Idea for getting ACE on Mechacon
Posted: April 27th, 2025, 6:41 am
I saw in no$cash’s CD documentation some interesting things that gave me an idea to attain arbitrary code execution on the Mechacon.
I haven’t looked at a disassembly of the Mechacon to see whether this would work. It’s also been 20 years since I’ve had the tools to compile and execute PS1 code to try something like this out.
This would only work on vC1 and later.
In the memory map, 0000-003F are I/O ports and 0040-023F are RAM. The stack is 00C0-00FF. Could we use command 19 74 to blow away the stack and overwrite some return address with a pointer to memory that we control? We can write to RAM in 01E1-023F by using too many parameter bytes; this could be used to upload a payload.19h,74h,index,len,databytes --> INT3(stat) ;Write multiple registers (bugged)
Same as read/write single register, but trying to transfer multiple registers at once. BUG: The transfer should range from 00h to len-1, but the loop counter is left uninitialized (set to X=48h aka "command number 19h-minus-1-mul-2" instead of X=00h). Causing to the function to read/write garbage at index 48h..FFh, it does then wrap to 00h and do the correct intended transfer, but the preceeding bugged part may have smashed RAM or I/O ports.
I haven’t looked at a disassembly of the Mechacon to see whether this would work. It’s also been 20 years since I’ve had the tools to compile and execute PS1 code to try something like this out.
This would only work on vC1 and later.