예제 #1
0
def start(dir):
    
    av=[]

    middleware='workspace/'+dir+'/xml/'+dir+'.graphml'
    #Extract the attack vectors paths  and stores in "attvec"
    attvec,nodes=graphml.loadGraphML(middleware)
    
    #Load the component of the middleware and their attributes
    comp=graphml.getComps(nodes)
    
    for i in attvec:               
                    
        arch='av'  
        av=[]       
        
        for j in i.split(','):
            arch=arch+"_"+j                
            for k in comp:
                if j==k.cId:                                                      
                    av.append(k)                                               
        os="ULM"
        web=False 
        
        try:                      
            analyze.analyzeAV(arch,av,os,web,dir)
            print "Analyzed: %s, OK!"%i
        except:
            print "Sorry:", sys.exc_info()
            print traceback.print_exc(file=sys.stdout)
예제 #2
0
def start(dir):
    
    av=[]

    middleware='workspace/'+dir+'/xml/'+dir+'.graphml'
    #Extract the attack vectors paths  and stores in "attvec"
    attvec,nodes=graphml.loadGraphML(middleware)
    
    #Load the component of the middleware and their attributes
    comp=graphml.getComps(nodes)
    
    for i in attvec:               
                    
        arch='av'  
        av=[]       
        
        for j in i.split(','):
            arch=arch+"_"+j                
            for k in comp:
                if j==k.cId:                                                      
                    av.append(k)                                               
        os="ULM"
        web=False 
        
        try:                      
            analyze.analyzeAV(arch,av,os,web,dir)
            print "Analyzed: %s, OK!"%i
        except:
            print "Sorry:", sys.exc_info()
            print traceback.print_exc(file=sys.stdout)
예제 #3
0
    logbook = Component()
    logbook.attrib(2, "logbook", "Administrator", "Partially-Privileged User",
                   "C++", "No", "Yes", "Yes", "Yes", "Yes", "Yes", "Yes",
                   "Yes", "No", "Yes", "Yes", "Yes", "No", "Yes", "Server",
                   "No", "Yes", 0, "No", "No", [3], [1])
    mysql = Component()
    mysql.attrib(3, "mysql", "Partially-Privileged User",
                 "Partially-Privileged User", "C++", "No", "No", "No", "No",
                 "Yes", "Yes", "Yes", "Yes", "No", "No", "No", "No", "No",
                 "No", "Server", "No", "Yes", 0, "No", "Yes", [0], [2])

    av = []
    #av.append(submit)
    #av.append(uam)
    #av.append(inputfl)
    #av.append(sagent)
    #av.append(outputfl)
    #av.append(alaunch)
    #av.append(condorg)
    #av.append(lrms)
    #av.append(condorstd)
    #av.append(job)

    av.append(submit)
    av.append(logbook)
    av.append(mysql)

    os = "ULM"
    web = False
    analyze.analyzeAV(av, os, web)