SafeUM
Home Blog Services Download Help About Recharge

Axarhöfði 14, 110 Reykjavik, Iceland

Iceland - 2015
SafeUM
Blog
Services
Download
Help
About
Recharge
Menu
Archive
TOP Security!
5 Sep 2014

RTFM 0day in iOS apps

Intro: Normal people spend their nights watching movies, reading articles, socializing or (yes, I know it's odd) sleeping.

I spend my nights reading RFCs and pentesting various applications/services.

One night I was randomly reading the tel URI scheme RFC as I am fascinated by old relics that are still used today, their flaws and the way people never read the RFC which leads to RTFM pwnage as I call it.

Let's try it out

As I finished reading the tel RFC I looked at my iPhone and said: Cool, let's try it out!. I instacoded a small html page and loaded it in Safari, here is the code:

As I clicked the click me link I was prompted with a nice dialog asking me if I really want to call 0000.

Apple

I didn't have much as this point and I was not looking for a security issue, just trying out the tel thing. As Apple likes to change stuff and make it better I thought: Hey, maybe Apple has its own RFC for tel!. And I was right: here it is.

The one line I fall in love with

Apple's documentation on the tel scheme is really short and easy to read. While reading the first paragraph something caught my attention:

When a user taps a telephone link in a webpage, iOS displays an alert asking if the user really wants to dial the phone number and initiates dialing if the user accepts. When a user opens a URL with the tel scheme in a native app, iOS does not display an alert and initiates dialing without further prompting the user.

So if I click the link in Safari I get the prompt asking me to confirm my action, if I click the link in a native app's webView it doesn't ask and performs the action right away (makes the call).

Do people read documentation?

No. And it's bad.

I instantly assumed people do read documentation so there was no way a big player like Facebook, Twitter, Google, LinkedIn, etc. would do such a silly mistake... but I was wrong.

Testing on Facebook Messenger

I sent the page link through Facebook Messeger, clicked it to get to the webView (social apps don't want you to ever leave the app and that's why the use webViews) and then clicked the sneaky click me link:

So clicking on the link initiates the call right away. Hold on... that's bad.

Making the link click itself

A lot of people make fake assumptions such as links are only clicked by users. Using some sneaky-beaky-like javascript I quickly made the link click itself:

Note: you can also do this server-side by redirecting the user to a tel location: header("Location: tel://0000")

So how is this a security issue?

I can make you call a phone number by clicking a link in any app that didn't implement custom handling for tel links.

Imagine I register a premium-rate phone number and then I send you the link on Facebook Messenger or Twitter. You click it and call me, I pick up instantly and charge you.

Facetime: "Hello pretty!" attack

I just made out the name for this attack, it's cool right? Facetime also had a URL scheme just like tel, and you can use it the same way. Needless to say it's vulnerable to the same exploit.

Facetime calls are instant. Imagine you clicking a link, your phone calls my (attacker) account, I instantly pick it up and (yes) save all the frames. Now I know how your face looks like and maybe where you are. Hello pretty!

Yes, it works. I tried.

This is wrong! Who did the mistake?

Well Apple did not. People didn't read the documentation at all. The first paragraph of the tel docs says what, when and how happens and also clearely specifies that However, a native app can be configured to display its own alert.

Who didn't RTFM?

Facebook Messenger

Gmail

Google+

Everybody...

Beware

While I only tested on a few apps which are big names, it is safe to assume that the smaller teams and platform haven't even thought about preventing this.

Tags:
Apple information leaks iOS 0day
Source:
Algorithm.dk
2052
Other NEWS
3 Jul 2020 safeum news imgage An encrypted messaging service has been infiltrated by police
4 May 2020 safeum news imgage Two-Factor Authentication ​What Is It and Why You Should Use It
12 Dec 2019 safeum news imgage Encryption is under threat - this is how it affects you
4 Nov 2019 safeum news imgage Should Big Decisions Be Based on Data or Your Intuition?
7 Jun 2018 safeum news imgage VPNFilter malware infecting 500,000 devices is worse than we thought
4 Jun 2018 safeum news imgage Hackers target Booking.com in criminal bid to steal hundreds of thousands from customers
1 Jun 2018 safeum news imgage Operator of World's Top Internet Hub Sues German Spy Agency
30 May 2018 safeum news imgage US says North Korea behind malware attacks
29 May 2018 safeum news imgage Facebook and Google targeted as first GDPR complaints filed
25 May 2018 safeum news imgage A new reason to not buy these cheap Android devices
24 May 2018 safeum news imgage Flaws in smart pet devices, apps could come back to bite owners
23 May 2018 safeum news imgage Google sued for 'clandestine tracking' of 4.4m UK iPhone users' browsing data
21 May 2018 safeum news imgage LocationSmart reportedly leaked phone location data onto the web
18 May 2018 safeum news imgage The SEC created its own scammy ICO to teach investors a lesson
17 May 2018 safeum news imgage Thieves suck millions out of Mexican banks in transfer heist
All news
SafeUM
Confidential Terms of Use Our technologies Company
Follow us
Download
SafeUM © Safe Universal Messenger

Axarhöfði 14,
110 Reykjavik, Iceland

Iceland - 2015