Whaaat?? How To Extract HEX Code from Arduino

Поділитися
Вставка
  • Опубліковано 4 жов 2024

КОМЕНТАРІ • 144

  • @ELECTRONOOBS
    @ELECTRONOOBS  Рік тому +5

    Join my Arduino Course (Spanish): bit.ly/2JY8icE
    My Tools: bit.ly/3uv8bc3
    Help me on Patreon: www.patreon.com/ELECTRONOOBS

    • @nazarost2061
      @nazarost2061 Рік тому

      Hi, what about 3d printed planes? Would it fly some day?

  • @kunalrai3389
    @kunalrai3389 Рік тому +15

    This is most helpful video for me because I wanted to know this in my college time, at that time I didn't found any video with in proper way.

  • @Pidd2424
    @Pidd2424 Рік тому +2

    finally there is also a discussion on how to extract HEX files. this is very helpful, where I sometimes forget to save the uploaded INO project file

  • @markgunnison
    @markgunnison Рік тому +3

    Perfect timing. I’m just starting to learn to program directly to chips.

  • @stchupidee
    @stchupidee 5 місяців тому +1

    Thank you so very much-this helped me get some key code uploaded to my Nano. As a newbie this would not have been possible without your help. I'm very grateful. Thank you.

  • @nzoomed
    @nzoomed 8 місяців тому +2

    Something that should be mentioned is there are fuses to prevent the reading of the code so no one can copy your work if needed.

  • @neozeo4245
    @neozeo4245 Рік тому +2

    wow very nice tutorial! Thanks! definitely need to check out extracting the EEPROM

  • @kartikrajurkar3708
    @kartikrajurkar3708 Рік тому +7

    Very nice video, really appreciate your work. I think this method only works when the controller is unlocked via are fuses, once controller is lock (hardware lock) we may be able to read fuse value but reading hex and reprogramming the controller again will not be possible. Be careful while locking the controller 😉

    • @btomas225
      @btomas225 Рік тому +1

      I'm not sure the above is true. I have read that once locked via the fuses, if it is attempted to read the device it will be erased first and then you can reprogram the device. So the device can be updated and used again. I'm no expert and I don't know the veracity of this statement but I recall reading this somewhere at sometime.

    • @Henry-sv3wv
      @Henry-sv3wv Рік тому

      You can disable Reset pin to turn it into another IO. That will lock you out of ISP programing mode cause reset is needed for that. Then you can only program the AVR with a special HV programmer or re enable reset with such a HV programmer.
      But if locked out of ISP i guess you can still use the arduino serial bootloader for programming if it is already on the chip...
      erasing the chip to reset read protection is possible

  • @JonathanDeWitt1988
    @JonathanDeWitt1988 Рік тому +3

    Andrei,
    I really appreciate this video. It is very useful information to know. I'm a member of many Facebook microcontroller groups. In one of the more popular groups Arduino for Beginners I see the question come up all the time about extracting code from an Arduino. I've never heavily researched the topic myself because I've never had the need. But it is useful and helpful to see how it is done. Thank you for taking the time to create and share this :) Now I have a specific tutorial I can refer those who ask that question.

  • @oussamathedjfreeman
    @oussamathedjfreeman Рік тому +3

    talk about fuse lock byte and how to avoid cloning your code :) the opposit way so

  • @sMAGTECH
    @sMAGTECH Рік тому +4

    Very useful information. Thank you. But please teach us how to prevent our code from copying. It will be halpful. Thank you once again.

    • @Henry-sv3wv
      @Henry-sv3wv Рік тому +2

      Code wants to be free. That's why we won't tell you.

  • @proximasmentes
    @proximasmentes 5 місяців тому

    Such a great tutorial!! Thanks so much!! It was the first time I could achieve the cloning of a 328P! :)

  • @geekrulz1
    @geekrulz1 Рік тому +3

    there is a way to reverse engineer hex files, using ghydra it would be posible for example

  • @walter5087
    @walter5087 Рік тому

    Amazing...you're best engineer ever..regards from guatemala

  • @FridayHouseXYZ
    @FridayHouseXYZ Рік тому +2

    Neat! I will have to try this on a few boards. Makes me want to look for a way to convert the HEX into code again.

    • @Shocker99
      @Shocker99 Рік тому +3

      Probably not worth your time. Hex is converted to assembly. Then you have to match the assembly with C++ libraries. And then convert it to the program observed in the IDE.
      There are probably some reverse engineering tools available which would make it easier but i imagine it's still a challenge.
      There is a fuse that can be set to inhibit reading of the chip. If there is anything worth protecting and the developer is reasonably good, this fuse will be set.

    • @FridayHouseXYZ
      @FridayHouseXYZ Рік тому

      @@Shocker99 You are right, I did look into it after posting that, and yes, this is exactly what I found. It would be cool, but not really worth the effort.

    • @Henry-sv3wv
      @Henry-sv3wv Рік тому +1

      @@FridayHouseXYZ
      That's what a c++ compiler does. Translates to (architecture dependend) machine code. For your PC it will be X86_64 opcode.
      A program for the Pico RP2040 will be translated to ARMv6-M Thumb instruction set.

  • @daddyroger504
    @daddyroger504 Рік тому

    This is what i want to know how to extract from microcontroller many years now when i start learn about Arduino now you start make that video

  • @gavinmurray9645
    @gavinmurray9645 Рік тому +1

    Brilliant, all other sites say that you can not do this, I now know that you can.

    • @ELECTRONOOBS
      @ELECTRONOOBS  Рік тому

      Well you can't get the code for Arduino. Just the hex code so you couldn't edit the code in Arduino IDE

    • @ShahZahid
      @ShahZahid Рік тому

      well that is partially correct, for something like STM32 chips you can lock the flash that way no one can read the chips code but still there are some attacks to even get past that but thats just too tedious

    • @AnalogDude_
      @AnalogDude_ Рік тому

      also on Microchip pic's you can lock it.

  • @aniruddhabnj
    @aniruddhabnj Рік тому +2

    Could you please share the fuse bit settings that will stop copying the hex file

  • @bolt0sito
    @bolt0sito Рік тому +2

    GREAT VIDEO, CAN YOU SHOW US HOW TO PROTECT OUR ARDUINO CODES FROM BEEN COPIED?

  • @AJayTheStageArtist
    @AJayTheStageArtist Рік тому +1

    Oh my this is i looking for from long time..thank you so much for your effort

  • @ezzeldin101
    @ezzeldin101 Рік тому

    This could save me in a lot of situations, Thanks bro!

  • @rizwanhameed5791
    @rizwanhameed5791 Рік тому +2

    How can we lock/protect our atmega328p. There a 4 lock bits , what are the functions of these bits. Explain.........

    • @ELECTRONOOBS
      @ELECTRONOOBS  Рік тому +1

      You could protect your code so nobody could copy it...

    • @Shocker99
      @Shocker99 Рік тому

      Datasheets for microcontrollers outline how to protect your code from being extracted. There is a protection fuse/register that needs to be set.

    • @rizwanhameed5791
      @rizwanhameed5791 Рік тому

      @@ELECTRONOOBS Program And Data Memory Lock Bits
      The Atmel® ATmega328P provides six lock bits
      BLB12
      BLB11
      BLB02
      BLB01
      LB2
      LB1
      Boot Lock Bits and Lock Bits respectively.
      What are the functionality of this bits
      What if i only read protect my code or full lock so microcontroller can not be programmed afterwards.

  • @yameenansari9039
    @yameenansari9039 Рік тому

    Thankyou for everything you uploaded very helpful for me to understand really love you brother from India ❤

  • @drelectronics13
    @drelectronics13 Рік тому

    Ok this is first like in ,2023 ,loved the video 🙌

  • @vegansynths7757
    @vegansynths7757 9 місяців тому

    You rock. I hope one day you will do an in depth video of the ESP-32's.

    • @ELECTRONOOBS
      @ELECTRONOOBS  9 місяців тому +1

      I'm on it! Soon, since I still learning about them!

    • @vegansynths7757
      @vegansynths7757 9 місяців тому

      Me too! @@ELECTRONOOBS

  • @parthpatel1605
    @parthpatel1605 Рік тому

    Nice explained 👍.
    Now Can you plz make a next vedio opposite to ☝️this vedio that how could we safe our written code from being copied.🤔
    I think as I m reading comments most of have asked same like me😅☝️

  • @ricardomarques1769
    @ricardomarques1769 Рік тому

    Great video, nice to see these videos.
    I use the avr PROGISP software which allows all that, and is compatible with multiple AVR Microcontrollers, it allows the user to lock the bootloader, look to which fuses are being configured, etc...

  • @monolith4076
    @monolith4076 Рік тому

    All your videos are great! Arduino is a learning starting point - your videos are completing that!
    Hope you will find a way to use arduino as a working base for programs loaded on a SD mem card, witch are uploaded with a push of a button

  • @kiatech
    @kiatech 7 місяців тому

    Thank you for the detailed video; very informative.
    Can I extract the flash from ATmega328P and then upload it into a different ATmega chip model, like ATmega2560?

  • @S.K.Koley.
    @S.K.Koley. Рік тому +2

    Love your videos ❤️ 😍

  • @crisselectronicprojects8408
    @crisselectronicprojects8408 10 місяців тому

    Good work!
    But, there is a solution to not being able to copy the sketch from inside any microcontroller. Because I had the opportunity to be asked to make a sketch and the person in question dared to ask me if he could copy the code. I didn't answer him for two days. During this time I looked for ways to copy. And finally I managed to make a sketch with protection. How? Well, if the ISP is used for copying, I blocked a pin from the ISP in the sketch. That pin is activated with 3 passwords. When trying to copy, the respective pin being necessary for copying, will lead to damage to the sketch.

  • @ranenclifton8282
    @ranenclifton8282 7 місяців тому

    Could you use this to essentially clone the current Arduino uno to a brand new unused unit? We have a fixture at my work that uses an arduino uno and the person who made it no longer works there and didn't save the files for future use.

  • @maxjanssen9327
    @maxjanssen9327 6 місяців тому

    Very good explanation. Thank you!

  • @subhabratabasu266
    @subhabratabasu266 Рік тому

    This video is good..
    But How can we protect our code so that anyone cannot steal our code..
    Please make a video on this if possible or give some resources from where we can learn.

  • @moinshaikh6684
    @moinshaikh6684 Рік тому

    Jabraad be bhaiwa!

  • @nguyenback7694
    @nguyenback7694 Рік тому

    Hi, can you show me how to calculate phase transition time or correct phase transition in your source, i have watched many times but still don't understand this part, by the way can i ask for some advice on phase transition after detecting zero point is 3 opame. thank you

  • @ProgrammerEA
    @ProgrammerEA 3 місяці тому

    Is it possible to extract FW from new Arduino MKR NB 1500 boards??

  • @tattoome_eu
    @tattoome_eu 10 місяців тому

    will it work if I do the same as you, but use a clean, never used atmega328p? Will I have to upload the bootloader first? or don't I have to?

  • @husky-nu3xk
    @husky-nu3xk 11 днів тому

    This is fabulous

  • @sainisahilindia
    @sainisahilindia Рік тому

    Electronoobs can you make pure sine wave vfd three phase with uno
    Also has lcd for displaying frequency

  • @jeffschroeder4805
    @jeffschroeder4805 Рік тому +1

    Is this a way that someone could find out our WIFI SSID and passwords if they had access to one of our Arduino or ESP boards?

    • @ELECTRONOOBS
      @ELECTRONOOBS  Рік тому

      Nope. Yo can never see the real code in text format. Only 1s and 0s

    • @gcm4312
      @gcm4312 Рік тому

      @@ELECTRONOOBS you can reverse it. especially if they are stored as strings in memory this is trivial. run `strings` on the unpacked intel hex file (what you got is not properly the devices memory but a packed format - called intel hex - that when unpacked will give you the binary.)

    • @ShahZahid
      @ShahZahid Рік тому +2

      can be done but would require quiet a bit of effort, but you can just lock the flash for most microcontroller in order to protect your code that's what most commercial products do

  • @vladi_g
    @vladi_g Рік тому

    Electroboobs rulez ))

  • @Enderkruemel
    @Enderkruemel Рік тому

    Why dont use the 6pins on the back on each Arduino? They are ment for doing exactly this i think...
    I have only one Problem, i used the Arduino ide and set the clock accidently from the internal to an external oscillator on an attiny13, and dont know how to set it back to Default. Is it possible to reprogramm it without any clock signal by just overwrite all stuff in its memory or does this overwrite need the clock?

    • @Henry-sv3wv
      @Henry-sv3wv Рік тому

      yes it's the 6 pin ISP, In-System Programming avr connector. avr ISP programmers often have 10 pin but there is an adapter

  • @sandaiulian8630
    @sandaiulian8630 3 місяці тому

    Hey, is it possible to extract the hex, eeprom and fuses of non-arduino bootloaded controllers?

  • @blabberbytes9967
    @blabberbytes9967 7 місяців тому

    Getting "WARNING: Unable to detect MCU" Any suggestions?

  • @micromachine9975
    @micromachine9975 Рік тому

    Buenas
    Estoy recreando el circuito que hiciste con el attiny85 y el módulo de 433 MHz. Pero el programa del receptor da problemas. Podrías probarlo tu para ver que es lo que no funciona?
    Un saludo

  • @gtag174
    @gtag174 Рік тому

    How is the extracted code edited to change the time ? Is it upload into Arduino IDE in anyway. Did not see that part in the video.

  • @Mohamed41538
    @Mohamed41538 10 місяців тому

    Hello my friend, how are you? I have a hex file. Can it be restored to the original C language?

  • @creativeeon
    @creativeeon 26 днів тому

    When i get hex file from arduino? can i edit this file like configuration file in arduino ide program?

  • @AnalogDude_
    @AnalogDude_ Рік тому

    Did ya check out the Fubarino?
    a much better thing compatible with the IDE.

    • @Henry-sv3wv
      @Henry-sv3wv Рік тому

      Fubarino does have a PIC controller. No thanks. I want something with a free gcc compiler. So something with ARM like stm32 or RP2040 and for IOT/Wifi: ESP32 and ESP8266

  • @jetraid
    @jetraid Рік тому +1

    Excellent, now we need a decompiller.

  • @CleoKawisha-sy5xt
    @CleoKawisha-sy5xt Рік тому +1

    hex is not 1's and 0's

    • @arturwiebe7482
      @arturwiebe7482 5 місяців тому

      Sure, 4 bits, 1 nibble

    • @commandoPR
      @commandoPR 3 місяці тому

      ... If you're too lazy to do the calculations.

  • @onlynation1509
    @onlynation1509 10 місяців тому

    How to edit hex code or convert to c or any other language

  • @MahBor
    @MahBor Рік тому

    I was told many times in many forums that this was impossible!

  • @deepraman8392
    @deepraman8392 Рік тому

    Please help with the link to buy these arduino parts

  • @shakirabdo638
    @shakirabdo638 4 місяці тому

    Amazing ❤

  • @yoshcopyright
    @yoshcopyright Рік тому

    easy very easy for this😊😂

  • @badraa7838
    @badraa7838 Рік тому

    Great video!

  • @wali-q1c
    @wali-q1c Рік тому

    لابأس جميل متفوق

  • @TheRaj6765
    @TheRaj6765 Рік тому

    How to extract the code from NodeMcu module ?

  • @diyelectrovids6536
    @diyelectrovids6536 4 місяці тому

    Anyone having trouble extracting HEX code with CP2102 USB to UART converter?

  • @donaldkormos5529
    @donaldkormos5529 Рік тому

    Great video!!!

  • @xianyingzhang1106
    @xianyingzhang1106 8 місяців тому

    如果有中文就更好了😂这样我能更好的学习

  • @tariqnrabeeje5742
    @tariqnrabeeje5742 Рік тому

    Is it possible to hack the controller and get the code if it is protected

  • @kaviarasan4566
    @kaviarasan4566 Рік тому

    Where can i download avrdudess??

  • @bahaajobs
    @bahaajobs Рік тому

    I have 2 questions please
    First question: is it possible to convert the hex code back to C language?
    Second question: is it possible to protect the code from being copied?
    Thank you in advance

  • @requiem4adreamc
    @requiem4adreamc Рік тому

    Can i use esp32 as master?

  • @drelectronics13
    @drelectronics13 Рік тому

    I heard mcu can be locked so you can extract data ,is it ?

    • @ShahZahid
      @ShahZahid Рік тому +1

      yes that us true but again there are methodes like power cycle attacks to even bypass that

    • @pritambakshi6936
      @pritambakshi6936 Рік тому

      @@ShahZahid it is Possible?

    • @drelectronics13
      @drelectronics13 Рік тому

      @@ShahZahid yeah i have seen some extracting code while boot

  • @explorerpragun431
    @explorerpragun431 Рік тому

    I think we can also convert the hex code into c code why don't you give it a try

  • @hicham_ben_omar
    @hicham_ben_omar Рік тому

    Super cool

  • @fuhadrock6370
    @fuhadrock6370 Рік тому

    So can I upload code to arduino nano using arduino nano......

    • @btomas225
      @btomas225 Рік тому +1

      Yes...I have done that.

    • @fuhadrock6370
      @fuhadrock6370 Рік тому

      @@btomas225 Ok Sir plz explain it.... How did u do it.....

  • @Maruchipawa
    @Maruchipawa Рік тому

    Thanks!

  • @tech1706
    @tech1706 Рік тому

    Great!!

  • @justchill4886
    @justchill4886 Рік тому

    can i fix my broken uno with this method? i tried literally everything but dead

    • @Golkun1
      @Golkun1 Рік тому

      You can use a HV-programmer to fix your chip

    • @justchill4886
      @justchill4886 Рік тому

      @@Golkun1 does it work with chinise atmel chip

    • @justchill4886
      @justchill4886 Рік тому

      @@Golkun1 thank you so much i will search detailly

    • @Golkun1
      @Golkun1 Рік тому

      @@justchill4886 if they are 100% compatible you should be successful. But it depends on what is the issue with your UNO. Typically HV-Programmers can fix wrongly set fuse bits.

    • @justchill4886
      @justchill4886 Рік тому

      @@Golkun1 i will try to do this tomorrow

  • @Tutorreal_msc7621
    @Tutorreal_msc7621 Рік тому

    How to extract hex arduino to lock

  • @BharatMohanty
    @BharatMohanty Рік тому

    Something new...( Never used an Arduino )

  • @nithylabs
    @nithylabs Рік тому

    Or can i get one if ur products for free?

  • @wizdumb420
    @wizdumb420 Рік тому +1

    16 != 2

  • @nithylabs
    @nithylabs Рік тому

    Can i get one 328p?

  • @FranikNoriega
    @FranikNoriega Рік тому

    Hey bro, i love your videos. I cant afford to help you on patreon but i can help you with your translations. Dont get me wrong, you speak great english.... in fact better than most, but i feel if you had someone that you could run your scripts by prior to uploading your videos, it would help you out. I dont mind helping you out with this. LMK if you are interested and ill send you my info. Sorry, i dont want to just post my info directly onto the comments for privacy reasons, hope you can understand why.

    • @ELECTRONOOBS
      @ELECTRONOOBS  Рік тому

      Thanks a lot :) But I think I will continue like this

  • @rob_scooter6199
    @rob_scooter6199 Рік тому

    thanks👍

  • @dtpc_technologies
    @dtpc_technologies Рік тому +2

    Thanks for teaching everyone how they can copy others hard-worked projects.

    • @309electronics5
      @309electronics5 Рік тому +3

      they will even do it without this video, you cant stop hardware hackers every hardware hacker likes extracting code they do it in a blink of a eye you cant stop it, this comment is sort of dumb people will always find ways to extract code and other firmwares

    • @dtpc_technologies
      @dtpc_technologies Рік тому

      @@309electronics5 Yeah this is like saying that thiefs will anyway rob banks but it is okay if someone is teaching robbery upfront right?

    • @Shocker99
      @Shocker99 Рік тому

      @@309electronics5 Depends on the device and the programmer. Most exploits you see hack the code by bypassing the debug mode check at boot up. Something that companies/programmers leave in the code and just turn off when they ship the product. The debug mode essentially gives the hacker god mode on the device. The debug mode is in the user space, not the root hardware space, which makes it easier to bypass - even if it's days/weeks on constant attempts.

    • @hugobracamontesbaltazar
      @hugobracamontesbaltazar Рік тому

      Don't bother him, everyone does the same...

    • @arminescobar5447
      @arminescobar5447 Рік тому +1

      It's a factory option, if you have to hide your code, May be you need to use another microcontroller

  • @sammin5764
    @sammin5764 Рік тому

    🌟🌟🌷🌷🌟🌟

  • @H2Opow
    @H2Opow Рік тому

    Hi.... From Spain.... Por favor... Haz este tema en español..... Un abrazo.

  • @soerenraudonis
    @soerenraudonis Рік тому

    It’s a shame to see how compiler bloat up simple Code who is also realiseble with simple Prozessor Codes

    • @Henry-sv3wv
      @Henry-sv3wv Рік тому

      I use micro python to make you assembly fetishists even more depressive XD

    • @soerenraudonis
      @soerenraudonis Рік тому

      @@Henry-sv3wv Never my problem what other people think to need to do…

    • @threeMetreJim
      @threeMetreJim Рік тому

      It's not a problem when you have plenty of memory. It's the needed libraries that cause 'bloat'. Assembly is good if you have a tiny memory and only want to do counters and bit shifting, but as soon as you want to do some maths, you'll be glad for a higher level language.

    • @soerenraudonis
      @soerenraudonis Рік тому

      @@threeMetreJim watch the c64 demos of 95 and take a guess what’s possible if people take more care about code efficiency… we are at a point where you need psychology to interpret code and where maschineschrieb do the coding…

    • @threeMetreJim
      @threeMetreJim Рік тому

      @@soerenraudonis I started on 6502 years ago hacking games for 8 bit computers and done some PIC micro (all in assembler). I wrote a 6502 assembler in 6502 years ago too (assembled via a BASIC program until it could assemble itself, the speed increase was impressive). I've managed to squeeze a fair bit into 8k of instruction space on a PIC (one project only 512 words) and only used integer multiplication and division. Assembly is great if you need exact timing or want to do really low level hardware stuff, but for anything more complicated.... Just look at the complexity of floating point maths in assembler. All you end up doing is writing your own routines that do the same as a library in the end. I can only imagine the difficulty (and time taken) to code something like a web server in assembly (on an ESP - is the instruction set and hardware manual even available?)

  • @herbertpayson
    @herbertpayson Рік тому

    Hexadecimal is not binary hence you are wrong when you say ones and zeros.

  • @letsgetto1millwithoutvids
    @letsgetto1millwithoutvids 5 місяців тому

    I thought is was basivally impossible to extract the code from the arduino ahh you cant its just the hex data and hex is not 1`s and o's

  • @letsgetto1millwithoutvids
    @letsgetto1millwithoutvids 5 місяців тому

    Someone turn this into a flipper zero app

  • @blabberbytes9967
    @blabberbytes9967 7 місяців тому

    Getting "WARNING: Unable to detect MCU" Any suggestions?