mirror of
https://github.com/mytechnotalent/Embedded-Hacking.git
synced 2026-07-07 04:58:00 +02:00
88 lines
4.3 KiB
XML
88 lines
4.3 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800">
|
|
<style>
|
|
.bg{fill:#0a0a0f}.pnl{fill:#12121a;stroke:#1a1a2e}.hdr{fill:#12121a}
|
|
.title{font:bold 42px 'Courier New',monospace;fill:#00ff41}
|
|
.sub{font:bold 28px 'Courier New',monospace;fill:#00d4ff}
|
|
.txt{font:24px 'Courier New',monospace;fill:#c0c0c0}
|
|
.dim{font:20px 'Courier New',monospace;fill:#888}
|
|
.grn{font:bold 24px 'Courier New',monospace;fill:#00ff41}
|
|
.red{font:bold 24px 'Courier New',monospace;fill:#ff0040}
|
|
.cyn{font:bold 24px 'Courier New',monospace;fill:#00d4ff}
|
|
.amb{font:bold 24px 'Courier New',monospace;fill:#ffaa00}
|
|
.badge{stroke:#00ff41;rx:14}
|
|
</style>
|
|
<rect class="bg" width="1200" height="800"/>
|
|
<rect class="hdr" x="0" y="0" width="1200" height="100" rx="0"/>
|
|
<text class="title" x="600" y="52" text-anchor="middle">I2C & Macro Exploitation</text>
|
|
<text class="dim" x="600" y="88" text-anchor="middle">Constants, I2C, Structs, and Hacking</text>
|
|
|
|
<!-- Left Column -->
|
|
<rect class="pnl" x="30" y="110" width="555" height="340" rx="8"/>
|
|
<text class="sub" x="50" y="145">Key Concepts</text>
|
|
|
|
<text class="grn" x="50" y="180">#define</text>
|
|
<text class="dim" x="230" y="180">Text replacement, no memory</text>
|
|
<text class="grn" x="50" y="210">const</text>
|
|
<text class="dim" x="230" y="210">Variable in .rodata (maybe)</text>
|
|
<text class="grn" x="50" y="240">I2C</text>
|
|
<text class="dim" x="230" y="240">Two-wire: SDA + SCL</text>
|
|
<text class="grn" x="50" y="270">struct</text>
|
|
<text class="dim" x="230" y="270">Groups related data fields</text>
|
|
<text class="grn" x="50" y="300">typedef</text>
|
|
<text class="dim" x="230" y="300">Creates type alias</text>
|
|
<text class="grn" x="50" y="330">AAPCS</text>
|
|
<text class="dim" x="230" y="330">r0-r3 args, r0 return</text>
|
|
<text class="grn" x="50" y="360">movs</text>
|
|
<text class="dim" x="230" y="360">16-bit, imm 0-255</text>
|
|
<text class="grn" x="50" y="390">movw</text>
|
|
<text class="dim" x="230" y="390">32-bit, imm 0-65535</text>
|
|
<text class="grn" x="50" y="420">Literal Pool</text>
|
|
<text class="dim" x="230" y="420">Large consts after code</text>
|
|
|
|
<!-- Right Column: Key Addresses -->
|
|
<rect class="pnl" x="615" y="110" width="555" height="340" rx="8"/>
|
|
<text class="sub" x="635" y="145">Key Addresses</text>
|
|
|
|
<text class="amb" x="635" y="180">0x10000234</text>
|
|
<text class="dim" x="850" y="180">main() entry</text>
|
|
<text class="amb" x="635" y="210">0x1000028E</text>
|
|
<text class="dim" x="850" y="210">FAV_NUM (movs)</text>
|
|
<text class="amb" x="635" y="240">0x10000296</text>
|
|
<text class="dim" x="850" y="240">OTHER_FAV_NUM (movw)</text>
|
|
<text class="amb" x="635" y="270">0x10003EE8</text>
|
|
<text class="dim" x="850" y="270">"Reverse" string</text>
|
|
<text class="amb" x="635" y="300">0x10003EF0</text>
|
|
<text class="dim" x="850" y="300">"Engineering" string</text>
|
|
<text class="amb" x="635" y="330">0x40098000</text>
|
|
<text class="dim" x="850" y="330">I2C1 HW base</text>
|
|
<text class="amb" x="635" y="360">0x2000062C</text>
|
|
<text class="dim" x="850" y="360">i2c1_inst struct</text>
|
|
|
|
<text class="dim" x="635" y="400">file_offset = addr - 0x10000000</text>
|
|
<text class="dim" x="635" y="425">String patches must be same length</text>
|
|
|
|
<!-- Bottom: Macro Chain and Hack Summary -->
|
|
<rect class="pnl" x="30" y="465" width="1140" height="100" rx="8"/>
|
|
<text class="sub" x="50" y="500">Macro Chain</text>
|
|
<text class="grn" x="50" y="535">I2C_PORT</text>
|
|
<text class="txt" x="210" y="535">--></text>
|
|
<text class="cyn" x="260" y="535">i2c1</text>
|
|
<text class="txt" x="340" y="535">--></text>
|
|
<text class="amb" x="390" y="535">&i2c1_inst</text>
|
|
<text class="txt" x="560" y="535">--></text>
|
|
<text class="red" x="610" y="535">0x40098000</text>
|
|
|
|
<!-- Bottom: Hack result -->
|
|
<rect class="pnl" x="30" y="580" width="1140" height="115" rx="8"/>
|
|
<text class="sub" x="50" y="615">Binary Hack Result</text>
|
|
<text class="txt" x="50" y="650">LCD: "Reverse" --></text>
|
|
<text class="grn" x="370" y="650">"Exploit"</text>
|
|
<text class="dim" x="520" y="650">Patched at 0x3EE8</text>
|
|
<text class="dim" x="50" y="675">Compiler may optimize const same as #define</text>
|
|
|
|
<!-- Key Takeaway -->
|
|
<rect class="pnl" x="30" y="710" width="1140" height="70" rx="8"/>
|
|
<text class="red" x="50" y="748">TAKEAWAY:</text>
|
|
<text class="txt" x="230" y="748">const is a source-level concept.</text>
|
|
<text class="dim" x="720" y="748">In binary, everything can change!</text>
|
|
</svg> |