File size: 20,206 Bytes
667c7fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5959221
 
 
 
 
 
 
32fd05c
 
 
 
 
 
 
f400015
32fd05c
f400015
12f0912
5959221
667c7fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
251c8a3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5959221
 
 
 
 
 
251c8a3
5959221
251c8a3
 
 
667c7fa
 
 
 
 
251c8a3
 
 
 
667c7fa
 
251c8a3
667c7fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5f90bfb
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
322
323
324
325
326
327
328
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Security+ QuickCheat Pro</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#3b82f6',
                        secondary: '#10b981',
                        dark: '#1e293b'
                    }
                }
            }
        }
    </script>
    <style>
        @media print {
            .no-print {
                display: none !important;
            }
            body {
                padding: 0;
                margin: 0;
                background: white;
                color: black;
            }
            .print-section {
                page-break-inside: avoid;
            }
        }
        .network-diagram {
            background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
            border-radius: 0.5rem;
        }
    </style>
</head>
<body class="bg-gray-50 text-gray-800 font-sans">
    <div class="container mx-auto px-4 py-8 max-w-4xl">
        <!-- Header -->
        <header class="mb-8 text-center no-print">
            <h1 class="text-4xl font-bold text-primary mb-2">Security+ QuickCheat Pro</h1>
            <p class="text-lg text-secondary">Your printable CompTIA Security+ knowledge checklist</p>
            <div class="flex justify-center gap-4 mt-4">
                <button onclick="window.print()" class="px-6 py-2 bg-primary text-white rounded-lg hover:bg-blue-700 transition flex items-center">
                    <i data-feather="printer" class="mr-2"></i> Print Checklist
                </button>
                <a href="nmap.html" class="px-6 py-2 bg-secondary text-white rounded-lg hover:bg-green-700 transition flex items-center">
                    <i data-feather="code" class="mr-2"></i> Nmap Cheat Sheet
                </a>
                <div class="relative group">
                    <button class="px-6 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition flex items-center">
                        <i data-feather="book" class="mr-2"></i> Lesson Recaps
                        <i data-feather="chevron-down" class="ml-2"></i>
                    </button>
                    <div class="absolute hidden group-hover:block bg-white shadow-lg rounded-lg mt-1 w-48 z-10">
                        <a href="lesson_1.html" class="block px-4 py-2 text-gray-800 hover:bg-purple-100 rounded-t-lg">Lesson 1 Recap</a>
                        <a href="lesson_2.html" class="block px-4 py-2 text-gray-800 hover:bg-purple-100">Lesson 2 Recap</a>
                    </div>
