Whaaat?? How To Extract HEX Code from Arduino

  Рет қаралды 62,963

Electronoobs

Electronoobs

Күн бұрын

Пікірлер: 144
@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
@markgunnison
@markgunnison Жыл бұрын
Perfect timing. I’m just starting to learn to program directly to chips.
@stchupidee
@stchupidee 6 ай бұрын
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.
@neozeo4245
@neozeo4245 Жыл бұрын
wow very nice tutorial! Thanks! definitely need to check out extracting the EEPROM
@nzoomed
@nzoomed 9 ай бұрын
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.
@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
@walter5087
@walter5087 Жыл бұрын
Amazing...you're best engineer ever..regards from guatemala
@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 :))))
@proximasmentes
@proximasmentes 6 ай бұрын
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
@AJayTheStageArtist
@AJayTheStageArtist Жыл бұрын
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!
@FridayHouseXYZ
@FridayHouseXYZ Жыл бұрын
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.
@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 Жыл бұрын
@@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.
@yameenansari9039
@yameenansari9039 Жыл бұрын
Thankyou for everything you uploaded very helpful for me to understand really love you brother from India ❤
@aniruddhabnj
@aniruddhabnj Жыл бұрын
Could you please share the fuse bit settings that will stop copying the hex file
@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.
@geekrulz1
@geekrulz1 Жыл бұрын
there is a way to reverse engineer hex files, using ghydra it would be posible for example
@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.
@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.
@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?
@maxjanssen9327
@maxjanssen9327 7 ай бұрын
Very good explanation. Thank you!
@S.K.Koley.
@S.K.Koley. Жыл бұрын
Love your videos ❤️ 😍
@vegansynths7757
@vegansynths7757 10 ай бұрын
You rock. I hope one day you will do an in depth video of the ESP-32's.
@ELECTRONOOBS
@ELECTRONOOBS 10 ай бұрын
I'm on it! Soon, since I still learning about them!
@vegansynths7757
@vegansynths7757 10 ай бұрын
Me too! @@ELECTRONOOBS
@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.
@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😅☝️
@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?
@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
@oussamathedjfreeman
@oussamathedjfreeman Жыл бұрын
talk about fuse lock byte and how to avoid cloning your code :) the opposit way so
@drelectronics13
@drelectronics13 Жыл бұрын
Ok this is first like in ,2023 ,loved the video 🙌
@bolt0sito
@bolt0sito Жыл бұрын
GREAT VIDEO, CAN YOU SHOW US HOW TO PROTECT OUR ARDUINO CODES FROM BEEN COPIED?
@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.
@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...
@ProgrammerEA
@ProgrammerEA 4 ай бұрын
Is it possible to extract FW from new Arduino MKR NB 1500 boards??
@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
@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
@moinshaikh6684
@moinshaikh6684 Жыл бұрын
Jabraad be bhaiwa!
@sandaiulian8630
@sandaiulian8630 4 ай бұрын
Hey, is it possible to extract the hex, eeprom and fuses of non-arduino bootloaded controllers?
@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.
@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
@sainisahilindia
@sainisahilindia Жыл бұрын
Electronoobs can you make pure sine wave vfd three phase with uno Also has lcd for displaying frequency
@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.
@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 Ай бұрын
When i get hex file from arduino? can i edit this file like configuration file in arduino ide program?
@badraa7838
@badraa7838 Жыл бұрын
Great video!
@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
@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
@u0000-u2x
@u0000-u2x Жыл бұрын
@@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
@blabberbytes9967
@blabberbytes9967 7 ай бұрын
Getting "WARNING: Unable to detect MCU" Any suggestions?
@onlynation1509
@onlynation1509 11 ай бұрын
How to edit hex code or convert to c or any other language
@husky-nu3xk
@husky-nu3xk 28 күн бұрын
This is fabulous
@donaldkormos5529
@donaldkormos5529 Жыл бұрын
Great video!!!
@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
@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
@deepraman8392
@deepraman8392 Жыл бұрын
Please help with the link to buy these arduino parts
@MahBor
@MahBor Жыл бұрын
I was told many times in many forums that this was impossible!
@TheRaj6765
@TheRaj6765 Жыл бұрын
How to extract the code from NodeMcu module ?
@vladi_g
@vladi_g Жыл бұрын
Electroboobs rulez ))
@jetraid
@jetraid Жыл бұрын
Excellent, now we need a decompiller.
@shakirabdo638
@shakirabdo638 4 ай бұрын
Amazing ❤
@diyelectrovids6536
@diyelectrovids6536 5 ай бұрын
Anyone having trouble extracting HEX code with CP2102 USB to UART converter?
@CleoKawisha-sy5xt
@CleoKawisha-sy5xt Жыл бұрын
hex is not 1's and 0's
@arturwiebe7482
@arturwiebe7482 6 ай бұрын
Sure, 4 bits, 1 nibble
@commandoPR
@commandoPR 3 ай бұрын
... If you're too lazy to do the calculations.
@kaviarasan4566
@kaviarasan4566 Жыл бұрын
Where can i download avrdudess??
@requiem4adreamc
@requiem4adreamc Жыл бұрын
Can i use esp32 as master?
@tariqnrabeeje5742
@tariqnrabeeje5742 Жыл бұрын
Is it possible to hack the controller and get the code if it is protected
@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
@xianyingzhang1106
@xianyingzhang1106 9 ай бұрын
如果有中文就更好了😂这样我能更好的学习
@wali-q1c
@wali-q1c Жыл бұрын
لابأس جميل متفوق
@hicham_ben_omar
@hicham_ben_omar Жыл бұрын
Super cool
@yoshcopyright
@yoshcopyright Жыл бұрын
easy very easy for this😊😂
@tech1706
@tech1706 Жыл бұрын
Great!!
@Maruchipawa
@Maruchipawa Жыл бұрын
Thanks!
@BharatMohanty
@BharatMohanty Жыл бұрын
Something new...( Never used an Arduino )
@explorerpragun431
@explorerpragun431 Жыл бұрын
I think we can also convert the hex code into c code why don't you give it a try
@Tutorreal_msc7621
@Tutorreal_msc7621 Жыл бұрын
How to extract hex arduino to lock
@nithylabs
@nithylabs Жыл бұрын
Can i get one 328p?
@dtpc_technologies
@dtpc_technologies Жыл бұрын
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
@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 Жыл бұрын
It's a factory option, if you have to hide your code, May be you need to use another microcontroller
@nithylabs
@nithylabs Жыл бұрын
Or can i get one if ur products for free?
@rob_scooter6199
@rob_scooter6199 Жыл бұрын
thanks👍
@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
@wizdumb420
@wizdumb420 Жыл бұрын
16 != 2
@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.
@blabberbytes9967
@blabberbytes9967 7 ай бұрын
Getting "WARNING: Unable to detect MCU" Any suggestions?
REAL Debugging Arduino + ESP32 | JTAG Programmer
9:05
Electronoobs
Рет қаралды 20 М.
EEPROM Memory - Store Anything - Arduino101
13:16
Electronoobs
Рет қаралды 107 М.
Ouch.. 🤕⚽️
00:25
Celine Dept
Рет қаралды 18 МЛН
兔子姐姐最终逃走了吗?#小丑#兔子警官#家庭
00:58
小蚂蚁和小宇宙
Рет қаралды 9 МЛН
Extracting Firmware from Embedded Devices (SPI NOR Flash) ⚡
18:41
Flashback Team
Рет қаралды 582 М.
Port Register Control | Increase speed of Read/Write - Arduino101
15:22
Optimizing Arduino Code: no setup(), no loop() ⛔
9:27
Wokwi
Рет қаралды 206 М.
Running Apple 1 software on a breadboard computer (Wozmon)
14:23
Getting Started with Meshtastic - Devices
15:01
The Comms Channel
Рет қаралды 218 М.
Mechanical  Switches are Obsolete?! Switch to a Latch Circuit! EB#53
10:36
Let's build a voltage multiplier!
16:32
Ben Eater
Рет қаралды 2,1 МЛН