Security¶
This page describes what MicroGoose protects on a networked board, what it leaves to you, and how to report a vulnerability. The details of each service are in Networking.
Reporting a vulnerability¶
Please report security problems privately, not in a public issue. Use GitHub's Report a vulnerability button on the repository's Security tab. Include the MicroGoose version, the board, and the steps that show the problem.
Fixes go into the next release and are listed in the Changelog. Security fixes are made to the latest release on PyPI; upgrade to it to receive them.
What is protected¶
| Area | Protection |
|---|---|
| Updates over WiFi | Each update is signed with HMAC-SHA256 over a one-time challenge from the board and the image's SHA-256, using a key only your PC and your boards hold. The board checks the signature before it writes anything, writes to the slot it is not running, checks the SHA-256, and only then boots it. Firmware that can't come up is rolled back. Details |
| Secrets in update images | An image sent over WiFi holds neither the WiFi password nor the update key; those are stored once, by a USB flash. |
| SSH and SFTP | Public keys only (Ed25519), no passwords. curve25519-sha256 key exchange with OpenSSH's strict key exchange (which closes the Terrapin attack), chacha20-poly1305. No port forwarding, no agent. The board's host key is made on the board, kept across updates, and pinned by microgoose ssh. Details |
| SSH implementation | MicroGoose's own server, small enough to review (mg_ssh.c, mg_sftp.c), on the Monocypher cryptography library. |
| HTTPS and MQTT over TLS | Server certificates are checked against ESP-IDF's root certificate bundle. |
| The Goose compiler | Downloaded from its official release and refused unless the SHA-256 matches the one MicroGoose pins. |
| Keys on the PC | The WiFi password and update key live in ~/.microgoose/wifi.json, readable only by your user. |
What is not protected¶
Know these before you put a board on a network you don't control:
- The network console (TCP port 3233) is plain text with no login. Anyone on the same network can read what the board prints.
- The HTTP server a program runs is plain HTTP.
- Secure boot and flash encryption are not enabled by MicroGoose. The WiFi password, the update key and the SSH host key are stored in the board's NVS flash unencrypted, so anyone with the board in hand can read them. ESP-IDF supports both features; turning them on is a manufacturing decision MicroGoose leaves to you.
- The update listener (port 3232) accepts an update from anyone holding
the key. If
wifi.jsonleaks, runmicrogoose wifi --forget, save the network again, and reflash each board over USB. - Post-quantum key exchange is not offered. OpenSSH 10.1 and later warn
about this;
microgoose sshturns the warning off. - Data stack overflows past the hardware guards are caught by a canary within 100 ms, not at the moment they happen. See How it works.
Hardening checklist for a deployment¶
- Put boards on their own network segment or VLAN, and block ports 3232, 3233 and 22 from anything that doesn't need them.
- Use a separate update key for each fleet or site: the key lives in
wifi.jsonunderMICROGOOSE_HOME, so give each its ownMICROGOOSE_HOME. - Enable ESP-IDF secure boot and flash encryption for devices that leave your building.
- Keep
~/.microgoose(or yourMICROGOOSE_HOME) out of backups and repositories that others can read. - Watch the Changelog and update to each release.