</div>
</div>
</header>

        <!-- Main Content -->
        <main class="bg-white shadow-lg rounded-lg p-6 print:p-0">
            <!-- Linux CLI Section -->
            <section class="mb-10 print-section">
                <h2 class="text-2xl font-bold text-primary border-b-2 border-primary pb-2 mb-4 flex items-center">
                    <i data-feather="terminal" class="mr-2"></i> Essential Linux CLI Commands
                </h2>
                <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                    <div class="bg-gray-50 p-4 rounded-lg">
                        <h3 class="font-semibold text-secondary mb-2">File System Navigation</h3>
                        <ul class="space-y-2">
                            <li><span class="font-mono bg-gray-200 px-2 py-1 rounded">ls</span> - List directory contents</li>
                            <li><span class="font-mono bg-gray-200 px-2 py-1 rounded">cd</span> - Change directory</li>
                            <li><span class="font-mono bg-gray-200 px-2 py-1 rounded">pwd</span> - Print working directory</li>
                        </ul>
                    </div>
                    <div class="bg-gray-50 p-4 rounded-lg">
                        <h3 class="font-semibold text-secondary mb-2">Permissions & Security</h3>
                        <ul class="space-y-2">
                            <li><span class="font-mono bg-gray-200 px-2 py-1 rounded">chmod</span> - Change file permissions</li>
                            <li><span class="font-mono bg-gray-200 px-2 py-1 rounded">sudo</span> - Execute as superuser</li>
                            <li><span class="font-mono bg-gray-200 px-2 py-1 rounded">passwd</span> - Change user password</li>
                        </ul>
                    </div>
                    <div class="bg-gray-50 p-4 rounded-lg">
                        <h3 class="font-semibold text-secondary mb-2">Network Commands</h3>
                        <ul class="space-y-2">
                            <li><span class="font-mono bg-gray-200 px-2 py-1 rounded">ifconfig</span> - Configure network interfaces</li>
                            <li><span class="font-mono bg-gray-200 px-2 py-1 rounded">netstat</span> - Network statistics</li>
                            <li><span class="font-mono bg-gray-200 px-2 py-1 rounded">ssh</span> - Secure shell remote login</li>
                        </ul>
                    </div>
                    <div class="bg-gray-50 p-4 rounded-lg">
                        <h3 class="font-semibold text-secondary mb-2">System & Utilities</h3>
                        <ul class="space-y-2">
                            <li><span class="font-mono bg-gray-200 px-2 py-1 rounded">grep</span> - Search text patterns</li>
                            <li><span class="font-mono bg-gray-200 px-2 py-1 rounded">iptables</span> - Firewall configuration</li>
                            <li><span class="font-mono bg-gray-200 px-2 py-1 rounded">ps</span> - Process status</li>
                        </ul>
                    </div>
                </div>
            </section>

            <!-- MAC Address Section -->
            <section class="mb-10 print-section">
                <h2 class="text-2xl font-bold text-primary border-b-2 border-primary pb-2 mb-4 flex items-center">
                    <i data-feather="hard-drive" class="mr-2"></i> MAC Address Fundamentals
                </h2>
                <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                    <div>
                        <h3 class="font-semibold text-secondary mb-2">What is a MAC Address?</h3>
                        <p class="mb-4">A Media Access Control (MAC) address is a <strong>unique hardware identifier</strong> assigned to network interfaces. It operates at <strong>Layer 2 (Data Link)</strong> of the OSI model.</p>
                        
                        <h3 class="font-semibold text-secondary mb-2">Key Characteristics:</h3>
                        <ul class="list-disc pl-5 space-y-1">
                            <li>48-bit address (e.g., <span class="font-mono">00:1A:2B:3C:4D:5E</span>)</li>
                            <li>Burned into the network interface card (NIC)</li>
                            <li>Used for local network communication</li>
                            <li>Essential for Ethernet frame delivery</li>
                        </ul>
                    </div>
                    <div class="network-diagram p-4">
                        <h3 class="font-semibold text-secondary mb-2 text-center">MAC Address Traffic Flow</h3>
                        <div class="flex flex-col items-center">
                            <div class="bg-white p-3 rounded-lg shadow-sm mb-2 text-center w-full">
                                <div class="font-mono text-sm">Source: 00:1A:2B:3C:4D:5E</div>
                                <div class="font-mono text-sm">Dest: 00:0A:95:9D:68:16</div>
                                <div class="text-xs mt-1">(Default Gateway)</div>
                            </div>
                            <i data-feather="arrow-down" class="text-secondary"></i>
                            <div class="bg-white p-3 rounded-lg shadow-sm mt-2 text-center w-full">
                                <div class="font-mono text-sm">Next Hop: Router MAC</div>
                                <div class="text-xs mt-1">Forwarded to destination network</div>
                            </div>
                        </div>
                    </div>
                </div>
            </section>

            <!-- IP Address Section -->
            <section class="mb-10 print-section">
                <h2 class="text-2xl font-bold text-primary border-b-2 border-primary pb-2 mb-4 flex items-center">
                    <i data-feather="globe" class="mr-2"></i> IP Address Fundamentals
                </h2>
                <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                    <div>
                        <h3 class="font-semibold text-secondary mb-2">What is an IP Address?</h3>
                        <p class="mb-4">An Internet Protocol (IP) address is a <strong>logical network identifier</strong> assigned to devices. It operates at <strong>Layer 3 (Network)</strong> of the OSI model.</p>
                        
                        <h3 class="font-semibold text-secondary mb-2">Key Concepts:</h3>
                        <ul class="list-disc pl-5 space-y-1">
                            <li><strong>IPv4:</strong> 32-bit address (e.g., <span class="font-mono">192.168.1.100</span>)</li>
                            <li><strong>IPv6:</strong> 128-bit address (e.g., <span class="font-mono">2001:0db8:85a3::8a2e:0370:7334</span>)</li>
                            <li>Assigned statically or via DHCP</li>
                            <li>Used for end-to-end communication</li>
                        </ul>
                    </div>
                    <div class="bg-gray-50 p-4 rounded-lg">
                        <h3 class="font-semibold text-secondary mb-2">Example IPv4 Configuration</h3>
                        <div class="font-mono bg-white p-3 rounded text-sm">
                            <div>IP Address: <span class="text-primary">192.168.1.100</span></div>
                            <div>Subnet Mask: <span class="text-primary">255.255.255.0</span></div>
                            <div>Gateway: <span class="text-primary">192.168.1.1</span></div>
                            <div>DNS: <span class="text-primary">8.8.8.8</span></div>
                        </div>
                        <p class="mt-2 text-sm">This configuration allows communication within the <span class="font-mono">192.168.1.0/24</span> network.</p>
                    </div>
                </div>
            </section>
            <!-- TCP Handshake Section -->
            <section class="mb-10 print-section">
                <h2 class="text-2xl font-bold text-primary border-b-2 border-primary pb-2 mb-4 flex items-center">
                    <i data-feather="share-2" class="mr-2"></i> TCP 3-Way Handshake & Port Scanning
                </h2>
                <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                    <div>
                        <h3 class="font-semibold text-secondary mb-2">TCP 3-Way Handshake</h3>
                        <ol class="list-decimal pl-5 space-y-2">
                            <li><strong>SYN:</strong> Client sends SYN packet to server</li>
                            <li><strong>SYN-ACK:</strong> Server responds with SYN-ACK</li>
                            <li><strong>ACK:</strong> Client sends final ACK to establish connection</li>
                        </ol>
                        <div class="mt-4 bg-gray-50 p-4 rounded-lg">
                            <h4 class="font-semibold text-secondary mb-2">Port Scanning Basics</h4>
                            <p>Port scanners like Nmap use this handshake to determine which ports are open:</p>
                            <ul class="list-disc pl-5 mt-2 space-y-1">
                                <li>Open port: Responds with SYN-ACK</li>
                                <li>Closed port: Responds with RST</li>
                                <li>Filtered port: No response</li>
                            </ul>
                        </div>
                    </div>
                    <div>
                        <h3 class="font-semibold text-secondary mb-2">Basic Nmap Examples</h3>
                        <div class="font-mono bg-gray-800 text-gray-100 p-4 rounded-lg text-sm">
                        <div class="mb-2">
                            <span class="text-green-400"># Basic Nmap examples (see full </span>
                            <a href="nmap.html" class="text-blue-400 underline">Nmap Cheat Sheet</a><span class="text-green-400">)</span><br>
                            <span class="text-blue-400">nmap</span> -sT 192.168.1.1 <span class="text-gray-400"># TCP connect scan</span><br>
                            <span class="text-blue-400">nmap</span> -sS 192.168.1.1 <span class="text-gray-400"># SYN stealth scan (root)</span><br>
                            <span class="text-blue-400">nmap</span> -A 192.168.1.1 <span class="text-gray-400"># Aggressive scan</span>
                        </div>
