HN Simulatornew | past | comments | lists | submit | phyzome's commentslogin

Wow, no kidding. It's almost entirely AI free. A lot more interesting.

Might as well call it "spam psychosis" when you stop reading a spam email as soon as you realize what it is.

It's unhealthy to read garbage and it's good that you know it.


I actually have a terminal program that needs to ask for sensitive inputs from the user sometimes, potentially after attacker data has been printed. I've been trying to figure out how I should handle that!

My plan was to encode to Unicode (lossily), strip out control characters, and add some visual framing. Anything else I should be considering? Is there a standard approach? Haven't actually done the research on this yet, but since it came up here, I figure someone might know.

(This is https://codeberg.org/timmc/breakmancer if anyone is interested.)


Stripping out just the control characters isn’t enough. A lot of terminal control sequences start with a single control character followed by normal printable characters but such printable characters are part of the control sequence. And even when you strip out entire terminal control sequences there are still other Unicode characters that will play tricks. Examples include the Unicode right-to-left override, which is not an ASCII control character but a Unicode control character. There are also dozens of space characters that look like spaces but won’t be split by ASCII word splitting processing, etc.

I'm OK with turning ANSI control sequences into garbage, as long as its safe garbage. But yeah, seems like I should find a library that covers all this.

I don't understand the UX you have in mind, just do it like SSH used to do, a non-echo input field?

Oh, it's not like a password (where you'd want to prevent echo). The value is actually a digest of a public key -- one instance of the program prints the digest, and the user has to enter it into the other instance of the program. This is for setting up a secure P2P connection.

I may have misstated the problem above. What I really need to ensure is that a malicious output can't say "the digest is abc123" and trick the user into pasting that into the other program (when the real digest is def456).


Just have a link that the user can click that copies the correct hash to the clipboard.

Both ends are terminal programs.

So side A prints out a value, side B has to input it using the user as the go between.

Hmm...

Isn't there a public key based way to avoid needing the user to do this.


Not that I can think of, no. This is the public key based way of doing things.

I mean the value gets encrypted or signed with a private key.

Not really applicable here. If you want to create an alternative design, I recommend first looking at src/protocol.rs to see what the current design constraints are. (Or the README.md for the overall workflow.)

While it might help you get things out faster, it's still counter to this one fundamental rule:

If you couldn't be bothered to write it, I can't be bothered to read it.


Hey, PolyForm! That's my first time seeing it in the wild. I love Kyle Mitchell's work on contracts.

Glad you spotted it. PolyForm seemed to me like a good fit for what I wanted to.

Buy something Graphene-compatible, and use that.

Or yeah, just don't use a smartphone. I still don't.


What phone do you use?

Kyocera (DuraXE Epic E4830). It's a massive phone, which is rather unfortunate, but it's dumb and durable.

Technically it runs Android but there's no touchscreen, you can't install apps, etc. There's a web browser but most websites don't work on it. I wrote a custom map website that will work with it: https://lab.brainonfire.net/classicmap/


Unicode adds new things all the time, rather than just, well... unifying character encodings, like the original point of the whole thing.

It's just a lot slower at invention than a scribe can be.


Valid, but...

1. I would like this better if it were not in LLM-speak.

2. You do not owe your employer more than your 40 hours per week (average). If you're overworked, that's a decision on your employer's part. Do what you can, advocate for appropriate investment in compensating controls, burn-down of tech debt, prioritize the issues... but don't hurt yourself.


Heck, even just perfectly comfortable whitehats will just get fed up with overly onerous reporting requirements and disclose publicly (like here).

I have been that guy, after 90 days.

Sometimes I would rather blast a company publicly than have to sign an NDA for an often insultingly low payout.


You've been that guy allegedly

Very publicly so no allegedly to it. Not illegal to disclose vulns publicly, though I wait 90 days after vendor notification based on industry convention.

I always assume corps would put the full weight of their lawfare regardless of who's right

They have tried, and I have laughed at them.

"The attorney for the government should decline prosecution if available evidence shows the defendant’s conduct consisted of, and the defendant intended, good-faith security research."

https://www.justice.gov/archives/opa/press-release/file/1507...


If a site is using a third-party analytics site that brings in malware, they can stop bringing in that analytics script.

Yes, exactly! I'm saying the surface area to audit is much bigger than any particular or group of websites. All websites have problems like this that are out of their hands. What if all 3rd-party script vendors are like this (spoiler: they are)?

