Skip to content

Latest commit

 

History

History
26 lines (24 loc) · 959 Bytes

Animals.md

File metadata and controls

26 lines (24 loc) · 959 Bytes

rhme-2016 write-up Animals

Animals (Exploit - 200 pts)

You can select 1 of the 3 animals to display an ASCII art (cat, dog, mouse).
First test, we sent dog+aaaaaaaaaa...(many times) until a memory dump.
After analysing these bytes, we can understand that they correpond to a table with different addresses (+ some parameters) used to display the picture.
We can change the current selection by modifying the 2 bytes just after the overflow.
Whatever, we can see & verify the following addresses associations:
cat = 0x015e
dog = 0x0158
mouse = 0x0152
??? = 0x014c (yeah)
Replaced the last address is not enough, we need to set a kind of offset defined by the next 2 bytes..
After few tries, we got the following payload with python:

from rhme_serial import *

s = rhme_serial()
print s.xfer("dogaaaaaaaaaaaaaaaaa\x4c\x01\x6b\x03\r\n")
s.close()

and got the flag of course !