Credit card skimming scripts using WebRTC found on popular shopping sites (opens external site)
View full thread · View on Hacker News
To get push notifications on iPhone or iPad, add Hack and Chat to your Home Screen: tap Share → Add to Home Screen, then open the installed app and enable push in Settings.
View full thread · View on Hacker News
I'd take more clunky over what we have any day of the week.
>A toy example, but HTML+CSS is Turing complete.
And it shouldn't be. Problem fixed.
>Even PDF, a static document format with no real user interaction, has a programming language (PostScript) embedded.
Given the millions of PDF exploits, that's likely the worst example one could give in support of this.
Replies (1)
For example, if you take away all loops and branches from JS, but still allow it to send network requests, you'll no longer have a Turing complete language (well, you'll have to also remove lambda functions and some other stuff; Turing completeness is complicated). But have you reduced its exploitability? Perhaps marginally, but no more than that.
You're barking up the wrong tree.
> And it shouldn't be. Problem fixed.
Why should it not? What changes would you make to ensure it's not? And what problem would that fix?
For the record, it's really quite difficult proving a system is not TC. See [1] for a list of examples. Note that I disagree with the "security implications", though it's worthwhile reading. To me, TC is more of a mathematical curiosity of a complex enough system; without other problems such as bad sandboxing or other exploitable features, it has no relevance for security.
[1] https://gwern.net/turing-complete#surprisingly-turing-comple...
Replies (1)
Who said we should still allow it to send network requests? Just to the parent page would be enough.
And my suggestion was stronger: that we can also drop JS and other functionality from pages handling payment forms altogether.
Replies (1)
> run random code on your computer. It is just not acceptable
> Servers should deliver just data
> Everying else is nuts.
You didn't mention network access as a problem once.
As I've tried to explain here, code execution and network access are entirely orthogonal issues. The latter is a problem (as is downloading data from other servers than the "parent page"), the former is not.
If you're serving a static PDF or even a static SVG, you're "executing random code" on your clients' computers. Why is that not a problem? Or is it, would you disallow payment pages from embedding SVGs as well?
Note also that just using a <img> tag, you're sending network requests, potentially to other servers, so disabling JS isn't enough to prevent that. And I'm fairly certain, that if you'd design a "static" prebuilt library of html entities, complex enough to support even a subset of what we've seen JS used for in shop interfaces for example, that'd be powerful enough to do conditional network requests, et cetera.
Replies (1)
Well, isn't it implied from "Servers should deliver just data"?
Code to be executed is not data. And without that, who would do the random network access, since a mere "payment entry/submit" form wouldn't be able.
>If you're serving a static PDF or even a static SVG, you're "executing random code" on your clients' computers. Why is that not a problem?
Allowing code in a format like PDF is already a problem. Same for SVG. Strict markup, with no references and dynamic instructions would be fine.
>
Or is it, would you disallow payment pages from embedding SVGs as well?*Totally. I'd even go as far as make them a standard, browser provided, form, and that's it. The store can send the shop's title and logo, some hero image, static images of each product, the price, if there was a discount, tax amounts, etc.
Then from the item list, to the "x" buttons to remove an item or "+" to increase the units, to the total amount, be rendered by the browser in a standard format for every shop on the web, similar how a mail app would show every mail as a set of "from", "subject", "body" textboxes.
Replies (1)
Code is data. Executing code is displaying data, and displaying data requires executing code.
> The store can send the shop's title and logo, some hero image, static images of each product, the price, if there was a discount, tax amounts, etc.
We've already established you need to disallow SVG. JPEG XL is another widely supported TC format, so that goes as well. [1]
> who would do the random network access
As I already mentioned, suppose the shop wants to serve their logo or product images from a CDN, to spread the load geographically or something. That's either a "random" network access to a different server, or it's just not allowed for the shop to do that.
> the price, if there was a discount, tax amounts, etc.
The "etc." is doing a lot of work here. As you add more and more features, you'll end up implementing a DSL for specifying a price listing. Then you'll have to take some care to ensure it's not accidentally TC, if that's something you care about.
Just because it's a fun thought experiment, suppose a shop wants to add an offer such as "buy 3 apples, get one free pear". If you allow that to your price list DSL, you've pretty much got a Petri net [2]. If you add precedence between offers (if both offer 1 and 2 apply, offer 1 is used), I think that would make it a Turing complete system, i.e. by designing the offers properly, the products you get at the end could be any function of the quantities of products you're buying. A silly example, but a fun one.
[1] https://dbohdan.com/jpeg-xl [2] https://en.wikipedia.org/wiki/Petri_net#Extensions
Continue this thread (1 replies) →