Twitter fixes SMS-based account hijacking vulnerability

Most Twitter SMS users are protected from spoofing attacks by default, but others need to set PIN

Twitter has restricted the ability of attackers to post tweets and perform other actions on behalf of many users who have phone numbers associated with their accounts, but some users need to enable a PIN option in order to be protected.

On Monday, a developer and security researcher named Jonathan Rudenberg reported that attackers can abuse the Twitter accounts of users who added their phone numbers to their profiles in order to use the service via SMS (Short Message Service).

Twitter allows users to control their accounts by sending commands via text messages to phone numbers set up by the company. The supported commands include: following and unfollowing users; tweeting; retweeting; sending direct messages; modifying profile information like name, bio or URL; and more.

The problem is that the origin of text messages can be spoofed and there are services that allow users to do this easily.

"Like email, the originating address of a SMS cannot be trusted. Many SMS gateways allow the originating address of a message to be set to an arbitrary identifier, including someone else's number," Rudenberg said.

This means that if an attacker knows the phone number of a Twitter user and that user associated his phone number with his account, the attacker can issue SMS commands on behalf of the user without actually having access to his phone.

In order to use Twitter via SMS users have to first associate their own phone numbers with their accounts. This can be done from the account settings menu in the Twitter website or by sending a sequence of commands, including the user name and password, to one of three Twitter phone numbers registered in the U.K., Germany and Finland.

Once this is done, users can start sending SMS commands from their phones to Twitter "short codes" -- special short numbers registered by Twitter with mobile operators in various countries -- or long codes, Twitter's internationally accessible phone numbers from U.K., Germany and Finland.

Sending text messages with a spoofed origin address to short codes is not possible, because those special phone numbers are only accessible from inside the operator's network and messages don't pass through an external SMS gateway that could allow spoofing. However, in Twitter's case attackers had the option of sending commands through the long codes.

Facebook and Venmo, a payment service, were vulnerable to the same type of attack, but fixed the problem after being contacted in August and November respectively, Rudenberg said. However, after initially responding to the private report in August, Twitter stopped answering, he said.

As a result, the researcher decided to make the issue public a few months later.

"Our team has already addressed this vulnerability," a Twitter representative said Tuesday via email.

However, it turns out that Twitter's fix does not automatically protect all users. Rudenberg was still able to demonstrate the vulnerability on a test account after Twitter said the vulnerability was addressed.

Twitter made changes that prevent users with phone numbers from mobile operators for which the company has a short code, to send commands through the long codes. This blocks the spoofing attack for a lot of users.

However, there are many mobile operators for which Twitter doesn't have a short code available. Users with phone numbers from those operators are allowed to send SMS commands through long codes. Those users can only associate their phone numbers with their accounts by using the long-code based process and not through the Twitter website.

Bogdan Alecu, an independent mobile security researcher, confirmed that users who are forced to use long codes are still vulnerable to account hijacking attacks via SMS spoofing.

Alecu performed a test using a phone number from an operator for which Twitter doesn't have a short code available. Sending an SMS with a spoofed origin through an SMS spoofing service doesn't cost more than 7 euro cents in Europe, he said.

"Users that use the long codes are vulnerable to spoofing, but can enable the PIN code feature," Rudenberg said Tuesday via email.

Twitter offers an option for every SMS command to be authenticated with a PIN. The option can be turned on and the PIN can be configured in the mobile section of the account settings on the Twitter website.

Rudenberg believes that hundreds of thousands of early Twitter users might have used the SMS feature, but never removed their phone numbers from their accounts when they later bought smartphones and started using Twitter's mobile apps.

"I also know a few people who use this feature for various reasons," he said. "I think that there are countries where smartphones don't have very high penetration that have users of this feature."

Join the CSO newsletter!

Error: Please check your email address.

Tags Internet-based applications and servicesonline safetysecuritymobile securityAccess control and authenticationtwitterinternetFacebookVenmo

Show Comments

Featured Whitepapers

Editor's Recommendations

Solution Centres

Stories by Lucian Constantin

Latest Videos

  • 150x50

    CSO Webinar: The Human Factor - Your people are your biggest security weakness

    ​Speakers: David Lacey, Researcher and former CISO Royal Mail David Turner - Global Risk Management Expert Mark Guntrip - Group Manager, Email Protection, Proofpoint

    Play Video

  • 150x50

    CSO Webinar: Current ransomware defences are failing – but machine learning can drive a more proactive solution

    Speakers • Ty Miller, Director, Threat Intelligence • Mark Gregory, Leader, Network Engineering Research Group, RMIT • Jeff Lanza, Retired FBI Agent (USA) • Andy Solterbeck, VP Asia Pacific, Cylance • David Braue, CSO MC/Moderator What to expect: ​Hear from industry experts on the local and global ransomware threat landscape. Explore a new approach to dealing with ransomware using machine-learning techniques and by thinking about the problem in a fundamentally different way. Apply techniques for gathering insight into ransomware behaviour and find out what elements must go into a truly effective ransomware defence. Get a first-hand look at how ransomware actually works in practice, and how machine-learning techniques can pick up on its activities long before your employees do.

    Play Video

  • 150x50

    CSO Webinar: Get real about metadata to avoid a false sense of security

    Speakers: • Anthony Caruana – CSO MC and moderator • Ian Farquhar, Worldwide Virtual Security Team Lead, Gigamon • John Lindsay, Former CTO, iiNet • Skeeve Stevens, Futurist, Future Sumo • David Vaile - Vice chair of APF, Co-Convenor of the Cyberspace Law And Policy Community, UNSW Law Faculty This webinar covers: - A 101 on metadata - what it is and how to use it - Insight into a typical attack, what happens and what we would find when looking into the metadata - How to collect metadata, use this to detect attacks and get greater insight into how you can use this to protect your organisation - Learn how much raw data and metadata to retain and how long for - Get a reality check on how you're using your metadata and if this is enough to secure your organisation

    Play Video

  • 150x50

    CSO Webinar: How banking trojans work and how you can stop them

    CSO Webinar: How banking trojans work and how you can stop them Featuring: • John Baird, Director of Global Technology Production, Deutsche Bank • Samantha Macleod, GM Cyber Security, ME Bank • Sherrod DeGrippo, Director of Emerging Threats, Proofpoint (USA)

    Play Video

  • 150x50

    IDG Live Webinar:The right collaboration strategy will help your business take flight

    Speakers - Mike Harris, Engineering Services Manager, Jetstar - Christopher Johnson, IT Director APAC, 20th Century Fox - Brent Maxwell, Director of Information Systems, THE ICONIC - IDG MC/Moderator Anthony Caruana

    Play Video

More videos

Blog Posts