Web
Nothing here 👀
solve: 108
100 points
difficulty: baby
Browse the source code:
1 |
|
You can try to executing getFlag
in the console
However, getFlag
is undefined because the script runs in a closure making getFlag inaccessible from the console’s scope
You can copy the entire code
and insert getFlag()
after the definition of getFlag
, as shown
Examining the getFlag
function reveals that it uses atob
to decode a base64 string
You can decode enc
directly using a base64 decoder:
FLAG: THJCC{h4ve_f5n_1n_b4by_w3b_a5161cc22af2ab20}
Memory-Catcher🧠
solve: 4
470 points
difficulty: medium
Analyze the index.php
1 |
|
Key observations
- login requires username:
admin
/ password:$secret
$secret
is read from/var/www/secret
The challenge’s goal is to obtain the contents of /var/www/secret
Examine the dockerfile
1 |
|
Focus on lines 3 and 6:
at line 3
I copies all files from ./share
into /var/www/html
at line 6
writes FAKE_SECRET
into /var/www/secret
Notice anything unusual?
The dockerfile itself is included in the ./share
directory copied to /var/www/html
, and it contains the secret in plain text
So we can access the secret by visiting:
http://chal.ctf.scint.org:10666/dockerfile
Then login with secret
FLAG: THJCC{r3m0v3_d0ckrrrf1l3_1n_pr0du4t10n!}
i18n
solve: 5
460 points
difficulty: medium
蛤 都2025年了 還有人不知道lfi就等於rce嗎
1 |
|
We can control variable $lang
but the include path’s prefix and suffix are setted
So we can use perl to write shell
payload:
1 |
|
1 |
|
FLAG: THJCC{r3se4rch3r_is_mean_RE:SE4RCH}
reference: https://blog.stevenyu.tw/2022/05/07/advanced-local-file-inclusion-2-rce-in-2022#rtoc-18
Note: 我原本這題沒刪dockerfile, 然後把dockerfile刪了 出了一題Memory-Catcher🧠
玩猜拳換免費flag
solve: 0
500 points
difficulty: hard
Examine app.py
1 |
|
Key observation: TEMPLATES_AUTO_RELOAD = True
enables hot reloading of templates when they change.
Next, review utils.py
The init
function initializes a users
table
Focus on the exec_sql
function:
1 |
|
Investigate all uses of exec_sql
the use
function in rps.py
allows control over the player_choise
parameter:
To get the flag
we need to increase our balance to 37378891
1 |
|
however, we can’t tamper with the database via a select
statement
(at least I can’t)
Instead, exploit the template auto-reload feature by overwriting templates/index.html with {{config}}
to leak the flag.
1 |
|
To bypass the check at line 8
we have to includes at least one item here
so the payload is
1 |
|
FLAG: THJCC{Crazy_ch@ll3nge_br0ken_everythin9}
iCloud☁️
solve: 7
440 points
difficulty: insane
1 |
|
Key points:
.ph*
files are disabled from being processed as PHP..htaccess
can override certain settings.
Examine the bot’s URL validation:
1 |
|
The bot only allows URLs matching http://web/uploads/
However, the regex (generated by ChatGPT) is flawed, allowing bypass with:
1 |
|
Alternatively, use .htaccess (official solution). Example:
1 |
|
This renders as
Create SOLVE.html to steal cookies:
1 |
|
FLAG: THJCC{hTaCc3s5_c@n_al3rt(
Pwned!)}
Note
感覺iCloud應該跟猜拳換個位置的
整排100 整排500
but我真的沒覺得我出太難i18n跟memory catcher甚至是前一天才出好的
還好這次題都沒出什麼大問題 讚👍