ångstromCTF 2020 - Woooosh Writeup

For Woooosh we had a clicker game with an obfuscated clicker game.

The backend source was given. They used socket.io, so we can do the same.

Looking at the source they use the first shape as the circle.

if (dist(game.shapes[0].x, game.shapes[1].y, x, y) < 10) {
game.score++;
}


So when we receive the generated shapes we just need to pick the first!

I opened a socket and started by emitting start.

socket.emit("start");


Afterwards we just need to listen for events and reply. Bellow is the clicking function.

socket.on('shapes', shapes => {
socket.emit("click", shapes[0].x, shapes[0].y);
});


And you’ll need this to get the flag.

socket.on('disp', disp => {
console.log(disp);
});


Full source here;