📝

Introduction

Required equipment

⚠️

I know that some equipment and micro chips prices skyrocketed in the past months. We do our best to provide you with equipment in DLS classroom.

ATMEGA328P-PU
USB to UART (some are at DLS)
AVRISP-MKII w/ ISP Interface
Logic analyseur (Some are at DLS)

Required software

Xloader
MobaXterm
Saleae Logic
AVRDude

How to flash a .hex file to my board

Most of the time, you will be provided with some .hex files that will have to be flashed on the ATMEGA328P-PU.

ℹ️
if you are provided with other files or formats, additional informations will be provided to explain the setup part.

I want to flash the chip on my board

Lucky for you, this step is quite simple, all you have to do is to download XLoader (linked above) and plug your board to your computer.
Fire up the XLoader app and select the .hex file you want to flash on the board

Once you selected the file to upload to the board, you can select the type of board you plugged to your computer and the com port that is related to the board

⚠️
Baud rate should be automatically changed to fit the board type
  • If that’s not the case here is a table with boards, IC, and baud rate
    BoardICUpload Speed
    Arduino YunATmega32u457600
    Arduino UnoATmega328p115200
    Arduino DuemilanoveATmega32857600
    Arduino DuemilanoveATmega16819200
    Arduino NanoATmega328p57600
    Arduino NanoATmega16819200
    Arduino MegaATmega2560115200
    Arduino MegaATmega128057600
    Arduino LeonardoATmega32u457600
    Arduino MicroATmega32u457600
    Arduino EsploraATmega32u457600
    Arduino MiniATmega328p115200
    Arduino MiniATmega16819200
    Arduino Pro Mini (5V, 16 MHz)ATmega328p57600
    Arduino Pro or Pro Mini (3.3V, 8 MHz)ATmega328p57600
    Arduino BTATmega328p19200
    Arduino BTATmega16819200
    Arduino NGATmega16819200
    Arduino NGATmega819200
    Arduino RobotATmega32u457600
    LilyPad ArduinoATmega328p57600
    LilyPad ArduinoATmega16819200

Just have to click upload then to push the file to the board

I want to flash my bare metal chip

This way of doing require more equipment and might be time consuming, if you own an Arduino board or equivalent, I strongly recommend to use it instead.
Otherwise, here is how to do so :

The first step is to hock the chip to the USB/UART board as follow:

Then in a terminal you can start AVRdude and use the following command :

sudo avrdude -c arduino -p m328p -P /dev/ttyUSB0 -U ./pathTo/chall.ino.hex

Some options might change depending on the chip you are using, here is some documentation for a first troubleshooting

Upload Hex file on Arduino using AVRDUDE (Programming AVR Boards)
In this tutorial, you will learn exactly what AVR DUDE is? How to install it? and how to upload a HEX file on any Arduino board or AVR Microcontroller using AVRDUDE. First lets get into the details of AVRDUDE! AVRDUDE: AVRDUDE is an acronym for AVR downloader uploader.
https://adduino.com/upload-hex-file-on-arduino-using-avrdude-programming-avr-boards/

⚠️
More informations and datasheets can be found on my website
Documentation
https://whiterose-infosec.super.site/documentation

Here is the flag to confirm you have read the informations about the basics of electronics and that you are ready to dive in the upcoming challenges : CTF-DLS{l3tS_Burn_S0m3_ChipS}

Feel free to contact me on Discord Whiterose#6600 so I can assist you in the process or answer to any technical difficulties regarding the flashing process or other.

Remember : Read the doc twice, cable up once and most importantly, have fun