{"id":1884,"date":"2025-06-10T13:40:08","date_gmt":"2025-06-10T17:40:08","guid":{"rendered":"https:\/\/www.peteonsoftware.com\/?p=1884"},"modified":"2025-06-10T13:40:08","modified_gmt":"2025-06-10T17:40:08","slug":"hack-the-box-walkthrough-origins","status":"publish","type":"post","link":"https:\/\/www.peteonsoftware.com\/index.php\/2025\/06\/10\/hack-the-box-walkthrough-origins\/","title":{"rendered":"Hack the Box Walkthrough: Origins"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/peteonsoftware.com\/images\/2025\/origins.png\" style=\"float:left;margin:.5rem;\" alt=\"HTB Origins Logo\" title=\"HTB Origins Logo\">We&#8217;re going to keep the pattern going and attack another free Sherlock from HackTheBox called <a href=\"https:\/\/app.hackthebox.com\/sherlocks\/Origins\">Origins<\/a>.  This is rated &#8220;Very Easy&#8221; and just consists of a .zip file download containing a .pcap file.  As is customary, the password to extract the files is <em>hacktheblue<\/em>.<\/p>\n<p>Here&#8217;s our scenario for this adventure:<br \/>\n<em>A major incident has recently occurred at Forela. Approximately 20 GB of data were stolen from internal s3 buckets and the attackers are now extorting Forela. During the root cause analysis, an FTP server was suspected to be the source of the attack. It was found that this server was also compromised and some data was stolen, leading to further compromises throughout the environment. You are provided with a minimal PCAP file. Your goal is to find evidence of brute force and data exfiltration.<\/em><\/p>\n<p>Since our only evidence is in a .pcap file, we&#8217;ll have to fire up <a href=\"https:\/\/www.wireshark.org\/\">Wireshark<\/a> (or your network traffic analyzer of choice).<\/p>\n<p><strong>Task 1: What is the attacker&#8217;s IP address?<\/strong><\/p>\n<p>Looking in the ftp.pcap file, we have multiple protocols represented.  Since we know that the ultimate compromise came from FTP, let&#8217;s start by filtering traffic that is using the FTP protocol.  Adding this as a filter will do the trick: <em>_ws.col.protocol == &#8220;FTP&#8221;<\/em>.  That gets us down to 163 packets out of the 547 in the file.  We can see over and over again that the main source making the requests is 15.206.185.207.  If you look, the first few entries have a source of 172.31.45.144, but that is responding.  The one making the request for the admin user is 15.206.185.207.  Then 172.31.45.144 asks for the password.  This makes it definitive which side is which.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/peteonsoftware.com\/images\/2025\/origins_task1.jpg\" alt=\"Relevant section of the .pcap file showing the answer to task 1\" title=\"Relevant section of the .pcap file showing the answer to task 1\"><\/p>\n<p><strong><em>Task 1 Answer: 15.206.185.207<\/em><\/strong><\/p>\n<p><strong>Task 2: It&#8217;s critical to get more knowledge about the attackers, even if it&#8217;s low fidelity. Using the geolocation data of the IP address used by the attackers, what city do they belong to?<\/strong><\/p>\n<p>You can go to many different places for this.  I&#8217;m getting this lookup from <a href=\"https:\/\/www.iplocation.net\/\">this site<\/a>.  Just search the IP and get the city.<\/p>\n<p><strong><em>Task 2 Answer: Mumbai<\/em><\/strong><\/p>\n<p><strong>Task 3: Which FTP application was used by the backup server? Enter the full name and version. (Format: Name Version)<\/strong><\/p>\n<p>Take a look back at the filtered capture from Task 1.  You can see what the server (172.31.45.144) is responding.<\/p>\n<p><strong><em>Task 3 Answer: vsFTPd 3.0.5<\/em><\/strong><\/p>\n<p><strong>Task 4: The attacker has started a brute force attack on the server. When did this attack start?<\/strong><\/p>\n<p>Let&#8217;s do an additional filter for only traffic with this IP as the source within the FTP traffic.  We can definitely see a brute force attempt happening.  If we click the first one (packet 100), it will show details in the bottom left pane.  If we expand the Frame 100 section, we can see Arrival Time, UTC Arrival Time, and Epoch Arrival time.  The format for the HTB answer wanted one of the two &#8220;normal&#8221; dates (and not the epoch time).  I guessed they wanted UTC as my first shot as that is pretty standard, and that was it.  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/peteonsoftware.com\/images\/2025\/origins_task4.jpg\" alt=\"Relevant section of the .pcap file showing the answer to task 4\" title=\"Relevant section of the .pcap file showing the answer to task 4\"><\/p>\n<p><strong><em>Task 4 Answer: 2024-05-03 04:12:54<\/em><\/strong><\/p>\n<p><strong>Task 5: What are the correct credentials that gave the attacker access? (Format username:password)<\/strong><\/p>\n<p>For this one, I just scrolled down to the end of the attack.  I figured the attack would stop when he was successful.  When I got to the last row that had PASS in it (number 407).  I then right clicked on it and chose <em>Follow -> TCP Stream Ctrl+Alt+Shift+T<\/em>.  That brings up the entire &#8220;conversation&#8221; in a window and also adds a filter <em>tcp.stream eq 33<\/em> so that you now can see all of the individual pieces that make up what has been assembled for us.  But from here, we can see what worked.<\/p>\n<pre>\r\n220 (vsFTPd 3.0.5)\r\n\r\nUSER forela-ftp\r\n\r\n331 Please specify the password.\r\n\r\nPASS ftprocks69$\r\n\r\n230 Login successful.\r\n\r\nSYST\r\n\r\n215 UNIX Type: L8\r\n\r\nFEAT\r\n\r\n211-Features:\r\n EPRT\r\n EPSV\r\n MDTM\r\n PASV\r\n REST STREAM\r\n SIZE\r\n TVFS\r\n211 End\r\n\r\nEPSV\r\n\r\n229 Entering Extended Passive Mode (|||63192|)\r\n\r\nLIST\r\n\r\n150 Here comes the directory listing.\r\n226 Directory send OK.\r\n\r\nEPSV\r\n\r\n229 Entering Extended Passive Mode (|||40790|)\r\n\r\nNLST\r\n\r\n150 Here comes the directory listing.\r\n226 Directory send OK.\r\n\r\nTYPE I\r\n\r\n200 Switching to Binary mode.\r\n\r\nSIZE Maintenance-Notice.pdf\r\n\r\n213 27855\r\n\r\nEPSV\r\n\r\n229 Entering Extended Passive Mode (|||9759|)\r\n\r\nRETR Maintenance-Notice.pdf\r\n\r\n150 Opening BINARY mode data connection for Maintenance-Notice.pdf (27855 bytes).\r\n226 Transfer complete.\r\n\r\nMDTM Maintenance-Notice.pdf\r\n\r\n213 20240503034329\r\n\r\nSIZE s3_buckets.txt\r\n\r\n213 268\r\n\r\nEPSV\r\n\r\n229 Entering Extended Passive Mode (|||23530|)\r\n\r\nRETR s3_buckets.txt\r\n\r\n150 Opening BINARY mode data connection for s3_buckets.txt (268 bytes).\r\n226 Transfer complete.\r\n\r\nMDTM s3_buckets.txt\r\n\r\n213 20240503034852\r\n\r\nEPSV\r\n\r\n229 Entering Extended Passive Mode (|||15028|)\r\n\r\nSTOR \/home\/cyberjunkieX0X\/HACKED.txt\r\n\r\n550 Permission denied.\r\n\r\nQUIT\r\n\r\n221 Goodbye.\r\n<\/pre>\n<p><strong><em>Task 5 Answer: forela-ftp:ftprocks69$<\/em><\/strong><\/p>\n<p><strong>Task 6: The attacker has exfiltrated files from the server. What is the FTP command used to download the remote files?<\/strong><\/p>\n<p>Look at the command listing from Task 5.  You can see it there.<\/p>\n<p><strong><em>Task 6 Answer: RETR<\/em><\/strong><\/p>\n<p><strong>Task 7: Attackers were able to compromise the credentials of a backup SSH server. What is the password for this SSH server?<\/strong><\/p>\n<p>Looking at the conversation in Task 5, I don&#8217;t see any passwords directly compromised during that interaction.  My guess is that they were in some of the files.  Let&#8217;s take a look at the files that were downloaded.  We can see that it looks like the attacker got a file called <em>Maintenance-Notice.pdf<\/em> and one called <em>s3_buckets.txt<\/em>.  Let&#8217;s just go up to the <em>File<\/em> Menu and select <em>Export Objects -> FTP-DATA<\/em>.  We can then choose <em>Save All<\/em> and put those files in the directory of our choosing.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/peteonsoftware.com\/images\/2025\/origins_task7_1.jpg\" alt=\"The Wireshark Menu options to export the files\" title=\"The Wireshark Menu options to export the files\"><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/peteonsoftware.com\/images\/2025\/origins_task7_2.jpg\" alt=\"The dialog box to save the files\" title=\"The dialog box to save the files\"><\/p>\n<p>s3_buckets.txt just contains this<\/p>\n<pre>\r\nhttps:\/\/2023-coldstorage.s3.amazonaws.com # bulk data from 2023, if required anything from here contact simon or alonzo. Retention period is 4 years\r\nhttps:\/\/2022-warmstor.s3.amazonaws.com # pending audit, email alonzo at archivebackups@forela.co.uk for any clearance\r\n<\/pre>\n<p>Maintenance-Notice.pdf has a lot of information, but contains this juicy paragraph:<\/p>\n<pre>\r\nFor team members requiring urgent access to the backup SSH servers during the maintenance\r\nperiod, you can use the temporary password \"**B@ckup2024!**\" - kindly ensure this information is\r\nhandled securely and do not share it outside of our team.\r\n<\/pre>\n<p><strong><em>Task 7 Answer: **B@ckup2024!**<\/em><\/strong><\/p>\n<p><strong>Task 8: What is the s3 bucket URL for the data archive from 2023?<\/strong><\/p>\n<p>Just check up in the contents of s3_buckets.txt.<\/p>\n<p><strong><em>Task 8 Answer: https:\/\/2023-coldstorage.s3.amazonaws.com<\/em><\/strong><\/p>\n<p><strong>Task 9: The scope of the incident is huge as Forela&#8217;s s3 buckets were also compromised and several GB of data were stolen and leaked. It was also discovered that the attackers used social engineering to gain access to sensitive data and extort it. What is the internal email address used by the attacker in the phishing email to gain access to sensitive data stored on s3 buckets?<\/strong><\/p>\n<p>This is also in the s3_buckets.txt file.<\/p>\n<p><strong><em>Task 9 Answer: archivebackups@forela.co.uk<\/em><\/strong><\/p>\n<p>And there we go.  That was a fun little exploration of some of the things that Wireshark can do for us.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;re going to keep the pattern going and attack another free Sherlock from HackTheBox called Origins. This is rated &#8220;Very Easy&#8221; and just consists of a .zip file download containing a .pcap file. As is &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[153],"tags":[141,142],"class_list":["post-1884","post","type-post","status-publish","format-standard","hentry","category-capture-the-flag","tag-information-security","tag-infosec"],"_links":{"self":[{"href":"https:\/\/www.peteonsoftware.com\/index.php\/wp-json\/wp\/v2\/posts\/1884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.peteonsoftware.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.peteonsoftware.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.peteonsoftware.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.peteonsoftware.com\/index.php\/wp-json\/wp\/v2\/comments?post=1884"}],"version-history":[{"count":0,"href":"https:\/\/www.peteonsoftware.com\/index.php\/wp-json\/wp\/v2\/posts\/1884\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.peteonsoftware.com\/index.php\/wp-json\/wp\/v2\/media?parent=1884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.peteonsoftware.com\/index.php\/wp-json\/wp\/v2\/categories?post=1884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.peteonsoftware.com\/index.php\/wp-json\/wp\/v2\/tags?post=1884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}