Results 1 to 4 of 4
  1. #1
    jamestford is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    2

    Do I need to create additional tables?

    Having trouble creating a query to summarize vulnerability data and display the affected hosts. So far I've been able to create a query that counts the number of vulnerabilities based on the plugin that the scanner used but cannot group the ip addresses by vulnerability. I'm guessing I may need to denormalize the data but cannot for the life of me figure this out, I've been banging my head against this for 8 hours now and really need some help.



    Here is the the table layout

    ID - randomly assigned by access
    Plugin ID - plugin used to identify vulnerability
    Risk - risk of vulnerability
    Name - short description
    Description - description of vulnerability
    Host - host ip address
    Protocol - protocol used
    Port - port number where vulnerability was found
    Plugin Output - specific vulnerability data for the host

    Here is my query:

    SELECT Results.[Plugin ID], Count(*) AS [Count], Results.Risk, Results.Name
    FROM Results
    WHERE (((Results.Risk)="Critical" Or (Results.Risk)="High"))
    GROUP BY Results.[Plugin ID], Results.Risk, Results.Name
    ORDER BY Results.Risk, Count(Results.[Plugin ID]) DESC;

    This query does a great job of counting the number of vulnerabilities and displaying them by Criticality, however it does not associate the host ip address with the vulnerabilities, every time I try to associate the host ip address it messes up the count.

    Any ideas?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Perhaps if you posted some sample raw data and sample of desired output we could suggest a method. I don't know what you mean by 'associate the host ip address with the vulnerabilities'. There's already an association because the vulnerability and host ip are in same record.

    How does this query display by Criticality? The grouping is on PluginID, Risk, Name - what is 'Criticality'?

    BTW, advise no spaces in naming convention, nor reserved words as names.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    jamestford is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    2
    Thanks for the reply, here is an example of the type of query or report I'd like to build:

    Plugin ID: 5881
    Count: 3458
    Risk: Critical
    Name: VMware Security Updates for vCenter Server
    Affected Hosts: 192.168.1.1, 192.168.1.3, 192.168.1.4, 192.168.1.5

    I have a query that is able to quickly generate a list of plugins, counts, risk, and name fields, but cannot figure out how to create a column that aggregates the affected hosts.

    Here is what some entries in the database look like:

    ID: 1
    Plugin ID: 5881
    Risk: Critical
    Name: VMware Security Updates for vCenter Server
    Host: 192.168.1.1

    ID: 2
    Plugin ID: 5881
    Risk: Critical
    Name: VMware Security Updates for vCenter Server
    Host: 192.168.1.2

    ID: 3
    Plugin ID: 5881
    Risk: Critical
    Name: VMware Security Updates for vCenter Server
    Host: 192.168.1.3

    ID:4
    Plugin ID: 5881
    Risk: Critical
    Name: VMware Security Updates for vCenter Server
    Host: 192.168.1.4

    Here is my current query:

    SELECT Results.[Plugin ID], Count(*) AS [Count], Results.Risk, Results.Name
    FROM Results
    WHERE (((Results.Risk)="Critical" Or (Results.Risk)="High"))
    GROUP BY Results.[Plugin ID], Results.Risk, Results.Name
    ORDER BY Results.Risk, Count(Results.[Plugin ID]) DESC;

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Was looking for a sample of the desired output. What do you want results to look like? Build a facsimile in Excel or even a table in the Advanced Post Editor.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Create Tables on load
    By tristandoo in forum Programming
    Replies: 6
    Last Post: 02-07-2014, 10:43 AM
  2. Replies: 1
    Last Post: 05-04-2013, 05:16 PM
  3. How to create using the fields from two tables?
    By Allen1892893 in forum Access
    Replies: 1
    Last Post: 03-31-2013, 07:29 PM
  4. to add additional tables or not?
    By phineas629 in forum Database Design
    Replies: 1
    Last Post: 09-30-2011, 12:23 PM
  5. what tables to create
    By mecca in forum Access
    Replies: 9
    Last Post: 11-04-2010, 02:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums