Decreasing chance of reverse engineering/code tampering

Hi all,

I have an arduino-based product I'm planning to sell. I don't want customers to try to access the code or board. What are some ways to decrease the chance of that?

I was thinking to remove/de-solder the USB input, or put superglue/hot glue to seal the socket. Perhaps loctite the screws on the outer housing to make it more difficult to access the board.

I know the code that can still be reverse engineered is binary and not the actual C++, but I would still like to decrease customer tampering if able.

Any ideas?

As your question relates to your own project and not to the Arduino project itself it has been moved to a more relevant forum category

Reality:

Be aware that if people see the behavior of your application, it is often far easier (cheaper) to rebuild from scratch then to try to reverse engineer it.

Some ideas to spent time to make reverse engineering more difficult:

  • blank all identification on chips resistors and PCB e.g 4.7K 10uF DHT22.
  • use a 6 layer PCB, place GND and 5V layer on the outside so all logical tracks are in the middle 4 and hard to see with X-ray
  • place unused components on the PCB as smoke screen (or even merge another application on the same board in an illogical way)
  • place components as irritating as possible
  • add smoke screen code in your sketch to make it fill up the PROGMEM (without disturbing the main code). An example is to add code to generate primes distributed in all existing code.
  • encrypt your EEPROM data, constant strings etc.
  • ...

However as said before rebuilding from scratch is often easier, and it allows one to improve on your application, including fixing bugs and introducing new ones ;).

Applications are relative hard to copy if the used algorithms are sophisticated, or some unique hardware (e.g. home made sensor) is used. Patenting those or the whole application is expensive and enforcing patents is even more costly.

The best copy protection might be to keep the price so low that it is financially not interesting to copy or reverse engineer it.

my 2 cents,

Are you sure you don't use any open source code (libraries etc.) that forbids you to do so?

And if you are:

:+1:

Copying can easiliy inhibited by setting lock bits ( at least at AVR processors without a bootloader ). And reverse engineering is nearly impossible if you inhibit reading the binary.

How is it possible to know how the code was compiled once it is inside the Prosessor?(Asking for a friend).

There are software tools called decompilers. It's not a perfect process, but it can be done. I have used them a couple of times.

If the code could be read there will be no traces to a Library.

Are you suggesting that it is OK to break the rules as long as nobody can prove it ?

No , but almost all the Libraries is in public domain.

If the code inside the Arduino is accessible, it can sometimes be determined that an open-source library was used by searching the compiled code for text messages used by the library, fixed data tables from the library, etc. No need to do any decompilation for that.

It might also be noticeable just by looking at output from your code, if it is displaying messages that are commonly associated with a particular library.

Library code of all known versions is an essential part of a decompiler. I used it already in the 80s. Hardware related (firmware) libraries are very easy to identify.

In the public domain, but usually with open source software licenses that require any code that uses the library to be under the same software license, which would require your code to be open source.

Please check the licenses carefully.

Very interesting but if there is no messages? I assume serial prints?

If a person sells a few boards once off nobody will care but if your product runs into the 6 figure range there will be some investigation.

If they are open source, you must follow the rules for open source which includes providing the source or at least a link to the source. Doing so in no way makes your product easier or more difficult to reverse engineer.

Thats the point if I say no Libraries was used my code is not open source so I dont have to show it.

If the code cannot be read (fuse protected) how will anybody have insights of how the code was compiled.

No general unspecified "open source" license exists. Instead any number of license schemes can be used: GPL, LGPL, BSD, MIT...
Also (additional, paid) licenses without open source restrictions may exist, at the authors' choice.

There exist other ways to find out more about running code. Also the use of protection mechanisms invites hackers to crack your code, for pure joy and fame.

But the point is proving a open Source Library was used not reverse engineering.

I know that I was using open source as a catch-all.