Closed CoconutMacaroon closed 3 years ago
Yeah, upgrading to WSL2 will quash this problem. Back what seems like a very long time ago I used to add WSL's root path in Windows to Defender's exception list. That might be a work-around (haven't tried lately).
I ran wsl --set-version 2 kali-linux
in PowerShell, and after it finished, I could install the package like expected (after opening Kali). Thank you!
you need remove .deb file error in /var/cache/apt/archives
using "rm -rf .deb" file error ,then dpkf --configure -a
and apt update && apt install kali-linux-headless
I ran
wsl --set-version 2 kali-linux
in PowerShell, and after it finished, I could install the package like expected (after opening Kali). Thank you!
I think it should be wsl --set-version kali-linux 2
, if anybody is struggling!
Windows Build Number
Microsoft Windows [Version 10.0.19042.928]
WSL Version
Kernel Version
Linux version 4.4.0-19041-Microsoft
Distro Version
Kali Linux
Other Software
Windows Defender, which is turned on and is the only antivirus installed on my Windows 10 installation.
Repro Steps
Here is what I did to get the error:
kali
into a PowerShell terminal. I used Windows Terminal Preview 1.7.1032.0, but I don't think that is relevent.kali-linux-headless
, so I went back to my terminal and didsudo apt update
. The command worked as expected. It told me that packages could be updated, but I chose to (try to) install the package first.sudo apt install kali-linux-headless
. I said yes, I wanted to install those packages. I was prompted to choose some settings for some of the packages, I did (although I don't remember what I chose now)Expected Behavior
The package installed successfully, without Windows Defender getting mad about it.
Actual Behavior
Get:<number> <URL>
, it started unpacking the packages and selecting a few more to install. At the end, it saidRight before (or perhaps during) those errors, Windows Defender told me it detected Ransomware: Running
Get-MpThreatDetection
(in PowerShell) informed me of the Ransomeware that appeared to come from my Kali WSL:C:\Users\[me]\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\LocalState\rootfs\var\cache\apt\archives\laudanum_1.0+r36-0kali4_all.deb
C:\Users\[me]\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\LocalState\rootfs\var\cache\apt\archives\python3-impacket_0.9.22-1_all.deb
C:\Users\[me]\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\LocalState\rootfs\var\cache\apt\archives\ettercap-common_1%3a0.8.3.1-3_amd64.deb
The other paths were similar to those, all containing laudanum, impacket, or ettercap.I tried running
sudo apt update
:I tried
sudo apt update
again, which told meRunning
sudo apt --fix-broken install
gave meDiagnostic Logs
No response