News for hackers. Stuff that matters.
Re:WSL2 corrupting Git repositories and shell history by ubercow13 on Saturday January 02, 2021 @04:29PM (#25616724)
This is nothing specific to WSL though, Windows has always had this problem. I expect there are many Windows developers who have no idea how much time they spend waiting for their code to be virus scanned every day.
Re:WSL2 corrupting Git repositories and shell history by glandium on Saturday January 02, 2021 @06:43PM (#25617797)
To give an idea how bad it is, building Firefox on a Threadripper 3970X on Windows takes slightly over 12 minutes if you don't disable Defender and somewhere around 7 minutes if you do.
Re:WSL2 corrupting Git repositories and shell history by samb1729 on Saturday January 02, 2021 @07:07PM (#25617973)
What a horrible amount of overhead. Why does Defender need to scan the contents of a bunch of non-executable files? I suspect the answer runs deep and is at least somewhat horrifying.
Re:WSL2 corrupting Git repositories and shell history by magicalhippo on Sunday January 03, 2021 @08:17AM (#25621601)
> Why does Defender need to scan the contents of a bunch of non-executable files?

While I agree the overhead is atrocious, buffer overflows and similar bugs can turn an "innocent" non-executable file into an executable, like this[1] JPEG file parser issue affecting a large number of applications using GDI+.

That said, I'd be surprised if it couldn't be smarter about this.

[1]: https://us-cert.cisa.gov/ncas/archives/alerts/TA04-260A

Re:WSL2 corrupting Git repositories and shell history by jan6 on Saturday January 02, 2021 @07:17PM (#25618045)
because windows has no concept of an executable bit, so a rename could make it runnable? or a benign looking program has a built-in interpreter run code from external file?
Re:WSL2 corrupting Git repositories and shell history by dataflow on Saturday January 02, 2021 @08:23PM (#25618452)
> windows has no concept of an executable bit

Sure it does. Execution is a permission you can set in the security tab.

> a rename could make it runnable

This is more likely why.

Re:WSL2 corrupting Git repositories and shell history by samb1729 on Sunday January 03, 2021 @04:02AM (#25620594)
> because windows has no concept of an executable bit, so a rename could make it runnable

This much I understand - but why can something so tightly integrated into the OS not instead intercept a file rename event and scan at that point?

I seem to be lacking sufficient information as to what specifically about Windows necessitates scanning everything on the filesystem when macOS and the various common Linux distros seem to do fine without it. It's not as if Windows is the only OS with interpreters, either.

Re:WSL2 corrupting Git repositories and shell history by mmis1000 on Saturday January 02, 2021 @07:21PM (#25618073)
Virus do abuse non executables like js, vbs, or whatever script file. Antivirus can't really know if it is the case without open it.
Re:WSL2 corrupting Git repositories and shell history by samb1729 on Sunday January 03, 2021 @04:11AM (#25620628)
What is it about Windows that makes this a problem where macOS and Linux seem to be fine? The same mechanisms exist in all three major operating systems, which is to say that technically any executable I choose to run on my computer can load a file and interpret it.

Is it really just that Windows users download and run random junk? It's been so long that I've seen a virus of any kind anywhere at all that I genuinely have no clue how people become infected with them or indeed whether it still really happens at all.

It certainly feels to me that the era of random toolbars and clearly visible desktop malware is over, but at the same time I live in a different bubble than in the past.

Re:WSL2 corrupting Git repositories and shell history by mkr-hn on Sunday January 03, 2021 @08:43AM (#25621706)
It's possible you don't see random toolbars and malware now because Defender works. Microsoft could be smarter and offer default exclusions for some things.
Re:WSL2 corrupting Git repositories and shell history by mmis1000 on Monday January 04, 2021 @01:46AM (#25628457)
But even file type that you think it is pretty safe (jpg, wav and some other media foramt) can abuse parser bug in viewers / explore.exe to result in code execution. And how do you prevent the malware just name its .js as .jpg and execute it with some interpreter? Some interpreters definitively don't care about file extensions.
Re:WSL2 corrupting Git repositories and shell history by Demiurge on Sunday January 03, 2021 @10:20AM (#25622227)
If that was the default, wouldn’t it be immediately exploited?
Re:WSL2 corrupting Git repositories and shell history by Shared404 on Monday January 04, 2021 @03:56AM (#25629017)
> I genuinely have no clue how people become infected with them or indeed whether it still really happens at all.

I'm a bit late to the conversation, but can confirm that yes, people do still get infected.

We almost always turn something up while doing virus scans at the repair shop I work at, and we mostly use off the shelf products, along with a couple other tricks.

Re:WSL2 corrupting Git repositories and shell history by 0x138d5 on Saturday January 02, 2021 @05:10PM (#25617034)
Some IDEs have started warning about this performance hit. IntelliJ + Gradle for example, but I'm guessing other Jetbrains products do the same.
Re:WSL2 corrupting Git repositories and shell history by Roritharr on Sunday January 03, 2021 @02:30AM (#25620229)
That's what made me aware of the problem. Now I need a comfortable gui for managing just those folders.
Re:WSL2 corrupting Git repositories and shell history by CamperBob2 on Saturday January 02, 2021 @08:00PM (#25618319)
Try "every compile." If you wonder why your .exe takes a couple of extra seconds to start up the first time you run it after a build, well, this is why.