<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://nizarlahmar.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://nizarlahmar.com/" rel="alternate" type="text/html" hreflang="en" /><updated>2026-11-22T19:59:11-05:00</updated><id>https://nizarlahmar.com/feed.xml</id><title type="html">Nizar Lahmar</title><subtitle>Nizar Lahmar (oxl0rd) — cybersecurity student focused on offensive security. C2 development in C++, 19 Hack The Box machines rooted, SOC detection labs, and exploitation write-ups.</subtitle><author><name>Nizar Lahmar</name></author><entry><title type="html">Write-up: Wifinetic on HTB</title><link href="https://nizarlahmar.com/writing/htb-wifinetic/" rel="alternate" type="text/html" title="Write-up: Wifinetic on HTB" /><published>2026-09-03T00:00:00-04:00</published><updated>2026-09-03T00:00:00-04:00</updated><id>https://nizarlahmar.com/writing/htb-wifinetic</id><content type="html" xml:base="https://nizarlahmar.com/writing/htb-wifinetic/"><![CDATA[<p>In today’s write-up, I’m covering the HackTheBox machine called ‘Wifinetic’.</p>

<p><strong>DISCLAIMER</strong>: This write-up does not include User/Root flags, nor does it reveal direct information like credentials. That said, following it will guide you to fully owning the target machine.</p>

<h1 id="why-i-chose-it">Why I Chose It</h1>

<p>As the name implies, this box has some WiFi shenanigans which is actually pretty rare for CTFs and similar activities. Therefore, I find that it’s an interesting box to cover, despite the fact it’s extremely easy and straightforward.</p>

<h1 id="reconnaissance">Reconnaissance</h1>

<p>For some reason, an all-ports scan of this machine was taking absurdly long, so I stuck to the 1000 most well-known ports (AKA Nmap’s default scan).</p>

<p>Below were the results.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Host is up (0.15s latency).
Not shown: 997 closed tcp ports (reset)
PORT   STATE SERVICE
21/tcp open  ftp
22/tcp open  ssh
53/tcp open  domain
</code></pre></div></div>

<p>Digging a bit deeper, we find that the FTP server is <code class="language-plaintext highlighter-rouge">vsFTPd 3.0.3</code> which isn’t immediately exploitable (after a while of checking service versions, you can come to memorize which ones have public CVEs; for instance, version <code class="language-plaintext highlighter-rouge">3.0.3</code> in this case is merely susceptible to DoS attacks).</p>

<p>Logging anonymously into FTP was successful, and several files were available to download. It seems like the target company in question is looking to migrate to Debian from OpenWrt.</p>

<h1 id="enumeration">Enumeration</h1>

<p>The most fruitful file turned out to be <code class="language-plaintext highlighter-rouge">backup-OpenWrt-2023-07-26.tar</code>, since once its contents were extracted, they revealed a seemingly old or incomplete version of the target system’s <code class="language-plaintext highlighter-rouge">/etc/</code> folder, including a <code class="language-plaintext highlighter-rouge">passwd</code> file.
Through this file, I was able to identify a user on the system called <code class="language-plaintext highlighter-rouge">netadmin</code>.</p>

<p>Inside the same folder, there’s another directory called <code class="language-plaintext highlighter-rouge">config</code> which houses a file called <code class="language-plaintext highlighter-rouge">wireless</code>. It contained what seems to be a WiFi password for a corresponding access point.</p>

<p><img src="/assets/images/wifinetic/wifi%20passwords.png" alt="wifi passwords" width="269" /></p>

<h1 id="exploitation">Exploitation</h1>

<p>Password reuse is a common exploitative vector on HTB machines, so I tried to SSH into the aforementioned <code class="language-plaintext highlighter-rouge">netadmin</code> user using this same password, and got in!</p>

<p>This netted me the User flag.</p>

<h1 id="privilege-escalation">Privilege Escalation</h1>

<p>This box is evidently geared towards wireless attacks, so some wireless reconnaissance is in order. My first go-to tool for this is <code class="language-plaintext highlighter-rouge">iw</code>.</p>

<p><code class="language-plaintext highlighter-rouge">iw dev</code> reveals a couple interesting interfaces, one of which, <code class="language-plaintext highlighter-rouge">mon0</code>, can be used to carry out wireless attacks given that it’s set to <code class="language-plaintext highlighter-rouge">monitor</code> mode.</p>

