in oder to solve a CTF-Challenge I have to construct a small ROP-chain. The scope of the ROP chain is to print the content of the `flag` file. I already constructed the ROP-chain, but it seems that when I call the system function with the parameter `cat flag`, the result isn't printed to the console.
My ROP-chain:
payload = b'A'*80 + pop_rdi + addr_cat_flag + systemPlt
As far as I know it should work this way, since it is a 64-Bit machine. But the strangest thing is that when insted of calling system
I call for example puts
then the content at address addr_cat_flag, which in this case is cat flag
, is printed to the console. This means that the parameter is hand over corectly.
The address of systemPlt should also be correct.
Does anybody know were the problem could be?