PDF reports problem

Hello everyone. I need help with PDF report. It’s 0 bytes. I tried all methods in same topics, but it won’t helped. I’ve update version of gvm, i’ve downloaded texlive packages. Any suggestions? What’s wrong with dependencies? I am able to see the results only in xml format. But it’s not presentable.

┌──(samurai㉿samurai)-[~]
└─$ sudo gvm-check-setup                   
gvm-check-setup 21.4.3
  Test completeness and readiness of GVM-21.4.3
Step 1: Checking OpenVAS (Scanner)... 
        OK: OpenVAS Scanner is present in version 21.4.4.
        OK: Server CA Certificate is present as /var/lib/gvm/CA/servercert.pem.
Checking permissions of /var/lib/openvas/gnupg/*
        OK: _gvm owns all files in /var/lib/openvas/gnupg
        OK: redis-server is present.
        OK: scanner (db_address setting) is configured properly using the redis-server socket: /run/redis-openvas/redis.sock
        OK: redis-server is running and listening on socket: /run/redis-openvas/redis.sock.
        OK: redis-server configuration is OK and redis-server is running.
        OK: _gvm owns all files in /var/lib/openvas/plugins
        OK: NVT collection in /var/lib/openvas/plugins contains 101914 NVTs.
Checking that the obsolete redis database has been removed
Could not connect to Redis at /var/run/redis-openvas/redis-server.sock: No such file or directory
        OK: No old Redis DB
        OK: ospd-OpenVAS is present in version 21.4.4.
Step 2: Checking GVMD Manager ... 
        OK: GVM Manager (gvmd) is present in version 21.4.5.
Step 3: Checking Certificates ... 
        OK: GVM client certificate is valid and present as /var/lib/gvm/CA/clientcert.pem.
        OK: Your GVM certificate infrastructure passed validation.
Step 4: Checking data ... 
        OK: SCAP data found in /var/lib/gvm/scap-data.
        OK: CERT data found in /var/lib/gvm/cert-data.
Step 5: Checking Postgresql DB and user ... 
        OK: Postgresql version and default port are OK.
 gvmd      | _gvm     | UTF8      | ru_RU.UTF-8 | ru_RU.UTF-8 | 
        OK: At least one user exists.
Step 6: Checking Greenbone Security Assistant (GSA) ... 
Oops, secure memory pool already initialized
        OK: Greenbone Security Assistant is present in version 21.4.4.
Step 7: Checking if GVM services are up and running ... 
        OK: ospd-openvas service is active.
        OK: gvmd service is active.
        OK: gsad service is active.
Step 8: Checking few other requirements...
        OK: nmap is present in version 21.4.4.
        OK: ssh-keygen found, LSC credential generation for GNU/Linux targets is likely to work.
        WARNING: Could not find makensis binary, LSC credential package generation for Microsoft Windows targets will not work.
        SUGGEST: Install nsis.
        OK: xsltproc found.
        WARNING: Your password policy is empty.
        SUGGEST: Edit the /etc/gvm/pwpolicy.conf file to set a password policy.

It seems like your GVM-21.4.3 installation is OK.

it’s russian, but it means that latest packages updated.

┌──(samurai㉿samurai)-[~]
└─$ sudo apt install texlive-latex-extra --no-install-recommends
Чтение списков пакетов… Готово
Построение дерева зависимостей… Готово
Чтение информации о состоянии… Готово         
Уже установлен пакет texlive-latex-extra самой новой версии (2022.20220722-2).
texlive-latex-extra помечен как установленный вручную.
Следующие пакеты устанавливались автоматически и больше не требуются:
  criu libpython3.9 libpython3.9-dev python3.9-dev tini wmdocker
Для их удаления используйте «sudo apt autoremove».
Обновлено 0 пакетов, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 1284 пакетов не обновлено.

┌──(samurai㉿samurai)-[~]
└─$ sudo apt install texlive-fonts-recommended --no-install-recommends
Чтение списков пакетов… Готово
Построение дерева зависимостей… Готово
Чтение информации о состоянии… Готово         
Уже установлен пакет texlive-fonts-recommended самой новой версии (2022.20220722-1).
texlive-fonts-recommended помечен как установленный вручную.
Следующие пакеты устанавливались автоматически и больше не требуются:
  criu libpython3.9 libpython3.9-dev python3.9-dev tini wmdocker
Для их удаления используйте «sudo apt autoremove».
Обновлено 0 пакетов, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 1284 пакетов не обновлено.

GVM versions

gsad: 21.4.4
gvmd: 21.4.5
openvas-scanner: 21.4.4
gvm-libs: 21.4.4

Environment

Operating system: Kali Linux
Kernel: Linux 5.15.0-kali3-amd64 (Debian 5.15.15-2kali1)
Installation method / source: Как установить Greenbone Vulnerability Management (GVM) (бывший OpenVAS) в Kali Linux - HackWare.ru

@J0hnD0e install following packages

texlive-latex-recommended
- texlive-latex-extra

Eero

1 Like

thanks a lot, but they are already installed. you can see it in my topic

@J0hnD0e please do not use --no-install-recommends parameter.

anyway. this is easy to debug:

find generate scripts for each report

find / -type f -iname ‘generate’ -print and look inside what commands it uses…

Eero

1 Like

I need to use this command in terminal? it tells me access denied. maybe I should do it with sudo?

find / -type f -iname ‘generate’ -print

1 Like

It would be a lot easier to read your command suggestions, if you use preformatted code for something like commands! Thank you!

`put your preformatted code inbetween these grave symbols`

right?

/usr/share/gvm/gvmd/global_schema_formats/02052818-dab6-11df-9be4-002264764cea/generate
/usr/share/gvm/gvmd/global_schema_formats/d6cf255e-947c-11e1-829a-406186ea4fc5/generate
/usr/share/gvm/gvmd/global_schema_formats/18e826fc-dab6-11df-b913-002264764cea/generate
/usr/share/gvm/gvmd/global_schema_formats/787a4a18-dabc-11df-9486-002264764cea/generate
/usr/share/gvm/gvmd/report_formats/c15ad349-bd8d-457a-880a-c7056532ee15/generate
/usr/share/gvm/gvmd/report_formats/9ca6fe72-1f62-11e1-9e7c-406186ea4fc5/generate
/usr/share/gvm/gvmd/report_formats/5ceff8ba-1f62-11e1-ab9f-406186ea4fc5/generate
/usr/share/gvm/gvmd/report_formats/910200ca-dc05-11e1-954f-406186ea4fc5/generate
/usr/share/gvm/gvmd/report_formats/a994b278-1f62-11e1-96ac-406186ea4fc5/generate
/usr/share/gvm/gvmd/report_formats/c402cc3e-b531-11e1-9163-406186ea4fc5/generate
/usr/share/gvm/gvmd/report_formats/9087b18c-626c-11e3-8892-406186ea4fc5/generate
/usr/share/gvm/gvmd/report_formats/a684c02c-b531-11e1-bdc2-406186ea4fc5/generate
/usr/share/gvm/gvmd/report_formats/c1645568-627a-11e3-a660-406186ea4fc5/generate
/usr/share/gvm/gvmd/report_formats/50c9950a-f326-11e4-800c-28d24461215b/generate
/usr/share/gvm/gvmd/report_formats/5057e5cc-b825-11e4-9d0e-28d24461215b/generate
/usr/share/gvm/gvmd/report_formats/9e5e5deb-879e-4ecc-8be6-a71cd0875cdd/generate
/usr/share/gvm/gvmd/report_formats/77bd6c4a-1f62-11e1-abf0-406186ea4fc5/generate
/usr/share/gvm/gvmd/report_formats/a3810a62-1f62-11e1-9219-406186ea4fc5/generate

@J0hnD0e directory name is report uuid and that you can use to locate correct script.

then you need edit it a bit to keep logs

Eero

1 Like

@Eero cant’t find correct script, because there is no pdf. file in this directory /usr/share/gvm/gvmd/report_formats/ :smiling_face_with_tear: I see only xml, xsl fromats in this directory

@J0hnD0e find the generate script with latex commands…

1 Like

@J0hnD0e

correct file is: /some/path/report_formats/454f76a7-ce51-45cf-afec-47065addcc97/c402cc3e-b531-11e1-9163-406186ea4fc5/generate

it looks like this

https://pastebin.com/8ssHq6jb

you need to edit it to look like this:

https://pastebin.com/fc6Jengq

and then run pdf report once and then you can find errors inside of /tmp/something/ directory
there you will find report.log that tells the error. probably says that some command is missing. then just install it from packages.

Eero

1 Like

@J0hnD0e if you need more help. please send private message.

Eero

1 Like

@Eero thanks a lot, I’ll try it

Hi,
I’m dealing with the same issue, is it ok to send you a private message for help?

@portmap ok

Hi, I start digging from your tip on uncommenting the rm command, and I found out that the error that appear is “Argument of ? has an extra }”.

After googling it, I found this Stackoverflow topic: https://stackoverflow.com/questions/72604709/latex-hyperref-error-argument-of-has-an-extra-enddocument.

All that I did was commenting the line below on the file $GVMD_PATH/report_formats/43a5ea5b-a189-416b-a5e9-67db8a87384f/c402cc3e-b531-11e1-9163-406186ea4fc5/latex.xsl.

From:

\usepackage[utf8x]{inputenc}

To:

%\usepackage[utf8x]{inputenc}

And it worked.

1 Like

@paiva.rafael great. please check this out @portmap and @J0hnD0e

2 Likes

sounds like bug in packing. we need to fix it.

Eero

1 Like

@paiva.rafael it works on kali rolling-release without modifications

some buggy package?

Eero

1 Like