-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
321 lines (299 loc) · 17.1 KB
/
index.html
File metadata and controls
321 lines (299 loc) · 17.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Security Assessment Report | Youssef Moataz</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body>
<header class="hero">
<div class="badge">SEC-REPORT: SQLI-2026</div>
<h1>SQL Injection Assessment</h1>
<p>A technical security audit detailing manual SQL injection testing and automated credential extraction on DVWA.</p>
<div class="container" style="margin-top: 4rem;">
<div class="stats-header">
<div class="stat-box">
<span class="stat-val">11</span>
<span class="stat-label">Total Payloads</span>
</div>
<div class="stat-box">
<span class="stat-val" style="color: var(--danger);">CRITICAL</span>
<span class="stat-label">Risk Rating</span>
</div>
<div class="stat-box">
<span class="stat-val">100%</span>
<span class="stat-label">Exfiltration Rate</span>
</div>
</div>
</div>
<div style="margin-top: 3rem; display: flex; gap: 1.5rem;">
<a href="formal_report.html" class="btn"><i class="fas fa-file-contract"></i> View Formal Audit</a>
<a href="#summary" class="btn btn-outline">Explore SQLi Findings</a>
</div>
<div style="margin-top: 2rem;">
<span style="color: var(--text-dim);">Conducted by</span>
<span style="color: var(--accent-gold); font-weight: 600;">Youssef Moataz</span>
</div>
</header>
<div class="container">
<section id="summary">
<div class="card">
<h2 style="margin-bottom: 2rem;"><i class="fas fa-file-contract" style="color: var(--accent-gold); margin-right: 15px;"></i>Executive Summary</h2>
<p style="font-size: 1.1rem; color: var(--text-dim); margin-bottom: 2rem;">
This assessment confirms deep-seated SQL injection vulnerabilities. By combining manual logic testing with advanced automation, I achieved full data exfiltration and compromise of all user accounts within the target environment.
</p>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem;">
<div>
<h4 style="color: var(--accent-gold);">RISK LEVEL</h4>
<p class="severity-high" style="font-size: 1.5rem;">CRITICAL</p>
</div>
<div>
<h4 style="color: var(--accent-gold);">TARGET INFRA</h4>
<p>Nginx 1.28.0 / MySQL 5.0.12</p>
</div>
<div>
<h4 style="color: var(--accent-gold);">DATA LEAKAGE</h4>
<p>Credentials + DB Structure</p>
</div>
</div>
<div class="fingerprint-grid" style="margin-top: 3rem;">
<div class="f-item">
<h5>WEB SERVER</h5>
<p>Nginx/1.28.0</p>
</div>
<div class="f-item">
<h5>DATABASE</h5>
<p>MySQL >= 5.0.12 (MariaDB fork)</p>
</div>
<div class="f-item">
<h5>PLATFORM</h5>
<p>PHP/8.4-mysql (DVWA)</p>
</div>
</div>
</div>
</section>
<section id="lifecycle">
<h2 style="text-align: center; margin-bottom: 3rem;">Attack Lifecycle</h2>
<div class="timeline">
<div class="timeline-item">
<div class="timeline-dot"></div>
<h4>1. Reconnaissance</h4>
<p>Identified input vector <code>id</code>. Server headers revealed Nginx/1.28.0 backend.</p>
</div>
<div class="timeline-item">
<div class="timeline-dot"></div>
<h4>2. Vulnerability Confirmation</h4>
<p>Manual probes with <code>' OR 1=1 --</code> confirmed Boolean response shifts. SQLMap further identified Time-based (SLEEP) and UNION-based vectors.</p>
</div>
<div class="timeline-item">
<div class="timeline-dot"></div>
<h4>3. Database Mapping</h4>
<p>Exfiltrated schema info, identifying <code>dvwa</code> and <code>information_schema</code>. Mapped table relations for target data.</p>
</div>
<div class="timeline-item">
<div class="timeline-dot"></div>
<h4>4. Data Exfiltration</h4>
<p>Recovered 5 administrative records, extracted MD5 hashes, and successfully decrypted them via dictionary attack.</p>
</div>
</div>
</section>
<section id="methodology">
<h2 style="text-align: center; margin-bottom: 3rem;">Technical Methodology</h2>
<div class="meth-grid">
<div class="card meth-item">
<i class="fas fa-keyboard meth-icon"></i>
<h3>Manual Logic Flaws</h3>
<p>Tested unsanitized input parameters with Boolean and Error-based payloads to map the backend database structure.</p>
</div>
<div class="card meth-item">
<i class="fas fa-robot meth-icon"></i>
<h3>Automated Exploitation</h3>
<p>Utilized SQLMap to automate schema enumeration and quickly dump administrative user records.</p>
</div>
<div class="card meth-item">
<i class="fas fa-code meth-icon"></i>
<h3>Custom Security Tooling</h3>
<p>Developed a Python script using requests to automate heuristic vulnerability detection for custom injection verification.</p>
</div>
</div>
</section>
<section id="findings">
<h2 style="margin-bottom: 3rem;"><i class="fas fa-shield-virus" style="color: var(--accent-gold); margin-right: 15px;"></i>Exploitation Log</h2>
<div class="card">
<div class="terminal-window no-print" style="margin-bottom: 3rem;">
<div class="terminal-header">
<div class="t-dot" style="background: #ff5f56;"></div>
<div class="t-dot" style="background: #ffbd2e;"></div>
<div class="t-dot" style="background: #27c93f;"></div>
</div>
<div class="t-body">
<div><span class="t-prompt">┌──(kali)-[~]</span></div>
<div><span class="t-prompt">└─$</span> <span class="t-cmd">sqlmap -u "..." --cookie="..." --dump</span></div>
<br>
<div style="color: #A3BE8C;">[INFO] Parameter 'id' is vulnerable (MySQL).</div>
<div style="color: #A3BE8C;">[INFO] Fetching entries for 'users' table.</div>
<div style="color: #D08770;">[INFO] Starting dictionary attack (md5).</div>
<div style="color: #EBCB8B;">[SUCCESS] Cracked 5/5 hashes.</div>
</div>
</div>
<div class="findings-container">
<div class="finding-row">
<div>
<h4>Time-Based Blind</h4>
<p style="color: var(--text-dim);">Vulnerability confirmed via response delay payloads.</p>
</div>
<span class="severity-high">CRITICAL</span>
</div>
<div class="finding-row">
<div>
<h4>UNION-Based Exfiltration</h4>
<p style="color: var(--text-dim);">Full database leakage achieved via UNION results.</p>
</div>
<span class="severity-high">CRITICAL</span>
</div>
</div>
</div>
</section>
<section id="exfiltrated">
<h2 style="margin-bottom: 1rem;">Exfiltrated Data Set</h2>
<p style="color: var(--text-dim); margin-bottom: 3rem;">Database dump recovered during the final exfiltration phase.</p>
<div class="card" style="padding: 1rem;">
<table class="exfil-matrix">
<thead>
<tr>
<th>UID</th>
<th>User</th>
<th>MD5 Hash</th>
<th>Status</th>
<th>Plaintext</th>
</tr>
</thead>
<tbody>
<tr><td>1</td><td>admin</td><td class="hash-dim">5f4dcc3b5...</td><td style="color: #27c93f;">CRACKED</td><td class="plaintext-gold">password</td></tr>
<tr><td>2</td><td>gordonb</td><td class="hash-dim">e99a18c42...</td><td style="color: #27c93f;">CRACKED</td><td class="plaintext-gold">abc123</td></tr>
<tr><td>3</td><td>1337</td><td class="hash-dim">8d3533d75...</td><td style="color: #27c93f;">CRACKED</td><td class="plaintext-gold">charley</td></tr>
<tr><td>4</td><td>pablo</td><td class="hash-dim">0d107d09f...</td><td style="color: #27c93f;">CRACKED</td><td class="plaintext-gold">letmein</td></tr>
<tr><td>5</td><td>smithy</td><td class="hash-dim">5f4dcc3b5...</td><td style="color: #27c93f;">CRACKED</td><td class="plaintext-gold">password</td></tr>
</tbody>
</table>
</div>
</section>
<section id="evidence">
<h2 style="margin-bottom: 1rem;">Technical Evidence</h2>
<h3 style="color: var(--accent-gold); margin-bottom: 1.5rem;"><i class="fas fa-search" style="margin-right:10px;"></i>Step 1: Application Reconnaissance</h3>
<div class="gallery" style="margin-bottom: 4rem;">
<div class="gallery-item">
<img src="pics/Screenshot_2026-04-15_15_50_52.png">
<div class="gallery-overlay"><h4>Target Application</h4><p>DVWA SQLi Module loaded.</p></div>
</div>
<div class="gallery-item">
<img src="pics/Screenshot_2026-04-15_15_42_27.png">
<div class="gallery-overlay"><h4>Environment</h4><p>Kali Linux toolset initialized.</p></div>
</div>
<div class="gallery-item">
<img src="pics/Screenshot_2026-04-15_15_54_03.png">
<div class="gallery-overlay"><h4>Session Config</h4><p>Capturing active PHP session tokens.</p></div>
</div>
<div class="gallery-item">
<img src="pics/Screenshot_2026-04-15_15_51_50.png">
<div class="gallery-overlay"><h4>Manual Test</h4><p>Confirming Boolean vulnerability.</p></div>
</div>
</div>
<h3 style="color: var(--accent-gold); margin-bottom: 1.5rem;"><i class="fas fa-meteor" style="margin-right:10px;"></i>Step 2: Automated Exploitation</h3>
<div class="gallery" style="margin-bottom: 4rem;">
<div class="gallery-item">
<img src="pics/Screenshot_2026-04-15_15_54_40.png">
<div class="gallery-overlay"><h4>SQLMap Init</h4><p>Starting heuristic scan.</p></div>
</div>
<div class="gallery-item">
<img src="pics/Screenshot_2026-04-15_15_55_29.png">
<div class="gallery-overlay"><h4>Vector Match</h4><p>Blind and UNION vectors confirmed.</p></div>
</div>
<div class="gallery-item">
<img src="pics/Screenshot_2026-04-15_15_55_54.png">
<div class="gallery-overlay"><h4>Database Extracted</h4><p>Dumping 'users' table schema.</p></div>
</div>
<div class="gallery-item">
<img src="pics/Screenshot_2026-04-15_15_55_58.png">
<div class="gallery-overlay"><h4>Hash Retrieval</h4><p>Targeting MD5 credentials.</p></div>
</div>
<div class="gallery-item">
<img src="pics/Screenshot_2026-04-15_15_56_00.png">
<div class="gallery-overlay"><h4>Data Dump</h4><p>Passwords successfully extracted.</p></div>
</div>
</div>
<h3 style="color: var(--accent-gold); margin-bottom: 1.5rem;"><i class="fas fa-terminal" style="margin-right:10px;"></i>Step 3: Custom Python Scanner</h3>
<div class="gallery">
<div class="gallery-item">
<img src="pics/Screenshot_2026-04-15_15_57_45.png">
<div class="gallery-overlay"><h4>Custom Script</h4><p>Writing target scanner in Python.</p></div>
</div>
<div class="gallery-item">
<img src="pics/Screenshot_2026-04-15_15_58_00.png">
<div class="gallery-overlay"><h4>Test Output</h4><p>Confirming logic triggers.</p></div>
</div>
<div class="gallery-item">
<img src="pics/Screenshot_2026-04-15_15_57_24.png">
<div class="gallery-overlay"><h4>Exfiltration Hook</h4><p>Testing manual hash extraction.</p></div>
</div>
<div class="gallery-item">
<img src="pics/Screenshot_2026-04-15_16_06_33.png">
<div class="gallery-overlay"><h4>Final Run</h4><p>Successful detection logs.</p></div>
</div>
</div>
</section>
<section id="library">
<h2 style="margin-bottom: 3rem;">Payload Reference</h2>
<div class="card">
<div class="table-container">
<table>
<thead>
<tr><th>Type</th><th>Payload</th><th>Status</th><th>Result</th></tr>
</thead>
<tbody>
<tr><td>Boolean Bypass</td><td><span class="code-pill">1' OR '1'='1</span></td><td style="color: var(--danger);">VULN</td><td>Login Bypass</td></tr>
<tr><td>UNION Attack</td><td><span class="code-pill">1' UNION SELECT null,version() --</span></td><td style="color: var(--danger);">SUCCESS</td><td>Version Leak</td></tr>
<tr><td>Time-Based</td><td><span class="code-pill">1' AND SLEEP(5) --</span></td><td style="color: var(--danger);">VULN</td><td>Delay Confirmed</td></tr>
<tr><td>Error-based</td><td><span class="code-pill">1' AND extractvalue(1,...)</span></td><td style="color: var(--danger);">SUCCESS</td><td>Direct Retrieval</td></tr>
</tbody>
</table>
</div>
</div>
</section>
<section id="code">
<div class="card">
<h2 style="margin-bottom: 2rem;">Detection Heuristics</h2>
<pre><code>
def is_vulnerable(response, baseline, elapsed, payload):
response_lower = response.lower()
for indicator in SUCCESS_INDICATORS:
if indicator in response_lower:
return True, f"Found: {indicator}"
if "sleep" in payload.lower() and elapsed > 1.5:
return True, f"Time-delay confirmed ({elapsed:.2f}s)"
return False, "Safe"
</code></pre>
</div>
</section>
<section id="remediation">
<h2 style="margin-bottom: 3rem;">Remediation</h2>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem;">
<div class="card" style="border-left: 4px solid var(--accent-gold);">
<h3>Prepared Statements</h3>
<p style="margin-top: 1rem; color: var(--text-dim);">Using parameterized queries to decouple user data from SQL instruction, nullifying injection vectors.</p>
</div>
<div class="card" style="border-left: 4px solid var(--accent-gold);">
<h3>Input Sanitization</h3>
<p style="margin-top: 1rem; color: var(--text-dim);">Strict type-enforcement and whitelist validation for every application entry point.</p>
</div>
</div>
</section>
</div>
<footer>
<p>© 2026 Portfolio | Youssef Moataz | Security Assessment</p>
</footer>
<script src="app.js"></script>
</body>
</html>