Impossible to scan a DEBIAN 8
What did you do? (required. The issue will be closed when not provided.)
I get the last version version by GIT and build it I make a scan of a Debian 8 VM and a Centos VM by ssh
What did you expect to happen?
I expected the scan to complete without error.
What happened instead?
It worked very well on the CENTOS 7, no result on the DEBIAN 8.
- Current Output
make install error
/home/user/go/src/github.com/future-architect/vuls/gost/debian.go:24:1: exported method Debian.Supported should have comment or be unexported /home/user/go/src/github.com/future-architect/vuls/scan/base.go:601:6: exported type DummyFileInfo should have comment or be unexported /home/user/go/src/github.com/future-architect/vuls/scan/base.go:603:1: exported method DummyFileInfo.Name should have comment or be unexported /home/user/go/src/github.com/future-architect/vuls/scan/base.go:604:1: exported method DummyFileInfo.Size should have comment or be unexported /home/user/go/src/github.com/future-architect/vuls/scan/base.go:605:1: exported method DummyFileInfo.Mode should have comment or be unexported /home/user/go/src/github.com/future-architect/vuls/scan/base.go:606:1: exported method DummyFileInfo.ModTime should have comment or be unexported /home/user/go/src/github.com/future-architect/vuls/scan/base.go:607:1: exported method DummyFileInfo.IsDir should have comment or be unexported /home/user/go/src/github.com/future-architect/vuls/scan/base.go:608:1: exported method DummyFileInfo.Sys should have comment or be unexported
Vuls scan
`[user@vuls-centos8 ~]$ vuls scan [Oct 8 08:38:58] INFO [localhost] Start scanning [Oct 8 08:38:58] INFO [localhost] config: /home/user/config.toml [Oct 8 08:38:58] INFO [localhost] Validating config... [Oct 8 08:38:58] INFO [localhost] Detecting Server/Container OS... [Oct 8 08:38:58] INFO [localhost] Detecting OS of servers... [Oct 8 08:38:58] INFO [localhost] (1/2) Detected: debian: debian 8.11 [Oct 8 08:39:00] INFO [localhost] (2/2) Detected: centos7: centos 7.8.2003 [Oct 8 08:39:00] INFO [localhost] Detecting OS of containers... [Oct 8 08:39:00] INFO [localhost] Checking Scan Modes... [Oct 8 08:39:00] INFO [localhost] Detecting Platforms... [Oct 8 08:39:01] INFO [localhost] (1/2) debian is running on other [Oct 8 08:39:01] INFO [localhost] (2/2) centos7 is running on other [Oct 8 08:39:01] INFO [localhost] Detecting IPS identifiers... [Oct 8 08:39:01] INFO [localhost] (1/2) centos7 has 0 IPS integration [Oct 8 08:39:01] INFO [localhost] (2/2) debian has 0 IPS integration [Oct 8 08:39:01] INFO [localhost] Scanning vulnerabilities... [Oct 8 08:39:01] INFO [localhost] Scanning vulnerable OS packages... [Oct 8 08:39:01] INFO [debian] Scanning in fast-root mode [Oct 8 08:39:01] INFO [centos7] Scanning in fast mode [Oct 8 08:39:01] INFO [debian] apt-get update... [Oct 8 08:39:06] WARN [debian] err: Failed to dpkg-ps: github.com/future-architect/vuls/scan.(*debian).postScan /home/user/go/src/github.com/future-architect/vuls/scan/debian.go:256
- pkg not found dpkg-query: github.com/future-architect/vuls/scan.(*debian).dpkgPs /home/user/go/src/github.com/future-architect/vuls/scan/debian.go:1328 [Oct 8 08:39:28] WARN [localhost] Some warnings occurred during scanning on debian. Please fix the warnings to get a useful information. Execute configtest subcommand before scanning to know the cause of the warnings. warnings: [Failed to dpkg-ps: github.com/future-architect/vuls/scan.(*debian).postScan /home/user/go/src/github.com/future-architect/vuls/scan/debian.go:256
- pkg not found dpkg-query: github.com/future-architect/vuls/scan.(*debian).dpkgPs /home/user/go/src/github.com/future-architect/vuls/scan/debian.go:1328] `
Please re-run the command using -debug and provide the output below.
`[user@vuls-centos8 ~]$ vuls scan -debug
locales: /usr/share/locale/fr/LC_MESSAGES/libc.mo
lightdm-gtk-greeter: /usr/share/locale/fr/LC_MESSAGES/lightdm-gtk-greeter.mo
dpkg-query: aucun chemin ne correspond à /usr/share/mime/mime.cache
dpkg-query: aucun chemin ne correspond à /var/cache/fontconfig/3047814df9a2f067bd2d96a2b9c36e5a-le64.cache-4
dpkg-query: aucun chemin ne correspond à /var/cache/fontconfig/3f7329c5293ffd510edef78f73874cfd-le64.cache-4
dpkg-query: aucun chemin ne correspond à /var/cache/fontconfig/4794a0821666d79190d59a36cb4f44b5-le64.cache-4
dpkg-query: aucun chemin ne correspond à /var/cache/fontconfig/4b14b093aebc79c320de5e86ae1d3314-le64.cache-4
dpkg-query: aucun chemin ne correspond à /var/cache/fontconfig/945677eb7aeaf62f1d50efc3fb3ec7d8-le64.cache-4
dpkg-query: aucun chemin ne correspond à /var/cache/fontconfig/d589a48862398ed80a3d6066f4f56f4c-le64.cache-4
dpkg-query: aucun chemin ne correspond à /var/cache/fontconfig/e13b20fdb08344e0e664864cc2ede53d-le64.cache-4
dpkg-query: aucun chemin ne correspond à /var/cache/fontconfig/e49e89034d371f0f9de17aab02136486-le64.cache-4
stderr:
err: %!s(
- pkg not found dpkg-query: github.com/future-architect/vuls/scan.(*debian).dpkgPs /home/user/go/src/github.com/future-architect/vuls/scan/debian.go:1328 [Oct 8 08:57:25] DEBUG [debian] Executing... stat /proc/1/exe [Oct 8 08:57:25] DEBUG [debian] execResult: servername: debian cmd: /usr/bin/ssh -tt -o StrictHostKeyChecking=yes -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=auto -o ControlPath=/home/user/.vuls/controlmaster-%r-debian.%p -o Controlpersist=10m [email protected] -p 22 -i /home/user/.ssh/id_rsa -o PasswordAuthentication=no stty cols 1000; sudo -S stat /proc/1/exe exitstatus: 0 stdout: Fichier : « /proc/1/exe » -> « /lib/systemd/systemd » Taille : 0 Blocs : 0 Blocs d'E/S : 1024 lien symbolique Périphérique : 3h/3d Inœud : 8144 Liens : 1 Accès : (0777/lrwxrwxrwx) UID : ( 0/ root) GID : ( 0/ root) Accès : 2020-10-08 08:37:11.520000000 +0200 Modif. : 2020-10-08 08:37:11.048000000 +0200 Changt : 2020-10-08 08:37:11.048000000 +0200 Créé : -
stderr:
err: %!s(
stderr:
err: %!s(
- pkg not found dpkg-query: github.com/future-architect/vuls/scan.(*debian).dpkgPs /home/user/go/src/github.com/future-architect/vuls/scan/debian.go:1328]
Scan Summary
centos7 centos7.8.2003 1431 installed, 0 updatable debian debian8.11 1270 installed, 0 updatable
Warning for debian: [Failed to dpkg-ps: github.com/future-architect/vuls/scan.(*debian).postScan /home/user/go/src/github.com/future-architect/vuls/scan/debian.go:256
- pkg not found dpkg-query: github.com/future-architect/vuls/scan.(*debian).dpkgPs /home/user/go/src/github.com/future-architect/vuls/scan/debian.go:1328] `
Steps to reproduce the behaviour
Configuration (MUST fill this out):
-
Go version (
go version): go version go1.15.2 linux/amd64 -
Go environment (
goenv):GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/user/.cache/go-build" GOENV="/home/user/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/user/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/user/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build811934267=/tmp/go-build -gno-record-gcc-switches"` -
Vuls environment:
Hash : ____
To check the commit hash of HEAD $ vuls -v vuls v0.12.3 build-20201006_194553_4b680b9
$ cd $GOPATH/src/github.com/future-architect/vuls $ git rev-parse --short HEAD 4b680b9
- config.toml: `[cveDict] type = "sqlite3" SQLite3Path = "/home/user/vulsctl/install-host/cve.sqlite3" #type = ["mysql", "postgres", "redis", "http" ] #url = ""
[ovalDict] type = "sqlite3" SQLite3Path = "/home/user/vulsctl/install-host/oval.sqlite3" #type = ["mysql", "postgres", "redis", "http" ] #url = ""
[gost] type = "sqlite3" SQLite3Path = "/home/user/vulsctl/install-host/gost.sqlite3" #type = ["mysql", "postgres", "redis", "http" ] #url = ""
[exploit] type = "sqlite3" SQLite3Path = "/home/user/vulsctl/install-host/go-exploitdb.sqlite3" #type = ["mysql", "postgres", "redis", "http" ] #url = ""
[metasploit] type = "sqlite3" SQLite3Path = "/home/user/vulsctl/install-host/go-msfdb.sqlite3"
url = ""
[servers]
[servers.centos7] host = "10.0.2.4" port = "22" user = "user" keyPath = "/home/user/.ssh/id_rsa" #scanMode = ["fast-root"] cpeNames = [ "cpe:2.3:a:stormshield:stormshield_network_security:4.0.1:::::::", "cpe:2.3:o:vmware:esxi:6.5:650-201707201::::::*", ]
[servers.debian] host = "10.0.2.15" port = "22" user = "vuls" keyPath = "/home/user/.ssh/id_rsa" scanMode = ["fast-root"]
[servers.debian.hardware] cpeNames = [ "cpe:2.3:a:stormshield:stormshield_network_security:4.0.1:::::::", "cpe:2.3:o:vmware:esxi:6.5:650-201707201::::::*", ] `
- command: vuls scan
Hi, @frack113
It shows that dpkg-query is not installed.
Try running sudo apt install dpkg-query on the server you want to scan, and re-scan.
Hello, dpkg-query is installed on the VM debian 8.11 and 9.13 . from my centos 8 with vuls to debian 8
-
`ssh [email protected]' Ok no password
-
vuls@debian:$ dpkg-query -l->ok -
vuls@debian:$sudodpkg-query -l `-> ok
in visudo : vuls ALL=(ALL) NOPASSWD:ALL