 Most AVR models can reserve a bootloader region, 256 bytes to 4 KB, where re-programming code can reside.At reset, the bootloader runs first and does some user-programmed determination whether to re-program or to jump to the main application.The code can re-program through any interface available, or it could read an encrypted binary through an Ethernet adapter like PXE.