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
+18 -18
View File
@@ -1,6 +1,6 @@
?# Week 9: Operators in Embedded Systems: Debugging and Hacking Operators w/ DHT11 Temperature & Humidity Sensor Single-Wire Protocol Basics.
# 📘 Week 9: Operators in Embedded Systems: Debugging and Hacking Operators w/ DHT11 Temperature & Humidity Sensor Single-Wire 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 all six types of C operators (arithmetic, increment, relational, logical, bitwise, assignment)
@@ -380,7 +380,7 @@ Embedded-Hacking/
---
## ? Part 11: Hands-On Tutorial - The Operators Code
## 🔧 Part 11: Hands-On Tutorial - The Operators Code
### Step 1: Review the Source Code
@@ -485,7 +485,7 @@ Humidity: 51.0%, Temperature: 23.8 deg C
---
## ? Part 12: Debugging with GDB
## 🐛 Part 12: Debugging with GDB
### Step 5: Start OpenOCD (Terminal 1)
@@ -640,7 +640,7 @@ The program will loop, printing values to serial.
---
## ? Part 13: Setting Up Ghidra for Analysis
## 🔧 Part 13: Setting Up Ghidra for Analysis
### Step 17: Start Ghidra
@@ -686,7 +686,7 @@ Wait for analysis to complete.
---
## ? Part 14: Finding the Reset_Handler
## 🔍 Part 14: Finding the Reset_Handler
### Step 22: Understand the Vector Table
@@ -773,7 +773,7 @@ Look at the end of Reset_Handler for three function calls. The middle one is `ma
---
## ? Part 15: Resolving Functions in Ghidra
## 🔍 Part 15: Resolving Functions in Ghidra
### Step 28: Resolve stdio_init_all
@@ -808,7 +808,7 @@ Look for repeated function calls with string addresses:
1. Find a call like the one at `0x10000262`
2. Right-click -> **Edit Function Signature**
3. Change to: `int printf(char *format, ...)`
3. Change to: `int printf(char *format,...)`
4. Check the **Varargs** checkbox
5. Click **OK**
@@ -859,7 +859,7 @@ bl FUN_xxxxx ; puts
---
## ? Part 16: Understanding IEEE-754 Floating-Point
## 🔬 Part 16: Understanding IEEE-754 Floating-Point
### What is IEEE-754?
@@ -927,7 +927,7 @@ print(f"Bytes: {encoded.hex()}") # 0000 80bf
---
## ? Part 17: Finding the Temperature Hack Point
## 🔍 Part 17: Finding the Temperature Hack Point
### Step 34: Locate the dht11_read Function
@@ -972,7 +972,7 @@ Make note of these offsets in the binary file:
---
## ? Part 18: Manual Hacking in Ghidra
## ✏️ Part 18: Manual Hacking in Ghidra
### Step 37: Open the Bytes Editor
@@ -1011,7 +1011,7 @@ print(f"New: {new}") # 5.0
---
## ? Part 19: Exporting and Testing
## 🚀 Part 19: Exporting and Testing
### Step 41: Export the Patched Binary
@@ -1026,7 +1026,7 @@ print(f"New: {new}") # 5.0
Open a terminal and run:
```powershell
cd C:\Users\assem.KEVINTHOMAS\OneDrive\Documents\Embedded-Hacking\0x001a_operators
cd C:\Users\flare-vm\Desktop\Embedded-Hacking-main\0x001a_operators
python ..\uf2conv.py build\0x001a_operators-h.bin --base 0x10000000 --family 0xe48bff59 --output build\hacked.uf2
```
@@ -1040,7 +1040,7 @@ You should see dramatically increased temperature readings!
---
## ? Part 20: Summary and Review
## 📊 Part 20: Summary and Review
### What We Accomplished
@@ -1084,7 +1084,7 @@ You should see dramatically increased temperature readings!
---
## ? Key Takeaways
## 💡 Key Takeaways
1. **Post-increment returns the OLD value** - `x++` gives you x, THEN adds 1
@@ -1106,7 +1106,7 @@ You should see dramatically increased temperature readings!
---
## ? Glossary
## 📖 Glossary
| Term | Definition |
| ------------------ | --------------------------------------------------- |
@@ -1131,7 +1131,7 @@ You should see dramatically increased temperature readings!
---
## ? Additional Resources
## 📚 Additional Resources
### IEEE-754 Float Quick Reference
@@ -1158,7 +1158,7 @@ You should see dramatically increased temperature readings!
---
## ? Real-World Implications
## 🌍 Real-World Implications
### Why This Matters