what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Twitter Graphic Manipulation Vulnerability

Twitter Graphic Manipulation Vulnerability
Posted Dec 1, 2010
Authored by Reverse Skills

Twitter.com suffered from a graphic manipulation and upload vulnerability.

tags | advisory, file upload
SHA-256 | 05b047f7fddea8f8aec9b3c7ca57644b7226f3fe0a12521b5c8b364b9a1af404

Twitter Graphic Manipulation Vulnerability

Change Mirror Download
-- [ ABOUT ME

Francisco Alonso - ReverseSkills

http://twitter.com/revskills

Security researcher from Spain. *Nix lover & Hardware Hacking  ░▒▓

-- [ ABOUT SERVICE

From Wikipedia :

Twitter is a website, owned and operated by Twitter Inc., which offers
a social networking and microblogging service, enabling its users to
send and read other users' messages called tweets. Tweets are
text-based posts of up to 140 characters displayed on the user's
profile page. Tweets are publicly visible by default, however senders
can restrict message delivery to their friends list. Users may
subscribe to other users' tweets—this is known as following and
subscribers are known as followers.[7]

All users can send and receive tweets via the Twitter website,
compatible external applications (such as for smartphones), or by
Short Message Service (SMS) available in certain countries.[8] While
the service is free, accessing it through SMS may incur phone service
provider fees. The website is based in San Francisco, California.
Twitter also has servers and offices in San Antonio, Texas and Boston,
Massachusetts.

-- [ DESCRIPTION OF THE VULNERABILITIES

A security bug in user profiles, allows for the avatar upload files
that are not really images, directly from the web form.

When a user wants to change their profile picture, you can upload any
image in three different formats JPG, PNG and GIF. To upload the image
in any of the above three files are generated two different sizes for
parts of the profile. If you try to upload a JPG and PNG image to be
treated by the GD library, Twitter backend removes any extra content
of the image and check the header correctly.

This does not happen with the application that handles GIF files,
enabling a user to upload content that is not really a GIF file by
simply changing the header. Combined with the possibility of defining
the form 'Content-type' of file you can upload content. Sent HTML and
JavaScript (XSS, weaponized, etc) and binary content / executable to
distribute Malware directly from Twitter's servers (Hosted on Akamai
and Amazon S3) .

Poc easier and less worrisome is this:

http://a2.twimg.com/profile_images/1096102091/file.html  [HTML XSS]

We could also play around with the image name filter rise.

-[ form code

Content-Disposition: form-data; name="profile_image[uploaded_data]";
filename="namefile"\r\nContent-Type:
application/octet-stream\r\n\r\n\r

This we can do to send the file in the form of the profile, adding a
NOP (x: รถ) to the filename. As the filter removed all the string
"filename.html" but it was uploaded successfully.

 http://a2.twimg.com/profile_images/xxxx/

For security reasons there has been no further evidence of this kind,
but the possibility exists that the user could move a directory and
overwrite after Twitter legitimate files or images from other
profiles. -- Not tested, but I think it is entirely feasible.--


--[ IMPACT OF THE VULNERABILITIES

- A malicious user can change their profile picture to target
customers through either Twitter or access applications from the Web.

- Can be used to distribute Malware in Twitter.

- Technically it is possible to modify files within that legitimate
Bucket (HTML, Javascript or  default profile images)

--[ SOLUTIONS

Improve image upload filter to allow file uploads correctly GIF,
trying in all cases the images as a new and removing content is not
validated in the file header.

-- Done --

--[ TIMELINE

27/09/10 - Bug found

08/11/10 - Twitter has been notified

08/11/10 - Twitter answers (7 minutes)

16/11/10 - Twitter patched security flaw, it is not possible to use it.

28/11/10 - Published

--[ CREDITS

-A response time unmatched in Twitter security team, thanks to Bob
Lord / http://twitter.com/boblord

-Thanks to all the team http://www.securitybydefault.com /
http://twitter.com/secbydefault

Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    16 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close