Instagram iOS session hijack
gist.github.com
gist.github.com
"Hi Stevie,
This issue has been reported some already so unfortunately cannot reward you, instagram is working to get https for all endpoints. Its a pretty high barrier to exploitation to already sniffing someones traffic however.
Thanks,
name removed
Security
Facebook"
And here I am sitting in the Apple Store around the corner from my apartment watching various cookies whizz past my screen.
I don't agree the barrier to exploit is high. All it takes is one sufficiently skilled person to release a tool so simple even a script kiddie can use it. At that point Pandora's Box has been blown apart. The obvious precedent for this is Firesheep (now sadly not functional) from back in 2010.
And that's why this was made :-)... http://en.wikipedia.org/wiki/Firesheep
Maybe you should contribute instagram-sniffing to it :) https://github.com/codebutler/firesheep
We've been steadily increasing our HTTPS coverage--Instagram Direct, for example, which we launched in late 2013, is 100% HTTPS. For the remainder of the app, especially latency-sensitive read endpoints like the main feed and other browsing experiences, we're actively working on rolling out HTTPS while making sure we don't regress on performance, stability, and user experience. This is a project we're hoping to complete soon, and we'll share our experiences in our eng blog so other companies can learn from it as well.
@wodim I adhered to the FB responsible disclosure procedure. FB replied saying they're already aware of the issue and closed the ticket.
An unfixed security vulnerability is still an unfixed security vulnerability, no matter how many people discover it in the interim. By refusing to coordinate with the new submitter, the new submitter does not know if the vulnerability will ever be fixed and is reasonably justified in using public disclosure.
The one case where refusing to coordinate with the new submitter is reasonable is when the new submitter learned about the vulnerability from the original submitter, which means that the original submitter has violated responsible disclosure. In that case, nobody would deserve a reward.
This is rare for bug bounty rewards. All the programs I am aware of only reward the first reporter.
> By refusing to coordinate with the new submitter, the new submitter does not know if the vulnerability will ever be fixed and is reasonably justified in using public disclosure.
That's kind of what I'm pointing out here. We are missing information about what Facebook actually said and when it was said. The "we already know about it" response could mean "we know about it and are working on fixing it" or it could mean "we know about it and we don't care". In the former case, it is not responsible to publicly disclose the issue until it is fixed. In the later, it is.
A separate scenario is if the company is taking a long time to fix the issue. This is obviously subjective, but in my opinion it is understandable for a reporter to publicly disclose a long-standing issue in an attempt to force the company to act.
STOP USING THE TERM RESPONSIBLE DISCLOSURE. It serves only to frame full, public disclosure as "irresponsible disclosure", which is false.
Now back to this gist.
Is he responsible? It depends on how the situation was played out.
Based on what OP said:
* He found this 216 days ago and wrote about it as a comment on HN
* He didn't say whether he reported that day but he recalled Instagram was making HTTP request a year prior to that day he wrote the comment
* He didn't tell us when he report this issue to FB. Yesterday? Last week?
* FB said they are aware of this situation and closed the ticket. Like someone else said here, "closing" has different meanings. I've never reported any vuln to FB so I don't know how that works. But on HackOne, particpating program can close a ticket and set the ticket to "Not Applicable" meaning someone else has already reported.
So the decision factor is:
* when was the first report submitted by OP? Yesterday? Last week? 3 months ago? 216 days ago?
* if it was very recent, OP doesn't know the exact time the last duplicate report was sent out. Give FB a little more time and ask FB again in a week or so.
I did say in my other comment fixing this issue should be pretty trivia for Instagram as an outsider, but I also should acknowledge any major change to infrastructure should have a proper audit and roll out.
edit:
One last point. If OP thinks he's doing the right thing, let it be. There are too many things unknown to me so I am just listing all the possible consideration. I have tons of bug bounty reports unfixed for 3 months on various sites and I still email those sec teams back and forth to look at progress. It's an individual decision and with every decision comes a consequence to bear.
No, sharing links to published data on the public, unauthenticated web is not wrong.
People accidentally leak password in source code. Instead of telling HN everyone come look at this embarrassing source code, first thing to do is to contact source owner to remove it. Yes, there is cache and Internet archive, but don't publish that until resolved is the proper interpretation of responsible disclosure.
It sounds like Facebook Security gets a lot of pushback from the developers. Certain things like coffee shop attacks and a lot of other REAL ISSUES get no notice for a long time. It took up until last year to get a damn HSTS header.
I actually reported an issue today about a security practice they implemented completely incorrectly. I got a response back that it was not meant for any actual security.
In theory it's unacceptable, but in practice this is a big company with thousands of employees and a lot of moving parts. Small changes can be hard to make....which to get back to my original point is why facebook seems to just ignore a lot issues but keep the pipes open for the occasional big one.
More interesting would be to take over a network (MITM style) and set up iptables to route all connections to Facebook IP's to a local webserver (DNAT target helps). Then you host a phishing FB page and soon you have logged emails and passwords from unsuspecting users. I think this can actually work even if Facebook does default to HTTPS, because users never actually reach Facebook itself.
The certificate won't match. I don't know how many users will click past the big red warning page most browsers show, but I don't have much sympathy for them if they do.
Actually, in that case, modern browsers would completely refuse to send you to the http site, even if you typed it in explicitly. All thanks to Facebook's 90 day HSTS header [0].
They could improve their security further by getting Facebook into the Chromium preload list. That list, which is shared with Firefox, eliminates the need for an initial, clear connection.
[0]: https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
[1]: https://src.chromium.org/viewvc/chrome/trunk/src/net/http/tr...
Now even youtube uses SSL.
If the user has successfully reached Facebook in the past 90 days, then their browser will have seen FB's HSTS header, and refuse to connect without TLS... provided they're not browsing with IE. :(
Step 1 of securing an API: Use SSL.
I am not sure why Instagram isn't moving all calls to HTTPS. Instagram itself is not as complicated as Facebook and shouldn't really be bounded to HTTP so badly.
They can easily do 301/302 redirect to HTTPS, then perform HSTS (for browser, not for API calls) in addition and let the proxy like nginx handles it to their usual port 80 requests. Problem solved.
How much more work do they need to do to shift from HTTP to HTTPS? I just don't get it.
We also terminate our SSL at the ELB level, which lessens the CPU load on nginx. -- http://instagram-engineering.tumblr.com/post/13649370142/wha...
http://www.zdnet.com/instagram-finally-picked-up-and-moved-f...
http://instagram-engineering.tumblr.com/post/89992572022/mig...
After doing `sudo tcpdump -In -i en0 -s 2048 -A dst i.instagram.com`, and using every instagram feature from my iPhone, nothing happens in the terminal.
```
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on en0, link-type IEEE802_11_RADIO (802.11 plus radiotap header), capture size 2048 bytes
```
I try running with -v and -vv, but no difference (except it doesn't suggest running in verbose more).
After hitting C-c to stop the program, it outputs
```
^C
0 packets captured
29816 packets received by filter
0 packets dropped by kernel
```
So there's a lot of things being captured, but the filter does not catch my Instagram activity. I'm logged in there, refreshing, getting images, getting followers/following, etc.
EDIT: oh shit, HN doenst do markdown. That sucks.
You can also prepend your lines with two spaces for pre-formatted text/code
EDIT: I'm not sure -In work with default drivers, but I'll test with my private Mac at home later.
1. Plug in your iPhone/iPad into your computer via USB cable
2. Go into Xcode Organizer and find your iDevice's UID
3. Hop over to terminal and type 'rvictl -s <UID>'
4. Type 'sudo tcpdump -n -i rvi0 -s 2048 -A dst i.instagram.com'
5. Open Instagram on the device, and the packet info should appear in terminal. The rest is the same
6. When you're done you can type 'rvictl -x <UID>'Never could get any traction with Instagram to look into the issue.