Electronic – arduino – Read strings from ATmega or Arduino

arduinoatmegaavrdudeflashSecurity

I have found out that one can disassemble an ATmega with objdump or avrdude. And if the LB1 and LB2 bits are set low it would be much harder. So if these bits are set high or just reading the flash is allowed is it possible to extract the strings that the program may contain.

For example, the strings contained in a compile C program that runs e.g. under Linux can be find out by running "strings a.out".

Is it possible to read the strings from an ATmega similar to the "strings a.out" example?

Best Answer

If you read out the ATmega's binary program, and store it in a file, strings will work.

Often C is used to program ATmega's, and it will store strings in exactly the same way as strings are stored on by C on Linux. They are '\0' terminated sequences of bytes, usually ASCII. It is such a useful string format, that people often do the same thing with assembler.

It is many years since I looked at the details, but the strings program used to work by looking for '\0' characters, then reading backwards over plausible ASCII characters.