(kali) Pdf report is empty while other format (cvs, xml) are ok

@Panos You need to edit correct file.

Eero

The work around worked for me a couple days ago.
However after the recent sync it is not working.

I (re)commented out “\usepackage[utf8x]{inputenc}” in both latex.xsl files I found, tried restarting services using

systemctl daemon-reload && systemctl restart gvmd.service && systemctl restart gsad.service

tried downloading a report pdf and it had the issue. I tried rebooting and then once the services were all back up I tried again with the same results.

I also see there are further differences in the latex.xsl file:
the new file has \usepackage{{textcomp}} added and

<xsl:value-of select="value/text()"/>\\ \hline

in the old file becomes

<xsl:call-template name="escape_text">   
<xsl:with-param name="string" select="value/text()"/
        </xsl:call-template>                                  
        <xsl:text>\\ \hline</xsl:text>

in the new file. (there are also some more additions to the new file for a new solution element. )

Ad sbrun has pointed out in Kali Linux Bug Tracker (and it worked for me perfectly):

Look for the file latex.xsl in /var/lib/gvm/gvmd/report_formats/*
In the file replace “\usepackage[utf8x]{inputenc}” by “%\usepackage[utf8x]{inputenc}”

Thank you, that initially worked a few weeks ago but last week when I tried re-applying the replacement of “\usepackage[utf8x]{inputenc}” with “%\usepackage[utf8x]{inputenc}”, the change did not work.

Just to get that right, since the initial post we changed the report format slightly thus the patch might need some adjustments. Additionally your local changes will be overridden with every feed sync (to be precise when running greenbone-feed-sync --type GVMD_DATA).

1 Like

Hi Bricks could you already find a proper solution to the issue ?
I updated kali distro including gsm packages but can now only create html report, no csv or pdf.
The workaround %\usepackage[utf8x]{inputenc} does not work anymore.
Any update on this issue ?
Many thanks
LL & P

Flip

AFAICT there is currently no one from Greenbone looking into any solution / there are no plans to do so.

Based on the collected info so far this is an issue in a 3rdparty LaTeX package which needs to be fixed within that one and which is outside of the control of Greenbone.

2 Likes

Thank you @cfi for your response. Is there any existing alternative to the used LaTex packages ?

@flipthemouse maybe I can try fix the issue.

Eero

Thank you @Eero . I think it’s quiet beneficial to solve that issue on the report formats.

@flipthemouse
@waldo
@Panos
@cfi

I just tested and same modification works on kali rolling linux release (installed from net installer)

path:

/var/lib/gvm/gvmd/report_formats/1f3202c2-c499-4260-922a-527106c05061/c402cc3e-b531-11e1-9163-406186ea4fc/latex.xsl

edit the file:

and remove line:

\usepackage[utf8x]{inputenc}

same in patch (diff format)

please note that you need to chattr +i /var/lib/gvm/gvmd/report_formats/1f3202c2-c499-4260-922a-527106c05061/c402cc3e-b531-11e1-9163-406186ea4fc5/latex.xsl to prevent sync to break the modification.

if any question, justr ask…

Eero

@flipthemouse as I looks like greenbone is unable to fix the issue, we need to patch kali packages.

edit: looks like new report format contains base64 coded data for scripts. weird.

I used this commandline on decode pdf input:

grep 'file name="latex.xsl' /var/lib/gvm/data-objects/gvmd/2*/report-formats/pdf-c402cc3e-b531-11e1-9163-406186ea4fc5.xml | sed  's#<file name="latex.xsl">##' | sed "s#</file>##" | sed 's/^[ \t]*//' |base64 -d

now just need to find way to edit it onliner…

Eero

@flipthemouse please test this on latest kali linux:

edit: new version, not perfect but works.

  1. run gvmd_data sync → greenbone-feed-sync --type GVMD_DATA
  2. run script: https://raw.githubusercontent.com/EeroV/greenbone-patches/main/fix-pdf-gen-kali-latest.sh (latest version)
  3. reload greenbone to sync data to system…

Eero

1 Like

If Kali breaks TeX Compatibility and it´s already upstream fixed, Kali should fix TeX and we all should_not line edit and patch in templates.

@Lukas lets hope for that.

issue has been ongoing for months.

Eero

@Eero There are ton´s of other Distributions out there without that issues :wink: I never hear any complains form a Gentoo user here, and i am happily using Gentoo since years :wink:

@Lukas well. I maybe many people are using kali for penetration testing…

I have not used gentoo for years. too slow and complex to install anything.

Eero

You should know what you are doing, esp. when it comes to penetration testing :wink:

@Lukas the main issue is that installing software takes years. even the kali might not be the best solution, but it works.

Eero

If it is a Kali issue it will become a Debian and Ubuntu issue too. Either because Kali imported packages from Debian testing or the packagers of Kali did upload the software for Debian too. So an advice for switching the distro because “Kali is bad” is a misleading advice.