Metasploit mailing list archives

Re: Error from openvas_report_import function after scan completion


From: George Birmingham <sec_engineer () roadrunner com>
Date: Wed, 28 Sep 2011 15:49:30 -0400

Stephen,

If I am not mistaken, the OpenVAS package can export its results into a .NBE file directly, which I was able to do at the start of this problem. I just couldn't import the results directly via the bridge. Has something changed ?

I'll go back tonight and re-verify, but I think I was able, from the Greenbone Security Assistant (browser session), to publish the .NBE file, then come back to Metasploit console and import the .NBE file from disk. The error below came from trying to import the results using the results id. This worked fine, though cumbersome, and only if Metasploit and OpenVAS are co-resident on the same system. I have not tried having OpenVAS export an .NBE file to a network file system location.

Your thoughts ?

Thanks,

George Birmingham


On 9/28/2011 1:58 PM, Average SecurityGuy wrote:
George and Tod,

I have updated issue 5436 with the new openvas code. I have tested the new library and plugin and everything seems to be working well. I am having trouble importing the NBE file but that is an import issue not a openvas plugin or library issue. I will try to work on that one later.

Stephen

On Tue, Sep 13, 2011 at 9:21 PM, George Birmingham <sec_engineer () roadrunner com <mailto:sec_engineer () roadrunner com>> wrote:

    Greetings. Having completed the first scan using OpenVAS from
    Metasploit, I received the following error when trying to import
    the scan results:

    Test initiation:

    *msf > openvas_task_start a2eb7c84-f28f-49c7-8ae4-3be813e1f954
        :
        :
    *</Task executes without issuing any errors and was monitored
    using the Browser (Greenbone Security Assistant) access to OpenVAS>/
    *:*
        :
    *msf > openvas_task_list a2eb7c84-f28f-49c7-8ae4-3be813e1f954
    [+] OpenVAS list of tasks

    ID                                    Name        Status  Progress
    --                                    ----        ------  --------
    a2eb7c84-f28f-49c7-8ae4-3be813e1f954  RouterScan  Done    -1*

    *msf > openvas_report_import a2eb7c84-f28f-49c7-8ae4-3be813e1f954*
    [-] Error while running command openvas_report_import: undefined
    method `elements' for nil:NilClass

    Call stack:
    /pentest/framework-4.0.0/msf3/lib/openvas/openvas-omp.rb:500:in
    `report_get_byid'
    /pentest/framework-4.0.0/msf3/plugins/openvas.rb:653:in
    `cmd_openvas_report_import'
    /pentest/framework-4.0.0/msf3/lib/rex/ui/text/dispatcher_shell.rb:380:in
    `send'
    /pentest/framework-4.0.0/msf3/lib/rex/ui/text/dispatcher_shell.rb:380:in
    `run_command'
    /pentest/framework-4.0.0/msf3/lib/rex/ui/text/dispatcher_shell.rb:342:in
    `run_single'
    /pentest/framework-4.0.0/msf3/lib/rex/ui/text/dispatcher_shell.rb:336:in
    `each'
    /pentest/framework-4.0.0/msf3/lib/rex/ui/text/dispatcher_shell.rb:336:in
    `run_single'
    /pentest/framework-4.0.0/msf3/lib/rex/ui/text/shell.rb:199:in `run'
    /pentest/framework-4.0.0/msf3/msfconsole:130

    *msf > openvas_report_import a2eb7c84-f28f-49c7-8ae4-3be813e1f954*
    [-] Error while running command openvas_report_import: undefined
    method `text' for nil:NilClass

    Call stack:
    /pentest/framework-4.0.0/msf3/lib/openvas/openvas-omp.rb:500:in
    `report_get_byid'
    /pentest/framework-4.0.0/msf3/plugins/openvas.rb:653:in
    `cmd_openvas_report_import'
    /pentest/framework-4.0.0/msf3/lib/rex/ui/text/dispatcher_shell.rb:380:in
    `send'
    /pentest/framework-4.0.0/msf3/lib/rex/ui/text/dispatcher_shell.rb:380:in
    `run_command'
    /pentest/framework-4.0.0/msf3/lib/rex/ui/text/dispatcher_shell.rb:342:in
    `run_single'
    /pentest/framework-4.0.0/msf3/lib/rex/ui/text/dispatcher_shell.rb:336:in
    `each'
    /pentest/framework-4.0.0/msf3/lib/rex/ui/text/dispatcher_shell.rb:336:in
    `run_single'
    /pentest/framework-4.0.0/msf3/lib/rex/ui/text/shell.rb:199:in `run'
    /pentest/framework-4.0.0/msf3/msfconsole:130*
    msf >*

    In viewing the OpenVAS report in the browser, the router has two
    findings, one HIGH and one MEDIUM.

    What shall I try next ?

    Thanks,

    George Birmingham
    Huntersville, NC


    _______________________________________________
    https://mail.metasploit.com/mailman/listinfo/framework




--
Stephen Haywood
Security Consultant

Twitter: @averagesecguy
Blog: averagesecurityguy.info <http://averagesecurityguy.info>


_______________________________________________
https://mail.metasploit.com/mailman/listinfo/framework

Current thread: