示例#1
0
def wf_cvemode(targetcve):
    libvmintgr.printd('starting cve report workflow...')
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    libvmintgr.vuln_extraction(scanner, vmconfig.vulnquery_where,
        writefile=vulns_writefile, readfile=vulns_readfile,
        targetcve=targetcve)
示例#2
0
def wf_group_list():
    libvmintgr.printd('starting asset group list workflow...')
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    for i in scanner.grouplist.keys():
        grpent = scanner.grouplist[i]
        sys.stdout.write('%s %s\n' % \
            (str(i).ljust(6), grpent['name']))
示例#3
0
def wf_vuln_proc():
    libvmintgr.printd('executing vulnerability processing automation...')
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    libvmintgr.vuln_extraction(scanner,
                               vmconfig.vulnquery_where,
                               writefile=vulns_writefile,
                               readfile=vulns_readfile)
示例#4
0
def wf_swquerymode(targetpkg):
    libvmintgr.printd('starting software query workflow...')
    asw = libvmintgr.software_extraction(scanner, targetpkg)
    for i in asw:
        for ent in asw[i]:
            sys.stdout.write('%s %s %s %s\n' % \
                (ent['ipaddr'].ljust(15), ent['hostname'].ljust(50),
                ent['swname'].ljust(20), ent['swver']))
示例#5
0
def wrapmain():
    try:
        domain()
    except SystemExit:
        pass
    except:
        libvmintgr.printd(traceback.format_exc())
        sys.exit(1)
示例#6
0
def wrapmain():
    try:
        domain()
    except SystemExit:
        pass
    except:
        libvmintgr.printd(traceback.format_exc())
        sys.exit(1)
示例#7
0
def wf_escalations():
    libvmintgr.printd('starting escalation workflow...')
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    libvmintgr.escalate_vulns(vmconfig.escdir, scanner,
        vmconfig.escalate_vulns, vmconfig.escalate_compliance)
    libvmintgr.escalate_hints(vmconfig.escdir, scanner,
        vmconfig.escalate_hints, vmconfig.vulnquery_where)
示例#8
0
def wf_group_list():
    libvmintgr.printd('starting asset group list workflow...')
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    for i in scanner.grouplist.keys():
        grpent = scanner.grouplist[i]
        sys.stdout.write('%s %s\n' % \
            (str(i).ljust(6), grpent['name']))
示例#9
0
def wf_swquerymode(targetpkg):
    libvmintgr.printd('starting software query workflow...')
    asw = libvmintgr.software_extraction(scanner, targetpkg)
    for i in asw:
        for ent in asw[i]:
            sys.stdout.write('%s %s %s %s\n' % \
                (ent['ipaddr'].ljust(15), ent['hostname'].ljust(50),
                ent['swname'].ljust(20), ent['swver']))
示例#10
0
def wf_cvemode(targetcve):
    libvmintgr.printd('starting cve report workflow...')
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    libvmintgr.vuln_extraction(scanner,
                               vmconfig.vulnquery_where,
                               writefile=vulns_writefile,
                               readfile=vulns_readfile,
                               targetcve=targetcve)
示例#11
0
def wf_escalations():
    libvmintgr.printd('starting escalation workflow...')
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    libvmintgr.escalate_vulns(vmconfig.escdir, scanner,
                              vmconfig.escalate_vulns,
                              vmconfig.escalate_compliance)
    libvmintgr.escalate_hints(vmconfig.escdir, scanner,
                              vmconfig.escalate_hints,
                              vmconfig.vulnquery_where)
示例#12
0
def wf_hostquery(targethosts):
    libvmintgr.printd('starting host query workflow...')
    thostbuf = []
    fd = open(targethosts, 'r')
    thostbuf = [x.strip() for x in fd.readlines()]
    fd.close()
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    wherebuf = libvmintgr.build_targethost_where(scanner, thostbuf)
    libvmintgr.vuln_extraction(scanner, wherebuf,
        writefile=vulns_writefile, readfile=vulns_readfile,
        targethosts=True)
示例#13
0
def wf_device_auth_fail():
    libvmintgr.printd('executing device authentication failure workflow...')
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    ret = libvmintgr.generate_report(scanner, vmconfig.devauth_report)
    faildata = libvmintgr.nexpose_parse_custom_authfail(scanner, ret)
    # XXX Add exemption handling here, probably based on a wildcard host
    # match or CIDR match
    for ln in faildata:
        sys.stdout.write('%s %s %s %s\n' % \
            (ln['ip'].ljust(17), ln['hostname'].ljust(60),
            ln['credstatus'].ljust(10), ln['sites']))
