Results 1 to 17 of 17

Thread: how to rollback openvas to cd original

  1. #1
    Join Date
    2013-Apr
    Location
    NC USA
    Posts
    59

    how to rollback openvas to cd original

    Hey everyone this is a how to rollback openvas to the cd original after apt-get dist-upgrade breaks it.
    !!! Updated May 17 to do both 64 bit and i386 !!!
    This is for a hard drive install with Kali 64 bit and i386.

    copy this code to a file ie. openvasrollback.sh
    Code:
    #!/bin/bash
    echo -e "\033[31mThis script will roll OpenVas back to Version 5\033[m"
    echo "Do you want to rollback ? (Y/N)"
    read install
    if [[ $install = Y || $install = y ]] ; then    
            echo -e "\033[31m====== Rolling OpenVas back to V5 ======\033[m"
            apt-get remove --purge greenbone-security-assistant libopenvas6 openvas-administrator openvas-manager openvas-cli openvas-scanner
            mkdir openvasfix
            cd openvasfix
            if [ $(uname -m) == "x86_64" ] ; then
                #64 bit system
                wget http://repo.kali.org/kali/pool/main/o/openvas-manager/openvas-manager_3.0.4-1kali0_amd64.deb
                wget http://repo.kali.org/kali/pool/main/o/openvas-administrator/openvas-administrator_1.2.1-1kali0_amd64.deb
                wget http://repo.kali.org/kali/pool/main/o/openvas-cli/openvas-cli_1.1.5-1kali0_amd64.deb
                wget http://repo.kali.org/kali/pool/main/o/openvas-scanner/openvas-scanner_3.3.1-1kali1_amd64.deb
                wget http://repo.kali.org/kali/pool/main/o/openvas/openvas_1.1_amd64.deb
                wget http://repo.kali.org/kali/pool/main/g/greenbone-security-assistant/greenbone-security-assistant_3.0.3-1kali0_amd64.deb
                wget http://repo.kali.org/kali/pool/main/libo/libopenvas/libopenvas5_5.0.4-1kali0_amd64.deb
            else
                #32 bit system
                wget http://repo.kali.org/kali/pool/main/o/openvas-manager/openvas-manager_3.0.4-1kali0_i386.deb
                wget http://repo.kali.org/kali/pool/main/o/openvas-administrator/openvas-administrator_1.2.1-1kali0_i386.deb
                wget http://repo.kali.org/kali/pool/main/o/openvas-cli/openvas-cli_1.1.5-1kali0_i386.deb
                wget http://repo.kali.org/kali/pool/main/o/openvas-scanner/openvas-scanner_3.3.1-1kali1_i386.deb
                wget http://repo.kali.org/kali/pool/main/o/openvas/openvas_1.1_i386.deb
                wget http://repo.kali.org/kali/pool/main/g/greenbone-security-assistant/greenbone-security-assistant_3.0.3-1kali0_i386.deb
                wget http://repo.kali.org/kali/pool/main/libo/libopenvas/libopenvas5_5.0.4-1kali0_i386.deb
            fi
            dpkg -i *
            apt-get install gsd kali-linux kali-linux-full
            wget --no-check-certificate https://svn.wald.intevation.org/svn/openvas/trunk/tools/openvas-check-setup
            chmod +x openvas-check-setup
            ./openvas-check-setup --v5
            else
                echo -e "\e[32m[-] Ok,maybe later !\e[0m"
            fi
            echo -e "\e[32m[-] Done!\e[0m"
    save the file ie. openvasrollback.sh and then chmod +x it.
    run this script with ie.
    ./openvasrollback.sh

    enjoy openvas 5 again!
    Last edited by reaperz73; 2013-05-18 at 02:48. Reason: made whole script sexier

  2. #2
    Join Date
    2013-May
    Posts
    26
    I had to add http://repo.kali.org/kali/pool/main/...ali0_amd64.deb
    It's still not totally happy with the stuff in init.d to run the setup, but I can at least start the server now, still looking for the init packages.

  3. #3
    Join Date
    2013-Apr
    Location
    NC USA
    Posts
    59
    Quote Originally Posted by compuwar View Post
    I had to add http://repo.kali.org/kali/pool/main/...ali0_amd64.deb
    It's still not totally happy with the stuff in init.d to run the setup, but I can at least start the server now, still looking for the init packages.
    thanks I fixed the script to include libopenvas5 and also the check setup script

  4. #4
    Join Date
    2013-May
    Posts
    26
    I just re-ran this after adding the lib and gsd to the downloads and now the original openvas-setup script runs but openvas manager is grumpy about its database versions:

    md main:MESSAGE:2013-05-15 22h00.16 utc:19769: init_manage: database version of database: 11

    md main:MESSAGE:2013-05-15 22h00.16 utc:19769: init_manage: database version supported by manager: 56

    md main:CRITICAL:2013-05-15 22h00.16 utc:19769: main: database is wrong version


    openvasmd --rebuild, openvasmd --migrate and openvasmd --update all seem to not work. I tried nuking openvas.* are reinstalling, but no joy. Thoughts?

  5. #5
    Join Date
    2013-Apr
    Location
    NC USA
    Posts
    59
    Quote Originally Posted by compuwar View Post
    I just re-ran this after adding the lib and gsd to the downloads and now the original openvas-setup script runs but openvas manager is grumpy about its database versions:

    md main:MESSAGE:2013-05-15 22h00.16 utc:19769: init_manage: database version of database: 11

    md main:MESSAGE:2013-05-15 22h00.16 utc:19769: init_manage: database version supported by manager: 56

    md main:CRITICAL:2013-05-15 22h00.16 utc:19769: main: database is wrong version


    openvasmd --rebuild, openvasmd --migrate and openvasmd --update all seem to not work. I tried nuking openvas.* are reinstalling, but no joy. Thoughts?
    run the openvas-check-setup script
    also note I just changed the original post and added apt-get install gsd kali-linux kali-linux-full to the script so you will have the menu items back
    be aware when you run the check-setup up script it will take a really long time to repair the databases

  6. #6
    Join Date
    2013-May
    Posts
    26
    check-setup gave me:

    Error: no such table: meta
    ERROR: Could not determine database revision, database corrupt or in invalid format.
    FIX: Delete database at /var/lib/openvas/mgr/tasks.db and rebuild it.

    but deleting the db didn't help- and I'm not sure what to do about the missing table. I'll try purging and re-running the script...

    Ok- I had to manually nuke /var/cache/openvas. gsd wouldn't install without a download and the check script gets an SSL validation error, but I already had a copy of it resident...

    Here's what I ended up doing:

    added gsd_1.2.2-1kali0_amd64.deb to the mix
    purged each individual package
    rm -rf /var/lib/openvas and /var/cache/openvas
    re-ran the script
    ran openvas-setup

    but now I have a disk error I have to fix, so I have to reboot to see where things are...

  7. #7
    Join Date
    2013-Apr
    Location
    NC USA
    Posts
    59
    That's weird compuwar gsd version in the repos has not changed?
    Oh well lets see how it goes after your reboot.

  8. #8
    Join Date
    2013-May
    Posts
    26
    I changed my sources.list to try to reinstall from CD, probably the issue.
    doing openvas-scapdata-sync now, it's slow...

  9. #9
    Join Date
    2013-May
    Posts
    26
    FYI: openvas-check-setup probably needs a --v5 at the end above too, unless your version is older than mine

  10. #10
    Join Date
    2013-Apr
    Location
    NC USA
    Posts
    59
    yeah openvas-scapdata-sync takes forever

  11. #11
    Join Date
    2013-Apr
    Location
    NC USA
    Posts
    59
    Quote Originally Posted by compuwar View Post
    FYI: openvas-check-setup probably needs a --v5 at the end above too, unless your version is older than mine
    Thanks I just fixed it.

  12. #12
    Join Date
    2013-May
    Posts
    26
    Needed an openvsmd --rebuild followed by openvas-setup then everything worked- thanks so much for your help!

  13. #13
    Join Date
    2013-Mar
    Posts
    20
    Thanks reaperz73, I just ran the bash script and it fixed it and added OpenVAS back to the menu under Vulnerability Analysis > OpenVAS Quick heads up for everyone I had to reboot before I could log in to OpenVAS and also to use the web interface at http://127.0.0.1:9392

    Thanks again reaperz73

  14. #14
    Join Date
    2013-Apr
    Location
    NC USA
    Posts
    59
    In the rollback script,
    I have replaced this
    wget https://svn.wald.intevation.org/svn/...as-check-setup
    with this
    wget --no-check-certificate https://svn.wald.intevation.org/svn/...as-check-setup

    to ignore the certificate error

    something is up with openvas certificate.

  15. #15
    Join Date
    2013-Apr
    Location
    NC USA
    Posts
    59
    !!! Update re-wrote script to be 64 bit and i386 and sexier check first post for the new version

  16. #16
    Join Date
    2013-Apr
    Posts
    182
    Quote Originally Posted by reaperz73 View Post
    Hey everyone this is a how to rollback openvas to the cd original after apt-get dist-upgrade breaks it.
    !!! Updated May 17 to do both 64 bit and i386 !!!
    This is for a hard drive install with Kali 64 bit and i386.

    copy this code to a file ie. openvasrollback.sh
    Code:
    #!/bin/bash
    echo -e "\033[31mThis script will roll OpenVas back to Version 5\033[m"
    echo "Do you want to rollback ? (Y/N)"
    read install
    if [[ $install = Y || $install = y ]] ; then    
            echo -e "\033[31m====== Rolling OpenVas back to V5 ======\033[m"
            apt-get remove --purge greenbone-security-assistant libopenvas6 openvas-administrator openvas-manager openvas-cli openvas-scanner
            mkdir openvasfix
            cd openvasfix
            if [ $(uname -m) == "x86_64" ] ; then
                #64 bit system
                wget http://repo.kali.org/kali/pool/main/o/openvas-manager/openvas-manager_3.0.4-1kali0_amd64.deb
                wget http://repo.kali.org/kali/pool/main/o/openvas-administrator/openvas-administrator_1.2.1-1kali0_amd64.deb
                wget http://repo.kali.org/kali/pool/main/o/openvas-cli/openvas-cli_1.1.5-1kali0_amd64.deb
                wget http://repo.kali.org/kali/pool/main/o/openvas-scanner/openvas-scanner_3.3.1-1kali1_amd64.deb
                wget http://repo.kali.org/kali/pool/main/o/openvas/openvas_1.1_amd64.deb
                wget http://repo.kali.org/kali/pool/main/g/greenbone-security-assistant/greenbone-security-assistant_3.0.3-1kali0_amd64.deb
                wget http://repo.kali.org/kali/pool/main/libo/libopenvas/libopenvas5_5.0.4-1kali0_amd64.deb
            else
                #32 bit system
                wget http://repo.kali.org/kali/pool/main/o/openvas-manager/openvas-manager_3.0.4-1kali0_i386.deb
                wget http://repo.kali.org/kali/pool/main/o/openvas-administrator/openvas-administrator_1.2.1-1kali0_i386.deb
                wget http://repo.kali.org/kali/pool/main/o/openvas-cli/openvas-cli_1.1.5-1kali0_i386.deb
                wget http://repo.kali.org/kali/pool/main/o/openvas-scanner/openvas-scanner_3.3.1-1kali1_i386.deb
                wget http://repo.kali.org/kali/pool/main/o/openvas/openvas_1.1_i386.deb
                wget http://repo.kali.org/kali/pool/main/g/greenbone-security-assistant/greenbone-security-assistant_3.0.3-1kali0_i386.deb
                wget http://repo.kali.org/kali/pool/main/libo/libopenvas/libopenvas5_5.0.4-1kali0_i386.deb
            fi
            dpkg -i *
            apt-get install gsd kali-linux kali-linux-full
            wget --no-check-certificate https://svn.wald.intevation.org/svn/openvas/trunk/tools/openvas-check-setup
            chmod +x openvas-check-setup
            ./openvas-check-setup --v5
            else
                echo -e "\e[32m[-] Ok,maybe later !\e[0m"
            fi
            echo -e "\e[32m[-] Done!\e[0m"
    save the file ie. openvasrollback.sh and then chmod +x it.
    run this script with ie.
    ./openvasrollback.sh

    enjoy openvas 5 again!

    gsad: error while loading shared libraries: libmicrohttpd.so.10: cannot open shared object file: No such file or directory

  17. #17
    Join Date
    2013-Apr
    Location
    NC USA
    Posts
    59
    @when123
    Code:
    apt-get install libmicrohttpd
    However OpenVas 6 is working now. So no need to rollback.

Similar Threads

  1. Kali on Original Macbook (2006)
    By ryanknut in forum Installing Archive
    Replies: 1
    Last Post: 2016-09-29, 11:44

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •