poniedziałek, 26 grudnia 2016

Automated scans with OpenVAS and Kali

I was wondering if we can run (some kind of ) an “automated scan”, out-of-the-box in Kali Linux. Version I used was updated to the latest one (for 26.12.2016, so 2.0). Here we go...

I’m sure you’re familiar with security scanner called OpenVAS. For those who don’t know what is it, check here and here for more details. 

During some web-research I found couple of articles I think you should read. You will find there OpenVAS command line described as well as few tips&tricks about the usage of the tool. 

As a "fan of CLI" I was curious if I will be able to prepare a small wrapper for omp to automate "scanning with Kali and OpenVAS" a little bit. Below you will find few results on screens:

You can now switch to Kali (X-mode) and go to OpenVAS Web Console, to see that there are already some results waiting for you:

And some more ...

So now, I think, you can create some cron-file to run your scans more automatically ;)

I know it's extremely easy to write a wrapper like this, nothing new here. Just few python lines and cool print messages. ;) As far as I'm familiar with the documentation of the OpenVAS, there is also a way to get some results as a file-"report" and save it to PDF/HTML document.

Ok, let's finally grab some source:

Maybe you will find the idea useful.

How to install OpenVAS on your box, you will find here or you can use the script described here.
Assuming, you already have installed and working OpenVAS, check the poc source located here.

Set a chmod u+x for code16.py and run it against your hostname/IP. (Note: I created the script to run it as root, so probably you will need to switch to root mode.)

Now we can start watching cool progress-bar in the Kali box ;)

In case of any questions, feel free to email me.


2 komentarze:

  1. Failed to acquire socket.
    [-] TargetID already exists, try different target host/IP

    1. Hi, that means: host you're trying to scan is already listed in openvas panel. you need to delete it manualy. ;)