News for hackers. Stuff that matters.
Re:Apple starts rejecting apps with “hot code push” features by menckenjr on Wednesday March 08, 2017 @05:51AM (#13819418)
This needs a little elaboration. Cached Javascript in any hybrid app is a security hole because that can be exposed through a jailbreak. Depending on how much of your business logic you've pushed into the JS layer to enable that "80% code sharing" that makes managers go all tingly you may be exposing all kinds of things - cached access tokens, API keys and whatnot - to anyone who wants to install your app and mine its secrets.
Re:Apple starts rejecting apps with “hot code push” features by woah on Wednesday March 08, 2017 @07:52AM (#13819847)
Huh? Are you saying that the security hole is that a user could see stuff in the memory of their own phone?
Re:Apple starts rejecting apps with “hot code push” features by menckenjr on Wednesday March 08, 2017 @09:23AM (#13820384)
Or someone that steals your phone, or picks it up when you lose it somewhere. Yes, there's the lock screen and passcode but...

http://www.wikihow.com/Bypass-iPhone-Passcode

Re:Apple starts rejecting apps with “hot code push” features by a_t48 on Wednesday March 08, 2017 @12:06PM (#13821582)
At that point your phone is fucked, anyhow. If you've lost physical control of the device and an attacker has broken the lock, you're compromised in much bigger ways.
Re:Apple starts rejecting apps with “hot code push” features by mikewhy on Wednesday March 08, 2017 @11:27AM (#13821285)
"This bypass won't work on iPhones running iOS 9.3 and up"
Re:Apple starts rejecting apps with “hot code push” features by menckenjr on Wednesday March 08, 2017 @01:36PM (#13822435)
Re:Apple starts rejecting apps with “hot code push” features by marcinzm on Wednesday March 08, 2017 @08:27AM (#13820064)
How is this any different from native code? Afaik, you can access the native compiled source code of an app on a jailbroken phone. Sure it's more of a pain to parse through but security through obscurity isn't security.
Re:Apple starts rejecting apps with “hot code push” features by jameside on Wednesday March 08, 2017 @12:18PM (#13821678)
Definitely, running "strings" on a binary is about as easy as finding the JS for a hybrid app (WebViews or React Native). Depending on your experience it could be easier to extract API keys from an IPA than from JS.

In either case the root issue is about sending secrets like an unscoped API key to the client. "Client secret" is an oxymoron in this context regardless of the programming language.

Re:Apple starts rejecting apps with “hot code push” features by menckenjr on Wednesday March 08, 2017 @01:45PM (#13822510)
You'd have to know a few things first, like (1) the IPA is a ZIP file, (2) the ZIP file is actually of a directory and (3) you can dump the actual code in the JS files (if they're in the bundle directory) much easier than you can look for strings from the binary that might look like an API key.

The API key is actually the least of the hazards, since you can hide that in the keychain. Having source code for your business logic shipping in your app is not good; having it be hackable business logic (by changing the JS in place) is very not good.

Re:Apple starts rejecting apps with “hot code push” features by jameside on Wednesday March 08, 2017 @02:08PM (#13822703)
Shipping source code with business logic (assuming the definition of source code includes obfuscated JS) is how the entire web works today! With WASM the code that is shipped will be even further away from the original source code and really not so different from downloading ARM from the App Store or Java/ART bytecode from the Play Store.
Re:Apple starts rejecting apps with “hot code push” features by menckenjr on Wednesday March 08, 2017 @02:48PM (#13823113)
Not the entire web. eBay and Amazon don't put all their algorithms in the browser; PayPal doesn't either. They hide their company jewels behind their API where they're a little more secure. What you see in the browser is the presentation layer code.

Hybrid apps could achieve that same kind of relative business logic security, but at the cost of pushing more and more of the actual business logic behind an API and not in the JS in the app. At that point, the benefits of code sharing (such as they are) get fewer and fewer since it's really pretty easy to write API code in Objective C, Swift, Java or Kotlin.

Re:Apple starts rejecting apps with “hot code push” features by menckenjr on Wednesday March 08, 2017 @09:19AM (#13820365)
You aren't "parsing" through compiled (and linked) code; you're decompiling it, which is a much trickier thing to do and get right. Having your app logic in Javascript in the sandbox cache is just serving it up on a plate.
Re:Apple starts rejecting apps with “hot code push” features by trakout on Wednesday March 08, 2017 @09:56AM (#13820616)
I'm having trouble seeing this as a valid argument when applied to cached JavaScript within a mobile browser. The same security practices apply.
Re:Apple starts rejecting apps with “hot code push” features by menckenjr on Thursday March 09, 2017 @09:43AM (#13829555)
They do, and it's for this reason that the really important stuff isn't in the web page at all - it's behind the company's API. The "business logic" that you can safely push out to a browser or hybrid app is somewhat limited, which means there is a hard upper limit on the real code sharing savings you can get with hybrid apps versus full native.
Re:Apple starts rejecting apps with “hot code push” features by scarface74 on Wednesday March 08, 2017 @07:05AM (#13819679)
You as an end user jailbreaking your own phone is not a "security hole".

I'm not aware of any non-tethered jailbreak for iOS 10

Re:Apple starts rejecting apps with “hot code push” features by nb777 on Wednesday March 08, 2017 @07:17AM (#13819721)
I think he's talking about application wide (not user specific) "secrets" in the javascript layer.
Re:Apple starts rejecting apps with “hot code push” features by menckenjr on Wednesday March 08, 2017 @07:27AM (#13819752)
Yes, I am. As for untethered jailbreaks, http://pangu8.com/10.html mentions a few.
Re:Apple starts rejecting apps with “hot code push” features by davewritescode on Wednesday March 08, 2017 @12:29PM (#13821769)
Yes it is, jailbreaking bypasses critical security features of your phone. Granted, it's required to run certain kinds of software but there are better ways to run your own code on your phone (like getting your own developer certificate) that preserve the security model.