Updated WEEK05

This commit is contained in:
Kevin Thomas
2026-05-09 14:35:26 -04:00
parent ee664b6733
commit db4925f4b5
20 changed files with 1256 additions and 403 deletions
+21 -21
View File
@@ -1,6 +1,6 @@
?# Week 11: Structures and Functions in Embedded Systems: Debugging and Hacking w/ IR Remote Control and NEC Protocol Basics
# 📘 Week 11: Structures and Functions in Embedded Systems: Debugging and Hacking w/ IR Remote Control and NEC Protocol 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 C structures (structs) and how they organize related data
@@ -476,7 +476,7 @@ Embedded-Hacking/
---
## ? Part 9: Hands-On Tutorial - Structures Code
## 🔧 Part 9: Hands-On Tutorial - Structures Code
### Step 1: Review the Source Code
@@ -588,7 +588,7 @@ int main(void) {
---
## ? Part 10: Debugging with GDB (Structures)
## 🐛 Part 10: Debugging with GDB (Structures)
### Step 5: Start OpenOCD (Terminal 1)
@@ -724,7 +724,7 @@ quit
---
## ? Part 11: Setting Up Ghidra for Structures
## 🔧 Part 11: Setting Up Ghidra for Structures
### Step 17: Start Ghidra
@@ -769,7 +769,7 @@ Wait for analysis to complete.
---
## ? Part 12: Resolving Functions - Structures Project
## 🔍 Part 12: Resolving Functions - Structures Project
### Step 22: Navigate to Main
@@ -825,7 +825,7 @@ bl FUN_xxxxx ; ir_init
Right after ir_init, look for the "IR receiver on GPIO" string being loaded:
1. Right-click -> **Edit Function Signature**
2. Change to: `int printf(char *format, ...)`
2. Change to: `int printf(char *format,...)`
3. Check the **Varargs** checkbox
4. Click **OK**
@@ -858,7 +858,7 @@ bl FUN_xxxxx ; sleep_ms
---
## ? Part 13: Recognizing Struct Patterns in Assembly
## 🔬 Part 13: Recognizing Struct Patterns in Assembly
### Step 29: Identify GPIO Set Direction
@@ -896,7 +896,7 @@ Create a mental (or written) map:
---
## ? Part 14: Hacking Structures
## ✏️ Part 14: Hacking Structures
### Step 31: Open the Bytes Editor
@@ -936,7 +936,7 @@ LED 2 (0x18) -> GPIO 16 -> Red LED (SWAPPED!)
Convert and flash:
```powershell
cd C:\Users\assem.KEVINTHOMAS\OneDrive\Documents\Embedded-Hacking\0x0023_structures
cd C:\Users\flare-vm\Desktop\Embedded-Hacking-main\0x0023_structures
python ..\uf2conv.py build\0x0023_structures-h.bin --base 0x10000000 --family 0xe48bff59 --output build\hacked.uf2
```
@@ -952,7 +952,7 @@ python ..\uf2conv.py build\0x0023_structures-h.bin --base 0x10000000 --family 0x
---
## ? Part 15: Security Implications - Log Desynchronization
## ✏️ Part 15: Security Implications - Log Desynchronization
### The Danger of Mismatched Logs
@@ -990,7 +990,7 @@ Our LED example demonstrates the same principle:
---
## ? Part 16: Functions Project - Advanced Code
## ✏️ Part 16: Functions Project - Advanced Code
### Step 35: Review the Functions Code
@@ -1084,7 +1084,7 @@ int process_ir_led_command(int ir_command, simple_led_ctrl_t *leds, uint8_t blin
---
## ? Part 17: Debugging with GDB (Functions)
## 🐛 Part 17: Debugging with GDB (Functions)
### Step 38: Start OpenOCD (Terminal 1)
@@ -1213,7 +1213,7 @@ quit
---
## ? Part 18: Analyzing .ELF Files in Ghidra
## 🔬 Part 18: Analyzing .ELF Files in Ghidra
### Step 50: Create New Ghidra Project
@@ -1246,7 +1246,7 @@ With .ELF files, you get more information:
---
## ? Part 19: Hacking the Functions Project
## ✏️ Part 19: Hacking the Functions Project
### Step 53: Find LED Pin Values
@@ -1289,7 +1289,7 @@ Button 3 -> LED 3 -> GPIO 16 -> Red (SWAPPED!)
### Step 56: Convert and Flash
```powershell
cd C:\Users\assem.KEVINTHOMAS\OneDrive\Documents\Embedded-Hacking\0x0026_functions
cd C:\Users\flare-vm\Desktop\Embedded-Hacking-main\0x0026_functions
python ..\uf2conv.py build\0x0026_functions-h.bin --base 0x10000000 --family 0xe48bff59 --output build\hacked.uf2
```
@@ -1305,7 +1305,7 @@ python ..\uf2conv.py build\0x0026_functions-h.bin --base 0x10000000 --family 0xe
---
## ? Part 20: Summary and Review
## 📊 Part 20: Summary and Review
### What We Accomplished
@@ -1384,7 +1384,7 @@ python ..\uf2conv.py build\0x0026_functions-h.bin --base 0x10000000 --family 0xe
---
## ? Key Takeaways
## 💡 Key Takeaways
1. **Structs group related data** - Better organization than separate variables
@@ -1408,7 +1408,7 @@ python ..\uf2conv.py build\0x0026_functions-h.bin --base 0x10000000 --family 0xe
---
## ? Glossary
## 📖 Glossary
| Term | Definition |
| -------------------------- | -------------------------------------------------- |
@@ -1426,7 +1426,7 @@ python ..\uf2conv.py build\0x0026_functions-h.bin --base 0x10000000 --family 0xe
---
## ? Additional Resources
## 📚 Additional Resources
### NEC IR Command Reference
@@ -1459,7 +1459,7 @@ python ..\uf2conv.py build\0x0026_functions-h.bin --base 0x10000000 --family 0xe
---
## ? Real-World Implications
## 🌍 Real-World Implications
### What You've Learned in This Course