picoCTF 2021 speeds and feeds Writeup

speeds and feeds is a Reverse Engineering challenge worth 50 points.

The description of this challenge is:

There is something on my shop network running at nc mercury.picoctf[.]net 16524, but I can't tell what it is.

Connecting to the host provided in the description, I was presented with about 1000 lines of text that looked like this:

G17 G21 G40 G90 G64 P0.003 F50
G0Z0.1
G0Z0.1
G0X0.8276Y3.8621
G1Z0.1
G1X0.8276Y-1.9310
G0Z0.1
G0X1.1034Y3.8621
G1Z0.1
G1X1.1034Y-1.9310
...snip...

I had no idea what any of this was, so I Googled one of the strings that were repeating G0Z0.1. This quickly informed me that I was likely looking at G-code, a programming language for CNC machines.

Because of overhearing conversations at the Syn Shop, I knew what G-code did and roughly how it worked, and that there is software that will plot G-code out for you. I guessed that the flag will probably be drawn out with this G-code.

Searching Google for G-code online, I was able to find an online viewer for G-code scripts at https://ncviewer.com

Pasting the G-code into this site yielded the flag:

One thought on “picoCTF 2021 speeds and feeds Writeup

  1. Pingback: picoCTF Writeups – DMFR SECURITY

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s