def dotransform(request, response):
    s = login()
    if s is None:
        return response

    vulns = Report(s, request.entity.uuid, request.value).search(
        ReportFilterQuery(
            ReportFilter(
                'exploit_framework_metasploit',
                'eq',
                'true'
            )
        )
    )

    for k, v in vulns.iteritems():
        e = NessusVulnerability(v.name, weight=v.count)
        e.severity = v.severity
        e.iconurl = icon_resource('logos/metasploit.png')
        e.pluginid = v.id
        e.count = v.count
        e.family = v.family
        e.uuid = v.uuid
        e.server = s.server
        e.port = s.port
        e += Field('metasploit_name', v.hosts[0].details[0].output['metasploit_name'], displayname='Metasploit Name')
        response += e
    return response
Example #2
0
def dotransform(request, response):
    s = login(host=request.entity.server, port=request.entity.port)
    if s is None:
        return response
    vulns = Report(s, request.entity.uuid, request.value).vulnerabilities
    for k in vulns:
        v = vulns[k]
        e = NessusVulnerability(v.name, weight=v.count)
        e.severity = v.severity
        e.pluginid = v.id
        e.count = v.count
        e.family = v.family
        e.uuid = v.uuid
        e.server = s.server
        e.port = s.port
        response += e
    return response
Example #3
0
def dotransform(request, response):
    s = login()
    vulns = Report(s, request.fields['nessusreport.uuid'], request.value).vulnerabilities
    for k in vulns:
        v = vulns[k]
        e = NessusVulnerability(v.name, weight=v.count)
        e.severity = v.severity
        e.pluginid = v.id
        e.count = v.count
        e.family = v.family
        e.uuid = v.uuid
        response += e
    return response
Example #4
0
def dotransform(request, response):
    s = login()
    if s is None:
        return response

    vulns = Report(s, request.entity.uuid, request.value).search(
        ReportFilterQuery(
            ReportFilter('exploit_framework_metasploit', 'eq', 'true')))

    for k, v in vulns.iteritems():
        e = NessusVulnerability(v.name, weight=v.count)
        e.severity = v.severity
        e.iconurl = icon_resource('logos/metasploit.png')
        e.pluginid = v.id
        e.count = v.count
        e.family = v.family
        e.uuid = v.uuid
        e.server = s.server
        e.port = s.port
        e += Field('metasploit_name',
                   v.hosts[0].details[0].output['metasploit_name'],
                   displayname='Metasploit Name')
        response += e
    return response