{"id":483,"date":"2025-12-24T04:02:00","date_gmt":"2025-12-24T04:02:00","guid":{"rendered":"https:\/\/hackingwithj.com\/?p=483"},"modified":"2025-12-18T16:11:48","modified_gmt":"2025-12-18T16:11:48","slug":"thm-aster","status":"publish","type":"post","link":"https:\/\/hackingwithj.com\/?p=483","title":{"rendered":"THM: Aster"},"content":{"rendered":"\n<p>This machine was a nice change of pace. Instead of the usual web-heavy approach, it introduced <strong>VoIP services<\/strong>, credential reuse, and a small reverse-engineering exercise at the end. A good reminder that not every box starts (or ends) with HTTP.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">NMAP<\/h2>\n\n\n\n<pre class=\"wp-block-code has-vivid-purple-color has-text-color has-link-color wp-elements-50c0ada8d4e5c9f1000b11194c199a44\"><code>PORT     STATE SERVICE     VERSION\n22\/tcp   open  ssh         OpenSSH 7.2p2 Ubuntu 4ubuntu2.10 (Ubuntu Linux; protocol 2.0)\n| ssh-hostkey: \n|   2048 fe:e3:52:06:50:93:2e:3f:7a:aa:fc:69:dd:cd:14:a2 (RSA)\n|   256 9c:4d:fd:a4:4e:18:ca:e2:c0:01:84:8c:d2:7a:51:f2 (ECDSA)\n|_  256 c5:93:a6:0c:01:8a:68:63:d7:84:16:dc:2c:0a:96:1d (ED25519)\n80\/tcp   open  http        Apache httpd 2.4.18 ((Ubuntu))\n| http-methods: \n|_  Supported Methods: GET HEAD POST OPTIONS\n|_http-server-header: Apache\/2.4.18 (Ubuntu)\n|_http-title: Aster CTF\n1720\/tcp open  h323q931?\n2000\/tcp open  cisco-sccp?\n5038\/tcp open  asterisk    Asterisk Call Manager 5.0.2\nService Info: OS: Linux; CPE: cpe:\/o:linux:linux_kernel<\/code><\/pre>\n\n\n\n<p>The standout port here was <strong>5038<\/strong> \u2014 Asterisk Call Manager. That immediately suggested VoIP-related attack paths.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">HTTP (80)<\/h2>\n\n\n\n<p>The website on port 80 was very basic.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"453\" src=\"https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170434.289-1024x453.png\" alt=\"\" class=\"wp-image-484\" srcset=\"https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170434.289-1024x453.png 1024w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170434.289-300x133.png 300w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170434.289-768x340.png 768w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170434.289-1536x679.png 1536w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170434.289.png 1895w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Default checks<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Gobuster \u2192 nothing useful<\/li>\n\n\n\n<li>FFUF \u2192 nothing useful<\/li>\n\n\n\n<li>Source code review \u2192 nothing useful<\/li>\n<\/ul>\n\n\n\n<p>Clicking the <strong>Download<\/strong> button returned a compiled Python file. Decompiling it using <code>uncompyle6<\/code> revealed the following encoded content:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"347\" src=\"https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170451.150-1024x347.png\" alt=\"\" class=\"wp-image-485\" srcset=\"https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170451.150-1024x347.png 1024w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170451.150-300x102.png 300w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170451.150-768x260.png 768w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170451.150-1536x521.png 1536w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170451.150.png 1552w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Running the extracted data through <strong>CyberChef<\/strong> produced:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Good job, user &#8220;admin&#8221; the open source framework for building communications, installed in the server.Good job reverser, python is very cool!Good job reverser, python is very cool!Good job reverser, python is very cool!<\/p>\n<\/blockquote>\n\n\n\n<p>The interesting part here was the username <strong><code>admin<\/code><\/strong> \u2014 potentially useful elsewhere. The web path ended here, so I shifted focus to the remaining open ports.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">VoIP (5038)<\/h2>\n\n\n\n<p>Port 5038 was running <strong>Asterisk Call Manager 5.0.2<\/strong>. After some research, I found that it\u2019s often misconfigured and sometimes vulnerable to credential brute forcing. Metasploit includes a module specifically for this. After some trial and error (and one VM crash), I configured it and ran the attack.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"260\" src=\"https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170637.020-1024x260.png\" alt=\"\" class=\"wp-image-486\" srcset=\"https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170637.020-1024x260.png 1024w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170637.020-300x76.png 300w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170637.020-768x195.png 768w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170637.020-1536x390.png 1536w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170637.020.png 1584w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Eventually, I recovered valid credentials.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"789\" height=\"20\" src=\"https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170654.164.png\" alt=\"\" class=\"wp-image-487\" srcset=\"https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170654.164.png 789w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170654.164-300x8.png 300w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170654.164-768x19.png 768w\" sizes=\"auto, (max-width: 789px) 100vw, 789px\" \/><\/figure>\n\n\n\n<p>Logging in was successful \u2014 important detail: you need to press <em>Enter twice<\/em> for commands to execute properly.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"313\" height=\"306\" src=\"https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170715.260.png\" alt=\"\" class=\"wp-image-488\" srcset=\"https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170715.260.png 313w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170715.260-300x293.png 300w\" sizes=\"auto, (max-width: 313px) 100vw, 313px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">SIP Enumeration &amp; Credential Reuse<\/h3>\n\n\n\n<p>Enumerating SIP users revealed multiple accounts, including <strong>harry<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"829\" height=\"162\" src=\"https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170710.006.png\" alt=\"\" class=\"wp-image-489\" srcset=\"https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170710.006.png 829w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170710.006-300x59.png 300w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170710.006-768x150.png 768w\" sizes=\"auto, (max-width: 829px) 100vw, 829px\" \/><\/figure>\n\n\n\n<p>On a hunch, I tried reusing the recovered password for SSH access as <code>harry<\/code>. And it worked.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"651\" height=\"277\" src=\"https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170801.636.png\" alt=\"\" class=\"wp-image-490\" srcset=\"https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170801.636.png 651w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170801.636-300x128.png 300w\" sizes=\"auto, (max-width: 651px) 100vw, 651px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Privilege Escalation<\/h2>\n\n\n\n<p>With SSH access as <code>harry<\/code>, I started looking around the home directory. One file immediately stood out: <code>Example_root.jar<\/code> I downloaded the file and decompiled it using <strong>JD-GUI<\/strong>. The decompiled source showed the following logic:<\/p>\n\n\n\n<pre class=\"wp-block-code has-vivid-purple-color has-text-color has-link-color wp-elements-4d42a677eb4d7433a3ad1b3bafb766e0\"><code>import java.io.File;\nimport java.io.FileWriter;\nimport java.io.IOException;\n\npublic class Example_Root {\n  public static boolean isFileExists(File paramFile) {\n    return paramFile.isFile();\n  }\n  \n  public static void main(String&#91;] paramArrayOfString) {\n    String str = \"\/tmp\/flag.dat\";\n    File file = new File(str);\n    try {\n      if (isFileExists(file)) {\n        FileWriter fileWriter = new FileWriter(\"\/home\/harry\/root.txt\");\n        fileWriter.write(\"my secret &lt;3 baby\");\n        fileWriter.close();\n        System.out.println(\"Successfully wrote to the file.\");\n      } \n    } catch (IOException iOException) {\n      System.out.println(\"An error occurred.\");\n      iOException.printStackTrace();\n    } \n  }\n}<\/code><\/pre>\n\n\n\n<p>The logic was simple:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If <code>\/tmp\/flag.dat<\/code> exists<\/li>\n\n\n\n<li>The program writes to <code>root.txt<\/code> in Harry\u2019s home directory<\/li>\n<\/ul>\n\n\n\n<p>All that was needed was to create the file:<\/p>\n\n\n\n<pre class=\"wp-block-code has-vivid-purple-color has-text-color has-link-color wp-elements-e7189cfee44bfe71a275279c2c4d5404\"><code>touch \/tmp\/flag.dat<\/code><\/pre>\n\n\n\n<p>After a short wait, the file appeared \u2014 and with it, the final flag. (I forgot to take a screenshot of the exact moment, but here\u2019s proof the room was completed.)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"280\" src=\"https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170911.847-1024x280.png\" alt=\"\" class=\"wp-image-491\" srcset=\"https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170911.847-1024x280.png 1024w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170911.847-300x82.png 300w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170911.847-768x210.png 768w, https:\/\/hackingwithj.com\/wp-content\/uploads\/2025\/12\/image-2025-12-18T170911.847.png 1113w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Learning Notes<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Reverse engineering isn\u2019t always complex \u2014 sometimes it\u2019s just understanding basic logic.<\/li>\n\n\n\n<li>Decompiled files (Python, Java, binaries) often contain direct hints.<\/li>\n\n\n\n<li>VoIP services are worth enumerating \u2014 they\u2019re frequently overlooked.<\/li>\n\n\n\n<li>Credential reuse is still incredibly common.<\/li>\n\n\n\n<li>Follow the breadcrumbs \u2014 every step in this box hinted at the next.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Final Thoughts<\/h2>\n\n\n\n<p>This challenge was a great mix of:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>non-standard services (VoIP),<\/li>\n\n\n\n<li>light reverse engineering,<\/li>\n\n\n\n<li>and simple but effective privilege escalation.<\/li>\n<\/ul>\n\n\n\n<p>Not flashy \u2014 just solid enumeration and logical progression. Exactly the kind of box that reinforces fundamentals.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This machine was a nice change of pace. Instead of the usual web-heavy approach, it introduced VoIP services, credential reuse, and a small reverse-engineering exercise at the end. A good reminder that not every box starts (or ends) with HTTP. NMAP The standout port here was 5038 \u2014 Asterisk Call Manager. That immediately suggested VoIP-related [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[8,20],"tags":[],"class_list":["post-483","post","type-post","status-publish","format-standard","hentry","category-ctf","category-cybersecurity"],"_links":{"self":[{"href":"https:\/\/hackingwithj.com\/index.php?rest_route=\/wp\/v2\/posts\/483","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hackingwithj.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hackingwithj.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hackingwithj.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hackingwithj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=483"}],"version-history":[{"count":2,"href":"https:\/\/hackingwithj.com\/index.php?rest_route=\/wp\/v2\/posts\/483\/revisions"}],"predecessor-version":[{"id":493,"href":"https:\/\/hackingwithj.com\/index.php?rest_route=\/wp\/v2\/posts\/483\/revisions\/493"}],"wp:attachment":[{"href":"https:\/\/hackingwithj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hackingwithj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hackingwithj.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}