The Text Editor Jail (misc)

PUBLISHED ON 16/02/2020 — EDITED ON 01/04/2020 — 247CTF, INFOSEC

Intro

This is my write-up of a Misc challenge The Text Editor Jail on the CTF site 247CTF.com.

Instructions

We didn’t have time to setup and test a proper jail, so this text editor will have to do for now. Can you break free?

Howto

When we open the site, we can see that we are inside VIM editor.

If you don’t know, you can execute arbitrary shell commands inside VIM.

In command mode, use :! to execute a command in the underlying shell. Lets list the files in the currend workind directory:

:! ls
run_for_flag

Nice! As the filename states, we need to run the executable file:

:! ./run_for_flag

Bingo!

See Also

TAGS: 247CTF, CTF, HACK, SHELL, VIM