<p>Moreover, through the same output, we can tell our target is the one and only access point at <code class="language-plaintext highlighter-rouge">wlan0</code> because its <code class="language-plaintext highlighter-rouge">Type</code> is set to <code class="language-plaintext highlighter-rouge">AP</code>, meaning it’s an access point. The output also reveals its <code class="language-plaintext highlighter-rouge">BSSID</code>.</p>

<p>With this information, we can consider a WPS PIN attack through a utility such as <code class="language-plaintext highlighter-rouge">reaver</code>.</p>

<p>When I want to see if a tool is available on a target machine, I usually immediately try to run the binary, such as through <code class="language-plaintext highlighter-rouge">reaver --help</code> in this case. And indeed, it is accessible.</p>

<p>Below is the command used.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>reaver <span class="nt">-i</span> mon0 <span class="nt">-b</span> 02:00:00:00:00:00 <span class="nt">-v</span>
</code></pre></div></div>

<p><code class="language-plaintext highlighter-rouge">mon0</code> is the aforementioned interface able to carry out this attack, <code class="language-plaintext highlighter-rouge">02:00:00:00:00:00</code> is the <code class="language-plaintext highlighter-rouge">BSSID</code> of our targeted access point (you can also find this <code class="language-plaintext highlighter-rouge">BSSID</code> via the <code class="language-plaintext highlighter-rouge">wash</code> utility provided through <code class="language-plaintext highlighter-rouge">reaver</code> but it did not work on this machine), and <code class="language-plaintext highlighter-rouge">-v</code> is for verbose output.</p>

<p>In just a few seconds, I got the password!</p>

<p><img src="/assets/images/wifinetic/reaver%20output.png" alt="reaver output" width="489" /></p>

<p>Similar to our initial foothold, I used this password to try and SSH in as the <code class="language-plaintext highlighter-rouge">root</code> user.</p>

<p>This netted me the Root flag.</p>

<p>And thus, Wifinetic was hacked!</p>

<h1 id="additional-notes">Additional Notes</h1>

<p>A decent amount of other information could’ve been gathered, like emails, by reading the other files accessible via FTP (you can download all of them via <code class="language-plaintext highlighter-rouge">mget *</code> by the way).</p>

<p>I don’t always cover this extra information given that my CTF write-ups are (typically) centered around the direct path towards finding the flag, as opposed to thoroughly toying with the target. But do take note that if this were to be a real pen-test, you’d enumerate a lot more information about the target instead of hyper-focusing on a <code class="language-plaintext highlighter-rouge">.txt</code> file.</p>]]></content><author><name>Nizar Lahmar</name></author><category term="write-ups" /><category term="htb" /><category term="wifinetic" /><summary type="html"><![CDATA[In today’s write-up, I’m covering the HackTheBox machine called ‘Wifinetic’.]]></summary></entry><entry><title type="html">Write-up: Blocky on HTB</title><link href="https://nizarlahmar.com/writing/htb-blocky/" rel="alternate" type="text/html" title="Write-up: Blocky on HTB" /><published>2026-08-31T00:00:00-04:00</published><updated>2026-08-31T00:00:00-04:00</updated><id>https://nizarlahmar.com/writing/htb-blocky</id><content type="html" xml:base="https://nizarlahmar.com/writing/htb-blocky/"><![CDATA[<p>In today’s write-up, I’m covering the HackTheBox machine called ‘Blocky’.</p>

<p><strong>DISCLAIMER</strong>: This write-up does not include User/Root flags, nor does it reveal direct information like credentials. That said, following it will guide you to fully owning the target machine.</p>

<h1 id="why-i-chose-it">Why I Chose It</h1>

<p>Although it’s extremely easy for an amateur pen-tester, I liked the “fake Minecraft” gag it has going on, and also the fact it seems to be running a genuinely valid Minecraft server.</p>

<h1 id="reconnaissance">Reconnaissance</h1>

<p>I tend to start out my pen-tests with a rudimentary Nmap scan. No <code class="language-plaintext highlighter-rouge">-A</code> or fancy evasion; just going across all ports to try and get a quick idea of what’s running on the machine.</p>

<p>Below were the results.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Host is up (0.072s latency).
Not shown: 65530 filtered tcp ports (no-response)
PORT      STATE  SERVICE
21/tcp    open   ftp
22/tcp    open   ssh
80/tcp    open   http
8192/tcp  closed sophos
25565/tcp open   minecraft
</code></pre></div></div>

