4 ms·
> if you’re on Chrome or Microsoft Edge, the DLL is dropped in the Downloads folder without even asking What fucked up joke is this?!
by mschuster91 11y ago
> if you’re on Chrome or Microsoft Edge, the DLL is dropped in the Downloads folder without even asking
What fucked up joke is this?!
- striking 11y agoI think the bigger joke is that you can hijack DLLs, and the UAC prompt and signed code verification don't say a word about it.
- Spivak 11y agoIt's certainly an interesting problem. Suppose that an program that needs administrative permissions depends on lib.dll. Should lib.dll have to be bundled with the application and signed with the same key? Why not statically link at that point then? Since the libraries the application might pull in might not even be available before runtime would you prompt for each load? Maybe prompt for each load that isn't in a system directory -- implying that there isn't prior trust? You could embed the key the library developer signed the library with but then we have a key revocation problem and updating the library might require updating the application and business critical applications might hold entire departments back from getting security fixes. I don't think this is really a problem with DLLs or the signature process, but that the old installer tries to load any library in the executable directory.
- digi_owl 11y agoThe constant issue of computer security is perhaps that software can only inspect actions, not intent. And any action taken can be either legitimate or nefarious, given the context of intent.
- marcosdumay 11y agoAt some point, infosec lies on user education. No arguing about this. But the exact point is open to argument. Software need an interfaces that reflect intent - if your browser dumps stuff from unrelated places at the same folder, and then the OS uses those unrelated stuff as if it was related, there's a completely failure from the software data to reflect the user intent. This is a blatant fault of the software stack (but of no party in particular).
- vezzy-fnord 11y agoThe classic way of mitigating the issue of intent, of course, is capability-based security. Standard ambient authority models basically leave the door wide open by decontextualizing all action, such that merely riding on someone's session from their end is sufficient.
- digi_owl 11y agoThat finds me thinking that a issue is perhaps that with modern personal computing, the system/kernel view of state (or some such), and the user view of state, are not lined up.
- fidz 11y agoIt is the NSIS' fault for auto-loading existing dll in the same working directory if presents. And UAC only does its job: To run a command with elevated privilege (so does sudo). UAC does not really care the executed code.
- icebraining 11y agoIt is the NSIS fault for auto-loading existing dll in the same working directory if presents. Well, I'd say it's Windows fault for having LoadLibrary do so by default. Unsafe actions should have to be manually enabled, not manually disabled!
- fidz 11y agoafaik we can specify absolute path in LoadLibrary function. If it isn't, yes, LoadLibrary will use cwd relative by default -- which is dangerous for non-installed program. This is okay for installed program since you need additional privilege to alter Program Files directory.
- plorkyeran 11y agoIt's relative to the location of the executable, not the current working directory. The idea on Windows is that an application's directory is a trusted location created specifically for that application. Running executables directly out of a Downloads folder is a violation of the Windows security model, so in that sense the security vulnerability is Chrome's fault, as the "correct" thing to do is to put downloaded files into different folders as older versions of IE did. Of course, that's terrible UX, and considering that this exact problem has been popping up for decades, I'd consider a manifest flag for "don't trust the application directory" long overdue.
- userbinator 11y agoOf course, that's terrible UX I find the "put everything that gets downloaded in one folder" to be worse UX than being able to choose where each download goes as it means having to move things back out of the downloads folder instead of them being downloaded to where I want them; especially when they're large files I wanted to put on a different drive, so the move turns into a lengthy copy operation.
- winter_blue 11y agoIt's not Microsoft's or the UAC's fault. It's Nullsoft's fault. NSIS (Nullsoft Scriptable Install System) loads and executes the DLL without any verification. Also, you're not hijacking DLLs -- you're using a DLL to hijack NSIS (which runs with administrative privileges).
- icebraining 11y agoHow can NSIS verify the DLL? How can an installer from, say, 2012 know if the copy of shfolder.dll in Windows 10 is valid? And worse - in some cases, NSIS wasn't even directly loading the DLLs, Windows was doing it behind its back (eg. NSIS called a Win32 function called OleInitialize, which loaded UXTheme.dll by itself).
- Strom 11y agoAll valid points. I think it should be possible, at least for Microsoft DLLs, to specify a flag that you are willing to load only those signed by Microsoft. A malicious version.dll wouldn't probably have a Microsoft signature. The signature verification would be done by the OS and thus would be future-proof. Even a OS-local whitelist for exemptions could work, where an admin could add some unsigned DLL hashes to the list that would still load. None of the downloaded malicious DLL files would pass this test.
- deleted 11y ago[deleted]
- plorkyeran 11y agoSafari does the same thing. I think FF is the only browser that still defaults to asking you what you want to do when you click on a download link.
- mschuster91 11y agoWell Chrome all day long tells me "foo.exe might be an unusual download" and with every version they make it harder to bypass that (also sites with misconfigured HTTPS, broken cipher suites and other crap which is perfectly fine in a internal environment). But then it allows silent DLL dropping... jeez.
- aftbit 11y agoBest tip I've learned in the past month: when you're at one of those unskippable TLS error warnings in Chrome/Chromium, just type "danger" on your keyboard. Example: https://subdomain.preloaded-hsts.badssl.com/ https://subdomain.preloaded-hsts.badssl.com/
- janfoeh 11y agoInteresting. I'm on 48 (beta) / OS X and can't get this to work, though.
- 11y ago
- userbinator 11y agoAs someone accustomed to selecting the location with every download, I really don't like the idea of a separate folder just for downloads. The first time I used a browser like that, when I clicked a link and it downloaded the file immediately, it was quite disorienting because I didn't know where it went. The files I download need to go in different places depending on what they are, so it's hugely irritating to have to go to Downloads (which is conveniently somewhere with a nontrivially long path...) and move them to where they should go. This encourages users to put everything they download in one place, which is really bad for organisation. IMHO the browser should always ask where you want to save something, defaulting to the last location you chose. The extra click/keypress, and having the files downloaded to their intended location, is far better than the multiple actions required to rummage in Downloads and move the files to where they should be afterwards. The workaround, to right-click and "Save As...", also involves an extra action.
- puredemo 11y agoYou can set FF to always prompt you..
- dgoldstein0 11y agoI actually wish that it would remember the last place I saved a file to from that particular domain, instead of just the last in general. E.g. sometimes I'm downloading software but sometimes I'm downloading bills which I have a pretty strict folder structure they go into.