Whaaat?? How To Extract HEX Code from Arduino

Поделиться
HTML-код
  • Опубликовано: 26 авг 2024

Комментарии • 142

  • @ELECTRONOOBS
    @ELECTRONOOBS  Год назад +4

    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 Год назад +14

    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.

  • @nzoomed
    @nzoomed 7 месяцев назад +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.

  • @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 4 месяца назад +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.

  • @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

  • @neozeo4245
    @neozeo4245 Год назад +2

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

  • @oussamathedjfreeman
    @oussamathedjfreeman Год назад +3

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

  • @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.

  • @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.

  • @geekrulz1
    @geekrulz1 Год назад +3

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

  • @aniruddhabnj
    @aniruddhabnj Год назад +2

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

  • @proximasmentes
    @proximasmentes 4 месяца назад

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

  • @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

  • @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.

  • @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.

  • @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.

  • @walter5087
    @walter5087 Год назад

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

  • @AJayTheStageArtist
    @AJayTheStageArtist Год назад +1

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

  • @yameenansari9039
    @yameenansari9039 Год назад

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

  • @ezzeldin101
    @ezzeldin101 Год назад

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

  • @bolt0sito
    @bolt0sito Год назад +2

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

  • @vegansynths7757
    @vegansynths7757 8 месяцев назад

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

    • @ELECTRONOOBS
      @ELECTRONOOBS  8 месяцев назад +1

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

    • @vegansynths7757
      @vegansynths7757 8 месяцев назад

      Me too! @@ELECTRONOOBS

  • @ranenclifton8282
    @ranenclifton8282 6 месяцев назад

    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.

  • @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...

  • @kiatech
    @kiatech 5 месяцев назад

    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?

  • @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

  • @ProgrammerEA
    @ProgrammerEA 2 месяца назад

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

  • @S.K.Koley.
    @S.K.Koley. Год назад +2

    Love your videos ❤️ 😍

  • @sandaiulian8630
    @sandaiulian8630 2 месяца назад

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

  • @crisselectronicprojects8408
    @crisselectronicprojects8408 8 месяцев назад

    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.

  • @maxjanssen9327
    @maxjanssen9327 5 месяцев назад

    Very good explanation. Thank you!

  • @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

  • @tattoome229
    @tattoome229 8 месяцев назад

    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?

  • @drelectronics13
    @drelectronics13 Год назад

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

  • @onlynation1509
    @onlynation1509 9 месяцев назад

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

  • @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

  • @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

  • @shakirabdo638
    @shakirabdo638 2 месяца назад

    Amazing ❤

  • @moinshaikh6684
    @moinshaikh6684 Год назад

    Jabraad be bhaiwa!

  • @jetraid
    @jetraid Год назад +1

    Excellent, now we need a decompiller.

  • @blabberbytes9967
    @blabberbytes9967 5 месяцев назад

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

  • @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.

  • @gtag174
    @gtag174 11 месяцев назад

    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.

  • @CleoKawisha-sy5xt
    @CleoKawisha-sy5xt Год назад +1

    hex is not 1's and 0's

    • @arturwiebe7482
      @arturwiebe7482 4 месяца назад

      Sure, 4 bits, 1 nibble

    • @commandoPR
      @commandoPR Месяц назад

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

  • @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

  • @TheRaj6765
    @TheRaj6765 Год назад

    How to extract the code from NodeMcu module ?

  • @badraa7838
    @badraa7838 Год назад

    Great video!

  • @sainisahilindia
    @sainisahilindia Год назад

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

  • @deepraman8392
    @deepraman8392 Год назад

    Please help with the link to buy these arduino parts

  • @Mohamed41538
    @Mohamed41538 8 месяцев назад

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

  • @diyelectrovids6536
    @diyelectrovids6536 3 месяца назад

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

  • @kaviarasan4566
    @kaviarasan4566 Год назад

    Where can i download avrdudess??

  • @requiem4adreamc
    @requiem4adreamc Год назад

    Can i use esp32 as master?

  • @MahBor
    @MahBor Год назад

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

  • @tariqnrabeeje5742
    @tariqnrabeeje5742 Год назад

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

  • @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

  • @Tutorreal_msc7621
    @Tutorreal_msc7621 Год назад

    How to extract hex arduino to lock

  • @tech1706
    @tech1706 Год назад

    Great!!

  • @Maruchipawa
    @Maruchipawa Год назад

    Thanks!

  • @xianyingzhang1106
    @xianyingzhang1106 7 месяцев назад

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

  • @hicham_ben_omar
    @hicham_ben_omar Год назад

    Super cool

  • @vladi_g
    @vladi_g Год назад

    Electroboobs rulez ))

  • @nithylabs
    @nithylabs Год назад

    Can i get one 328p?

  • @user-dz5df8wh5l
    @user-dz5df8wh5l Год назад

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

  • @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.....

  • @divyanshu_harkhka
    @divyanshu_harkhka Год назад +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

    • @divyanshu_harkhka
      @divyanshu_harkhka Год назад

      @@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

  • @rob_scooter6199
    @rob_scooter6199 Год назад

    thanks👍

  • @wizdumb420
    @wizdumb420 Год назад +1

    16 != 2

  • @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

  • @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

  • @yoshcopyright
    @yoshcopyright Год назад

    easy very easy for this😊😂

  • @BharatMohanty
    @BharatMohanty Год назад

    Something new...( Never used an Arduino )

  • @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

  • @explorerpragun431
    @explorerpragun431 Год назад

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

  • @nithylabs
    @nithylabs Год назад

    Or can i get one if ur products for free?

  • @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

  • @H2Opow
    @H2Opow Год назад

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

  • @sammin5764
    @sammin5764 Год назад

    🌟🌟🌷🌷🌟🌟

  • @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 4 месяца назад

    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 4 месяца назад

    Someone turn this into a flipper zero app

  • @blabberbytes9967
    @blabberbytes9967 5 месяцев назад

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

  • @donaldkormos5529
    @donaldkormos5529 Год назад

    Great video!!!