</div>
                    </div>
                </div>
            </section>

            <!-- Ports and Services Section -->
            <section class="mb-10 print-section">
                <h2 class="text-2xl font-bold text-primary border-b-2 border-primary pb-2 mb-4 flex items-center">
                    <i data-feather="hash" class="mr-2"></i> Common Ports & Services
</h2>
                <div class="mb-4 bg-primary bg-opacity-10 p-4 rounded-lg">
                    <p><strong>Note:</strong> The ports below are commonly scanned during security assessments. Understanding these helps identify potential attack surfaces.</p>
                </div>
                <div class="overflow-x-auto">
                    <table class="min-w-full bg-white border border-gray-200">
<thead class="bg-gray-100">
                            <tr>
                                <th class="py-2 px-4 border-b text-left">Port</th>
                                <th class="py-2 px-4 border-b text-left">Protocol</th>
                                <th class="py-2 px-4 border-b text-left">Service</th>
                                <th class="py-2 px-4 border-b text-left">Description</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr class="hover:bg-gray-50">
                                <td class="py-2 px-4 border-b font-mono">20/21</td>
                                <td class="py-2 px-4 border-b">TCP</td>
                                <td class="py-2 px-4 border-b">FTP</td>
                                <td class="py-2 px-4 border-b">File Transfer Protocol</td>
                            </tr>
                            <tr class="hover:bg-gray-50">
                                <td class="py-2 px-4 border-b font-mono">22</td>
                                <td class="py-2 px-4 border-b">TCP</td>
                                <td class="py-2 px-4 border-b">SSH</td>
                                <td class="py-2 px-4 border-b">Secure Shell</td>
                            </tr>
                            <tr class="hover:bg-gray-50">
                                <td class="py-2 px-4 border-b font-mono">80</td>
                                <td class="py-2 px-4 border-b">TCP</td>
                                <td class="py-2 px-4 border-b">HTTP</td>
                                <td class="py-2 px-4 border-b">Hypertext Transfer Protocol</td>
                            </tr>
                            <tr class="hover:bg-gray-50">
                                <td class="py-2 px-4 border-b font-mono">443</td>
                                <td class="py-2 px-4 border-b">TCP</td>
                                <td class="py-2 px-4 border-b">HTTPS</td>
                                <td class="py-2 px-4 border-b">HTTP Secure</td>
                            </tr>
                            <tr class="hover:bg-gray-50">
                                <td class="py-2 px-4 border-b font-mono">3389</td>
                                <td class="py-2 px-4 border-b">TCP</td>
                                <td class="py-2 px-4 border-b">RDP</td>
                                <td class="py-2 px-4 border-b">Remote Desktop Protocol</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </section>

            <!-- TCP/IP Stack Section -->
            <section class="print-section">
                <h2 class="text-2xl font-bold text-primary border-b-2 border-primary pb-2 mb-4 flex items-center">
                    <i data-feather="layers" class="mr-2"></i> TCP/IP Stack Overview
                </h2>
                <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                    <div>
                        <div class="bg-gray-50 p-4 rounded-lg mb-4">
                            <h3 class="font-semibold text-secondary mb-2">Layer 2: Data Link (MAC)</h3>
                            <p class="font-mono text-sm bg-white p-2 rounded">Frame addressed to next hop: <span class="text-primary">00:1A:2B:3C:4D:5E</span> (default gateway)</p>
                            <p class="mt-1 text-sm">Responsible for local network delivery using MAC addresses.</p>
                        </div>
                        
                        <div class="bg-gray-50 p-4 rounded-lg mb-4">
                            <h3 class="font-semibold text-secondary mb-2">Layer 3: Network (IP)</h3>
                            <p class="font-mono text-sm bg-white p-2 rounded">Packet addressed to: <span class="text-primary">203.0.113.45</span></p>
                            <p class="mt-1 text-sm">Handles logical addressing and routing between networks.</p>
                        </div>
                    </div>
                    <div>
                        <div class="bg-gray-50 p-4 rounded-lg mb-4">
                            <h3 class="font-semibold text-secondary mb-2">Layer 4: Transport (TCP/UDP)</h3>
                            <p class="font-mono text-sm bg-white p-2 rounded">Segment addressed to port: <span class="text-primary">443</span> (HTTPS)</p>
                            <p class="mt-1 text-sm">Manages end-to-end communication and reliability.</p>
                        </div>
                        
                        <div class="bg-gray-50 p-4 rounded-lg">
                            <h3 class="font-semibold text-secondary mb-2">Layer 7: Application</h3>
                            <p class="font-mono text-sm bg-white p-2 rounded">HTTP GET request for: <span class="text-primary">/index.html</span></p>
                            <p class="mt-1 text-sm">Contains the actual application data and protocols.</p>
                        </div>
                    </div>
                </div>
                <div class="mt-6 bg-primary bg-opacity-10 p-4 rounded-lg">
                    <h3 class="font-semibold text-primary mb-2">Complete Communication Flow:</h3>
                    <ol class="list-decimal pl-5 space-y-2">
                        <li>Application creates HTTP request (Layer 7)</li>
                        <li>TCP segment created with port 443 (Layer 4)</li>
                        <li>IP packet addressed to destination IP (Layer 3)</li>
                        <li>Ethernet frame addressed to next hop MAC (Layer 2)</li>
                    </ol>
                </div>
            </section>
        </main>

        <!-- Footer -->
        <footer class="mt-12 text-center text-sm text-gray-500 no-print">
            <p>Security+ QuickCheat Pro - Printable Study Reference</p>
            <p class="mt-1">For optimal printing, use Chrome/Firefox and select "Background graphics" in print settings</p>
        </footer>
    </div>

    <script>
        feather.replace();
    </script>
</body>
</html>