示例#14
0
def wf_device_auth_fail():
    libvmintgr.printd('executing device authentication failure workflow...')
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    ret = libvmintgr.generate_report(scanner, vmconfig.devauth_report)
    faildata = libvmintgr.nexpose_parse_custom_authfail(scanner, ret)
    # XXX Add exemption handling here, probably based on a wildcard host
    # match or CIDR match
    for ln in faildata:
        sys.stdout.write('%s %s %s %s\n' % \
            (ln['ip'].ljust(17), ln['hostname'].ljust(60),
            ln['credstatus'].ljust(10), ln['sites']))
示例#15
0
def wf_asset_dump():
    libvmintgr.printd('starting asset dump workflow...')
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    for s in scanner.sitelist:
        sys.stdout.write('# %s\n' % scanner.sitelist[s]['name'])
        for a in scanner.sitelist[s]['assets']:
            sys.stdout.write('%s ' % a['address'])
            hname = a['hostname']
            if hname == None or hname == '':
                sys.stdout.write('unknown\n')
            else:
                sys.stdout.write('%s\n' % hname)
示例#16
0
def wf_asset_dump():
    libvmintgr.printd('starting asset dump workflow...')
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    for s in scanner.sitelist:
        sys.stdout.write('# %s\n' % scanner.sitelist[s]['name'])
        for a in scanner.sitelist[s]['assets']:
            sys.stdout.write('%s ' % a['address'])
            hname = a['hostname']
            if hname == None or hname == '':
                sys.stdout.write('unknown\n')
            else:
                sys.stdout.write('%s\n' % hname)
示例#17
0
def wf_hostquery(targethosts):
    libvmintgr.printd('starting host query workflow...')
    thostbuf = []
    fd = open(targethosts, 'r')
    thostbuf = [x.strip() for x in fd.readlines()]
    fd.close()
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    wherebuf = libvmintgr.build_targethost_where(scanner, thostbuf)
    libvmintgr.vuln_extraction(scanner,
                               wherebuf,
                               writefile=vulns_writefile,
                               readfile=vulns_readfile,
                               targethosts=True)
示例#18
0
def wf_spool(path):
    libvmintgr.printd('starting spool workflow for %s...' % path)
    libvmintgr.spool_runner(path, scanner)
示例#19
0
def wf_mozdef():
    libvmintgr.printd('dequeueing events to mozdef...')
    libvmintgr.mozdef_proc(vmconfig.escdir,
        vmconfig.mozdef_compliance_urls, vmconfig.mozdef_vuln_urls,
        vmconfig.mozdef_hint_urls)
示例#20
0
def wf_auto_purge():
    libvmintgr.printd('starting asset purge workflow...')
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    libvmintgr.group_purge(scanner, vmconfig.purge_groupid)
示例#21
0
def wf_site_sync():
    libvmintgr.printd('executing site device sync workflow...')
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    for i in vmconfig.devsync_map.keys():
        libvmintgr.site_update_from_files(scanner, i, vmconfig.devsync_map[i])
示例#22
0
def wf_asset_grouping():
    libvmintgr.printd('starting asset grouping workflow...')
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    libvmintgr.asset_grouping(scanner)
示例#23
0
def wf_asset_grouping():
    libvmintgr.printd('starting asset grouping workflow...')
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    libvmintgr.asset_grouping(scanner)
示例#24
0
def wf_vuln_proc():
    libvmintgr.printd('executing vulnerability processing automation...')
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    libvmintgr.vuln_extraction(scanner, vmconfig.vulnquery_where,
        writefile=vulns_writefile, readfile=vulns_readfile)
示例#25
0
def wf_mozdef():
    libvmintgr.printd('dequeueing events to mozdef...')
    libvmintgr.mozdef_proc(vmconfig.escdir, vmconfig.mozdef_compliance_url,
                           vmconfig.mozdef_vuln_url)
示例#26
0
def wf_site_sync():
    libvmintgr.printd('executing site device sync workflow...')
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    for i in vmconfig.devsync_map.keys():
        libvmintgr.site_update_from_files(scanner, i, vmconfig.devsync_map[i])
示例#27
0
def wf_escalations():
    libvmintgr.printd('starting escalation workflow...')
    libvmintgr.escalate_vulns(vmconfig.escdir, vmconfig.escalate_vulns,
                              vmconfig.escalate_compliance)
示例#28
0
def wf_auto_purge():
    libvmintgr.printd('starting asset purge workflow...')
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    libvmintgr.group_purge(scanner, vmconfig.purge_groupid)
示例#29
0
def wf_adhocgroup(targetgroup):
    libvmintgr.printd('starting adhoc group creation mode...')
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    libvmintgr.adhoc_group(scanner, targetgroup)
示例#30
0
def wf_adhocgroup(targetgroup):
    libvmintgr.printd('starting adhoc group creation mode...')
    libvmintgr.site_extraction(scanner)
    libvmintgr.asset_extraction(scanner)
    libvmintgr.adhoc_group(scanner, targetgroup)
示例#31
0
def wf_spool(path):
    libvmintgr.printd('starting spool workflow for %s...' % path)
    libvmintgr.spool_runner(path, scanner)