Live data from Hacker News

Psychic Paper: iOS Sandbox Escape

siguza.github.io

21–30 of 61 posts

Re: Psychic Paper: iOS Sandbox Escape

#21
post #4

Once binary plists were introduced, it was only a matter of time before it became the macOS equivalent of windows registry. The fact that Apple is maintaining multiple parsers, and apparently added yet another in response to this bug, just smells bad.

It is far from the Windows registry. Everything is file-oriented, making it easy to backup or wipe away any given plist. The plists themselves are well named and located files that tell you what it is, and things don’t appear in multiple places. No program that gets installed needs to modify any system plists; in fact, apps pretty much never access plist that they don’t own. This last fact makes it so different from…

> Everything is file-oriented, making it easy to backup or wipe away any given plist.

Does cfprefsd react well to that these days?

Re: Psychic Paper: iOS Sandbox Escape

#22
post #6

Maybe we should take this as a lesson that we should use the simplest marshalling format that adequately captures our use cases rather than using a swiss-army knife format like XML.

I’m not sure that there were much better choices available at the time. IIRC property lists date back to NextStep. By the time stuff like JSON started popping up, plists were pervasive all throughout OS X. Typical legacy problem!

Property lists have a JSON format, interestingly.

Re: Psychic Paper: iOS Sandbox Escape

#23

Earlier quoted context omitted.

Problem is legacy software tends to use XML. iOS can be considered legacy at this point. Plists are prevalent at every level of iOS.

So much has been rewritten you can’t really call it legacy at this point.

Fair enough. When I worked for Apple, I would often take a gander at the iOS source code. There was a lot of legacy stuff in there, as in, "do not modify this method, we don't know what it does" in comments. There were certainly legacy components in there from many years back, and it didn't seem like tech debt was on the radar. At least when I was there.

Re: Psychic Paper: iOS Sandbox Escape

#24

Earlier quoted context omitted.

So much has been rewritten you can’t really call it legacy at this point.

Fair enough. When I worked for Apple, I would often take a gander at the iOS source code. There was a lot of legacy stuff in there, as in, "do not modify this method, we don't know what it does" in comments. There were certainly legacy components in there from many years back, and it didn't seem like tech debt was on the radar. At least when I was there.

As someone currently taking a break from reverse engineering the internals of CoreGraphicsServices on macOS, I can't resist saying that iOS can't possibly be as legacy as this.

Re: Psychic Paper: iOS Sandbox Escape

#25

Earlier quoted context omitted.

It is far from the Windows registry. Everything is file-oriented, making it easy to backup or wipe away any given plist. The plists themselves are well named and located files that tell you what it is, and things don’t appear in multiple places. No program that gets installed needs to modify any system plists; in fact, apps pretty much never access plist that they don’t own. This last fact makes it so different from…

> Everything is file-oriented, making it easy to backup or wipe away any given plist. Does cfprefsd react well to that these days?

Most plists are NOT NSUserDefaults / CFPreferences

Re: Psychic Paper: iOS Sandbox Escape

#26

Earlier quoted context omitted.

> Everything is file-oriented, making it easy to backup or wipe away any given plist. Does cfprefsd react well to that these days?

Most plists are NOT NSUserDefaults / CFPreferences

Right, but those would be the closest analog to the registry would it not?

Re: Psychic Paper: iOS Sandbox Escape

#27

Earlier quoted context omitted.

So much has been rewritten you can’t really call it legacy at this point.

Fair enough. When I worked for Apple, I would often take a gander at the iOS source code. There was a lot of legacy stuff in there, as in, "do not modify this method, we don't know what it does" in comments. There were certainly legacy components in there from many years back, and it didn't seem like tech debt was on the radar. At least when I was there.

Certainly there are various bits that are legacy and behave like that, but generally speaking, calling the entire thing legacy is a bit of a stretch. Also considering it started in 2007, I think the definition of legacy is quite short termed here. It also implies a negativity, that if you’re not jumping from technology to technology then you’re doing something wrong. I disagree with that viewpoint.

Re: Psychic Paper: iOS Sandbox Escape

#28

This reminds me a lot of one of the original ways to run unsigned code on the Sony PSP. If you made two directories: SomeApp SomeApp% And then launch the folder with the % sign then the code that checks for valid signatures will check in the directory without the %, but the code that actually launches the binary will still run the code in the directory with the %. So all you need to do is get any binary with a valid…

yeay the god old days when stuff was released on March 33rd and wololo had an active community

Re: Psychic Paper: iOS Sandbox Escape

#29
post #17
post #4

Once binary plists were introduced, it was only a matter of time before it became the macOS equivalent of windows registry. The fact that Apple is maintaining multiple parsers, and apparently added yet another in response to this bug, just smells bad.

I thought the Windows Registry was reviled because it was a single database that held everything from user customization to device driver and boot configuration, in one file. It was contrasted with the Unix/Linux way, which was single-purpose text files, with the system-wide configuration in protected /etc files, and user-specific configuration in ~/. files Plists are the best of both worlds. They're a file format ra…

I meant it in the sense that it turned into binary blobs that became less accessible for humans to manage, and a place where both Apple and 3rd party vendors started hiding magic stuff stored who-knows-where in a format that isn’t easy to grep / find.

Re: Psychic Paper: iOS Sandbox Escape

#30
> I just hate GUIs for development, especially when you Google how to do something, and the answer is a series of 17 “click here and there”s that are no longer valid because all the GUI stuff moved somewhere else in the last update.

It's not just developer tools that suffer from this problem. I opened iMovie recently after not playing with it for almost 10 years, and was so flabbergasted at how everything worked. Took me almost 2 weeks to sync my own song to a series of cut video clips (cut out of larger videos, which was the main problem). Maybe I'm just an idiot, but googling around for solutions ended up with either out-of-date answers or completely unrelated problems.

I just wish that the app would use even one or two conventions from the 40-50 years of GUI research that has been done...

Post reply on HN