# Is it possible to extract code from an arduino board?

Is there a way to export code for an arduino even as a hex file?

• Yes, using avrdude from the command line, unless the security fuse has been set. It might even be possible then, but intentionally much harder, and not clear if anyone has yet defeated that security mechanism. – Chris Stratton Mar 15 '13 at 21:56
• @ChrisStratton I was listening to a defcon talk where they talked about how it had been defeated. I can't remember which one it was, but google might remember. – Hair_of_the_Dog Mar 15 '13 at 21:58
• It has been defeated for some microcontrollers, and not (at least to public knowledge, short of physical dissection) yet for others. – Chris Stratton Mar 15 '13 at 22:00
• Yeah, I'm pretty sure it was dissected. – Hair_of_the_Dog Mar 16 '13 at 2:24

• It turns out that not only is readback supported, the default avrdude verify behavior relies on it as it works by reading back a buffer and performing comparison on the PC. So essentially, anyone who has ever uploaded code to an ATmega based Arduino by letting the IDE invoke avrdude with the default configuration, has also implicitly read one out. – Chris Stratton Feb 4 '18 at 21:53