Just press 'q'

Just press 'q'

I recently bought a 2nd hand Netgear Prosafe M4100 to use at home. It's an old switch, no doubt, but still really capable. I got it off eBay and the seller stated it was working, pulled from a live environment, so I splurged the £35 for it (try finding a fully managed 26 port, PoE switch for £35).

A few days later it arrived and I fired it up, eventually finding my way to the login screen after configuring my laptop with a static IP address. Somewhat predictably the password hadn't been reset, so I tried a paper clip in the tiny little reset button but no change. Seems the password is stored in some non-volatile memory, unaffected by the reset button. So what to do now, well, I did what any self respecting lazy developer would do and turned to ChatGPT.

ChatGPT walked me through setting up HyperTerm and connecting to the Mini-USB (mini, not micro, cos that's how we rolled in 2013) serial port, from where I could see the boot sequence from the switch.

At first ChatGPT told me to hit escape to access the boot menu but when this failed to do anything it instructed me to power cycle the device while spamming ctrl+c, which kills the boot process and takes you to the boot loader. We then spent about three hours, first setting various environment variables and continue with the boot process, and then trying to flash a new firmware in the hope of nuking the admin password, first by trying to load the file off USB, only to find the console doesn't have access to the USB device, then sending the file over serial using XMODEM and finally setting up a TFTP server on my desktop and having the switch retrieve the ROM from there, all without look.

So after hours and hours of debugging and seemingly exhausting all options, ChatGPT casually told me to spam q while the switch rebooted to get to the boot menu, from where you can recover the admin password. 🙃

3+ hrs of hacking around, and it knew all along.

And this is everything that's wrong with the current state of AI, it is amazing at a lot of things, I use it as a debugging partner most days, I use it to weigh up alternative implementations, I use it to write chunks of boilerplate, but you'll often find yourself on a 3hr detour if you're not careful.