Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detected as Virus/Trojan by Microsoft Defender when installed from VS code #3182

Closed
adic3x opened this issue Feb 19, 2024 · 12 comments
Closed
Milestone

Comments

@adic3x
Copy link

adic3x commented Feb 19, 2024

Extension installed from VS Code downloaded from official site (https://code.visualstudio.com/)

*:\Users***.vscode\extensions\golang.go-0.41.0\bin\vscgo.exe (MD5 c93025a0a7a7ac3db48a0333af22fd0e)

Detected: Trojan:Win32/Wacatac.B!ml

Cool.

@gopherbot gopherbot added this to the Untriaged milestone Feb 19, 2024
@jkruza
Copy link

jkruza commented Feb 19, 2024

I just got the same...
Zrzut ekranu 2024-02-19 195945

@joeyell
Copy link

joeyell commented Feb 19, 2024

Same here

image

@ecerichter
Copy link

I've updated the MSAV, and the problem remains. Does this file presents real threat or it's a false positive?

@hyangah
Copy link
Contributor

hyangah commented Feb 20, 2024

This is a false positive. This is https://github.com/golang/vscode-go/blob/master/vscgo/main.go
and also see https://go.dev/doc/faq#virus.

Question for windows users: An alternative I am thinking is to package a precompiled binary with the extension, instead of letting the extension install the binary using go install when getting activated. But it is unclear to me if that's sufficient to make those virus scanners silent. As far as I know other extensions also bundle go binaries, for example GH copilot or google cloud code. Have the virus scanners complained them?

@adic3x
Copy link
Author

adic3x commented Feb 20, 2024

Security Intelligence Update for Microsoft Defender Antivirus - KB2267602 (Version 1.405.308.0) fix this issue, so it really looks like false positive.

From the beginning I thought it was more likely an M$ problem. Anyway it would be nice if the golang developer team and M$ both collaborated to avoid false positives without compromising the security of the system.

@jkruza
Copy link

jkruza commented Feb 20, 2024

@hyangah ,

thanks for quick response. I think everyone here was suspecting false positive, but we needed someone to check and confirm :)

But it is unclear to me if that's sufficient to make those virus scanners silent

Not sure either - most likely the presence/use of binary is the trigger, not the way it was delivered...

@Lercher
Copy link

Lercher commented Feb 20, 2024

I'm getting this, which I guess is related. However, I don't know if its due to some corporate policy:

image

@qmuntal
Copy link

qmuntal commented Feb 21, 2024

Question for windows users: An alternative I am thinking is to package a precompiled binary with the extension, instead of letting the extension install the binary using go install when getting activated. But it is unclear to me if that's sufficient to make those virus scanners silent.

This will help lowering the chances of false positive. MS Defender don't like applications that install software without user interaction.

@rmc47
Copy link

rmc47 commented Feb 21, 2024

Question for windows users: An alternative I am thinking is to package a precompiled binary with the extension

This, coupled with signing the binary with a code signing certificate, would be the best bet: most anti-malware solutions attach reputation to both the file hash (which will vary by release) and the certificate used to sign it (which will vary much more rarely), so code signing any PEs is a really good way of avoiding reputation-based false positives.

(Sadly it does come with a financial cost for the certificate, though - there's no equivalent of Let's Encrypt for code signing certs - yet!)

@hyangah hyangah modified the milestones: Untriaged, v0.41.1 Feb 21, 2024
@gopherbot
Copy link
Collaborator

Change https://go.dev/cl/565679 mentions this issue: extension/src/goMain: skip vscgo installation on windows

@gopherbot
Copy link
Collaborator

Change https://go.dev/cl/565680 mentions this issue: [release] extension/src/goMain: skip vscgo installation on windows

gopherbot pushed a commit that referenced this issue Feb 21, 2024
And, pass `-trimpath` when building it so the executable
file hash is stable.

And increase the vscgo test timeout.

Fixes #3182

Change-Id: Ib86bf07ddc4a89849bb778b2621268b334f3a80a
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/565679
Reviewed-by: Peter Weinberger <pjw@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
Commit-Queue: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Robert Findley <rfindley@google.com>
(cherry picked from commit 0b3fabc)
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/565680
Auto-Submit: Hyang-Ah Hana Kim <hyangah@gmail.com>
@hyangah
Copy link
Contributor

hyangah commented Feb 22, 2024

We are going to release v0.41.1 tomorrow. The version disables vscgo invocation on windows.

Release candidate - https://github.com/golang/vscode-go/releases/tag/v0.41.1-rc.1

#3186 is the issue to revise the release workflow and reenable vscgo.
Thanks for reporting and investigating this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants