{"componentChunkName":"component---src-templates-post-template-js","path":"/hackthebox-linux-curling-en","result":{"data":{"markdownRemark":{"id":"f879d635-abcf-5123-b575-53a73ad987bb","html":"<blockquote>\n<p>This page has been machine-translated from the <a href=\"/hackthebox-linux-curling\">original page</a>.</p>\n</blockquote>\n<p>I use the penetration-testing learning platform “Hack The Box” to study security.\nAt the time of writing, my rank on Hack The Box is ProHacker.</p>\n<span class=\"gatsby-resp-image-wrapper\" style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 220px; \">\n      <a class=\"gatsby-resp-image-link\" href=\"/static/0da9a3a8737ef19f8ff8980445608ccd/c8042/327080.png\" style=\"display: block\" target=\"_blank\" rel=\"noopener\">\n    <span class=\"gatsby-resp-image-background-image\" style=\"padding-bottom: 22.727272727272727%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAFCAYAAABFA8wzAAAACXBIWXMAAAsTAAALEwEAmpwYAAABX0lEQVQY0zWPzU7bQBRG/Rbdd9NuqCAmEMcexz8TJ46Mo/zgkEQJRAlQVUCRXJBIIJDSXVftouoKsUTqtos+Qp9qTgekLj7duVe6554x7uY5Vxdn6nb+kWyvR6PdI+n0aGZDOoMxg4MZjVaGE9bx6ztsVyR+nGKHMaLawJExRRFg2p7Swfj1eKN+P33l758HVsuc6Ydz8qsFx6fnnOaXLFb3jGfHBDttuqOJPpjR6Y+YHR2yN54wmh5R8qrPQDadUBnLzynfvs/Vzx/3fFl+Is0OGE7e49WaVKJUG+q3TNhMBxRkiw0vQciAfN/B8SpUpcu65WOWhVovmRjN3ms1PYm5XuwznXQJuzZJ3yfqCuK+RTJ0kW2BHblEuxai4erlgC3hayNff1eb2SEbZROZvVLGWuGNHrxVrrdF0RGUq85LLClwahpU030kKAUuoq6r/wzURvb/eC/ggiXUu6LJP4kLwM41lD7PAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"></span>\n  <picture>\n          <source srcset=\"/static/0da9a3a8737ef19f8ff8980445608ccd/b5458/327080.webp 220w\" sizes=\"(max-width: 220px) 100vw, 220px\" type=\"image/webp\">\n          <source srcset=\"/static/0da9a3a8737ef19f8ff8980445608ccd/c8042/327080.png 220w\" sizes=\"(max-width: 220px) 100vw, 220px\" type=\"image/png\">\n          <img class=\"gatsby-resp-image-image\" src=\"/static/0da9a3a8737ef19f8ff8980445608ccd/c8042/327080.png\" alt=\"Hack The Box\" title=\"Hack The Box\" loading=\"lazy\" style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\">\n        </picture>\n  </a>\n    </span>\n<p>This time I am writing up the retired HackTheBox machine “Curling”.</p>\n<!-- omit in toc -->\n<h2 id=\"about-this-article\" style=\"position:relative;\"><a href=\"#about-this-article\" aria-label=\"about this article permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>About This Article</h2>\n<p><strong>The content of this article is not intended to encourage acts that are contrary to social order.</strong></p>\n<p>Please note that attempting attacks against environments other than those you own or are authorized to use may violate the Act on the Prohibition of Unauthorized Computer Access (the Unauthorized Access Prohibition Act).</p>\n<p>All statements here are my own and do not represent any organization I belong to.</p>\n<!-- omit in toc -->\n<h2 id=\"table-of-contents\" style=\"position:relative;\"><a href=\"#table-of-contents\" aria-label=\"table of contents permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Table of Contents</h2>\n<ul>\n<li><a href=\"#enumeration\">Enumeration</a></li>\n<li><a href=\"#internal-enumeration\">Internal Enumeration</a></li>\n<li><a href=\"#privilege-escalation\">Privilege Escalation</a></li>\n<li><a href=\"#summary\">Summary</a></li>\n</ul>\n<h2 id=\"enumeration\" style=\"position:relative;\"><a href=\"#enumeration\" aria-label=\"enumeration permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Enumeration</h2>\n<p>I started with the usual enumeration.</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">$ <span class=\"token function\">sudo</span> <span class=\"token function\">sed</span> -i <span class=\"token string\">'s/^[0-9].*$RHOST/10.10.10.150 $RHOST/g'</span> /etc/hosts\n$ nmap -sV -sC -Pn -T4 <span class=\"token variable\">$RHOST</span><span class=\"token operator\">|</span> <span class=\"token function\">tee</span> nmap1.txt\nPORT   STATE SERVICE VERSION\n<span class=\"token number\">22</span>/tcp <span class=\"token function\">open</span>  <span class=\"token function\">ssh</span>     OpenSSH <span class=\"token number\">7</span>.6p1 Ubuntu 4ubuntu0.5 <span class=\"token punctuation\">(</span>Ubuntu Linux<span class=\"token punctuation\">;</span> protocol <span class=\"token number\">2.0</span><span class=\"token punctuation\">)</span>\n<span class=\"token operator\">|</span> ssh-hostkey: \n<span class=\"token operator\">|</span>   <span class=\"token number\">2048</span> 8a:d1:69:b4:90:20:3e:a7:b6:54:01:eb:68:30:3a:ca <span class=\"token punctuation\">(</span>RSA<span class=\"token punctuation\">)</span>\n<span class=\"token operator\">|</span>   <span class=\"token number\">256</span> 9f:0b:c2:b2:0b:ad:8f:a1:4e:0b:f6:33:79:ef:fb:43 <span class=\"token punctuation\">(</span>ECDSA<span class=\"token punctuation\">)</span>\n<span class=\"token operator\">|</span>_  <span class=\"token number\">256</span> c1:2a:35:44:30:0c:5b:56:6a:3f:a5:cc:64:66:d9:a9 <span class=\"token punctuation\">(</span>ED25519<span class=\"token punctuation\">)</span>\n<span class=\"token number\">80</span>/tcp <span class=\"token function\">open</span>  http    Apache httpd <span class=\"token number\">2.4</span>.29 <span class=\"token variable\"><span class=\"token punctuation\">((</span>Ubuntu<span class=\"token punctuation\">))</span></span>\n<span class=\"token operator\">|</span>_http-server-header: Apache/2.4.29 <span class=\"token punctuation\">(</span>Ubuntu<span class=\"token punctuation\">)</span>\n<span class=\"token operator\">|</span>_http-generator: Joomla<span class=\"token operator\">!</span> - Open Source Content Management\n<span class=\"token operator\">|</span>_http-title: Home\nService Info: OS: Linux<span class=\"token punctuation\">;</span> CPE: cpe:/o:linux:linux_kernel\n\nService detection performed. Please report any incorrect results at https://nmap.org/submit/ <span class=\"token builtin class-name\">.</span>\nNmap done: <span class=\"token number\">1</span> IP address <span class=\"token punctuation\">(</span><span class=\"token number\">1</span> <span class=\"token function\">host</span> up<span class=\"token punctuation\">)</span> scanned <span class=\"token keyword\">in</span> <span class=\"token number\">24.61</span> seconds</code></pre></div>\n<p>Port 80 was open so I accessed it — it looked like a CMS.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 960px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/ab3be31b727292ed8db9099062fcee4a/33a7b/image-20220801201510966.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 53.333333333333336%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB3klEQVQoz5VSyW7UQBT0GQaQMpg1EhESP0mUA2JJCFEg5MBy4M4PcOEDcuI4Vi7MTCbjHnu8tbu9jpfivQ5EbCKipVK/92SXq+rZsu3b2Nh4gFt37mNor8O+eQ9r9l0Mrl7HpcEQl68MTX0xbAyu3YD18MkLbG3vY+f1O+weMt7j5dsP2H71Bo/3DvFo9wCbT/f+DeLYfLaPrecHsHqcnZbwdS4wEZ65x67A8XQGESX4n2MlKoXUColM4DgO/OWSagmxWMAVwtRt26Jtml/QfL/jKMKCntNKoSgKWGmeQxU5NDWJ0qhWDVZdj4ZQtz3YQd/3f+DHWRKh5y8NYZZlTJgRWY6Emokf4TRMcRJIeFJjRnVZN+bF38mqqjIEJd1aa5RlaWCxOlZZUJOxdVJZ1vWFWTExR+H5PibTqSE1llWRGcsZIQxDKM6U8pSUXRzHkKlEkiQmY54xuNaZRtd1yLVEmSujrmKFbJkJFT0wm51g7s4RBME54jgy4Jo/GIRn8yWhbxt8OjrGx89fULEocmqWwhnKLIfjRhAyg5cW0JTdOFAY0cwRES3q79ZHY4Gj0RRuEEGR7XOFKQUsaFhQyDlJj8km96dBjCDViOLELOLnBXWMln+fFVmuUFP23wDgVQETXdwv1AAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <picture>\n          <source\n              srcset=\"/static/ab3be31b727292ed8db9099062fcee4a/8ac56/image-20220801201510966.webp 240w,\n/static/ab3be31b727292ed8db9099062fcee4a/d3be9/image-20220801201510966.webp 480w,\n/static/ab3be31b727292ed8db9099062fcee4a/e46b2/image-20220801201510966.webp 960w,\n/static/ab3be31b727292ed8db9099062fcee4a/03b0b/image-20220801201510966.webp 1119w\"\n              sizes=\"(max-width: 960px) 100vw, 960px\"\n              type=\"image/webp\"\n            />\n          <source\n            srcset=\"/static/ab3be31b727292ed8db9099062fcee4a/8ff5a/image-20220801201510966.png 240w,\n/static/ab3be31b727292ed8db9099062fcee4a/e85cb/image-20220801201510966.png 480w,\n/static/ab3be31b727292ed8db9099062fcee4a/d9199/image-20220801201510966.png 960w,\n/static/ab3be31b727292ed8db9099062fcee4a/33a7b/image-20220801201510966.png 1119w\"\n            sizes=\"(max-width: 960px) 100vw, 960px\"\n            type=\"image/png\"\n          />\n          <img\n            class=\"gatsby-resp-image-image\"\n            src=\"/static/ab3be31b727292ed8db9099062fcee4a/d9199/image-20220801201510966.png\"\n            alt=\"image-20220801201510966\"\n            title=\"image-20220801201510966\"\n            loading=\"lazy\"\n            style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n          />\n        </picture>\n  </a>\n    </span></p>\n<p>I explored the Joomla installation using the following reference but could not find any exploitable entry point.</p>\n<p>Reference: <a href=\"https://hackertarget.com/attacking-enumerating-joomla/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Attacking and Enumerating Joomla | HackerTarget.com</a></p>\n<p>After reading through the page source, I noticed that <code class=\"language-text\">secret.txt</code> was embedded in it.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 487px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/21cf9aaa59091f5f58edfa7a784ddf38/7b439/image-20220802220814485.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 43.75%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAYAAAAywQxIAAAACXBIWXMAAAsTAAALEwEAmpwYAAABOUlEQVQoz21SiW6EIBT0/7+vSds0adL1wPUCBX3KNQX20D3GvIgPGIcZsqosobVGhPc+FY0LVrXAagPnbn0HYz2ecdtzG2fnuoYx5mFyVStm3mFkOXrWoyxm5PmKuhiguISUGvOsQfP2QByRRYXPhD7IMosBbxv8fn+gyDk+vxj6hoEUoR8Ik9wguhmqlXDW7QprxqAPhBEjE1gnSmOTFrswZ2CdezmyM/a+LzAgY9XuYUT0jcQCPgz4O50gBEdZFmiaBnWwp+87MFal76qqQOt+bLuZi0Lrwl+ch2wntD9nqE5eFlgbQnG7FYc69nEMJRLSTEkVjQRDJp7wbZqvzf11DyXKl72ECAmOYoQJTzu14Iqnoo2Cx4/X6rnuxP7qoRIK8jymBF24b5teE0msaEfswV8JsRO8wz+Rjr7Tc+sX7wAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <picture>\n          <source\n              srcset=\"/static/21cf9aaa59091f5f58edfa7a784ddf38/8ac56/image-20220802220814485.webp 240w,\n/static/21cf9aaa59091f5f58edfa7a784ddf38/d3be9/image-20220802220814485.webp 480w,\n/static/21cf9aaa59091f5f58edfa7a784ddf38/9d50c/image-20220802220814485.webp 487w\"\n              sizes=\"(max-width: 487px) 100vw, 487px\"\n              type=\"image/webp\"\n            />\n          <source\n            srcset=\"/static/21cf9aaa59091f5f58edfa7a784ddf38/8ff5a/image-20220802220814485.png 240w,\n/static/21cf9aaa59091f5f58edfa7a784ddf38/e85cb/image-20220802220814485.png 480w,\n/static/21cf9aaa59091f5f58edfa7a784ddf38/7b439/image-20220802220814485.png 487w\"\n            sizes=\"(max-width: 487px) 100vw, 487px\"\n            type=\"image/png\"\n          />\n          <img\n            class=\"gatsby-resp-image-image\"\n            src=\"/static/21cf9aaa59091f5f58edfa7a784ddf38/7b439/image-20220802220814485.png\"\n            alt=\"image-20220802220814485\"\n            title=\"image-20220802220814485\"\n            loading=\"lazy\"\n            style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n          />\n        </picture>\n  </a>\n    </span></p>\n<p>Accessing that URL showed a suspicious-looking string.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 542px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/ed8e611a8e2f1aee8710f59ddd1e3a00/c0388/image-20220802220859608.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 39.166666666666664%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAYAAAD5nd/tAAAACXBIWXMAAAsTAAALEwEAmpwYAAABJklEQVQoz62MW0/CQBSE+x+8hLRq2t1edksvodhQgZio/0pRgligFZU/ii8ovLSMu6smPvjiZZLvzNnZk9FMk4IQC5RSWNQDoS5sR+B6CmI7Cof5YH4IHkTgzejdg1hkkcpdxmESAs0P2/CZiySO4QcJGI+Et+CxCEHUBrU5dMMSJQmStI+sd46se4YT4d3+hdrT7FTcpjg4tKHpYjQMqrDsAB1x4PAWeHgM6sU4Ij7CVoa43UMz7iAQu8wkhsmw0zCx27CwpxPs6xTa4HqEy6shpA9uxijKJ0xmc0yLB+TTe9zeFSjnC8zKR5VJH+eFoFR/w9HkCzm09foVq5cVNps1ls9L1HWFv0iTo6oqQY3tdisK64/371CFskSW/QffFkp9+k/1Br0gyVM04TDzAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <picture>\n          <source\n              srcset=\"/static/ed8e611a8e2f1aee8710f59ddd1e3a00/8ac56/image-20220802220859608.webp 240w,\n/static/ed8e611a8e2f1aee8710f59ddd1e3a00/d3be9/image-20220802220859608.webp 480w,\n/static/ed8e611a8e2f1aee8710f59ddd1e3a00/3f954/image-20220802220859608.webp 542w\"\n              sizes=\"(max-width: 542px) 100vw, 542px\"\n              type=\"image/webp\"\n            />\n          <source\n            srcset=\"/static/ed8e611a8e2f1aee8710f59ddd1e3a00/8ff5a/image-20220802220859608.png 240w,\n/static/ed8e611a8e2f1aee8710f59ddd1e3a00/e85cb/image-20220802220859608.png 480w,\n/static/ed8e611a8e2f1aee8710f59ddd1e3a00/c0388/image-20220802220859608.png 542w\"\n            sizes=\"(max-width: 542px) 100vw, 542px\"\n            type=\"image/png\"\n          />\n          <img\n            class=\"gatsby-resp-image-image\"\n            src=\"/static/ed8e611a8e2f1aee8710f59ddd1e3a00/c0388/image-20220802220859608.png\"\n            alt=\"image-20220802220859608\"\n            title=\"image-20220802220859608\"\n            loading=\"lazy\"\n            style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n          />\n        </picture>\n  </a>\n    </span></p>\n<p>Running it through CyberChef’s Magic recipe revealed it was a Base64-encoded password.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 897px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/992b04e04756fa54e7b96aa17f46ccf8/3a737/image-20220802220932321.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 29.583333333333332%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAGCAYAAADDl76dAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA6UlEQVQY02VQi27EIAzr///lrjeJdi1QWoqAgJfk1m6nIVmA83CcwTmPUgpqJUbVd85Z3wIiQskvTlBKxRkjnHNw3mGaJizLgshcOhOGx+MDzq7wkuDs3UwKrLWYv2aklG4xgTQZxxHeb1gXrvVec7ShcRHGRsz+RIgJrTX03lnx4IacvG36v3iZWIQkRpTx90h8iJkQUsWeCNS6koJ937FyoWdbJ6tffGsEYwzmeWLrG8IeEEJQy+JiwLuGFvF17/Dao/J8ZNLn51Mb1vq+684DDa297PzH77S35Z/c4zgYAVROqP6Vx/FvpyjTbes0HsEAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <picture>\n          <source\n              srcset=\"/static/992b04e04756fa54e7b96aa17f46ccf8/8ac56/image-20220802220932321.webp 240w,\n/static/992b04e04756fa54e7b96aa17f46ccf8/d3be9/image-20220802220932321.webp 480w,\n/static/992b04e04756fa54e7b96aa17f46ccf8/10735/image-20220802220932321.webp 897w\"\n              sizes=\"(max-width: 897px) 100vw, 897px\"\n              type=\"image/webp\"\n            />\n          <source\n            srcset=\"/static/992b04e04756fa54e7b96aa17f46ccf8/8ff5a/image-20220802220932321.png 240w,\n/static/992b04e04756fa54e7b96aa17f46ccf8/e85cb/image-20220802220932321.png 480w,\n/static/992b04e04756fa54e7b96aa17f46ccf8/3a737/image-20220802220932321.png 897w\"\n            sizes=\"(max-width: 897px) 100vw, 897px\"\n            type=\"image/png\"\n          />\n          <img\n            class=\"gatsby-resp-image-image\"\n            src=\"/static/992b04e04756fa54e7b96aa17f46ccf8/3a737/image-20220802220932321.png\"\n            alt=\"image-20220802220932321\"\n            title=\"image-20220802220932321\"\n            loading=\"lazy\"\n            style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n          />\n        </picture>\n  </a>\n    </span></p>\n<p>I then entered the username found in a post on the site together with this decoded password into the login form, and successfully logged in.</p>\n<p>After that, I followed the same approach as the article below — embedding a reverse shell into a template file PHP and obtained a shell. </p>\n<p>Reference: <a href=\"https://www.hackingarticles.in/joomla-reverse-shell/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Joomla: Reverse Shell - Hacking Articles</a></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 960px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/1fc9488217c950391db7ff69199da72f/3fca6/image-20220802221825355.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 24.583333333333336%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAFCAYAAABFA8wzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAyElEQVQY032PXW7EIAyEOdLuQyD8kwBJaNJN73+ZWZusuqpa9eHT2AbN2EKHhFg2JGJ0AdZZpBQRY+gaSLnm+e12/5v7W0UpGXlOKGXCNCWE4MjEk4mHNQbeOzgyY5RS0OMIrfUvjNH9TSxLRV0Kai1obe3kPOE8DzweO/Z9w3400gb+ewVQaPA9hJVnfIm1BqJ9bFi3ipm3rDNmMospUEAmg9Lhk9Wo+iZSSgzD0PWq5Y+ZOL8+4SmRGyUVhtdHrt+qvg24/48nkeCqDzyjjdMAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <picture>\n          <source\n              srcset=\"/static/1fc9488217c950391db7ff69199da72f/8ac56/image-20220802221825355.webp 240w,\n/static/1fc9488217c950391db7ff69199da72f/d3be9/image-20220802221825355.webp 480w,\n/static/1fc9488217c950391db7ff69199da72f/e46b2/image-20220802221825355.webp 960w,\n/static/1fc9488217c950391db7ff69199da72f/01adf/image-20220802221825355.webp 1112w\"\n              sizes=\"(max-width: 960px) 100vw, 960px\"\n              type=\"image/webp\"\n            />\n          <source\n            srcset=\"/static/1fc9488217c950391db7ff69199da72f/8ff5a/image-20220802221825355.png 240w,\n/static/1fc9488217c950391db7ff69199da72f/e85cb/image-20220802221825355.png 480w,\n/static/1fc9488217c950391db7ff69199da72f/d9199/image-20220802221825355.png 960w,\n/static/1fc9488217c950391db7ff69199da72f/3fca6/image-20220802221825355.png 1112w\"\n            sizes=\"(max-width: 960px) 100vw, 960px\"\n            type=\"image/png\"\n          />\n          <img\n            class=\"gatsby-resp-image-image\"\n            src=\"/static/1fc9488217c950391db7ff69199da72f/d9199/image-20220802221825355.png\"\n            alt=\"image-20220802221825355\"\n            title=\"image-20220802221825355\"\n            loading=\"lazy\"\n            style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n          />\n        </picture>\n  </a>\n    </span></p>\n<h2 id=\"internal-enumeration\" style=\"position:relative;\"><a href=\"#internal-enumeration\" aria-label=\"internal enumeration permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Internal Enumeration</h2>\n<p>The shell landed with low privileges, so I started working toward privilege escalation.</p>\n<p>I had no access to <code class=\"language-text\">user.txt</code>, but for some reason a file called <code class=\"language-text\">password_backup</code> was readable.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 713px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/e1845bd355ca4869a31a820c79140360/01267/image-20220802222345013.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 42.91666666666667%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAYAAAAywQxIAAAACXBIWXMAAAsTAAALEwEAmpwYAAABkElEQVQoz22S6XKjMBCEeR5jMOYSYA6BBARfrJP3f5beHinJbqryQ4ygpG+6ewgG3aFtG6hKoapK1E3lVlkWGIYOfe+XUgpFUUCVCnEc43g8/luRryFXoAg5nfwBORhF0XdVqsTlcmGjCk3ToOtaB46jGGEY/roCrXsevDiFw9AiyzLosUeeZ3jbVuz7HRvrZCa3lwZJcnINozjyAijoxG9Sg8loWmqpQsFwX5Y55sU4YEerHx9/sCwzjJ2439nkje8W1o4QMUmSoOAdiasocgTyyLIUeeEza5ifrzXBFvf7hnHUVK3xeNycUoHJHVEXhkdn9XA4eMtCzvPcBS5K67pCT2BNoFh+PK5Y18WBBG6twbLa78x+DEeGYszIXGqUHIBYbrgXBR3hNwLE5rKKZYP399012a6Lsxce/oNKpdpALIp8AUomkt00efB2XfF83qiQQCp8vZ643jbM88QYBjR0k6ZnB4y+FMr/JsCMIPkfZThu6mwgQ3m9dogLrQc3bTtbF03Be2ma4nxOvLpP4F+2gyxuKDkaIAAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <picture>\n          <source\n              srcset=\"/static/e1845bd355ca4869a31a820c79140360/8ac56/image-20220802222345013.webp 240w,\n/static/e1845bd355ca4869a31a820c79140360/d3be9/image-20220802222345013.webp 480w,\n/static/e1845bd355ca4869a31a820c79140360/69b3e/image-20220802222345013.webp 713w\"\n              sizes=\"(max-width: 713px) 100vw, 713px\"\n              type=\"image/webp\"\n            />\n          <source\n            srcset=\"/static/e1845bd355ca4869a31a820c79140360/8ff5a/image-20220802222345013.png 240w,\n/static/e1845bd355ca4869a31a820c79140360/e85cb/image-20220802222345013.png 480w,\n/static/e1845bd355ca4869a31a820c79140360/01267/image-20220802222345013.png 713w\"\n            sizes=\"(max-width: 713px) 100vw, 713px\"\n            type=\"image/png\"\n          />\n          <img\n            class=\"gatsby-resp-image-image\"\n            src=\"/static/e1845bd355ca4869a31a820c79140360/01267/image-20220802222345013.png\"\n            alt=\"image-20220802222345013\"\n            title=\"image-20220802222345013\"\n            loading=\"lazy\"\n            style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n          />\n        </picture>\n  </a>\n    </span></p>\n<p>Opening it showed that a hexdump of binary data had been saved as a text file.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 960px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/04f547a0d540960b971017dc8857745e/7af19/image-20220802223016385.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 60.83333333333334%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAAAsTAAALEwEAmpwYAAABTUlEQVQoz42Si3KDIBBF/f8vbKfmIaIYBAVjTHzEWxZLYjNNmnXuXBA8LrtE7LBFYTJUJwlNaiXqs8Iuj/G5/wATHMooVFZDm9K5cr7MVV1CyNy5hFAlsoNAlNsUecOgu2KlA8qTgKgZ4s0XsixDURRgjPlxkiSoqgqqLDH0A24xz4gw42lM44TtbouEJeAZB0sdMM/83DYWTdNgHMcf1gKKpmnyk0dR9H3vgWnqTuFAKXcucnDOHWwB0p4AJEXX6/X+IjwrYLyJ3VETD9sn+yVD59ZaGFPjcrncM3wE+uPP9/THYYCU0teLsum6zgO67uSd9Pv7v4CrelA5wvqrCPvnd4Dror+jtzN8BniMf4F1XaNt21vNgqhh5NTt4/Ho60x6CaS10l1erbXvKrlSyjeIZIzx78Ie+vFLIDllSdlQLUNWg+s+jUlhT7jP3x4spVFMhBctAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <picture>\n          <source\n              srcset=\"/static/04f547a0d540960b971017dc8857745e/8ac56/image-20220802223016385.webp 240w,\n/static/04f547a0d540960b971017dc8857745e/d3be9/image-20220802223016385.webp 480w,\n/static/04f547a0d540960b971017dc8857745e/e46b2/image-20220802223016385.webp 960w,\n/static/04f547a0d540960b971017dc8857745e/fc170/image-20220802223016385.webp 1359w\"\n              sizes=\"(max-width: 960px) 100vw, 960px\"\n              type=\"image/webp\"\n            />\n          <source\n            srcset=\"/static/04f547a0d540960b971017dc8857745e/8ff5a/image-20220802223016385.png 240w,\n/static/04f547a0d540960b971017dc8857745e/e85cb/image-20220802223016385.png 480w,\n/static/04f547a0d540960b971017dc8857745e/d9199/image-20220802223016385.png 960w,\n/static/04f547a0d540960b971017dc8857745e/7af19/image-20220802223016385.png 1359w\"\n            sizes=\"(max-width: 960px) 100vw, 960px\"\n            type=\"image/png\"\n          />\n          <img\n            class=\"gatsby-resp-image-image\"\n            src=\"/static/04f547a0d540960b971017dc8857745e/d9199/image-20220802223016385.png\"\n            alt=\"image-20220802223016385\"\n            title=\"image-20220802223016385\"\n            loading=\"lazy\"\n            style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n          />\n        </picture>\n  </a>\n    </span></p>\n<p>Running it through Magic showed it could be decompressed with Bzip2.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 960px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/d1111a6266391182f63e33f26e6e538a/38a65/image-20220802223210459.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 40%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAYAAAD5nd/tAAAACXBIWXMAAAsTAAALEwEAmpwYAAABMklEQVQoz11R2ZKDMAzj/39yH1qO5oQASQiH1sounU4zY0IcS5aVxjkLrRRSjMg5Y9u2d/D8nfu8s4I1xqBrOzjnsCwLGu08Bm1h/YgpBOz7jvM8K4jF2miklHAcB8pe6r4sM4ZhwDwHrHFFFDGsIbZ52ogfndCNomQ/AVy4LlRSAmOKKKXU4rtZmCY8ng/0ZoDz7k14CbBJW0EuR41DiplkEDgL4SRgFt8789ZaKLFpsqbmOT6biRY0MRek7UD6IuRoHLnvOwSxgmpvNbSDuSyescntKTGNnzP8Wr4IUcekT0q9xEcjfs0YR193mt/3PbzWVa0RpWxQCU/5/K3rrY6LIyitEGj8ulYgX3IWMipt2xb+NdQ8I0ijSsjPTfQZ9IoqGfer87++tuw8n/9354dVv7RGbGdQlqsaAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <picture>\n          <source\n              srcset=\"/static/d1111a6266391182f63e33f26e6e538a/8ac56/image-20220802223210459.webp 240w,\n/static/d1111a6266391182f63e33f26e6e538a/d3be9/image-20220802223210459.webp 480w,\n/static/d1111a6266391182f63e33f26e6e538a/e46b2/image-20220802223210459.webp 960w,\n/static/d1111a6266391182f63e33f26e6e538a/4690a/image-20220802223210459.webp 1075w\"\n              sizes=\"(max-width: 960px) 100vw, 960px\"\n              type=\"image/webp\"\n            />\n          <source\n            srcset=\"/static/d1111a6266391182f63e33f26e6e538a/8ff5a/image-20220802223210459.png 240w,\n/static/d1111a6266391182f63e33f26e6e538a/e85cb/image-20220802223210459.png 480w,\n/static/d1111a6266391182f63e33f26e6e538a/d9199/image-20220802223210459.png 960w,\n/static/d1111a6266391182f63e33f26e6e538a/38a65/image-20220802223210459.png 1075w\"\n            sizes=\"(max-width: 960px) 100vw, 960px\"\n            type=\"image/png\"\n          />\n          <img\n            class=\"gatsby-resp-image-image\"\n            src=\"/static/d1111a6266391182f63e33f26e6e538a/d9199/image-20220802223210459.png\"\n            alt=\"image-20220802223210459\"\n            title=\"image-20220802223210459\"\n            loading=\"lazy\"\n            style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n          />\n        </picture>\n  </a>\n    </span></p>\n<p>The output was still unclear at that point.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 670px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/c8de5505687848c4ee0f6516790830d1/d67fd/image-20220802225354437.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 108.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAWCAYAAADAQbwGAAAACXBIWXMAAAsTAAALEwEAmpwYAAADEElEQVQ4y22V6XLiQAyE/f4vt4EcJAHjA3xymwC2SUqrT55xNqn9oRrPGEut7tYQpGkq6Wolfd9L13XStS66IfquH59/7/mm7+/jc7RcSBCGC4njWHa7nRRFIZvNRqOWWqOqKinL0s7qupayKiXPcwvOyrKwZ94dDgeL4GHyR97e36SqK5kv5oo21QKRxEkscZrIchlKkiRWNE4iWUZLOyPJ9XqVy/Ui19tV2rY1pEGiH+ZFLsfj0SputhtLzgcepa2698hrfX86neR+v8vX15d8fn5qDK0Hj49Th7AW2l+BUIskii5xaEHNPuXM0EbWct938vHxoXGW5twY4uBdk5EADklWOF7gk+cszwbuiu8z3u/3e0NJcoosFMzxdJRgEc61emotF/oRLZEABKCm5a2nYRSqMAEiuNZYZ2uJokjO57MEk+mDzF5n9uNlFFp7kWvTWlX0q/VqpCFScSIVBo6bppH9YW/r5XIxYQJ4oQ3gUhk0XhATyIli+1GU2tpFjEGUuwo0+DOYqG1mb6/WJrYBBdaInHWwCCst0R7nnEEHiIhbe5PbbYggVHfTEtDhAq5ADFqKwCvmLvxeV84Ox4PZxkfvEaIyqLbbrSlKW6hJ4lw/XmuxyiXmXZZldobKJD0pf3DIsyV8fnmyFklAK/8KMPgwtkKck5Rz3sMvqOARdRsNSziKgm3cpNS1F2Jj6DZOCC8IxY8qCsYeLojvy8Nsw6QUytP7/H0UIjJhYpseE8L2S1tDJ4pPMohzkxZR8Bmkw4HnyawyznI5ohpmurIzbGaCaMteGEP4Mnu2ivwYVChtc4uxlTcztt6X3Jsrb3Z9v1ERDVn3bRtD+Koe9CRzPZkAmgAlSU4i1pXbs5KY2f9hG3dBB/CT6bAzm7kms1lWCmiL9vCjrX6vq82yith1reOxHU0eTKcTE4Mk89+iJP8XxU8K4waHg9L9r1l2FyyGpX1mmpVbB9PzvNttx78DZpnbGlNzJzbNaRi9p+dHvcvCH/fher0eBHCiZMqdcaox3EDJoLy6gUKMLcVI/BeiX2qS/NYNowAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <picture>\n          <source\n              srcset=\"/static/c8de5505687848c4ee0f6516790830d1/8ac56/image-20220802225354437.webp 240w,\n/static/c8de5505687848c4ee0f6516790830d1/d3be9/image-20220802225354437.webp 480w,\n/static/c8de5505687848c4ee0f6516790830d1/6cceb/image-20220802225354437.webp 670w\"\n              sizes=\"(max-width: 670px) 100vw, 670px\"\n              type=\"image/webp\"\n            />\n          <source\n            srcset=\"/static/c8de5505687848c4ee0f6516790830d1/8ff5a/image-20220802225354437.png 240w,\n/static/c8de5505687848c4ee0f6516790830d1/e85cb/image-20220802225354437.png 480w,\n/static/c8de5505687848c4ee0f6516790830d1/d67fd/image-20220802225354437.png 670w\"\n            sizes=\"(max-width: 670px) 100vw, 670px\"\n            type=\"image/png\"\n          />\n          <img\n            class=\"gatsby-resp-image-image\"\n            src=\"/static/c8de5505687848c4ee0f6516790830d1/d67fd/image-20220802225354437.png\"\n            alt=\"image-20220802225354437\"\n            title=\"image-20220802225354437\"\n            loading=\"lazy\"\n            style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n          />\n        </picture>\n  </a>\n    </span></p>\n<p>Using “From Hexdump” to download it as a binary file revealed it was a tar archive. Extracting it yielded Floris’s password, and I was able to retrieve the user flag.</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">$ <span class=\"token function\">tar</span> xvf download.tar \npassword.txt\n\n$ <span class=\"token function\">cat</span> password.txt \n5d<span class=\"token operator\">&lt;</span>wdCbdZu<span class=\"token punctuation\">)</span><span class=\"token operator\">|</span>hChXll</code></pre></div>\n<p>Using this password I could now log in via SSH, so I continued from there.</p>\n<h2 id=\"privilege-escalation\" style=\"position:relative;\"><a href=\"#privilege-escalation\" aria-label=\"privilege escalation permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Privilege Escalation</h2>\n<p>I uploaded linpeas to perform further enumeration.</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">$ <span class=\"token function\">scp</span> /home/kali/Hacking/Tools/linpeas.sh floris@<span class=\"token variable\">$RHOST</span>:/home/floris\n\n$ ./linpeas.sh <span class=\"token function\">tee</span> lipeas.txt</code></pre></div>\n<p>The owner of certain files appeared to be root.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 613px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/ec4740995d0cfd26a05be7ecee3dd0e6/5754a/image-20220802231753019.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 25.83333333333333%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAFCAYAAABFA8wzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA2ElEQVQY02WOXZLCIBCEc6DkQWXAChISAgQwuj/3v0s7wazWlg9f9RTTdE9z1hZ6GHEgBaE0bFpg8gy7BpjFwcQJFz/CJAftLIarx5B93enZVt+235BKojGDQc4B3lwQmLQEhOjh3FRRUuKsFBSbJc+SdmWUVB/a9H0P7ycU/vwbI36+b7jdVy5ZsK4F5VqQUgDxB9rDiOgVSjuqlnKgsQalRORpxJefUXLikMwhsWqMAVupEFQD39A//StoDscjD4S2bdF1XTUIErvxOZ/Eia+g19sH8n3xA7mGqa69LHgPAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <picture>\n          <source\n              srcset=\"/static/ec4740995d0cfd26a05be7ecee3dd0e6/8ac56/image-20220802231753019.webp 240w,\n/static/ec4740995d0cfd26a05be7ecee3dd0e6/d3be9/image-20220802231753019.webp 480w,\n/static/ec4740995d0cfd26a05be7ecee3dd0e6/0abb1/image-20220802231753019.webp 613w\"\n              sizes=\"(max-width: 613px) 100vw, 613px\"\n              type=\"image/webp\"\n            />\n          <source\n            srcset=\"/static/ec4740995d0cfd26a05be7ecee3dd0e6/8ff5a/image-20220802231753019.png 240w,\n/static/ec4740995d0cfd26a05be7ecee3dd0e6/e85cb/image-20220802231753019.png 480w,\n/static/ec4740995d0cfd26a05be7ecee3dd0e6/5754a/image-20220802231753019.png 613w\"\n            sizes=\"(max-width: 613px) 100vw, 613px\"\n            type=\"image/png\"\n          />\n          <img\n            class=\"gatsby-resp-image-image\"\n            src=\"/static/ec4740995d0cfd26a05be7ecee3dd0e6/5754a/image-20220802231753019.png\"\n            alt=\"image-20220802231753019\"\n            title=\"image-20220802231753019\"\n            loading=\"lazy\"\n            style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n          />\n        </picture>\n  </a>\n    </span></p>\n<p>Looking at the linpeas output, these same files appeared under <code class=\"language-text\">Modified interesting files in the last 5mins</code>.</p>\n<p>It looked like some root-owned job was running in the background.</p>\n<p>I could not identify exactly which process was touching them, but as a test I modified the address in <code class=\"language-text\">input</code> to <code class=\"language-text\">url = \"http://10.10.14.4:5000\"</code>, and my local machine received a connection.</p>\n<p>I thought about this for a while. If the process could access arbitrary URLs with root privileges, simply changing the URI scheme to <code class=\"language-text\">file://</code> should allow reading any file on the system.</p>\n<p>So I set the destination in <code class=\"language-text\">input</code> as follows, and was able to retrieve the root flag.</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">$ <span class=\"token builtin class-name\">echo</span> <span class=\"token string\">'url = \"file:///root/root.txt\"'</span> <span class=\"token operator\">></span> input</code></pre></div>\n<h2 id=\"summary\" style=\"position:relative;\"><a href=\"#summary\" aria-label=\"summary permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Summary</h2>\n<p>The initial enumeration took some time, but overall this was a straightforward machine.</p>","fields":{"slug":"/hackthebox-linux-curling-en","tagSlugs":["/tag/hack-the-box-en/","/tag/linux-en/","/tag/easy-box-en/","/tag/english/"]},"frontmatter":{"date":"2022-08-01","description":"A writeup of the retired HackTheBox machine 'Curling'.","tags":["HackTheBox (en)","Linux (en)","EasyBox (en)","English"],"title":"HackTheBox Writeup: Curling (Easy/Linux)","socialImage":{"publicURL":"/static/dc4d8b7f8795f3c3d3489d9957d155f2/no-image.png"}}}},"pageContext":{"slug":"/hackthebox-linux-curling-en"}},"staticQueryHashes":["251939775","401334301","825871152"]}