Live data from Hacker News

Any sufficiently advanced uninstaller is indistinguishable from malware

devblogs.microsoft.com

241–250 of 556 posts

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#241

There was a bug in an uninstaller, once, that deleted all of the files on the disk. Sounds like malware to me!

There was a bug in some Linux driver installer that accidentally /usr, the whole thing.

"Totally uncool dude!!!"

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#242
post #63

Here's the codeproject link the code came from. https://www.codeproject.com/Articles/17052/Self-Deleting-Exe... > Whether they follow the licensing terms for that code I do not know. I'm guessing they didn't ship the binary with a link pointing back to this page? These's also another codeproject example that uses a bat file, which is fairly similar to the recommendation in the post. I guess that's the better example.…

At least the author seems to agree with Raymond Chan on the similarities between his approach and malware... > shellcode is the technical term (in security circles) for binary machine code that is typically used in exploits as the payload. Here's a quick and dirty way of generating the shellcode from the obj file generated when you compile your source files. In our case, we are interested in whipping the shellcode up…

Unfortunatelt CodeProject is full of code like this.

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#243

Earlier quoted context omitted.

For the curious: Here's a completely unfinished guide to how you might start developing such an application: https://marksweb.site/hta/ From HTAs, you have access to the file system, the network, the registry, the shell - everything. It might be a bit different than normal web dev, but it's not too bad either.

Wow, that's so cool! I played around with making HTAs as a kid and never thought those could be that powerful. (I quickly moved on to topics more exciting to a teenage hacker, like making WinForms apps with some PHP RAD IDE.) Wondering what would it take to port mshta (with all the ActiveX goodies) to other platforms. Maybe it's a little bit late for that, but sounds like it might be a fun project to me.

To be honest, in my ideal world, mshta, Electron and the like would be discontinued and, instead, there'd be a cross-desktop-platform HTML/CSS/JS app-runtime (_not a browser!_). This runtime should support a sensible, large subset of modern Web APIs plus a set of cross-OS and OS-specific APIs so it's easy to work with for developers. To be easy to use for users, it should be installed by default on all major consumer-facing OSes. So yeah, it's probably not gonna happen anytime soon...

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#244

There was a bug in an uninstaller, once, that deleted all of the files on the disk. Sounds like malware to me!

There was a bug in some Linux driver installer that accidentally /usr, the whole thing.

Why does a third party app have rights all files without asking? The Android app rights system integration into linux and windows is way overdue

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#245

Why do Windows programs need special installers/uninstallers? Why isn't this handled by Windows itself?

How could Windows handle it by itself?

If it provides a framework for installers/uninstallers, it'll be fighting the inertia of decades of legacy software, programmer habits, and old tutorials.

If it tracks file ownership by program, it might accidentally delete user files. How would it differentiate between a VSCode extension that should be uninstalled, and a binary compiled with VSCode for a user project? A false positive could be catastrophic.

If it restricts what programs can do to accurately track file ownership, you end up with Android. Which is fantastic for security, but is a royal pain in the ass for all parties:

- The app developers have to jump through hoops for the simplest actions, and rewrite most of their code in the new style.

- The operating system has to implement a ton of scaffolding, like permissions-restricted file pickers and ways to hand off "intents" between applications.

- The user is faced with confusing dialogs, and software with seemingly arbitrary limitations.

In the age of shared runtimes, auto-updaters, extension marketplaces, and JIT compilers, managing installed applications is harder than ever.

Edit: the answer above applies only to Windows, because of its baggage. Linux'es are in a much better position, for example, though their solution is still not perfect.

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#246

Earlier quoted context omitted.

There was a bug in some Linux driver installer that accidentally /usr, the whole thing.

Why does a third party app have rights all files without asking? The Android app rights system integration into linux and windows is way overdue

I'm fairly sure Android apps running as root (like this driver installer probably was) will also have access over all files without asking. That's the danger of root.

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#247

Earlier quoted context omitted.

One thing I like about Linux package managers is that you can query any file to see which package owns it. How does Windows not track this?

Except they all leave files everywhere in ~, ~/.cache, ~/.config, ~/.whatevertheyfeellike

That is not part of the software itself so it is still correctly installed/uninstalled.

Now I believe all software should have a manpage, dialog and a cli argument that describes where all the files[1] generated by default go but that is another subject.

[1] cache, config and even default save

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#248
post #193

Earlier quoted context omitted.

Those files are user data, not part of the software package.

I would disagree, files that the user cannot edit or should not edit should not be going into their home directory. Things like cache files should go into a system wide cache directory instead.

I agree cache file should not go into their home directory, however I don't agree they aren't user data and that they would be part of the software installation.

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#249

Any time I see a Microsoft link with a cheeky title, I assume it’s a great Raymond Chen deep dive. Haven’t been wrong yet!

It is a very provocative title. I guessed Raymond Chen as well. Of course he delivers an interesting deep dive behind the title.

Re: Any sufficiently advanced uninstaller is indistinguishable from malware

#250
post #226
post #193

Earlier quoted context omitted.

I would disagree, files that the user cannot edit or should not edit should not be going into their home directory. Things like cache files should go into a system wide cache directory instead.

Why would you want that? If you have separate partitions, would you really want user data to go to the system partition? Or a third partition? Do you find having more places that user programs can write a benefit?

I would favor a /var/user/something directory.

The fact that nobody does that is pretty much a consequence of the difficulty of coordinating multiple projects that do not have a common authority, not because it is a bad idea.

Post reply on HN