Пример #1
0
def get_remoting_vnc_object(config_name=None):
    import time
    from model_extraction import configuration
    from virtualization import virtualbox

    if config_name is None:
        config = configuration.get_default_config()
    else:
        config = configuration.get_config()['configurations'][config_name]
        
    ret = virtualbox.VirtualBoxMachine(name=config["image name"],
                                       snapshot=config["snapshot"],
                                       already_prepared=config["already prepared"])
    ret.prepare_command = config["prepare command"]
    ret.remote_instrumentation_file = config.get("remote logs")
    return ret
Пример #2
0
def get_remoting_vnc_object(config_name=None):
    import time
    from model_extraction import configuration
    from virtualization import virtualbox

    if config_name is None:
        config = configuration.get_default_config()
    else:
        config = configuration.get_config()['configurations'][config_name]

    ret = virtualbox.VirtualBoxMachine(
        name=config["image name"],
        snapshot=config["snapshot"],
        already_prepared=config["already prepared"])
    ret.prepare_command = config["prepare command"]
    ret.remote_instrumentation_file = config.get("remote logs")
    return ret
Пример #3
0
    node.edges.pop(3)  # change when these notifs...

    extractor.graph.node_hints[extractor.graph.nodes.index(node)] = {
        'ignorable': ignorable_areas
    }


def activate_app(node, world):
    screen = world.machine.automation.grab_screen()
    world.machine.automation.mouse.click(screen.size[0] / 2,
                                         screen.size[1] / 2)
    return True


if __name__ == '__main__':
    test_files = configuration.get_config(
    )["configurations"]["uac on"]["test files"]
    extractor = base_extractor.BaseExtractor(
        '7zip_uac_on_2', '\\utils\\runurl.py ' + test_files + '7z920.exe')

    # speedy launch doesnt work well with elevated processes
    extractor.use_fast_run_command = False

    extractor.graph.add_post_create_node_hook(
        'User Access Control',
        lambda node, world: customize_uac_node(extractor, node, world))

    extractor.graph.add_post_create_node_hook(
        'User Access Control_2',
        lambda node, world: customize_uac_node_2(extractor, node, world))

    extractor.graph.add_pre_create_node_hook(3, activate_app)
Пример #4
0
    ignorable_areas = []
    
    ignorable_areas.append(node.edges[3].location)
    node.edges.pop(3) # change when these notifs...

    extractor.graph.node_hints[extractor.graph.nodes.index(node)] = {'ignorable': ignorable_areas}

    
def activate_app(node, world):
    screen = world.machine.automation.grab_screen()
    world.machine.automation.mouse.click(screen.size[0] / 2, screen.size[1] / 2)
    return True

if __name__ == '__main__':
    test_files = configuration.get_config()["configurations"]["uac on"]["test files"]
    extractor = base_extractor.BaseExtractor('7zip_uac_on_2',
                                             '\\utils\\runurl.py ' + test_files + '7z920.exe')

    # speedy launch doesnt work well with elevated processes
    extractor.use_fast_run_command = False

    extractor.graph.add_post_create_node_hook('User Access Control',
                                              lambda node, world: customize_uac_node(extractor, node, world))
                                              
    extractor.graph.add_post_create_node_hook('User Access Control_2',
                                              lambda node, world: customize_uac_node_2(extractor, node, world))

    extractor.graph.add_pre_create_node_hook(3, activate_app)
                                              
    #Ignore 'Browse For Folder' dialog as we dont care for windows native dialog
Пример #5
0
'''
Пример #6
0
'''