The document describes the reversing of a Tiffany binary that spawns 7 child processes. Each child process handles messages from the parent process using ptrace calls. The parent initializes the children by sending configuration data, then sends each character of a password to be verified. Each child performs a simple computation on its local data and passes the character to the next child. The password is only accepted if all children accept after processing all characters.
15. Reversing: Tiffany
• Spawns 7 children, many ptrace calls
• Hint: “Each instance does a very simple thing”
• ltrace fails during initialization
• strace fails after computation
<DEMO>
strace ./tiffany 2>&1 | less
17. Ptrace communication
• Parent sends messages to children using
ptrace
• Similarly, children send each other messages
using ptrace.
One of the reasons why the program is slow…
25. Command #3
• Parent sends every char to first child
Child handler:
• Updates states according to char and local data
• Forwards char to previous child
• Last child informs parent to send next char
Every child gets char and “performs a step”
27. Password okay?
• Password OK if final `bitokay` is 1
• All children must “accept” the password
• Every child is a DFA
• Local data is state transition function
Extract DFA, intersect, find witness
Minimize DFA while intersecting!