natlas icon indicating copy to clipboard operation
natlas copied to clipboard

Restructuring the agent scan config

Open 0xdade opened this issue 5 years ago • 1 comments

Is your feature request related to a problem? Right now, every scan config option is part of a top level blob called agent_config. This means if we want to pass config options around to different components of the agent as it becomes more modular, we either have to parse out the ones we want at the top level or we have to pass the whole blob to each component of the agent.

Describe the feature you'd like Break up the agent_config blob into it's respective components. Example:

"agent_config": {
    "id": 1
    "nmap": {
        "versionDetection": true, 
        "osDetection": true, 
        "enableScripts": true, 
        "onlyOpens": true,
        "scriptTimeout": 60, 
        "hostTimeout": 600, 
        "osScanLimit": true, 
        "noPing": false, 
        "udpScan": false, 
        "scripts": "default,ssh-auth-methods,ssl-enum-ciphers"
    },
    "web_screenshots": {
        "webScreenshots": true,
        "webScreenshotTimeout": 60
    },
    "vnc_screenshots": {
        "vncScreenshots": true,
        "vncScreenshotTimeout": 60
    },
    "agent_timeout" : 660
}

Have you considered alternative ways to get this feature We could leave it the way it is but it makes it harder to modularize the agent.

Additional context N/A

0xdade avatar Nov 04 '19 03:11 0xdade

You may consider something like:

"web_screenshots": {
  "timeout": 60
    },
"vnc_screenshots": {
  "timeout": 60
}

The existence of the *_screenshots section would mean that that scanner would get enabled, then follow a convention of naming for the properties. This would reduce variance between the different plugins and more logic can be shared by each plugin.

ajacques avatar Nov 04 '19 04:11 ajacques