UI: Add fingerprinters to the schema

This commit is contained in:
Ilija Lazoroski 2022-07-01 16:47:04 +02:00
parent cb1360f5af
commit 1f3bffbabe
5 changed files with 69 additions and 11 deletions

View File

@ -25,6 +25,14 @@ export default function UiSchema(props) {
info_box: {
'ui:field': InfoBox
}
},
fingerprinters:{
classNames: 'config-template-no-header',
'ui:widget': AdvancedMultiSelect,
fingerprinter_classes: {
classNames: 'config-template-no-header'
}
}
}
},

View File

@ -4,6 +4,7 @@ import {propagationConfigurationSchema} from './definitions/propagation.js';
import {bruteForceExploiters, vulnerabilityExploiters} from './definitions/exploiter_classes.js';
import {credentialCollectors} from './definitions/credential_collectors.js';
import {postBreachActions} from './definitions/post_breach_actions.js';
import {fingerprinterClasses} from './definitions/fingerprinter_classes.js'
export const SCHEMA = {
'title': 'Monkey',
@ -12,7 +13,8 @@ export const SCHEMA = {
'brute_force_classes': bruteForceExploiters,
'vulnerability_classes': vulnerabilityExploiters,
'credential_collectors_classes': credentialCollectors,
'post_breach_actions': postBreachActions
'post_breach_actions': postBreachActions,
'fingerprinter_classes': fingerprinterClasses
},
'properties': {
'propagation': propagationConfigurationSchema,

View File

@ -1,4 +1,5 @@
export const exploitationOptionsConfigurationSchema = {
'title': 'Exploiters Options',
'type': 'object',
'properties': {
'http_ports': {

View File

@ -0,0 +1,52 @@
export const fingerprinterClasses = {
'title': 'Fingerprinters',
'description': 'Fingerprint modules collect info about external services ' +
'Infection Monkey scans.',
'type': 'string',
'pluginDefs': {
'smb' : {'name':'smb', 'options':''},
'ssh' : {'name':'ssh', 'options':''},
'http' : {'name':'http', 'options':''},
'mssql' : {'name':'mssql', 'options':''},
'elastic' : {'name':'elastic', 'options':''}
},
'anyOf': [
{
'type': 'string',
'enum': ['smb'],
'title': 'SMB Fingerprinter',
'safe': true,
'info': 'Figures out if SMB is running and what\'s the version of it.'
},
{
'type': 'string',
'enum': ['ssh'],
'title': 'SSH Fingerprinter',
'safe': true,
'info': 'Figures out if SSH is running.'
},
{
'type': 'string',
'enum': ['http'],
'title': 'HTTP Fingerprinter',
'safe': true,
'info': 'Checks if host has HTTP/HTTPS ports open.'
},
{
'type': 'string',
'enum': ['mssql'],
'title': 'MSSQL Fingerprinter',
'safe': true,
'info': 'Checks if Microsoft SQL service is running and tries to gather ' +
'information about it.'
},
{
'type': 'string',
'enum': ['elastic'],
'title': 'Elastic Fingerprinter',
'safe': true,
'info': 'Checks if ElasticSearch is running and attempts to find it\'s version.'
}
]
}

View File

@ -1,23 +1,18 @@
import {pluginConfigurationSchema} from './plugins.js';
import {icmpScanConfigurationSchema} from './icmp_scan.js';
import {scanTargetConfigurationSchema} from './scan_target.js';
import {tcpScanConfigurationSchema} from './tcp_scan.js';
export const networkScanConfigurationSchema = {
'title': 'Network analysis',
'type': 'object',
'additionalProperties': false,
'properties': {
'fingerprinters': {
'title': 'Fingerprinters',
'type': 'array',
'items': pluginConfigurationSchema,
'default': [
{'name': 'SMBFinger', 'safe': true, 'options': {}},
{'name': 'SSHFinger', 'safe': true, 'options': {}},
{'name': 'HTTPFinger', 'safe': true, 'options': {}},
{'name': 'MSSQLFinger', 'safe': true, 'options': {}},
{'name': 'ElasticFinger', 'safe': true, 'options': {}}
]
'uniqueItems': true,
'items': {
'$ref': '#/definitions/fingerprinter_classes'
}
},
'icmp': icmpScanConfigurationSchema,
'targets': scanTargetConfigurationSchema,