Ogres are like onions
First of all, we do as we are told and download the docker container. Like described in the task, we can do this with
docker run -tp 8000:8000 downunderctf/onions
After container is started, we can open the webpage provided by the docker container. There are four memes of shrek and one image is not accessable (if we look at the sourcecode, we can see, that this file is called "flag.jpg").
We should have a look into the docker container.
docker exec -it <container> /bin/sh
While in the containershell, we can move to the app directory... but there is no flag.jpg, so I used find
to look if it is somewhere else.
no
Okay let's look into the DockerFile of this container... it's also in the app
.
The image was later (after container creation) removed... so it should be in the layers!
[...]
COPY . /app # buildkit
RUN /bin/sh -c rm memes/flag.jpg
EXPOSE map[8000/tcp:{}]
...
Lets have a look into the filesystem, where the container is stored. Therefore we change the directory to /var/lib/docker/overlay2
and use find.
find -name flag.jpg -ls
There it is!