247CTF - The Text Editor Jail
Escape a text editor jail and execute code to retrieve the flag.
Vulnerability
The web text editor uses vim commands. Vim's :!command
syntax can execute arbitrary shell commands, breaking out of the
restricted environment.
Solution
Use vim's command execution to escape the jail:
1 | :!bash |
This opens a bash shell where you can execute programs:
1 | bash-4.3$ ls |