<p>Whenever I see FTP, I instinctually try to log in anonymously (username <code class="language-plaintext highlighter-rouge">anonymous</code> with no password), but it didn’t work.</p>

<p>I occasionally also consider leaving two terminals open in the background brute-forcing any login services, such as FTP and SSH, but that usually hogs up resources and can cause issues with HTB machines, so I chose not to. Moreover, brute-forcing is very rarely a good ROI on CTF challenges.</p>

<p>Visiting the 80 port (after adding the domain <code class="language-plaintext highlighter-rouge">blocky.htb</code> to our <code class="language-plaintext highlighter-rouge">hosts</code> file) reveals a WordPress website with little to no activity.</p>

<p><img src="/assets/images/blocky/blockycraft%20site.png" alt="blockycraft site" width="676" /></p>

<h1 id="enumeration">Enumeration</h1>

<p>As with any web application pen-test, enumerating subdirectories is an essential step. So, I ran <code class="language-plaintext highlighter-rouge">gobuster</code> with a small <code class="language-plaintext highlighter-rouge">dirbuster</code> wordlist.</p>

<p>While it’s running, I performed some basic WordPress reconnaissance through <code class="language-plaintext highlighter-rouge">wpscan</code> and Metasploit’s <code class="language-plaintext highlighter-rouge">WordPress Scanner</code> module.</p>

<p>Both of them detected the WordPress version is <code class="language-plaintext highlighter-rouge">4.8</code>, but they didn’t identify any other exploitable avenues or glaring findings (like usernames or available plugins). The theme used (<code class="language-plaintext highlighter-rouge">twentyseventeen</code>) was also not seemingly problematic.</p>

<p>The directory enumeration netted some interesting results, like <code class="language-plaintext highlighter-rouge">/wp-includes/</code> and <code class="language-plaintext highlighter-rouge">/wp-content/uploads</code>, but the only fruitful ones were <code class="language-plaintext highlighter-rouge">/plugins/</code>, as it contained two JAR files, and <code class="language-plaintext highlighter-rouge">/phpmyadmin/</code> which expectedly contained a phpMyAdmin login page.</p>

<p>One of the aforementioned files, <code class="language-plaintext highlighter-rouge">BlockyCore.jar</code>, when decompiled (such as through <a href="https://www.decompiler.com/">this website</a>), revealed a pair of credentials.</p>

<p><img src="/assets/images/blocky/blockycore.jar%20file.png" alt="blockycore.jar file" width="480" /></p>

<h1 id="exploitation">Exploitation</h1>

<p>The credentials got me administrative privileges for phpMyAdmin, and this allowed access to various databases, including the <code class="language-plaintext highlighter-rouge">wordpress</code> one. The latter revealed the only existing user is <code class="language-plaintext highlighter-rouge">notch</code>. Nice.</p>

<p>In practice, I do think it’s reasonable to try out a limited but encompassing dictionary attack against exposed usernames, if only as a background task. In this case, for instance, I could’ve used <code class="language-plaintext highlighter-rouge">wpscan</code> to do so.</p>

<p>That said, the path of least resistance is to simply change the password through phpMyAdmin itself.</p>

<blockquote>
  <p>When changing the password, ensure it’s stored as a PHPass hash (by choosing MD5 in the Function drop-down menu on phpMyAdmin).</p>
</blockquote>

<p>After a few minutes, we can log into WordPress through the <code class="language-plaintext highlighter-rouge">notch</code> user who happens to have administrative privileges. Surprisingly, however, this didn’t immediately lead to anything fruitful like a shell, given that some usually-exploitable avenues like plugins weren’t useful this time around.</p>

<h1 id="lateral-movement">Lateral Movement</h1>

<p>After 30 minutes or so of looking around, I decided to see if a <code class="language-plaintext highlighter-rouge">notch</code> user also existed on the machine itself, and used the same password as the one we discovered earlier. And indeed this was the way.</p>

<p>I SSH’d via <code class="language-plaintext highlighter-rouge">notch@blocky.htb</code>, provided the aforementioned password, and got in.</p>

<p>This netted me the User flag.</p>

<h1 id="privilege-escalation">Privilege Escalation</h1>

<p>I then discovered this user was also in the <code class="language-plaintext highlighter-rouge">sudo</code> group through the <code class="language-plaintext highlighter-rouge">id</code> command, and further confirmed their capabilities through <code class="language-plaintext highlighter-rouge">sudo -l</code>, which revealed they are able to do basically anything on the target system, including thereby reading the contents of the <code class="language-plaintext highlighter-rouge">/root/</code> directory, which is typically where the second HTB flag is held.</p>

