5 ms·
I don't see what the fuss is about. This is an effective mitigation, given that software can't just arbitrarily lie about its user agent.
by StavrosK 8y ago
I don't see what the fuss is about. This is an effective mitigation, given that software can't just arbitrarily lie about its user agent.
- abraae 8y agoEh? Software can do exactly that.
- arcticbull 8y agoPretty sure that was sarcasm haha
- deleted 8y ago[deleted]
- StavrosK 8y agoHow? Do you think developers would be so crazy as to add some sort of "--user-agent" option to software like curl that would cause arbitrary strings to be presented as the user agent? Why would somebody write software to do this, just go on the internet and tell lies?
- faitswulff 8y agoI thought all this security nonsense ended in the 90s when they introduced the IS-MALICIOUS-REQUEST header. It must be, because I haven't seen any web traffic declaring itself malicious since then.
- ezoe 8y agoI believe most devices implemented now 11 years old RFC 3514. So evil packets and non-evil packets can be easily distinguished.
- TheCraiggers 8y agoWhile that's probably technically feasible, that sounds like something only a terrorist would do anyway. All the more reason to ban the entire program, I say!
- deleted 8y ago[deleted]
- maxaf 8y agoYour downvoters are terrible at detecting satire.
- anyfoo 8y agoEven without --user-agent, you can still pipe 'echo -e "GET ...\rnHost: ... "' through nc, or even telnet. Therefore, we obviously need to patch echo (and all echo shell builtins) to refuse to output strings containing "GET", "POST", "HTTP", or "Host:".
- colordrops 8y agoOoh boy I'm imagining some bureaucratic version of an operating system that uses this sort of security up and down the entire stack like some rube Goldbergian contraption to whack a mole a particular vulnerability. Like an operating system designed by doctor Seuss.
- zrm 8y ago> Therefore, we obviously need to patch echo (and all echo shell builtins) to refuse to output strings containing "GET", "POST", "HTTP", or "Host:". Unfortunately it is also possible to do this using file redirection or to write a new program that will make a TCP connection and send arbitrary data through it, making it necessary to do the same for all editors, compilers and interpreters. That sounds like a lot of work though (there are many such programs), so maybe we ought to just patch the kernel to prohibit any of those strings from being written to a file descriptor. There can't be that many false positives.
- ezoe 8y agoWhy stop there? The user can easily modify the kernel to disable such prevention measures for malicious usage. We must have a regulation to require a hardware level detection and prevention features of curl which all hardware vendors must follow.
- asynch8 8y agooh god stop some politician might see this and take you for being srs
- craftinator 8y agoBut users have fingers, which can be used to disable or subvert said "features". Thus, those fingers are just gonna have to go. They're a security risk, and security risks are against the regulations.
- sbmassey 8y agoOnly software developers with no honour would ever do that.
- teraflop 8y agoI guess the biggest problem is that the mitigation isn't future-proof. Someday, there might be other command-line tools besides cURL that can be used for this kind of attack. A better fix would be to just drop all incoming IPv4 packets that have the "evil" bit set. (https://www.ietf.org/rfc/rfc3514.txt https://www.ietf.org/rfc/rfc3514.txt) Extending this protection to IPv6 is left as an exercise for the reader.
- StavrosK 8y agoAh, but what about packets that aren't evil, just gullible and manipulated by some third party?
- dvhh 8y agoThen add a "tainted by evil" flag to the ipv7 spec, or better, just add a "pure" flag to future ip spec.
- StavrosK 8y agoI think I'd almost prefer an "alignment" flag, so we don't mischaracterize all the Chaotic Neutral packets.
- wincy 8y agoWell if you’d read the RFC it’s obvious it’s your routers responsibility to flag those bits as evil. And if you’re using heuristic intrusion detection systems you need to do flag each bit as evil 50% of the time. It’s good we have such amazing protections in place.
- lxe 8y agoExactly. Hacking your client to use another user-agent or another IP address is illegal under CFAA. See Craigslist Inc. v. 3Taps Inc. etc...
- gonesilent 8y agoSo when I check desktop site in chrome I'm hacking?
- chii 8y agoOf course! So is right clicking and selecting inspect element to modify the page!
- chronogram 8y agoI would call it hacking.. you sometimes run into those websites with 50 different opacity bits for all their web app things, and you don’t want to deal with all that rubbish so you set a “opacity: 1 !important” and the whole website looks off but it’s finally useable. I’d call that a hack. Or also when you run into those websites designed on a $2000 screen that thinks it’s tres moderne to use 808080 text, so you “hack” it into readable text. I think those are all happy little hacks :-)
- Tepix 8y agoThat's why super secure websites block right-click events on their webpage. Makes them unhackable!
- stevefan1999 8y agoThis is quite funny
- StavrosK 8y agoI am not laughing one bit let me tell you. Honesty in user agents is one of the last few defenses we have against hackers running rampant on the internet and turning it into some lawless wasteland where people don't even answer truthfully about their A/S/L.
- jniedrauer 8y agoI think you should have added a /s tag... some people don't get jokes unless you hit them over the head with it.
- StavrosK 8y agoI will never stoop so low as to telegraph my own joke.
- wyldfire 8y agoThen you must encounter Poe's Law frequently....?
- StavrosK 8y agoAll the time. After having seen the kinds of things some people will say in earnest, I will never begrudge someone missing my sarcasm.
- thayne 8y agoIn textualform, sarcasm and ignorance look the same. otoh, it can sometime be quite funny to see responses from people that take it seriously...
- dmix 8y agoI've never posted sarcasm online without at lease one person (that guy) who takes it seriously and decides to reply. But I think it's worth it because the people who get it will get it. If a small group doesn't then who cares (if everyone doesn't then you did a bad job constructing a joke).
- labster 8y agoI couldn't agree more. The joke construction was a bit weak though, when you miss a good part of the audience. Add something like, "I mean, could you imagine the chaos it would cause if IE told websites it was really Mozilla?" and you demonstrate mastery of the subject matter, which should be enough to let other experts know you were facetious rather than ignorant. Unless you have timing issues... or need the comedian's plausible deniability.
- Macross8299 8y agoExactly, once they roll out the patch with a boolean OR in the conditional as '$http_user_agent ~* "wget"', it'll pretty much be hack proof!
- frjalex 8y agolibcurl is open source, I would imagine it'd not be difficult to make it "lie."
- anyfoo 8y agoSomeone who also did not get the joke is going to read your comment, and suggest that libcurl being closed source somehow fixes the problem.
- da_chicken 8y ago(Hint: the curl command already has a --user-agent parameter which allows the user to set the user agent string.)
- dvhh 8y agoI have to fix my sarcasm detection AI again because of this comment
- StavrosK 8y agoYou're welcome!
- ReptileMan 8y agoAnd it is also very good that regexes are simple, unambiguous, easy to debug and their engines are heavily scrutinized that no code execution/undefined behavior is possible.
- Pxtl 8y agoWell, they can, but first they have to flip the RFC3514 "Evil" bit.
- deleted 8y ago[deleted]
- fixermark 8y agoIt does seem so obviously simple to sidestep that it makes me wonder if they pushed it because they had an active attack they believed it would mitigate. Were they concerned that the attack was already baked into some automated script in the wild and this could perhaps at least trip up the script long enough for them to engineer a real fix? Scripted attacks can of course be modified too, but it still takes more than zero human effort to do it.
- Anarch157a 8y agoCurl can, easily. Curl is not just a client to get a file and pipe it to other programs, it's a diagnostic tool, and it has all sorts of parameters to help it simmulate all kinds of interaction with a webserver, including the -A parameter to change the user-agent, this is why this 'fix' is so stupid.
- delfinom 8y agocurl -A "iswearimnotcurl" <exploit>
- deleted 8y ago[deleted]
- PinkMilkshake 8y agoThey might be able to fix it by making the only valid user agent “not-curl-honest”.
- webninja 8y agoActually you can use -A to change the user agent in Curl itself. For example: curl -A "YourNewUserAgentString” http://url.com Furthermore, there are free plugins or add-ons for both Chrome and Firefox that let you change the user agent and say you’re using IE, a mobile browser, a google bot, or anything you want the user agent string to say. Most programmers should be able to write a small script using Python’s urllib or urllib2 to do a basic PUT or GET request with any User Agent. Heck, just type “change user agent python urllib” into google, click on the first stack overflow link, and copy/paste the answer. You can use Go, ruby, java, nodeJS, or PHP instead as well. Edit: Maybe your comment was sarcasm :)
- StavrosK 8y ago> Edit: Maybe your comment was sarcasm :) I still appreciate you putting in the effort to explain. Have an upvote!