mirror of
https://github.com/mytechnotalent/Embedded-Hacking.git
synced 2026-05-22 15:39:39 +02:00
Updated WEEK05
This commit is contained in:
+14
-14
@@ -1,6 +1,6 @@
|
||||
?# Week 7: Constants in Embedded Systems: Debugging and Hacking Constants w/ 1602 LCD I2C Basics
|
||||
# 📘 Week 7: Constants in Embedded Systems: Debugging and Hacking Constants w/ 1602 LCD I2C Basics
|
||||
|
||||
## ? What You'll Learn This Week
|
||||
## 🎯 What You'll Learn This Week
|
||||
|
||||
By the end of this tutorial, you will be able to:
|
||||
- Understand the difference between `#define` macros and `const` variables
|
||||
@@ -385,7 +385,7 @@ Embedded-Hacking/
|
||||
|
||||
---
|
||||
|
||||
## ? Part 7: Hands-On Tutorial - Constants and I2C LCD
|
||||
## 🔧 Part 7: Hands-On Tutorial - Constants and I2C LCD
|
||||
|
||||
### Step 1: Review the Source Code
|
||||
|
||||
@@ -463,7 +463,7 @@ OTHER_FAV_NUM: 1337
|
||||
|
||||
---
|
||||
|
||||
## ? Part 8: Debugging with GDB (Dynamic Analysis)
|
||||
## 🐛 Part 8: Debugging with GDB (Dynamic Analysis)
|
||||
|
||||
> ? **REVIEW:** This setup is identical to previous weeks. If you need a refresher on OpenOCD and GDB connection, refer back to Week 3 Part 6.
|
||||
|
||||
@@ -695,7 +695,7 @@ i r r0 r1
|
||||
|
||||
---
|
||||
|
||||
## ? Part 9: Understanding the Assembly
|
||||
## 🔬 Part 9: Understanding the Assembly
|
||||
|
||||
Now that we've explored the binary in GDB, let's make sense of the key patterns we found.
|
||||
|
||||
@@ -766,7 +766,7 @@ These are stored consecutively in the `.rodata` section. Note the addresses - we
|
||||
|
||||
---
|
||||
|
||||
## ? Part 10: Hacking the Binary with a Hex Editor
|
||||
## ✏️ Part 10: Hacking the Binary with a Hex Editor
|
||||
|
||||
Now for the fun part - we'll patch the `.bin` file directly using a hex editor!
|
||||
|
||||
@@ -776,7 +776,7 @@ Now for the fun part - we'll patch the `.bin` file directly using a hex editor!
|
||||
|
||||
1. Open **HxD** (or your preferred hex editor: ImHex, 010 Editor, etc.)
|
||||
2. Click **File** -> **Open**
|
||||
3. Navigate to `C:\Users\assem.KEVINTHOMAS\OneDrive\Documents\Embedded-Hacking\0x0017_constants\build\`
|
||||
3. Navigate to `C:\Users\flare-vm\Desktop\Embedded-Hacking-main\0x0017_constants\build\`
|
||||
4. Open `0x0017_constants.bin`
|
||||
|
||||
### Step 16: Calculate the File Offset
|
||||
@@ -870,14 +870,14 @@ From our GDB analysis in Step 10, we found the string at `0x10003ee8`. File offs
|
||||
|
||||
---
|
||||
|
||||
## ? Part 11: Converting and Flashing the Hacked Binary
|
||||
## 🚀 Part 11: Converting and Flashing the Hacked Binary
|
||||
|
||||
### Step 21: Convert to UF2 Format
|
||||
|
||||
Open a terminal and navigate to your project directory:
|
||||
|
||||
```powershell
|
||||
cd C:\Users\assem.KEVINTHOMAS\OneDrive\Documents\Embedded-Hacking\0x0017_constants
|
||||
cd C:\Users\flare-vm\Desktop\Embedded-Hacking-main\0x0017_constants
|
||||
```
|
||||
|
||||
Run the conversion command:
|
||||
@@ -909,11 +909,11 @@ OTHER_FAV_NUM: 1337
|
||||
|
||||
The numbers are unchanged - we only patched the LCD string!
|
||||
|
||||
? **BOOM! We successfully changed the LCD text from "Reverse" to "Exploit" without access to the source code!**
|
||||
🎉 **BOOM! We successfully changed the LCD text from "Reverse" to "Exploit" without access to the source code!**
|
||||
|
||||
---
|
||||
|
||||
## ? Part 12: Summary and Review
|
||||
## 📊 Part 12: Summary and Review
|
||||
|
||||
### What We Accomplished
|
||||
|
||||
@@ -991,7 +991,7 @@ The numbers are unchanged - we only patched the LCD string!
|
||||
|
||||
---
|
||||
|
||||
## ? Key Takeaways
|
||||
## 💡 Key Takeaways
|
||||
|
||||
1. **#define is text replacement** - It happens before compilation, no memory used.
|
||||
|
||||
@@ -1015,7 +1015,7 @@ The numbers are unchanged - we only patched the LCD string!
|
||||
|
||||
---
|
||||
|
||||
## ? Glossary
|
||||
## 📖 Glossary
|
||||
|
||||
| Term | Definition |
|
||||
| ----------------------- | --------------------------------------------------- |
|
||||
@@ -1036,7 +1036,7 @@ The numbers are unchanged - we only patched the LCD string!
|
||||
|
||||
---
|
||||
|
||||
## ? Additional Resources
|
||||
## 📚 Additional Resources
|
||||
|
||||
### I2C Timing Reference
|
||||
|
||||
|
||||
Reference in New Issue
Block a user