Database schema for the port scanning portion of the vulnerability scanner

Let's try to understand the backend database and the structure of the various tables within the database that we are using. The show databases command is used to list all the databases present in MySQL:

      

In order to use the current database, which is relevant for our vulnerability scanner, we use the use nmapscan command. Furthermore, to see all the tables within the current database, we use the show tables command:

In order for us to see the structure or schema of the table that will hold all the scan projects, we use the desc project command. To see the data of the project we scanned, we issue the following SQL query:

IPtable is the table that holds the results for the port scanning results of our target. The following command, desc IPtable, shows us the schema of the table:

The following screenshot shows the data present in the IPtable for the current project, 744. We can see that all the service scan results are placed in the table in CSV format:

Once the port scanning of the project is successfully finished, all the details of the project are moved from IPtable to IPtable_history. This is to make the lookup operation fast on IPtable. As a result, the schema of IPtable_history table would be exactly the same as IPtable. This can be verified in the following screenshot:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.216.229