Home HackyEaster 2022 Layer Cake
Writeup
Cancel

Layer Cake

Challenge

Someone said there would be cake.

1
hackyeaster/layercake:latest

Solution

Upon pulling the first layer was fat, the next 30 were small, so, guessing they’re just overwriting a file repeatedly.

So we immediately write this handy one liner, to search through every diff directory provided by docker, copying any egg.png files into tmp.

1
2
3
for x in $(docker inspect hackyeaster/layercake:latest | jq '.[0].GraphDriver.Data.LowerDir' -r | tr ':' '\n'); do
	egg=$(sudo find $x -name egg.png); hash=$(echo $egg | cut -d/ -f 6); sudo cp $egg /tmp/egg-$hash.png;
done;

And then we see all of the eggs and rely on manual inspection to find our egg.

Flag

he2022{th3_c4k3_is_a_l1e!}