163 points · by rntn · 2y ago · 72 comments
Specifically, we're using context-sensitive and Turing-complete parsers up and down the software stack, which (at the Turing-complete level of complexity, says Gödel) guarantees that determined attackers can expect to discover an exploitable "weird machine."
Folks should watch this panel and other talks by Meredith L. Patterson (co-collaborator and wife of the late Len Sassaman) and Sergey Bratus (previously at DARPA, now Dartmouth) to get a sense of the problem and the solution.
https://youtu.be/8tAxHrntBJs?t=806
These folks are saying that, just as the industry handled over-the-wire insecurity with TLS and e2ee (and not rolling our own crypto) we can handle device exploitability with well-described data and automated parser generation from those descriptions (and not rolling our own parsers, which these folks say should be verboten for the same reason as rolling one's own crypto: parsing is too hard for non-specialists to get right).
Moreover, we don't have to redo the whole stack for it to be meaningful: big players can start using this tooling (e.g. https://github.com/UpstandingHackers/hammer) for parsers handling data from very untrustworthy inputs, such as message payloads sent to a phone number.
Apple's Lockdown mode is a step in this direction, though in such a crude, "burn the village" way that it makes the phone almost unusable. But sacrificing usability shouldn't be necessary with current methods. If these folks can make safe parsers for PDF (https://www.darpa.mil/program/safe-documents) it should be possible for anything.
Another great talk: https://www.youtube.com/watch?v=3kEfedtQVOY
I hope readers will be able to look past this one sentence in your post and take a good hard look at the rest of it, which is quite important.
In real conditions, static analysis and theorem proving can verify lots of safety properties. See e.g. Astrée & Airbus, or F* and Project Everest.
IMHO, the solution is to use static analysis in conjunction with DSLs that have restricted semantics to make static analysis and hand-written proofs easy.
You're referring to verifying 'lots' of safety properties, I referred to verifying that an algorithm does everything it's supposed to. These are not the same thing in the general case.
My actual point was that generic incompleteness and undecidability theorems do not guarantee that any given program must be defective.
The thrust of langsec is in fact to parse all inputs at the boundaries, using algorithms with known properties, that is, ones where it's feasible to prove that they'll halt, won't overrun buffers, and so on.
There is a "problem of political will" but also the problem of stupid SW which tries very high to decode everything you throw at it. Some time ago it was "file format not recognized", nowadays it is a root exploit.
> If these folks can make safe parsers for PDF (https://www.darpa.mil/program/safe-documents) it should be possible for anything
It is, but it's very expensive. That's why a lot of this research has been getting billions in funding for 10-15 years now in order to build out the underlying ecosystem needed to harden the entire stack
https://www.versobooks.com/en-ca/products/2684-the-palestine...
https://www.euractiv.com/section/politics/short_news/polish-...
At that moment it's safe to assume that all EU govs use Pegasus against the public in general.
https://www.dw.com/en/spain-court-reopens-investigation-in-p...
https://notesfrompoland.com/2023/12/18/polish-state-tv-order...
Law and justice are a particularly extreme example.
Either way, I think it's very reasonable to *do* assume the worst of governments - as in we should strive to design the system to be able to withstand as much malice from people in power as possible.
Sure there were judges who opposed PiS, but there were plenty who did not. This guy, who is now in Belarus, is an example of one of PiS's pet judges
https://notesfrompoland.com/2024/05/06/polish-judge-flees-to...
It's safe to assume that any mobile phone OS will inevitably be targeted. There are always going to be unpatched and uncaught vulnerabilities, and the market for finding these vulns are very hot.
The bigger question is why do you think you'd be vulnerable to attack by a nation-state? If you are that prominent, you are screwed anyhow.
This article by Mickens is fairly accurate [0]
[0] - https://scholar.harvard.edu/files/mickens/files/thisworldofo...
Everything which can fit into a pocket and has a HTML5 browser?
FYI, I know about how extremely vulnerable average cellular baseband is (and that it would often use unprotected or weakly protected DMA). Let's assume the device in question doesn't have one of these.
Just about every phone (smart or feature) is running some flavor of Unix (iOS/BSD for Apple, Android/Linux for most other smartphones, and KaiOS/Linux for feature phones).
The 1998 style Nokia brick is functionally non-existent as there is no financially viable demand for a product like that anymore.
The markets that are feature phone driven (much of Africa, poorer regions of South and Southeast Asia) are also heavily WhatsApp dependent, so the mobile OS needs to be lightweight but also support modern app functionality - which lends itself to the embedded Linux use case.
Also, no matter how much you modify and QA code, inevitably some bug will arise, and will be open to exploitation.
Sure, but it runs Android Go (embedded Android) or KaiOS (embedded Linux) out of the box.
Any vulnerabilities that arises in Linux can also be weaponized on those OSes as well depending on when the OS image was deployed and whether or not the OEM supports upgrades and patches (generally they don't)
Civil society can be understood as the "third sector" of society, distinct from government and business, and including the family and the private sphere. By other authors, civil society is used in the sense of 1) the aggregate of non-governmental organizations and institutions that advance the interests and will of citizens or 2) individuals and organizations in a society which are independent of the government.
https://en.wikipedia.org/wiki/Civil_societyIt does not. You are conflating:
civil 2b: adequate in courtesy and politeness : MANNERLY
with
civil 4: of, relating to, or involving the general public, their activities, needs, or ways, or civic affairs as distinguished from special (such as military or religious) affairs
https://www.merriam-webster.com/dictionary/civil
You can see that 'uncivil' does not include in its meanings an antonym of civil 4:
https://notesfrompoland.com/2023/12/18/polish-state-tv-order...
This was a pretty clear and obvious abuse of the state apparatus against political opponents.
The whole populace being under surveillance is a much worse outcome than the chance of some politician being assassinated being relatively higher. Mass surveillance to prevent the latter seem absolutely in the worst interests of the average citizen; spying on people to protect the elites is what every nasty dictatorship does.
It's not all or nothing as far as the words "legal framework" goes.
The problem is, when the vulns exist due to hand-rolled parsing, you don't get to choose who the attacker is.
It would be very surprising to see Russia using Western tech such as Pegasus, you can't just outsource your spy tools to your enemies. They most likely have as powerful if not more technologies.
This whole NSO spectacle is more about the subversive BDS movement than a genuine care about political suppression and spying on the citizens.
Israel is very lenient towards Russia.