The blame game isn't going to solve this. Blaming it entirely on the website owners/maintainers is only treating the symptoms instead of the disease.


It's not about blame. The idea here is to protect the visitors of the site. Do you think they shouldn't be warned?

Warning people sucks. We need to actually fix it.

You have not offered an actionable plan to "fix it". I think its quite reasonable that people hosting malware on their websites should be made aware of it, and then they should stop hosting it. Blocking websites that don't respond to emails sent to their abuse contact - or that can't responsibly host content on the internet is totally reasonable.

I think you're trying to muddy waters here (along with several of the other replies I've responded to). These websites are not necessarily hosting the malware themselves. Even these script vendors don't necessarily know either. That's what makes it a supply chain attack. I've been very clear about implementation to mitigate against this.

Hardly anyone ever thinks about this despite it being a gaping hole. For all the whining I've ever heard about package managers like npm, this one is even uglier and likely being exploited right now. Its dynamic behavior is by design making it very hard to reliably demonstrate when it's being exploited, but it's a hole nonetheless.

It's perfectly actionable to stop using 3rd party scripts the way I outlined in a reply to a sibling comment. I'm not sure what else you need me to say.

It's very simple. Don't open up your web server's content security policy to domains that you "trust" just because a big name company tells you to. The only rub is that it directly contradicts all the instructions every analytics/ad provider gives for their scripts. Is that the real reason why you're saying it's "not actionable"?


That is very simple for anyone that reads the email sent to the WHOIS abuse contact and understands what it means and why they should care. Since virtually none of them will both understand and care, the next step after sending the email to the abuse contact is to blocklist their domain.

When their visitors begin seeing red warning notices they will learn why they should care.


I'll quote my own reply to your sibling.

> I'm not sure why you insist on playing whack-a-mole. You'll eventually just end up with a list of every domain the user visits on a regular basis. You're basically "shooting the messenger". Do you not understand that this is the other way around? Do you not understand this is a supply chain attack?


I still do not know what you think the relevance of that statement is. What is the specific action you are advocating the author of TFA take that does not require addressing it at each and every website operator?

If more than one sentence at a time is too much for your context window, you might need to pick another topic to discuss.

You're out of runway with this question and you either fly or you don't.

EDIT (we've hit max reply depth): No. I don't have a link. This is getting weird. If you're only convinced by authority, that explains why you insist on holding someone accountable for an issue that is as systemic as a supply chain attack. There is no "manager" to speak with. :smfh:


If it’s not asking to much from you, maybe you could link me to a comment from someone else who understands what you are getting at.

Visitors getting a big red warning page is the most effective way to get it fixed though. There's no way for site admins to sweep the issue under the rug

If we're really being serious about getting it fixed and not just waving a magic wand and laying blame, the scripts should not be distributed via a platform that tells web maintainers to blindly paste a script tag and leave their web servers wide open for the whitelisted 3rd party domain(s) to send whatever they want to visitors. We need to end the security theater with nonces that is bypassing what most people expect from a content security policy that is almost never true in practice.

The scripts should be 100% static files hosted by the same origin and not be obfuscated. These scripts should not make additional requests to inject even more scripts that cannot be known until run time and are specific to that targeted visitor. These scripts should be released in the usual semver tradition with matching hashes that never change without the explicit action by the same domain that the user actually visited (making the nonce obsolete).

Like I said, this is a very old debate with a very simple solution whose only problem is that it breaks the business model of a multi-billion dollar idea. Not only would this tighten up security, but your favorite websites wouldn't lag so hard anymore either. The vast majority of complaints about the web being slow are from the dozens of HTTP requests constantly being made behind your back. This is exactly why so many users feel forced to use an adblocker even though that doesn't always work.


All of that sounds great but also it's important to protect visitors.

Maybe if the site owners experience their sites going down due to this they'll look for some alternatives.


You're totally not getting what I'm saying and that's fine, but why do you post these replies then?

I'm not sure why you insist on playing whack-a-mole. You'll eventually just end up with a list of every domain the user visits on a regular basis. You're basically "shooting the messenger". Do you not understand that this is the other way around? Do you not understand this is a supply chain attack?

If you insist on warning users, then that could only possibly work against the URLs of the requests behind the scenes, not the domain of the site they intended to visit. That is basically what an adblocker already does in the first place!

But, an adblocker is not a solution to this problem and is just a band-aid. Re-read the rest of my earlier comments.


This is a great list of things “someone” should do. Can the author of TFA do it?

Why haven’t you already done it?


Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: