499 lines
13 KiB
HTML
499 lines
13 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Terminal/Minimalist Blog - Home</title>
|
|
<style>
|
|
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,700;1,400&family=Inter:wght@400;500;700&family=JetBrains+Mono:ital,wght@0,400;0,500;1,400&display=swap');
|
|
|
|
/* CSS Variables & Core Layout */
|
|
:root {
|
|
--bg-canvas: #121417;
|
|
--bg-surface: #1c1f26;
|
|
--border-color: #2b303b;
|
|
--text-primary: #e0e6f0;
|
|
--text-muted: #8a95a5;
|
|
--accent: #ffb000; /* Amber */
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
body {
|
|
background-color: var(--bg-canvas);
|
|
color: var(--text-primary);
|
|
font-family: 'Inter', sans-serif;
|
|
line-height: 1.6;
|
|
display: flex;
|
|
justify-content: center;
|
|
}
|
|
|
|
/* Rigid Grid System & App Wrapper */
|
|
.app-container {
|
|
display: grid;
|
|
grid-template-columns: 260px 1fr;
|
|
width: 100%;
|
|
max-width: 1200px;
|
|
min-height: 100vh;
|
|
border-left: 1px solid var(--border-color);
|
|
border-right: 1px solid var(--border-color);
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
.app-container {
|
|
grid-template-columns: 1fr;
|
|
border-left: none;
|
|
border-right: none;
|
|
}
|
|
.sidebar {
|
|
border-right: none !important;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
}
|
|
|
|
/* Sidebar Navigation (Monospaced UI) */
|
|
.sidebar {
|
|
background-color: var(--bg-canvas);
|
|
border-right: 1px solid var(--border-color);
|
|
padding: 24px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
font-family: 'IBM Plex Mono', monospace;
|
|
}
|
|
|
|
.profile-title {
|
|
font-size: 1.1rem;
|
|
font-weight: 700;
|
|
color: var(--text-primary);
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.profile-subtitle {
|
|
font-size: 0.85rem;
|
|
color: var(--text-muted);
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.nav-list {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin-bottom: auto;
|
|
}
|
|
|
|
.nav-item {
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.nav-link {
|
|
display: flex;
|
|
align-items: center;
|
|
color: var(--text-primary);
|
|
text-decoration: none;
|
|
font-size: 0.9rem;
|
|
padding: 6px 8px;
|
|
border: 1px solid transparent;
|
|
}
|
|
|
|
/* Snap instant hovers */
|
|
.nav-link:hover {
|
|
background-color: var(--accent);
|
|
color: var(--bg-canvas);
|
|
}
|
|
|
|
.nav-link:focus {
|
|
outline: 2px solid var(--accent);
|
|
outline-offset: -2px;
|
|
}
|
|
|
|
/* Structural Indicator for Active Nav Items */
|
|
.nav-link.active::before {
|
|
content: "> ";
|
|
color: var(--accent);
|
|
margin-right: 6px;
|
|
}
|
|
|
|
.nav-link.active:hover::before {
|
|
color: var(--bg-canvas);
|
|
}
|
|
|
|
/* Keybindings Panel */
|
|
.keybindings-panel {
|
|
border: 1px solid var(--border-color);
|
|
background-color: var(--bg-surface);
|
|
padding: 16px;
|
|
border-radius: 4px;
|
|
margin-top: 24px;
|
|
}
|
|
|
|
.keybindings-title {
|
|
font-size: 0.8rem;
|
|
font-weight: 500;
|
|
color: var(--text-primary);
|
|
margin-bottom: 12px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.keybinding-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
font-size: 0.8rem;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.keybinding-row:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
kbd {
|
|
background-color: var(--bg-canvas);
|
|
border: 1px solid var(--border-color);
|
|
border-bottom: 1.5px solid var(--text-muted);
|
|
border-radius: 3px;
|
|
padding: 1px 5px;
|
|
font-size: 0.75rem;
|
|
color: var(--text-primary);
|
|
font-family: 'JetBrains Mono', monospace;
|
|
}
|
|
|
|
/* Main Content Area */
|
|
.main-content {
|
|
padding: 40px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.prose-container {
|
|
width: 100%;
|
|
max-width: 65ch; /* Optimal readability cap */
|
|
}
|
|
|
|
/* Typography & Headers */
|
|
h1, h2, h3 {
|
|
font-family: 'IBM Plex Mono', monospace;
|
|
font-weight: 700;
|
|
color: var(--text-primary);
|
|
margin-top: 0;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 1.8rem;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 1.3rem;
|
|
margin-top: 32px;
|
|
margin-bottom: 16px;
|
|
border-bottom: 1px solid var(--border-color);
|
|
padding-bottom: 8px;
|
|
}
|
|
|
|
p {
|
|
margin-bottom: 20px;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
a {
|
|
color: var(--accent);
|
|
text-decoration: none;
|
|
}
|
|
|
|
a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
/* Dividers */
|
|
hr {
|
|
border: 0;
|
|
border-top: 1px solid var(--border-color);
|
|
margin: 32px 0;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Metadata Tags */
|
|
.post-metadata {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 12px;
|
|
margin-bottom: 24px;
|
|
font-family: 'IBM Plex Mono', monospace;
|
|
font-size: 0.85rem;
|
|
color: var(--text-muted);
|
|
align-items: center;
|
|
}
|
|
|
|
.tag {
|
|
color: var(--accent);
|
|
background-color: transparent;
|
|
padding: 0;
|
|
font-size: 0.85rem;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.tag:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
/* Terminal-Style Code Block Component */
|
|
.code-block {
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 4px;
|
|
background-color: var(--bg-surface);
|
|
margin: 24px 0;
|
|
font-family: 'JetBrains Mono', monospace;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.code-header {
|
|
background-color: var(--bg-canvas);
|
|
border-bottom: 1px solid var(--border-color);
|
|
padding: 8px 16px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
font-size: 0.8rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.code-filename {
|
|
color: var(--text-primary);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.code-content {
|
|
padding: 16px;
|
|
overflow-x: auto;
|
|
font-size: 0.85rem;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.code-content pre {
|
|
margin: 0;
|
|
}
|
|
|
|
/* Simple Monospace Syntax Colors */
|
|
.syn-comment { color: var(--text-muted); }
|
|
.syn-keyword { color: #ff5555; }
|
|
.syn-string { color: #50fa7b; }
|
|
.syn-type { color: #8be9fd; }
|
|
.syn-var { color: #ffb86c; }
|
|
|
|
/* Dense Archive / Tabular Posts List */
|
|
.post-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin-top: 16px;
|
|
font-family: 'IBM Plex Mono', monospace;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.post-table th, .post-table td {
|
|
text-align: left;
|
|
padding: 10px 12px;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.post-table th {
|
|
color: var(--text-muted);
|
|
font-weight: 500;
|
|
font-size: 0.8rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.post-table tbody tr {
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* Tabular Snap Hover - Instantly inverts row */
|
|
.post-table tbody tr:hover td {
|
|
background-color: var(--accent);
|
|
color: var(--bg-canvas);
|
|
}
|
|
|
|
.post-table tbody tr:hover td a {
|
|
color: var(--bg-canvas);
|
|
}
|
|
|
|
.post-table td a {
|
|
color: var(--text-primary);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.post-table .post-date {
|
|
color: var(--text-muted);
|
|
width: 110px;
|
|
}
|
|
|
|
.post-table tbody tr:hover .post-date {
|
|
color: var(--bg-canvas);
|
|
}
|
|
|
|
/* Footer */
|
|
footer {
|
|
margin-top: 48px;
|
|
padding-top: 24px;
|
|
border-top: 1px solid var(--border-color);
|
|
font-family: 'IBM Plex Mono', monospace;
|
|
font-size: 0.8rem;
|
|
color: var(--text-muted);
|
|
display: flex;
|
|
justify-content: space-between;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="app-container">
|
|
|
|
<!-- Sidebar Navigation -->
|
|
<aside class="sidebar">
|
|
<div class="profile-title">[node-01]</div>
|
|
<div class="profile-subtitle">dev-blog@system:~$</div>
|
|
|
|
<nav>
|
|
<ul class="nav-list">
|
|
<li class="nav-item">
|
|
<a href="homepage.html" class="nav-link active">Home</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a href="#" class="nav-link">Posts</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a href="#" class="nav-link">Projects</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a href="index.html" class="nav-link">Spec Catalog</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
<!-- Keybindings Panel Widget -->
|
|
<div class="keybindings-panel">
|
|
<div class="keybindings-title">Keyboard Shortcuts</div>
|
|
<div class="keybinding-row">
|
|
<span>Search posts</span>
|
|
<kbd>Ctrl</kbd> + <kbd>K</kbd>
|
|
</div>
|
|
<div class="keybinding-row">
|
|
<span>Go to Catalog</span>
|
|
<kbd>g</kbd> + <kbd>c</kbd>
|
|
</div>
|
|
<div class="keybinding-row">
|
|
<span>Toggle Terminal</span>
|
|
<kbd>~</kbd>
|
|
</div>
|
|
</div>
|
|
</aside>
|
|
|
|
<!-- Main Content -->
|
|
<main class="main-content">
|
|
<div class="prose-container">
|
|
|
|
<!-- Post Title & Metadata Header -->
|
|
<article>
|
|
<h1>Reverse Engineering IoT Firmware: SPI Flash Extraction</h1>
|
|
|
|
<div class="post-metadata">
|
|
<span>Posted: 2026-07-20</span>
|
|
<span>•</span>
|
|
<span>Reading: 8 mins</span>
|
|
<span>•</span>
|
|
<a href="#" class="tag">[#firmware]</a>
|
|
<a href="#" class="tag">[#hardware]</a>
|
|
<a href="#" class="tag">[#security]</a>
|
|
</div>
|
|
|
|
<p>
|
|
In security audits of embedded systems, retrieving the firmware is usually the critical first step. When over-the-air updates are encrypted and the debug ports (UART, JTAG) are disabled in production silicon, dumping the physical SPI Flash memory chip becomes necessary.
|
|
</p>
|
|
|
|
<p>
|
|
In this write-up, we extract firmware directly from an 8-pin SOP SPI flash chip using a Bus Pirate. This hardware-level approach bypasses any bootloader lockdowns and extracts the raw partition table directly from the silicon.
|
|
</p>
|
|
|
|
<!-- Component 1: Terminal-Style Code Block with syntax styling -->
|
|
<div class="code-block">
|
|
<div class="code-header">
|
|
<span class="code-filename">extract_firmware.sh</span>
|
|
<span>Bash</span>
|
|
</div>
|
|
<div class="code-content">
|
|
<pre><code><span class="syn-comment">#!/bin/sh</span>
|
|
<span class="syn-comment"># Query the SPI flash details using flashrom via Bus Pirate</span>
|
|
flashrom -p buspirate_spi:dev=/dev/ttyUSB0,spispeed=1M -r firmware_dump.bin
|
|
|
|
<span class="syn-comment"># Verify the integrity of the binary dump by comparing hashes</span>
|
|
<span class="syn-keyword">if</span> [ <span class="syn-var">$?</span> -eq 0 ]; <span class="syn-keyword">then</span>
|
|
echo <span class="syn-string">"Dump successful. Running md5sum..."</span>
|
|
md5sum firmware_dump.bin
|
|
<span class="syn-keyword">else</span>
|
|
echo <span class="syn-string">"Failed to read flash memory."</span> >&2
|
|
<span class="syn-keyword">exit</span> 1
|
|
<span class="syn-keyword">fi</span></code></pre>
|
|
</div>
|
|
</div>
|
|
|
|
<p>
|
|
After standard verification, we can proceed to unpack the bin file using tools like <code>binwalk</code>. If the partition table contains standard filesystem formats (e.g. SquashFS, jffs2), binwalk extracts it automatically. Otherwise, manual offset carving is required.
|
|
</p>
|
|
</article>
|
|
|
|
<hr>
|
|
|
|
<!-- Tabular Archive Index Section -->
|
|
<section>
|
|
<h2>Recent Writes & Archive</h2>
|
|
<p style="color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px;">
|
|
Dense, terminal-style index of prior posts. Press <kbd>Tab</kbd> to focus and navigate rows instantly.
|
|
</p>
|
|
|
|
<table class="post-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Date</th>
|
|
<th>Title</th>
|
|
<th>Tags</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr onclick="location.href='#'">
|
|
<td class="post-date">2026-07-15</td>
|
|
<td><a href="#">Building a High-Availability Traefik Router with Docker Compose</a></td>
|
|
<td><span style="color: var(--accent);">[#homelab]</span></td>
|
|
</tr>
|
|
<tr onclick="location.href='#'">
|
|
<td class="post-date">2026-07-10</td>
|
|
<td><a href="#">POSIX sh vs. Bash: Portability in Modern Scripts</a></td>
|
|
<td><span style="color: var(--accent);">[#shell]</span></td>
|
|
</tr>
|
|
<tr onclick="location.href='#'">
|
|
<td class="post-date">2026-06-28</td>
|
|
<td><a href="#">CTF Write-up: Heap Exploitation in glibc 2.35</a></td>
|
|
<td><span style="color: var(--accent);">[#ctf]</span></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
|
|
<!-- Footer -->
|
|
<footer>
|
|
<span>© 2026 Developer Blog</span>
|
|
<span>Built with Design-Specification.md</span>
|
|
</footer>
|
|
|
|
</div>
|
|
</main>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|