|
7 | 7 | <title>Writeup: Easy Box 1</title> |
8 | 8 | <!-- Tailwind CSS --> |
9 | 9 | <link href=" https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css" rel=" stylesheet" > |
10 | | - <style> |
11 | | - html, body { |
12 | | - height: 100%; |
13 | | - } |
14 | | - body { |
15 | | - display: flex; |
16 | | - flex-direction: column; |
17 | | - } |
18 | | - main { |
19 | | - flex: 1; |
20 | | - } |
21 | | - </style> |
22 | 10 | </head> |
23 | | -<body class="bg-gray-900 text-white"> |
| 11 | +<body class="bg-gray-900 text-white min-h-screen flex flex-col"> |
24 | 12 | <!-- Navbar --> |
25 | 13 | <nav class="bg-gray-800 p-4"> |
26 | 14 | <div class="container mx-auto"> |
|
33 | 21 | </nav> |
34 | 22 |
|
35 | 23 | <!-- Writeup Content --> |
36 | | - <main class="container mx-auto p-6"> |
| 24 | + <div class="container mx-auto p-6 flex-grow"> |
37 | 25 | <h1 class="text-4xl font-bold mb-4">HackTheBox: Easy Box 1 Writeup</h1> |
38 | | - <p class="mb-6">This is a detailed walkthrough of the HackTheBox Easy Box 1 challenge...</p> |
39 | | - |
40 | | - <!-- Your writeup content goes here --> |
41 | | - </main> |
| 26 | + <p class="mb-6">This is a detailed walkthrough of the HackTheBox Easy Box 1 challenge, covering each stage of the penetration testing process.</p> |
| 27 | + |
| 28 | + <!-- Table of Contents --> |
| 29 | + <div class="bg-gray-800 p-4 rounded mb-4"> |
| 30 | + <h2 class="text-2xl font-bold mb-4">Table of Contents</h2> |
| 31 | + <ul class="list-decimal list-inside"> |
| 32 | + <li><a href="#enumeration" class="text-blue-400 hover:underline">Enumeration</a></li> |
| 33 | + <li><a href="#vulnerabilities" class="text-blue-400 hover:underline">Vulnerabilities Identified</a></li> |
| 34 | + <li><a href="#exploitation" class="text-blue-400 hover:underline">Exploitation</a></li> |
| 35 | + <li><a href="#post-exploitation" class="text-blue-400 hover:underline">Post-Exploitation</a></li> |
| 36 | + <li><a href="#lessons-learned" class="text-blue-400 hover:underline">Lessons Learned</a></li> |
| 37 | + </ul> |
| 38 | + </div> |
| 39 | + |
| 40 | + <!-- Enumeration Section --> |
| 41 | + <div id="enumeration" class="bg-gray-800 p-4 rounded mb-6"> |
| 42 | + <h2 class="text-3xl font-bold mb-2">Enumeration</h2> |
| 43 | + <p>In this section, we perform network reconnaissance and service discovery using tools like <strong>nmap</strong>, <strong>netcat</strong>, or others to identify open ports, services, and potential attack vectors.</p> |
| 44 | + <pre class="bg-gray-700 p-4 rounded text-sm mb-4">nmap -sC -sV -oN nmap_initial.txt 10.10.10.X</pre> |
| 45 | + <p>Output shows open ports 22 (SSH) and 80 (HTTP). We also found a public web directory that looks interesting.</p> |
| 46 | + </div> |
| 47 | + |
| 48 | + <!-- Vulnerabilities Identified --> |
| 49 | + <div id="vulnerabilities" class="bg-gray-800 p-4 rounded mb-6"> |
| 50 | + <h2 class="text-3xl font-bold mb-2">Vulnerabilities Identified</h2> |
| 51 | + <p>Based on the services identified, the following vulnerabilities were discovered:</p> |
| 52 | + <ul class="list-disc list-inside mb-4"> |
| 53 | + <li>Outdated <strong>Apache HTTP Server</strong> (CVE-XXXX-XXXX)</li> |
| 54 | + <li>Weak credentials for SSH access</li> |
| 55 | + </ul> |
| 56 | + </div> |
| 57 | + |
| 58 | + <!-- Exploitation Section --> |
| 59 | + <div id="exploitation" class="bg-gray-800 p-4 rounded mb-6"> |
| 60 | + <h2 class="text-3xl font-bold mb-2">Exploitation</h2> |
| 61 | + <p>In this section, we detail how the vulnerabilities were exploited to gain initial access to the system.</p> |
| 62 | + <p>Exploiting the outdated Apache server allowed us to upload a reverse shell:</p> |
| 63 | + <pre class="bg-gray-700 p-4 rounded text-sm mb-4">nc -lvnp 4444</pre> |
| 64 | + <p>Next, we used a weak SSH password to gain further access to the machine.</p> |
| 65 | + </div> |
| 66 | + |
| 67 | + <!-- Post-Exploitation Section --> |
| 68 | + <div id="post-exploitation" class="bg-gray-800 p-4 rounded mb-6"> |
| 69 | + <h2 class="text-3xl font-bold mb-2">Post-Exploitation</h2> |
| 70 | + <p>After gaining access, we performed the following actions:</p> |
| 71 | + <ul class="list-disc list-inside mb-4"> |
| 72 | + <li>Privilege escalation using a kernel exploit</li> |
| 73 | + <li>Collected sensitive data such as <strong>/etc/passwd</strong> and system logs</li> |
| 74 | + <li>Maintained persistence with a hidden SSH key</li> |
| 75 | + </ul> |
| 76 | + </div> |
| 77 | + |
| 78 | + <!-- Lessons Learned --> |
| 79 | + <div id="lessons-learned" class="bg-gray-800 p-4 rounded mb-6"> |
| 80 | + <h2 class="text-3xl font-bold mb-2">Lessons Learned</h2> |
| 81 | + <p>This section highlights key takeaways and best practices learned from the engagement:</p> |
| 82 | + <ul class="list-disc list-inside"> |
| 83 | + <li>Ensure timely updates and patch management to avoid exploitation of known vulnerabilities.</li> |
| 84 | + <li>Use strong, unique credentials for all accounts to prevent easy brute-force attacks.</li> |
| 85 | + </ul> |
| 86 | + </div> |
| 87 | + </div> |
42 | 88 |
|
43 | 89 | <!-- Footer --> |
44 | | - <footer class="bg-gray-800 p-4 text-center"> |
45 | | - <p>© 2024 Your Name. <a href="https://github.com/username" class="text-blue-400 hover:underline">GitHub</a></p> |
| 90 | + <footer class="bg-gray-800 p-4 text-center mt-auto"> |
| 91 | + <p>© 2024 Your Name. <a href="https://github.com/your-github" class="text-blue-400 hover:underline">GitHub</a></p> |
46 | 92 | </footer> |
47 | 93 | </body> |
48 | 94 | </html> |
0 commit comments