Vous êtes sur la page 1sur 11

OPEN VAS BY EtherGoat

I know a lot of people have had trouble with this so hopefully this will get you going. This walkthrough is comprised of a few details I should layout: 1) Using BackTrack 5 R3 (32bit) 2) Using the "how to" setup from the BackTrack Wiki (which does work) but I will tell you exactly what to do 3) End result is to have the Web UI as our interface. Why? Don't ask so many questions. I'm going to skip over the "What is OpenVAS" explanation. If you don't know, go use the Googles on the interwebs. Also, this a fresh install of BackTrack, update and upgrade, and that's all. So, that all being said, let us begin: So, OpenVAS is already installed, but needs configuration. For those of you who have had issues getting it to run, the answer is yes, there is a specific method to get it working. To find all the associated functions of the whole OpenVAS suite, go to: Applications--> BackTrack--> Vulnerability Assessment--> Vulnerability Scanners--> OpenVAS. From the OpenVas menu entry, you can see a whole list of entries. Lets take a quick look at those.

Step 1: Run OpenVAS check setup Now, sometimes, when this is run you will see the following:

Not a problem, and just one more clue as to why so many people pull their hair out. If this occurs, here's what we do:

What I did here, is go to the directory where the error was reported. So that was: cd /pentest/misc/openvas/. The ran ls command, and we can see the openvas-check-setup , so from there I typed: ./openvas-check-setup and hit enter. Here's the result:

As you can see, it returned an error message about not having made a certificate. It's also informing you to go run that mkcert now, but hold on there hot shot. Before we do so, we are going to create a user first. Step 2: Run OpenVAS Adduser So go the OpenVas Menu and select OpenVas Adduser.

Ok so here's the steps: Login: root2 (the name of the user being added, can be anything, I have root already so I called it root2) Authentication (pass/cert) [pass]: (just hit enter, as we are going to make a password instead of a certificate) Login Password: (type in a password you want to use for the user i.e. for root2) Login Password (again): (type in the password again to confirm) User Rules (don't need any, just hit ctrl-D) Is that ok? (y/n) [y]: (type the letter y and hit enter) And you are done with that step.

Step 3: Run OpenVAS Mkcert Go back to the OpenVAS menu and select OpenVAS Mkcert. This will create a certificate that isn't actually needed since we are going to run this all from our local machine. However, and this is

were confusion can throw people off, we need to create it anyway in order to have everything work. So lets look at what we need to type in after running mkcert:

CA certificate lifetime in days [1460]: (hit enter) Server certificate lifetime in days [365]: (hit enter) Your country (two letter code) [DE]: CA (I chose CA for Canada) Your state or province name [none]: (hit enter) Your location (e.g. town) [Berlin]: Hell (I chose hell, feels like it sometimes) Your Organization [OpenVAS Users United]: (hit enter) And now, you should see:

And your are done with that step. Step 4: Run OpenVAS NVT Sync We are now going to pull the latest NVT's, the files used to detect vulnerabilities. Update these often even after we are all setup. Note that the first run of this could take some time. So go to the OpenVAS menu and select OpenVAS NVT Sync

And you are done with that step. Step 5: Run OpenVAS Scanner Now that we have the latest NVT's, we can start the scanner for the first time so that it can load them all. Note that this is going to be brutally slow the first time, depending on your setup it could

take 30min to an hour, so go have a bite. I should also state that whenever you start the OpenVAS scanner, it will run as a daemon in the background unless you stop it manually or shutdown. So go to the OpenVAS menu, and select Start OpenVAS Scanner:

And you are done with that step. Step 6: Setup the OpenVAS Manager Now we are really going to enter the parts where people get lost and fist their monitor. This step is not run from the menu but a command we will run from the terminal. We are going to create a client certificate for the manager. So open up a terminal window and do the following:

All you need to enter is the command to run which is: openvas-mkcert-client -n om -i And you are done with that step. Step 7: Rebuild the database So because of this new cert entry, our database (you know those NVT's we grew a beard waiting for) is out of 'date' so to speak. I will mention at this point that everytime you run the NVT Sync to

pull the latest ones, you should rebuild the database again, but I will remind you at the end with a little memo of everything you need to run whenever you want to run OpenVAS ( I promise it's

much shorter than what we are doing now). All we need to do to rebuild the DB is:

We just open up a terminal window and run the command: openvasmd --rebuild (it will take a few minutes) And your are done with that step. Step 8: Setup the OpenVAS Administrator So now we are going to create an admin that lets us run all our scans. Once again, this is not from the menu but a command we will run in the terminal. So open a terminal windows and do the following:

We entered the command: openvasad -c 'add_user' -n administrator -r Admin where administrator (not Admin) is the name of the admin we are creating, name it whatever you want. It will than

ask you for a password, enter it and that's it. I really do hope you have been making notes about the user names and passwords we've created this far right? Good. And you are done with that step. Before we continue, we are going to follow the same steps outlined in the BackTrack wiki at this point, but right where it ends we are going to shut down the services we are about to start, then

restart them. Why? well, you may not have the same problems I had at this point, but I found this worked like a charm, so just do it. Step 9: Startup the OpenVAS Manager The next few commands we are going to run, are going to operate as background daemons. Just want to point that out now. So to start up the manager, open a terminal and run the following:

We just enter at the terminal: openvasmd -p 9390 -a 127.0.0.1 And you are done with that step. Step 11: Startup the Greenbone Security Assistant And again, open a terminal and do the following:

We just enter at the terminal: gsad --http-only --listen=127.0.0.1 -p 9392 And you are done with that step.

Step 12:

Access the WebUI So open up your browser and enter the following:

We just enter 127.0.0.1:9392 in the address bar. You'll be greeted with a login page, it wants your admin credentials (remember those? the ones you made a note of wink wink). You will then be brought to the main page

Guess what.....OpenVAS is ready to rock. But wait a second. Don't get trigger happy just yet. We are going to shut it all down and start it right back up again. Why? So that you can now see how

to get everything up and running the next time you want to use it. So here' what I want you to do:

1) Log out of the WebUI 2) From the OpenVAS menu, every menu entry that starts with Stop, I want you to stop. Yes all of them. Final Step: Startup Procedure for OpenVAS Ok, here we go:

The screenshot is my text file for all the info I need to get it running. To spell it out here's the steps:

To run OpenVAS (web UI) - Openvas NVT Sync (From the menu entry) - openvasmd --rebuild (From terminal) - Start Openvas scanner (From the menu entry)

- openvasmd -p 9390 -a 127.0.0.1 (From terminal) - openvasad -a 127.0.0.1 -p 9393 (From terminal) - gsad --http-only --listen=127.0.0.1 -p 9392 (From terminal) - Open Browser to http://127.0.0.1:9392 - Enter Administrator credentials - Welcome to OpenVAS http://ethergoat-blog.blogspot.jp/2012/09/openvas-setp-tutorial.html MIN MAW SOE

Vous aimerez peut-être aussi