Тёмный

Whaaat?? How To Extract HEX Code from Arduino 

Electronoobs
Подписаться 575 тыс.
Просмотров 57 тыс.
50% 1

High quality PCB prototypes: www.pcbway.com
🔥How to extract an existing code back from an Arduino using AVRDUDESS. Store the code in a hexadecimal file and then be able to upload it to any other Arduino. Full tutorial for Flash, EEPROM and fuses part.
🔀LINKS
-------------------------------------
Tutorial page: electronoobs.com/eng_arduino_...
My tools: electronoobs.com/eng_afiliate...
False/True T-Shirt: teespring.com/it-s-funny-beca...
🤝SUPPORT
-------------------------------------
Join my Arduino Course (Spanish): bit.ly/2JY8icE
ELECTRONOOBS.io: electronoobs.io
Donate on PayPal: www.paypal.com/donate?hosted_...
Help my projects on Patreon : / electronoobs
my Q&A page: electronoobs.io/forum/index.php
Facebook page: / electronoobs
Canal en Español: / electronoobs en español
00:00 Intro
01:47 The microcontroller
02:40 AVR Blocks
04:07 Flash Memory
05:44 ISP Programmer
06:35 Extract Fuses
08:21 Extract Code & EEPROM
10:15 Upload back the code
12:14 Thank You
Like share and subscribe to motivate me. Thank you
#electronics
#homemade
#Arduino

Наука

Опубликовано:

 

