This one is something that took quite some time to pull off while searching, most of the information I found was either wrong or incomplete, so here we go.
- Build openvas with postgresql support.
- Make required configuration changes to Kali linux source, such as service scripts.
- Create .deb package with kali linux source.
To pull this off I will be using the Kali Linux Rolling v4.6.4, other than the usual build tools we will need Postgresql libraries to build Openvas-Manager with Postgresql.
We will start with the Database preparations, we are told by documentation on Openvas document that we will need user equal to login user if your using Kali your probably using root.
In the previous commands we create a user, with the following privileges.
- -D: The new user will not be allowed to create databases.
- -R: The new user will not be allowed to create new roles.
- -S: The new user will not be a superuser.
And new database with root as its owner, we will then create a new role, and assign it to the new database user root, and load the uuid-ossp database extension.
The stuff needed to build this are as follows:
Does are the required libraries to openvas to postgresql.
Each of does packages have dependencies on their own, we can check does by executing:
The result is a list of dependencies that we need to install before we build any of the packages.
For the openvas-manager-6.0.8 the dependencies are as follows.
The package needs some changes before we building the libopenvas8.
Next is openvas-manager, we will have to to change the build rules at debian/rules and
A minor detail about this package is an error that showed up about a missing library after a while i found out that it wasn’t included in the .deb file so we need to add this lines to make shore its included.
After installing openvas-manager build openvas-scanner, openvas-cli and openvas, after installing, does packages finishing the installation of any missing runtime dependencies like redis-server with.
After is the same as regular package.