<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nigel Pepeon on Medium]]></title>
        <description><![CDATA[Stories by Nigel Pepeon on Medium]]></description>
        <link>https://medium.com/@nigel.pepeon?source=rss-8aba52fc69b5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MmHW-HMqsWlUCoPXjt8ooQ.jpeg</url>
            <title>Stories by Nigel Pepeon on Medium</title>
            <link>https://medium.com/@nigel.pepeon?source=rss-8aba52fc69b5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 11:34:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nigel.pepeon/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Information Gathering — Web Edition (HTB)]]></title>
            <link>https://medium.com/@nigel.pepeon/information-gathering-web-edition-htb-18e9bc8a7253?source=rss-8aba52fc69b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/18e9bc8a7253</guid>
            <dc:creator><![CDATA[Nigel Pepeon]]></dc:creator>
            <pubDate>Sun, 09 Feb 2025 18:57:03 GMT</pubDate>
            <atom:updated>2025-02-09T18:57:03.713Z</atom:updated>
            <content:encoded><![CDATA[<h4>Information Gathering — Web Edition (HTB)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AJTjk_Se9gdshkZX" /><figcaption>Photo by <a href="https://unsplash.com/@lemonvlad?utm_source=medium&amp;utm_medium=referral">Vladislav Klapin</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Hey there! This is going to be a quick write up on a HTB module — Information Gathering — Web Edition; that is part of the <a href="https://academy.hackthebox.com/">Bug Bounty path</a> on Hack the box.</p><p>The module in question is “fingerprinting” that has three questions; but our focus today will be on the second one as its a bit more challenging than the other two…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wu5fBrUNO59Sk4MaNkYqcw.png" /></figure><p>The module gives a walk through of the different tools you can use during recon phase of a target, but the second question requires us to dig a bit deeper to get the answer.</p><p>We can use a number of tools to get the answer but for our case, we shall use nikto:</p><h3><strong>Step 1</strong>: add the IP provided plus the domain to our /etc/hosts file to be able to run the scan:</h3><p>To do so we open nano editor and add it like so:</p><pre>sudo nano /etc/hosts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZIRLObeuM7kxz3pfjAOliw.png" /></figure><h3>Step 2 — Once that is done, we run our nikto scan like so:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S02JCIKV3qfRYeFCgGiFGg.png" /></figure><p>Pay attention to the redirect we get (circled in blue). Ideally , as per the question on HTB, we are supposed to get the CMS running on the provided subdomain.</p><p>Our scan does not provide us with that but does give us a possiblle lead; /administrator page. Ideally Hack the Box is designed to make you “think outside the box” and not every questions answer is provided within the room you are working on…</p><p>So with that in mind lets visit the page app.inlanefreight.local/administrator and see what we get:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wrT81umQWcX_-6u-dq_ffA.png" /><figcaption>Bingo 😎!</figcaption></figure><p>The site displays a Joomla! log in page and that provides the answer to our question!</p><p>An interesting way to get you out of the ordinary fingerprinting reliance on tools and literally “hack the box!”</p><p>Bye!✌️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18e9bc8a7253" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“CROCODILE” HTB TIER 1]]></title>
            <link>https://medium.com/@nigel.pepeon/crocodile-htb-tier-1-72fac35ddc9a?source=rss-8aba52fc69b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/72fac35ddc9a</guid>
            <dc:creator><![CDATA[Nigel Pepeon]]></dc:creator>
            <pubDate>Tue, 17 Dec 2024 13:44:52 GMT</pubDate>
            <atom:updated>2024-12-17T13:44:52.897Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DwWNhAuuo3rIKnO5" /><figcaption>Photo by <a href="https://unsplash.com/@brucetml?utm_source=medium&amp;utm_medium=referral">Bruce Tang</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Day 4 of the walk through, let’s dive right in! 😤</p><p>For our first task, all we have to do is open up the help page on NMAP and get our answer:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d5B739t6p0oe03l76e1o3g.png" /></figure><h4>Task 2</h4><p>Next, we are required to get what service versions are running on the provided IP. Its important to note the different scripts and their output as shown in the screen shot below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VK8tp2CkXbX1EpSZlvOIlA.png" /></figure><h4>Task 3 &amp; 4</h4><p>From our NMAP scan, we see that we have an FTP port open.</p><p>For this task we need to connect via FTP to get the code provided after a successful log in. We also need to provided a username that does not require authentication to grant access to the ftp server.</p><p>I had to research a bit on the whole FTP protocol and services and found <a href="https://www.howtogeek.com/412626/how-to-use-the-ftp-command-on-linux/">this link</a> that helped me get the flags for these tasks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MQ78owSFmkBp5eIuFRxXUg.png" /></figure><p>Lets break it down:</p><ol><li>Command to log into any FTP service</li><li>Provide username ;for any unknown username provide “anonymous” to bypass log in credentials</li><li>Log in code for task 4</li></ol><h4>Task 5 &amp; 6</h4><p>For these tasks, we need to refer to the basics of FTP protocols.</p><p>To retrieve files from an FTP server we use the “get” command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sAbEVNCQXwpFk17214c7oQ.png" /></figure><p>We get the answers for these tasks using the above commands.</p><p><strong>NOTE! —</strong> after using the “get” command the file requested is downloaded to your local machine. But for my case I was unable to locate it hence usage of the “more “ command to simply list the contents of the file of interest as opposed to downloading it.</p><h4>Task 7 &amp; 8</h4><p>For these tasks, they are pretty straightforward so I won’t break them down 😬</p><h4>Task 9</h4><p>This task was quite fun! We are required to use gobuster, to enumerate and find a .php file that will provide the opportunity to authenticate to the web service.</p><p>Gobuster’s help page provides some insight into directory bruteforcing. That enough doesn’t aid in this task. We need to find an extension to help with FILE enumeration so let’s break down the command used:</p><pre>gobuster dir -u http://target-ip/ -w /usr/share/seclists/Discovery/Web-Content/common.txt -x php -o gobuster_results.txt<br></pre><ul><li>gobuster dir: Mode for directory and file brute-forcing.</li><li>-u http://target-ip/: URL of the target web service.</li><li>-w /path/to/wordlist.txt: Path to your wordlist.</li><li>-x php: Brute-force file extensions (e.g., .php).</li><li>-o gobuster_results.txt: Output results to a file for later analysis</li></ul><p>After the command is done running we can see we have some hits with the .php extension. One key thing to note, The “size” column of the output dictates whether or not the directory has any content</p><p>For example the /config.php directory is of size 0 meaning there is nothing on that page. Next we try the /login.php directory and we do get a log in page !</p><p>That helps us answer task 9’s question; on to the last bit!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K7v70wA23bPl096xNPAsTQ.png" /></figure><h4>Task 10</h4><p>We have now a log in form but unsure of the credentials … if you’ve been following along, the above FTP log in that we performed revealed some user lists:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GAqnq5Vujqx45CbXbP6Wug.png" /></figure><p>Next we try log in using the usernames and passwords in the user lists we found randomly until we find a hit !(it may be a long process in the usernames are longer thus scripting may come in handy in such a case)</p><p>After a number of tries we are able to log in!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uk_txfWGzFsudRv0SJg3lQ.png" /></figure><p>Just like that we have increased our knowledge base 👽</p><h4>CONCLUSION</h4><p>This room provided a great challenge to try figure out a number of things on my end (ftp protocol, gobuster usage) and overall mindset to break through to the flag, hope you enjoyed the walk through, see you next time !😁</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1jkG8CHw10OM2r4WEAJCXg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72fac35ddc9a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“SEQUEL” HTB]]></title>
            <link>https://medium.com/@nigel.pepeon/sequel-htb-11903a5edbbc?source=rss-8aba52fc69b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/11903a5edbbc</guid>
            <dc:creator><![CDATA[Nigel Pepeon]]></dc:creator>
            <pubDate>Mon, 16 Dec 2024 11:53:36 GMT</pubDate>
            <atom:updated>2024-12-16T11:53:36.725Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M0_JhY39YHlOEguu" /><figcaption>Photo by <a href="https://unsplash.com/@markusspiske?utm_source=medium&amp;utm_medium=referral">Markus Spiske</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Another day another box to solve! Let’s dive in 😁</p><p>As always, we start by getting a lay of the “land”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oThlEjRpE-TG890KN7ywYQ.png" /></figure><p>NMAP returns one open port, and that gives us the answer to the first question.</p><h4>Task 2</h4><p>For this task, the commands used in the above screenshot don’t give us optimal results as required, so we modify our command a bit to get different results like so :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-oXltRCkVSTz9orKlbrEuw.png" /></figure><p>Note the difference between the 1st and 2nd commands.</p><h4>Task 4</h4><p>Next, we try get access to the DB without providing a password. Ideally the syntax for accessing any MariaDB is</p><pre>mysql -u &lt;insert username here&gt; -p &lt;password here&gt; </pre><p>But for this instance, we need to also specify the IP like so:</p><pre>mysql -u &lt;insert username here&gt; -h &lt;IP Here&gt; -p &lt;password here&gt;</pre><p>Now, for this particular instance, we need to guess which username will grant us access without having to provide the password for the same account :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Psmhty2vqDK-QeoGrPSGg.png" /></figure><h4>Task 5&amp;6</h4><p>For these tasks, basic understanding of database commands will be of help 😉</p><h4>Task 7</h4><p>Next up, we need to explore the database to answer the question related to this task.</p><p>Simply run the following command to first see all the databases present:</p><pre>SHOW databases; </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kufmp0xwlYlHvb52cNfXXg.png" /></figure><h4>Task 8</h4><p>For the last task, we need to find the root flag.</p><p>This process has a few steps:</p><ol><li>figure out which database to use. From the screen shot above we can see one DB that stands out “htb” so lets use that :</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HLgsbVLVrqi9hhSYJKCRqw.png" /></figure><p>2. Next to see what’s contained inside that particular DB:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*vakvuifH8sqFWyahRHNXjg.png" /></figure><p>3. We now need to figure out where to get the flag, so lets dump the contents of each table using SQL query like so:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_G6dMxaEuyPNtX-EIMlh2Q.png" /></figure><p>Just like that, we have pwned yet another box!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z3oTbuK_t13IZtm7jh3-1Q.png" /></figure><p>In case the queries above seemed confusing try reading the room on HTB “SQL Injection Fundamentals” to help you get started.</p><p>See you next time!😉</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ud3TcLjUcwIyME58" /><figcaption>Photo by <a href="https://unsplash.com/@s_midili?utm_source=medium&amp;utm_medium=referral">serjan midili</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11903a5edbbc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“APPOINTMENT” HTB BOX]]></title>
            <link>https://medium.com/@nigel.pepeon/appointment-htb-box-b92e7a1de2f0?source=rss-8aba52fc69b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/b92e7a1de2f0</guid>
            <dc:creator><![CDATA[Nigel Pepeon]]></dc:creator>
            <pubDate>Sun, 15 Dec 2024 14:56:25 GMT</pubDate>
            <atom:updated>2024-12-15T14:56:25.790Z</atom:updated>
            <content:encoded><![CDATA[<p>Another day, another box to pwn, so let’s get to it folks! 😁</p><p>Today’s box is rated “very easy” and falls under Tier 1 machines under “Starting Point” series on <a href="https://app.hackthebox.com/starting-point">Hack The Box</a>. As always to connect to the machines, ensure you have a vpn connection as provided by HTB (you can read more about it on their page).</p><h4>Task 1</h4><p>Being an easy machine the questions are not as tough especially for beginners like you and me :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DjL3yIpnsXM0GenXh2kZvw.png" /><figcaption>“Light weight babyyyy” 💪</figcaption></figure><h4>Task 2 &amp; 3</h4><p>Another set of easy questions to help us ease into the practical bit:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BjjTNFp34Lp6uqF1ICTCZg.png" /><figcaption>A quick Google search should do the trick!👍</figcaption></figure><h4>Task 4</h4><p>For this task, start up your terminal and conduct an NMAP scan of the provided IP to get the solution required:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oBvSWb4AY04gGM0dMN_JJQ.png" /></figure><p>Let’s break the above commands down:</p><pre>nmap -sV ; helps enumrate the service version running on the web server<br>--open ; lists only the open ports and reduces scan time </pre><h4>Task 5</h4><p>From the above screen shot, we get the unsecured version of Apache running, now we are required to get the SECURED version of the same (Google to the rescue 😀)</p><p><em>*Tasks 6&amp;7 are simple to Google I will not focus on them.</em></p><h4>Task 8</h4><p>Here we need to visit the manual page for gobuster to get our answer:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lqghmd0hdBMghaqnbrnFvg.png" /></figure><h4>Task 10</h4><p>Now we get our hands dirty !🤤 We are first required to log in using a comment to replicate improper user input handling. So lets visit the web page (remember to specify port 80 as discovered in our earlier nmap scan) :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4bMhWr6etpxDMiDh-I1CSQ.png" /></figure><p>Next, let’s try logging in. We are instructed to log in as admin without knowing the password:</p><p>To do so, we need to add a comment to the username (read on SQL basics to get the concept) to aid in bypassing the password parameter required to log in:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yx-s0cwPIFry5notWT9wzw.png" /><figcaption>For the password I provided the hash (#) mark since an empty field is not accepted</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*khoMJlw1lKQQwSN8bGKHxg.png" /></figure><h4>CONCLUSION</h4><p>Just like we add another box to our pwned list! 🥳️</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ati2mK4ZNgFMSNlwwyPI1w.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b92e7a1de2f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“DANCING” — HACK THE BOX (HTB)]]></title>
            <link>https://medium.com/@nigel.pepeon/dancing-hack-the-box-htb-7f84f45d363c?source=rss-8aba52fc69b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f84f45d363c</guid>
            <dc:creator><![CDATA[Nigel Pepeon]]></dc:creator>
            <pubDate>Sat, 14 Dec 2024 11:18:10 GMT</pubDate>
            <atom:updated>2024-12-14T11:18:10.155Z</atom:updated>
            <content:encoded><![CDATA[<h3>“DANCING” — HACK THE BOX (HTB)</h3><p>In preparation for my upcoming Cyber Shujaa final exam, I decided to tackle a windows machine to help my skills in the same domain, and what better platform than HTB 😌. For those who may not be familiar, Cyber Shujaa is a Kenyan company looking aid individuals with the necessary practical skills to get into the world of cyber security. Read more about them on their <a href="https://cybershujaa.co.ke/">website</a>.</p><p>For those looking to sharpen your skills, <a href="https://app.hackthebox.com/starting-point">this is the best place to start</a>… Enough chatter, lets get into it!😤</p><h4><strong>ACCESSING THE MACHINES</strong></h4><p>As with any machine on the Hack the Box platform, you first have to connect via VPN to their network : to do so, simply download the VPN file and connect to the network as shown in the screen shot below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*5wlmsqAptheuAbug7YpuUg.png" /><figcaption>sudo openvpn &lt;file_name_here&gt; to connect</figcaption></figure><p>Next spawn up the machine (typically takes about a minute depending on your network connectivity)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*djUoCIfXl2Eudtw67yb2qQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qFiZA8sEPr2YHanZjOaaUA.png" /></figure><p>Now that we have access let’s begin!</p><h4><strong>THE FUN PART!</strong></h4><p>There is a total of 8 tasks for this particular machine, and it is advisable to handle them systematically as most rely on the flag gotten from the previous question</p><h4>Task 1</h4><p>This was a pretty simple one, I will blur out the answers to the questions as its against HTB policies, but will share the methodology to get to the end goal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CHq8btZ32y4paJqKR-8Yvw.png" /></figure><p>Task 2 <br>Again for this one a quick Google search will help, but if you want to test your skills truly, how about a quick port scan 😉</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GjT6pfNXkEK0eixQtC56UA.png" /></figure><p>Lets break down the commands:</p><pre>nmap -sV --open &lt;IP address here&gt;<br>-sv; is used for service version enumeration<br>--open; eases the scan time and only lists open ports (comes in handy when short on time)<br></pre><h4>Task 3</h4><p>Here we refer back to our scan results (screen shot above) ; since our nmap command included the service version enumeration command</p><h4>Task 4</h4><p>This is where it gets tricky … we need to know commands used when listing available shares on available clients. Thankfully Linux tools come with a “man” page (short for manual) to help us.</p><p>To access it simply type : man &lt;tool name here&gt;</p><pre>for our case the command would be :<br>man smbclient </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5tD4lIo4xudLgiU2WZaTag.png" /><figcaption>Manual page for smb client</figcaption></figure><h4>Task 5</h4><p>Now that we know how to list them, lets get how many shares are on our client:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l1ZwmdW7ILTTYhc2R3P5Cw.png" /></figure><h4>Task 6</h4><p>Again for this task, familiarity with Windows goes a long way. We are required to find the share among the listed ones (refer to the screen shot above) that has a blank password.</p><p>Typically, shares with a “dollar sign” ($) at the end have password authentication, so our option is the last share among the listed ones!</p><h4>Task 7</h4><p>This task requires us to go back to the SMB basics, to get our answer so run ‘man smbclient’ to get the flag</p><h4>Task 8</h4><p>We are down to our last challenge.</p><p>This one requires to achieve the following :</p><ol><li>Access the SMB client</li><li>Locate the root flag</li><li>Read the contents of the flag</li></ol><p>To access the client:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XgKXp9WNXfVGM8XQm8CBxQ.png" /><figcaption>We use -N at the end to skip password authentication</figcaption></figure><p>Locating the root flag: I had a challenge with this as smb commands are different but the process is still the same. First list the contents available :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SITnuli0TY1oirQjR_9yUg.png" /></figure><p>Ideally we now move into one of the directories above and try find the flag.txt file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NJ6vyO2hPcd1MAg-QELh1g.png" /></figure><p>Finally to read the contents of the file you can use the “get” command which downloads the file into our current directory (didn’t get this part either 🤔) OR the easier way is using the “more”command like so</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gKg4qxKGESRngBqV5Pn9mA.png" /></figure><p>The above command reveals the content of our flag as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V6Ohs96mgh2aWV-zc5qEvQ.png" /></figure><p>And Just like that, we have pwned our machine! 😎</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tPt1udJwEOGHyI-jCaz3Ow.png" /></figure><p>See you on the next flag hunt!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gVfQJgM9noo-ecHK" /><figcaption>Photo by <a href="https://unsplash.com/@bearsnap?utm_source=medium&amp;utm_medium=referral">Junseong Lee</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f84f45d363c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB BOX “FAWN”]]></title>
            <link>https://medium.com/@nigel.pepeon/htb-box-fawn-94486e74fbdb?source=rss-8aba52fc69b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/94486e74fbdb</guid>
            <dc:creator><![CDATA[Nigel Pepeon]]></dc:creator>
            <pubDate>Thu, 27 Jun 2024 16:54:28 GMT</pubDate>
            <atom:updated>2024-06-27T16:54:28.940Z</atom:updated>
            <content:encoded><![CDATA[<p>Another day, another box; this one tested my learning and research skills so lets get into it!</p><p>The second box under the “Starting point” series on HTB is a Linux machine, that looks to test: among other things; ftp user knowledge.</p><p>As usual, we first have to connect to the openvpn provided by HTB, like shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DM_bbSP_jHoYPgChvykU4w.png" /></figure><p>To establish the connection was successful you should see similar to the image below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/1*ryzPAuoKAfaSb6PXBckIHA.png" /><figcaption>The connection is a success once you see the padlock icon followed by an IP address</figcaption></figure><p>After the connection is complete, we can then proceed to try and find our way inside the box and to our flag. Remember, the main challenge here is our FTP skills, so that can be a guiding step as to where to start our Recon. A basic NMAP scan will reveal that port 21 is open while other ports are unresponsive.</p><p>To start us off, we can try to log into the server as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*9z1lSwb-EbJMDg8tFiF7Sg.png" /></figure><p>The basic syntax to log in is:</p><pre>ftp [ip address]</pre><p>Once input, you shall be prompted to input your username and password. Normally, the log in username is what is listed as shown above, (circled in red): i.e the name at the end of the IP address which normally is the name of the account you are trying to log in as. If the account name is the same, just hit enter after which you shall be prompted for a password.</p><p>In our case, we do not have the username, thus we have to log in using “anonymous’ log in which is available on ftp.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*35_X5yD8H_d5Nq4zeMlYGA.png" /></figure><p>After typing in the username, hit enter and you shall be prompted for the password; input “anonymous” (without the quotation marks) and hit enter.</p><p>We shall then have logged in successfully and now we can try get our flag. A simple “ls” command should do the trick!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*Sf0VXfnHPDlKDSkXEJKaOQ.png" /></figure><p>From the image above we can see that we have a “flag.txt” file! Now to try and see the contents… Normally the “cat” command would do the trick but in this case it doesn’t work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/241/1*APSxQmc5T6udAcZKYH3z5g.png" /></figure><p>This is because, we logged in as an anonymous user and thus, we do not have all functionalities available to us i.e read, write and execute.</p><p>So a work around would be to use the “get” command. This gives us two options: have a local file (on our local machine) and a remote one (on the server).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/284/1*cY7P2g28BGWN285K2IENTA.png" /></figure><p>To get the flag just go to your folders, search for “flag.txt” and you shall be presented with a text file. Select a method with which to read or open the text file with (VS Code in my case) and you shall get the flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*XoEL5bF3r4lbQB0pRbbd4Q.png" /></figure><p>Just like that another machine has been Pwned!! Next up, “Redeemer”!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QgfvMTbMg_dqdh1E" /><figcaption>Photo by <a href="https://unsplash.com/@s1n?utm_source=medium&amp;utm_medium=referral">Xin</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94486e74fbdb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB BOX “MEOW”]]></title>
            <link>https://medium.com/@nigel.pepeon/htb-box-meow-fea6b67b81ea?source=rss-8aba52fc69b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/fea6b67b81ea</guid>
            <dc:creator><![CDATA[Nigel Pepeon]]></dc:creator>
            <pubDate>Sun, 23 Jun 2024 10:15:45 GMT</pubDate>
            <atom:updated>2024-06-23T10:15:45.415Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QsmpF3NUR9JfjhOv" /><figcaption>Photo by <a href="https://unsplash.com/@dj_johns1?utm_source=medium&amp;utm_medium=referral">DJ Johnson</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I know its been a minute since the last post, I was busy being a freedom fighter 😂 for my country 🇰🇪. On today’s blog, I will be tackling the very first machine on <a href="https://app.hackthebox.com/starting-point">Hack The box</a>. The machine is called “meow” and is a Linux Machine listed as “very easy”</p><p>Let’s get started ! 😁</p><p>To access the machine go this <a href="https://app.hackthebox.com/starting-point">link </a>and choose the very first machine “Meow”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rxSUfnXISG0h3kGu1JrQ7Q.png" /><figcaption>Landing page for HTB’s Machines</figcaption></figure><p>There is a series of questions to be answered before you can get to the machine itself, but the questions are pretty easy. Once you answer all of them correctly, you can now spawn the machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LhcZCnpVTXfFp4vuVuJoCw.png" /></figure><p>To be able to connect to a machine (any machine on HTB) you have the option of doing so using openVPN option; which is a bit easier in my view. Read more about it <a href="https://help.hackthebox.com/en/articles/5185687-introduction-to-lab-access">here.</a></p><p>Once we are connected, our job is to find the root flag. Keep in mind, we have no clue what is running on the server instance provided once we spawn the target machine; so we first have to get a lay out of the land using nmap.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*lZIq5f967eyS6QgA9mnfvA.png" /></figure><p>From the probe, we can see that we have 23 open which gives us a starting point of what to attack (in this case telnet) in order to get our flag. You can run the following command to get more info on telnet</p><pre>telnet --help</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*VwatjvzSubDvQsg5b10YHw.png" /></figure><p>After running the telnet service (cmd to use is — telnet [ip address] minus the square brackets) ; we are greeted with the above. Next is try and figure out the log in credentials to access the server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*zlSIUZgUwmwBP3xmEyWY9A.png" /></figure><p>The box is listed as “easy” so the login in name was not hard to get. After inputting “root” we now have access to the server and its contents. Next we run a simple “ls” scan to see what’s inside.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*CYunjuqa1SBP2Ju1k5rYhw.png" /></figure><p>From the image above, the “ls” command gives us the contents that include a .txt file. Using “cat” command, we get the flag ! 😀</p><p>A very easy box and great starting point to work on our pen test skills. Up next on my to-do list : “Fawn” the second box of the starting point series boxes by HTB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*E8joM6DwcTnj1z5a" /><figcaption>Photo by <a href="https://unsplash.com/@craft_ear?utm_source=medium&amp;utm_medium=referral">Jan Tinneberg</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fea6b67b81ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PICOCTF SERIES “PW Crack 1”]]></title>
            <link>https://medium.com/@nigel.pepeon/picoctf-series-pw-crack-1-21b3ba7a88e5?source=rss-8aba52fc69b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/21b3ba7a88e5</guid>
            <dc:creator><![CDATA[Nigel Pepeon]]></dc:creator>
            <pubDate>Tue, 16 Apr 2024 12:40:00 GMT</pubDate>
            <atom:updated>2024-04-16T12:40:00.464Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nDc4WxoSLdA7LCKf" /><figcaption>Photo by <a href="https://unsplash.com/@_twistedplot?utm_source=medium&amp;utm_medium=referral">Magda Vrabetz</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Hello, welcome back to my blog page, today the journey to sharpening my skills takes us to some python code analysis; so let’s get into it! 😋</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dj3iTkxq4lQWu6sMyIEoTA.png" /><figcaption>Password cracker challenge on PicoCTF</figcaption></figure><p>What is required of us today is to try and crack the password (spoiler alert, its easier than you think 😐). The instructions are to have both the password checker and the encrypted flag in the same directory.</p><p>Reason for this is to enable the code run smoothly without any errors, as the password checker needs to reference to the “encrypted flag file” in order to run and give the correct flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M_vYM4hP5dAQSPNoMZST8Q.png" /></figure><p>After opening the code ( I am using VS Code to do my code compilation); we have some code (from line 2 to line 9) that may throw you off the course if you’re not careful.</p><p>Our area of interest lies below that code. Lets break it down :</p><pre>flag_enc = open(&#39;level1.flag.txt.enc&#39;, &#39;rb&#39;).read()</pre><p>Line 13 defines a variable “flag_enc” and its function is simply to open the encoded flag.txt file (hence why the two files should be in the same directory 🤷‍♂️)</p><pre>def level_1_pw_check():<br>    user_pw = input(&quot;Please enter correct password for flag: &quot;)<br>    if( user_pw == &quot;1e1a&quot;):<br>        print(&quot;Welcome back... your flag, user:&quot;)<br>        decryption = str_xor(flag_enc.decode(), user_pw)<br>        print(decryption)<br>        return<br>    print(&quot;That password is incorrect&quot;)</pre><p>From line 17: a function is defined (denoted as def) and user input is required to be able to check and ascertain its the correct one before printing the flag.</p><p>To help check if the user input matches the required input; the “if” loop comes into play (use this <a href="https://www.w3schools.com/python/python_intro.asp">link</a> to familiarize yourself with python if you’re new to it). When you run the code, you shall be prompted to input the password (courtesy of line 18).</p><p>Line 19 gives the hint to the password:</p><pre>if( user_pw == &quot;1e1a&quot;):<br>        print(&quot;Welcome back... your flag, user:&quot;)</pre><p>This line tells the compiler that is the user inputs “1e1a” as the password then the password is correct and the compiler should print a “welcome back…” message plus the flag as seen below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y4LBZYySErYJ1wcjTjSPDQ.png" /><figcaption>Flag reveal for PW Crack1 on PicoCTF</figcaption></figure><p>THE END!!! 🤣</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21b3ba7a88e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PICOCTF SERIES “HashingJobApp”]]></title>
            <link>https://medium.com/@nigel.pepeon/picoctf-series-hashingjobapp-59f614f6c3f9?source=rss-8aba52fc69b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/59f614f6c3f9</guid>
            <dc:creator><![CDATA[Nigel Pepeon]]></dc:creator>
            <pubDate>Mon, 15 Apr 2024 09:42:28 GMT</pubDate>
            <atom:updated>2024-04-15T09:42:28.947Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ILPLNAHPLsbAwRQQNVlwIg.png" /></figure><p>This challenge ALMOST made me close my laptop for the week (I am writing this on a Monday 😒); let’s get into it!</p><p>Once you click on “ launch instance” you are provided with a site and destination port to connect to in my case it was :</p><pre>nc saturn.picoctf.net 55088<br>#the challenge under &quot;what&#39;s a netcat&quot; will help understand the above commands</pre><p>On accessing the challenge, you are required to hash a couple of texts into an md5 hash in order to access the flag. Speed is of importance as the connection times out after a few seconds of inactivity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*h1iBXCyNyXT3_WgiuwZTDA.png" /><figcaption>The texts in quotation marks are to be hashed to reveal the flag.</figcaption></figure><p>To help with hashing, I used this <a href="https://www.md5hashgenerator.com/">site </a>. If speed isn’t your thing you can come up with a python script to help with automation of the same like this <a href="https://mregraoncyber.com/picoctf-writeup-hashingjobapp/">guy</a> ( mind blown 😱)!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iAsTkY_zVuBUaGYW" /><figcaption>Photo by <a href="https://unsplash.com/@nathanfertig?utm_source=medium&amp;utm_medium=referral">Nathan Fertig</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>See you on the next blog post!😉</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=59f614f6c3f9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PICO CTF SERIES “what’s a netcat”]]></title>
            <link>https://medium.com/@nigel.pepeon/pico-ctf-series-whats-a-netcat-0b7146abd47a?source=rss-8aba52fc69b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/0b7146abd47a</guid>
            <dc:creator><![CDATA[Nigel Pepeon]]></dc:creator>
            <pubDate>Mon, 15 Apr 2024 09:07:17 GMT</pubDate>
            <atom:updated>2024-04-15T09:07:17.016Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sFjVmAc7GeXWB5FOWe8sFQ.png" /><figcaption>PicoCtf General skills challenge</figcaption></figure><p>Another easy challenge for us to tackle, lets get into it 😉</p><p>From the screen shot above all we have to do is use <a href="https://linux.die.net/man/1/nc">netcat </a>to get the flag. Key areas to not is how to specify a port when using nc to avoid getting “no port specified” error (see screen shot below for wrong ways to connect to nc)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z6L5feyoTpFFqOVzz9sCIw.png" /><figcaption>trial and error before getting the flag.</figcaption></figure><pre>nc jupiter.challenges.picoctf.org 25103<br>#25103 --&gt; specifies the port to be used for connection<br>#jupiter.challenges.picoctf.org --&gt; the server/site we are trying to connect to</pre><p>Another 100 points added to our gym score just like that 😉</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0b7146abd47a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>