Live data from Hacker News

Peach App Token Reuse Flaw

hakobaito.co.uk

31–35 of 35 posts

Re: Peach App Token Reuse Flaw

#31
post #23

So the article title could be changed to "Peach API has replay vulnerability"? I haven't actually tried this yet but can someone confirm the app has pinning? If so, thoughts on how he sniffed the original traffic and ran the replay?

If you have a jailbroken iOS device you can use SSL Kill Switch [0] to disable certificate pinning and get the traffic with MITMproxy [1] or Charles.

[0] https://github.com/nabla-c0d3/ssl-kill-switch2 [1] http://mitmproxy.org/

Re: Peach App Token Reuse Flaw

#32
post #9

Earlier quoted context omitted.

> While I agree that the tokens must be expired on logout Is there really that much additional security over deleting tokens locally when logging out, but expiring all existing tokens (using a timestamp) on password change? Blacklisting individual tokens requires storing them in the db and then looking them up each time a user logs in. It seems like given the app already uses TLS, the tiny security gain isn't big eno…

I agree although I think about it more in terms of development and maintenance effort. There's plenty of other relatively computationally and IO intensive activity happening during login so I can't see an extra select having a tangible impact to performance.

The issue isn't tokens getting created on login, it's them getting validated on every request. That's already 40-50ms, even without the db hit each time.

Re: Peach App Token Reuse Flaw

#34
post #3

While I agree that the tokens must be expired on logout, it's hard to gain access to the token via MITM because the API requests are performed over TLS [0]! This point seems glossed over in the post. You would need access to a client app directly to be able to inspect its storage or sniff the traffic yourself to determine the token being used. Access to an unencrypted client device is usually game over for most apps'…

Not that hard. It's pretty easy to social engineer a typical not-HN user to install an arbitrary root cert to the trusted store.

Another commenter mentioned certificate pinning, and it Peach does this, and refuses non-secure API requests, I'd agree it's overblown. It is a vulnerability, yes, but where's the exploit?

An honest query to add on: wouldn't a nonce-style expiration digest be sufficient to prevent this hypothetical reply attack from being effective once the nonce expired?

Re: Peach App Token Reuse Flaw

#35
post #21

Earlier quoted context omitted.

On windows? Try fiddler: http://www.telerik.com/fiddler

Fiddler works on all platforms. It is my proxy cap tool of choice.

Oh, very cool. Last I used it (just after Telerik acquired them), it was Windows only.
Post reply on HN