<p>This netted me the Root flag.</p>

<p>And thus, Blocky was hacked!</p>

<h1 id="additional-notes">Additional Notes</h1>

<p>As you saw earlier, there was presumably a Minecraft server running on port <code class="language-plaintext highlighter-rouge">25565</code>, and this server’s configuration files seem to be stored under <code class="language-plaintext highlighter-rouge">minecraft/</code> inside <code class="language-plaintext highlighter-rouge">notch</code>’s <code class="language-plaintext highlighter-rouge">/home/</code> directory.</p>

<p>That said, I didn’t try to play on this server, nor did I go back to try to gain a shell through the administrative WordPress account.</p>]]></content><author><name>Nizar Lahmar</name></author><category term="write-ups" /><category term="htb" /><category term="blocky" /><summary type="html"><![CDATA[In today’s write-up, I’m covering the HackTheBox machine called ‘Blocky’.]]></summary></entry><entry><title type="html">How I Passed the eJPT</title><link href="https://nizarlahmar.com/writing/ejpt-experience/" rel="alternate" type="text/html" title="How I Passed the eJPT" /><published>2026-07-02T00:00:00-04:00</published><updated>2026-07-02T00:00:00-04:00</updated><id>https://nizarlahmar.com/writing/ejpt-experience</id><content type="html" xml:base="https://nizarlahmar.com/writing/ejpt-experience/"><![CDATA[<p>In today’s blog post, I will be going over my experience passing INE’s eJPT (Junior Penetration Tester) certification. I’ll briefly document my experience, lessons learned, and overall thoughts.</p>

<h1 id="why-go-for-it">Why go for it?</h1>

<p>The first question to ask is why I was even interested in this certification.</p>

<p>The primary reason is because I needed a certification which can signal to HR practically-relevant pen-testing experience before going for something as substantial as the OSCP. The only certification that bridges this gap, as far as I know, is the eJPT.</p>

<p>Other well-known certs, such as the CPTS and PNPT, are either on the same level of the OSCP, or too niche to matter on a resume. That said, the eJPT itself isn’t high-level enough that it replaces those heavy-hitters, but it’s also not negligible.</p>

<p>Moreover, I wanted a professional test-oriented experience in regard to pen-testing to help solidify my basic skills and quicken some of my learning.</p>

<h1 id="my-experience">My Experience</h1>

<h2 id="payment-and-learning-material">Payment and Learning Material</h2>

<p>I paid $199 for both the voucher (which includes a complimentary retake) as well as 3 months of eJPT-specific learning material from INE. Originally, it was $299, but a discount code I found online took off a hundred bucks! (I promise you I do not remember the code; but I had used AI to look for it, so try that)</p>

<p>I only had two weeks to cram so I couldn’t afford paying for the voucher only and haphazardly deciding which material to study online.</p>

<p>The learning material itself was very professional and well-structured. You could tell the instructor (Alexis Ahmed) knew what he was talking about, and the courses themselves (structured sequentially under the Penetration Testing Student learning path) are properly organized.</p>

<p>Some of the content was definitely slightly repetitive, but not only is some of that unavoidable, but the individual courses are also supposed to be self-sufficient and independent to some extent, so it’s understandable.</p>

<h2 id="note-structure">Note Structure</h2>

<p>I was taking notes using Obsidian and forming my own knowledge base that doubles as a methodology/playbook.</p>

<p>For example, I’d separate the phases (e.g., Reconnaissance, Post-Exploitation) sequentially and include therein their associated techniques, with dedicated tool pages and vector pages (e.g., SMB, FTP).</p>

<p>I should probably dedicate an entire blog to this, since it’s not an exam-specific endeavor, and the way to take notes properly for hacking is more complicated than it seems, but for now, I’ll keep it at that.</p>

<p>When actually taking the exam, I had one big Markdown-formatted page organized across “Nmap scans”, “Comprehensive Findings” and “Questions”.</p>

<h2 id="the-exam--some-tips">The Exam &amp; Some Tips</h2>

<p>You have 48 hours to pass the exam, and <em>I</em> was given 45 questions total.</p>

<p>You are not handed a specific target like a CTF; you’re simply part of the network you’re supposed to test the security of (using a browser-based cloud Kali environment), and expected to find hosts manually and work your way into internal machines.</p>

<p>I really liked that aspect because it felt extremely realistic for the sort of engagement you can expect in the real world.</p>

<p>I did not think the questions were sequential, as some of them referenced things I would’ve only reached during post-exploitation of, say, the third main target in the network (vis-à-vis the IP ordering).</p>

<p>That said, I think you should go question-by-question, and only branch out once one of the questions references something you must dedicate some time to, such as extensive web-app enumeration. This is because a question can directly hint at the answer (such as a MCQ asking what a user’s password is; simply try all four options).</p>

<p>I initially spent a good amount of time running various Nmap scans to get a good idea of the working environment, and I hopped from machine to machine across the various pen-test phases as I saw fit based on the questions.</p>

<p>Evidently, I was oftentimes hopping between questions and skipping forth to answer what I could confidently answer in the moment whilst delegating what I couldn’t to a later point.</p>

<p>It was immediately apparent how essential the note-taking was, as you had to keep track of your findings, flags, techniques attempted, etc. as you progressed.</p>

<h2 id="how-hard-is-it">How Hard is it?</h2>

<p>Objectively speaking (that is, weighing the exam based on the difficulty of knowing what enumeration to perform and what techniques to utilize, including the occasional inferred answers), I can confidently say the eJPT exam is <strong>not difficult</strong>.</p>

<p>That said, keep in mind that this perspective is objective. Realistically speaking, the difficulty is relative to your preparation and experience. I already had novice experience with HTB labs and similar CTF-style platforms. If someone is starting out from scratch or has little to no relevant pen-testing experience, then the exam is bound to be much harder for them.</p>

<p>Not to mention, if the (fairly generous) time limit gets to you or a question stumping you leads to a halt in progress, the exam might also end up being harder for you. Regardless, I do think this is an exception, and most people usually find the exam relatively easy to pass as long as you prepared decently.</p>

<h2 id="compared-to-ctfs-and-labs">Compared to CTFs and Labs</h2>

<p>If you’re using INE’s material, you’re probably wondering if it’s harder or easier than the included labs and CTFs.</p>

<p>The main difference which I believe makes the exam ever so slightly harder on a net level is that it includes multiple machines. This can quickly get overwhelming, whereas a CTF is only concerned with one machine, and labs are even less stressful as they’re only concerned with a specific task like SMB enumeration.</p>

<p>But on a single-target level, it just comes down to the machine. Some of them would be harder than the CTFs, some easier.</p>

<p>Don’t overthink it. Just practice, take notes, and go pass.</p>

<h1 id="lessons-learned">Lessons Learned</h1>

<p>A few lessons learned (some specific to the exam, some general) include:</p>

<ul>
  <li>Expect that initial enumeration and reconnaissance will take a while; don’t rush it unnecessarily.</li>
  <li>Before you do a version scan, a Windows host might genuinely look indistinguishable from a Linux host; don’t haphazardly assume the OS (and don’t fully trust Nmap’s output either).</li>
  <li>When using Metasploit modules, ensure you customize the variables as needed; changing the <code class="language-plaintext highlighter-rouge">TARGETURI</code>, for instance, is the difference between exploitation netting a shell or silently failing.</li>
  <li>When a username is found, consider a dictionary attack (maybe parallel to other techniques); stick to the wordlist emphasized in the <em>Letter of Engagement</em> (like <code class="language-plaintext highlighter-rouge">rockyou.txt</code>).</li>
  <li>Don’t overthink the questions or attempt fancy techniques; the core toolset given to you in your offline machine is more than enough.</li>
</ul>

<h1 id="final-thoughts">Final Thoughts</h1>

<p>Overall, it was a great learning experience. I definitely recommend this certification to anyone seeking to solidify their amateur pen-testing skills if the premium doesn’t bother you.</p>

<p>That said, adjust your expectations accordingly — this cert is beginner-friendly and primarily <em>meant</em> to act as a stepping-stone, so don’t pat yourself on the back too hard after getting it, haha.</p>]]></content><author><name>Nizar Lahmar</name></author><category term="certs" /><category term="hacking" /><category term="ejpt" /><summary type="html"><![CDATA[In today’s blog post, I will be going over my experience passing INE’s eJPT (Junior Penetration Tester) certification. I’ll briefly document my experience, lessons learned, and overall thoughts.]]></summary></entry></feed>