golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
122.99k stars 17.54k forks source link

Virus total detects simple hello world program as a trojan on windows #60828

Closed jmwielandt closed 1 year ago

jmwielandt commented 1 year ago

What version of Go are you using (go version)?

$ go version
go version go1.20.5 windows/amd64

Does this issue reproduce with the latest release?

Yes. Also tried with 1.20.4.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=C:\Users\josew\go\bin
set GOCACHE=C:\Users\josew\AppData\Local\go-build
set GOENV=C:\Users\josew\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\josew\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\josew\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.20.5
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\josew\go\src\example.com\hola\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=C:\Users\josew\AppData\Local\Temp\go-build888617517=/tmp/go-build -gno-record-gcc-switches

What did you do?

`go.mod` file: ``` module example.com/hola go 1.20 ```
`main.go` file ```go package main import "fmt" func main() { fmt.Println("hola mundo") } ```

Compile with go build.

Upload your .exe to https://www.virustotal.com/gui

My exe: hola.zip (google chrome blocks the download).

What did you expect to see?

No virus nor trojan detection.

What did you see instead?

imagen

Idk if the url will be available for you but: https://www.virustotal.com/gui/file/2eb68957ba42d0aafcedcef515b0485b22e0dd9e2179081bae83328ff637ba71?nocache=1

seankhliao commented 1 year ago

https://golang.org/doc/faq#virus