5 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 147   
@ELECTRONOOBS
@ELECTRONOOBS Год назад
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 Год назад
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 Год назад
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
@neozeo4245
@neozeo4245 Год назад
wow very nice tutorial! Thanks! definitely need to check out extracting the EEPROM
@stchupidee
@stchupidee 2 месяца назад
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.
@walter5087
@walter5087 Год назад
Amazing...you're best engineer ever..regards from guatemala
@markgunnison
@markgunnison Год назад
Perfect timing. I’m just starting to learn to program directly to chips.
@proximasmentes
@proximasmentes 2 месяца назад
Such a great tutorial!! Thanks so much!! It was the first time I could achieve the cloning of a 328P! :)
@ezzeldin101
@ezzeldin101 Год назад
This could save me in a lot of situations, Thanks bro!
@yameenansari9039
@yameenansari9039 Год назад
Thankyou for everything you uploaded very helpful for me to understand really love you brother from India ❤
@AJayTheStageArtist
@AJayTheStageArtist Год назад
Oh my this is i looking for from long time..thank you so much for your effort
@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...
@JonathanDeWitt1988
@JonathanDeWitt1988 Год назад
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.
@ELECTRONOOBS
@ELECTRONOOBS Год назад
Glad I was able to help :))))
@maxjanssen9327
@maxjanssen9327 3 месяца назад
Very good explanation. Thank you!
@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
@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
@S.K.Koley.
@S.K.Koley. Год назад
Love your videos ❤️ 😍
@FridayParanormal
@FridayParanormal Год назад
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 Год назад
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.
@FridayParanormal
@FridayParanormal Год назад
@@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 Год назад
@@FridayParanormal 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.
@kartikrajurkar3708
@kartikrajurkar3708 Год назад
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 Год назад
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
@moinshaikh6684
@moinshaikh6684 Год назад
Jabraad be bhaiwa!
@vegansynths7757
@vegansynths7757 6 месяцев назад
You rock. I hope one day you will do an in depth video of the ESP-32's.
@ELECTRONOOBS
@ELECTRONOOBS 6 месяцев назад
I'm on it! Soon, since I still learning about them!
@vegansynths7757
@vegansynths7757 6 месяцев назад
Me too! @@ELECTRONOOBS
@badraa7838
@badraa7838 Год назад
Great video!
@kiatech
@kiatech 4 месяца назад
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?
@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
@aniruddhabnj
@aniruddhabnj Год назад
Could you please share the fuse bit settings that will stop copying the hex file
@drelectronics13
@drelectronics13 Год назад
Ok this is first like in ,2023 ,loved the video 🙌
@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😅☝️
@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
@gavinmurray9645
@gavinmurray9645 Год назад
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.
@tattoome229
@tattoome229 7 месяцев назад
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?
@shakirabdo638
@shakirabdo638 Месяц назад
Amazing ❤
@sMAGTECH
@sMAGTECH Год назад
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 Год назад
Code wants to be free. That's why we won't tell you.
@bolt0sito
@bolt0sito Год назад
GREAT VIDEO, CAN YOU SHOW US HOW TO PROTECT OUR ARDUINO CODES FROM BEEN COPIED?
@ranenclifton8282
@ranenclifton8282 4 месяца назад
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.
@oussamathedjfreeman
@oussamathedjfreeman Год назад
talk about fuse lock byte and how to avoid cloning your code :) the opposit way so
@geekrulz1
@geekrulz1 Год назад
there is a way to reverse engineer hex files, using ghydra it would be posible for example
@ProgrammerEA
@ProgrammerEA 26 дней назад
Is it possible to extract FW from new Arduino MKR NB 1500 boards??
@nzoomed
@nzoomed 5 месяцев назад
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.
@Maruchipawa
@Maruchipawa Год назад
Thanks!
@vladi_g
@vladi_g Год назад
Electroboobs rulez ))
@gtag174
@gtag174 9 месяцев назад
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.
@yoshcopyright
@yoshcopyright Год назад
easy very easy for this😊😂
@sandaiulian8630
@sandaiulian8630 15 дней назад
Hey, is it possible to extract the hex, eeprom and fuses of non-arduino bootloaded controllers?
@sainisahilindia
@sainisahilindia Год назад
Electronoobs can you make pure sine wave vfd three phase with uno Also has lcd for displaying frequency
@hicham_ben_omar
@hicham_ben_omar Год назад
Super cool
@user-dz5df8wh5l
@user-dz5df8wh5l Год назад
لابأس جميل متفوق
@tech1706
@tech1706 Год назад
Great!!
@rob_scooter6199
@rob_scooter6199 Год назад
thanks👍
@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.
@rizwanhameed5791
@rizwanhameed5791 Год назад
How can we lock/protect our atmega328p. There a 4 lock bits , what are the functions of these bits. Explain.........
@ELECTRONOOBS
@ELECTRONOOBS Год назад
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.
@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
@MahBor
@MahBor Год назад
I was told many times in many forums that this was impossible!
@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
@crisselectronicprojects8408
@crisselectronicprojects8408 7 месяцев назад
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.
@xianyingzhang1106
@xianyingzhang1106 5 месяцев назад
如果有中文就更好了😂这样我能更好的学习
@onlynation1509
@onlynation1509 7 месяцев назад
How to edit hex code or convert to c or any other language
@Mohamed41538
@Mohamed41538 7 месяцев назад
Hello my friend, how are you? I have a hex file. Can it be restored to the original C language?
@deepraman8392
@deepraman8392 Год назад
Please help with the link to buy these arduino parts
@jetraid
@jetraid Год назад
Excellent, now we need a decompiller.
@blabberbytes9967
@blabberbytes9967 4 месяца назад
Getting "WARNING: Unable to detect MCU" Any suggestions?
@TheRaj6765
@TheRaj6765 Год назад
How to extract the code from NodeMcu module ?
@requiem4adreamc
@requiem4adreamc Год назад
Can i use esp32 as master?
@jeffschroeder4805
@jeffschroeder4805 Год назад
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 Год назад
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
@ELECTRICALWARRIORS
@ELECTRICALWARRIORS Год назад
How do I do this with pic microcontroller sir
@ELECTRONOOBS
@ELECTRONOOBS Год назад
I don't know for now... I'll search for a solution.
@kaviarasan4566
@kaviarasan4566 Год назад
Where can i download avrdudess??
@drelectronics13
@drelectronics13 Год назад
I heard mcu can be locked so you can extract data ,is it ?
@ShahZahid
@ShahZahid Год назад
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
@diyelectrovids6536
@diyelectrovids6536 Месяц назад
Anyone having trouble extracting HEX code with CP2102 USB to UART converter?
@BharatMohanty
@BharatMohanty Год назад
Something new...( Never used an Arduino )
@nithylabs
@nithylabs Год назад
Can i get one 328p?
@tariqnrabeeje5742
@tariqnrabeeje5742 Год назад
Is it possible to hack the controller and get the code if it is protected
@ELECTRICALWARRIORS
@ELECTRICALWARRIORS Год назад
I want to extract code or hex file back from pic microcontroller kindly help me sir
@ELECTRONOOBS
@ELECTRONOOBS Год назад
I don't know for now... I'll search for a solution.
@ELECTRICALWARRIORS
@ELECTRICALWARRIORS Год назад
Ok thank you sir for your reply kindly give me a solution i forgot my previous uploaded code and i didn't remember where did i save that file now i want to re upload in another pic microcontroller thanks
@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
@wizdumb420
@wizdumb420 Год назад
16 != 2
@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
@Tutorreal_msc7621
@Tutorreal_msc7621 Год назад
How to extract hex arduino to lock
@fuhadrock6370
@fuhadrock6370 Год назад
So can I upload code to arduino nano using arduino nano......
@btomas225
@btomas225 Год назад
Yes...I have done that.
@fuhadrock6370
@fuhadrock6370 Год назад
@@btomas225 Ok Sir plz explain it.... How did u do it.....
@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
@nithylabs
@nithylabs Год назад
Or can i get one if ur products for free?
@explorerpragun431
@explorerpragun431 Год назад
I think we can also convert the hex code into c code why don't you give it a try
@divyanshu_harkhka
@divyanshu_harkhka Год назад
Thanks for teaching everyone how they can copy others hard-worked projects.
@309electronics5
@309electronics5 Год назад
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 Год назад
It's a factory option, if you have to hide your code, May be you need to use another microcontroller
@H2Opow
@H2Opow Год назад
Hi.... From Spain.... Por favor... Haz este tema en español..... Un abrazo.
@CleoKawisha-sy5xt
@CleoKawisha-sy5xt Год назад
hex is not 1's and 0's
@arturwiebe7482
@arturwiebe7482 2 месяца назад
Sure, 4 bits, 1 nibble
@commandoPR
@commandoPR 5 дней назад
... If you're too lazy to do the calculations.
@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 2 месяца назад
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 2 месяца назад
Someone turn this into a flipper zero app
@donaldkormos5529
@donaldkormos5529 Год назад
Great video!!!
@blabberbytes9967
@blabberbytes9967 4 месяца назад
Getting "WARNING: Unable to detect MCU" Any suggestions?
Далее
REAL Debugging Arduino + ESP32 | JTAG Programmer
9:05
Pin Change Interruptions ISR | PCINT | Arduino101
14:19
Четыре тормоза
00:53
Просмотров 50 тыс.
MC TAXI: АК-47
35:14
Просмотров 527 тыс.
EEPROM Memory - Store Anything - Arduino101
13:16
Просмотров 100 тыс.
FOC Driver + Feedback Magnetic Sensor - Arduino
14:34
How to Clone Arduino's
7:16
Просмотров 11 тыс.
CAN Bus: Serial Communication - How It Works?
11:25
Просмотров 206 тыс.
🛑 STOP! SAMSUNG НЕ ПОКУПАТЬ!
1:00
Просмотров 341 тыс.