Search code examples
shellcode

Trying to read a file + print to stdout in shellcode


I'm able to open + read the file, but can't seem to get the call to sys_write just right... ??

<< Redacted until the end of the challenge >>

The [beginning of] the file contents gets to stdout, but the content leads me to believe it's truncated (ends mid-word and continues as garbage) after ~105 bytes...?


Solution

  • So turns out I just needed to pass [a longer] rdx to sys_read (and adjust the sys_write command accordingly!