Facebook patches security hole that allowed mass harvesting of phone numbers

Facebook prevents the abuse of phone number searching on its mobile site by imposing a search-rate limit

Facebook has restricted the rate at which users can perform phone number searches on its mobile website in order to block a recently disclosed method of harvesting phone numbers.

"The ability to search for a person by phone number is intentional behavior and not a bug in Facebook," Facebook said Tuesday in an emailed statement. "By default, your privacy settings allow everyone to find you with search and friend finder using the contact info you have provided, such as your email address and phone number. You can modify these settings at any time from the Privacy Settings page."

"Facebook has developed an extensive system for preventing the malicious usage of our search functionality and the scenario described by the researcher was indeed rate-limited and eventually blocked," the company said. "We are constantly updating these systems to improve their effectiveness and address new kinds of attacks."

On Friday, independent security researcher Suriya Prakash publicly disclosed that Facebook's phone number search feature can be abused to find the name of people who own randomly generated phone numbers.

Facebook requires users to associate phone numbers with their accounts in order to gain access to additional features, including enhanced account security options like two-factor authentication. The website also allows users to locate other people's profiles by searching for their phone number.

However, without a strict limit on how many searches a user can perform, attackers could generate sets of thousands of sequential phone numbers and use the website's search feature to discover if any of them are associated with Facebook accounts.

This would allow them to build lists of phone numbers coupled with the names of their owners extracted from Facebook profiles. Such information could be sold to advertisers or used in phone-based scams.

Suriya claims that he privately contacted Facebook in August and presented this attack scenario and that the company's security team dismissed the threat by saying that phone number-based searches are rate-limited on the website.

However, after additional testing, the researcher found that the mobile version of Facebook appeared to have no search-rate limit implemented. He claims that subsequent emails sent to Facebook went unanswered and this led to his decision to go public with the issue.

After the public disclosure, other security researchers independently verified the vulnerability. Tyler Borland, a security researcher from security firm Alert Logic even released a script that took advantage of multicore CPUs to run multiple Facebook phone number search processes concurrently.

Security researchers confirmed that Facebook started limiting the number of searches that can be performed through its mobile website on Monday. However, they doubt that any limitation existed before that time, as suggested by the company's statement.

"Frankly, I don't think such a rate limit ever existed on the mobile version [of the website]," Suriya said Wednesday.

The researcher claims that his tests lasted eight days and included searching for sets of 10,000 phone numbers one after the other using the same account and the same IP address without getting blocked

"My tests were blocked around 10 PM CST on Monday," Borland said Wednesday via email. "I built a check into the original script for logouts or irregular HTTP responses (403, 5xx, 3xx, etc.) for when something like this would happen. Facebook logs you out when your account gets banned, so it was easy to tell when the patch got rolled out."

"I most certainly believe it was fixed when the media frenzy happened," he said. "It was literally less than a day when the story broke out that a fix was pushed out."

Bogdan Botezatu, a senior e-threat analyst at antivirus vendor Bitdefender, confirmed that earlier on Monday he was initially able to use Borland's script to perform over 5,000 search queries. However, when he tried again on Tuesday his Facebook account got locked down for 24 hours.

The search-rate limitation that Facebook implemented on Monday still allowed around 300 requests to be made from an account, Borland said.

This means that attacks were still possible, especially if run from multiple accounts, because of the method's high success rate. "I gathered an average of 40-60 numbers with one account during those 300 requests/account," the researcher said.

However, the limit appears to have been was drastically lowered today. "As of 10 AM CST on Wednesday I could only do 10-30 requests before getting the 'badboy' account lockout," Borland said in a blog post.

"Quite honestly, I'm still not sure why an account name or Facebook id needs to be attached to a phone lookup result," he said. "It should only give an option to send a friend request by that number if it existed, like you would with an email."

"I really wish it did not come to such a public disclosure but they [Facebook] really left me no choice," Suriya said, referring to the breakdown in communication between him and the Facebook Security team that eventually led to his public disclosure on Friday.

"I don't understand the presence of a security team if they can't respond to serious security threats properly," he said. "I even sent them an email a couple of days before I made it public stating that I am gonna make it public unless they acknowledge the vulnerability and move towards fixing it."

"You also have to give it up to the media on this one," Borland said. "Seriously, a couple of months of back and forth turned into a couple of hours to cook up a patch as soon as the media got a hold of it."

Join the CSO newsletter!

Error: Please check your email address.
Show Comments

Featured Whitepapers

Editor's Recommendations

Solution Centres

Stories by Lucian Constantin

Latest Videos

  • 150x50

    CSO Webinar: Will your data protection strategy be enough when disaster strikes?

    Speakers: - Paul O’Connor, Engagement leader - Performance Audit Group, Victorian Auditor-General’s Office (VAGO) - Nigel Phair, Managing Director, Centre for Internet Safety - Joshua Stenhouse, Technical Evangelist, Zerto - Anthony Caruana, CSO MC & Moderator

    Play Video

  • 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

More videos

Blog Posts

Market Place