Skip to content

Mock Plugin

Before deploying ASP to production, use this plugin to simulate CMDB, SIEM, and SIRP data sources for testing the Agent architecture and data flow.

CMDB

Simulates the enterprise CMDB asset query interface, used to obtain asset context information during alert investigation.

Usage

python
from PLUGINS.Mock.CMDB.CMDB import cmdb_instance

result = cmdb_instance.lookup(artifact_type, artifact_value)

Supported Artifact Types

TypeReturns
HOSTNAME / ENDPOINT / DEVICE / IP_ADDRESSAsset information: IP, MAC, status, environment, network zone, responsible person, installed software
USER_NAME / USER / ACCOUNTIdentity information: user ID, department, position, privilege level, associated endpoints
EMAIL_ADDRESS / EMAILEmail + identity information
PORTPort exposure information: protocol, common services, exposure level
SUBNETSubnet information: CIDR, zone, asset count
RESOURCE_UID / RESOURCECloud resource information: type, cloud provider, region, status
MAC_ADDRESS / SERIAL_NUMBERAsset information

CMDB is based on SHA-256 deterministic hashing; the same input always returns the same result.

SIEM

Generates three types of simulated logs: network traffic, host events, and AWS CloudTrail, with support for sending to ELK and Splunk.

Configuration

  1. Copy PLUGINS/Mock/SIEM/CONFIG.example.py to CONFIG.py
  2. Set the enable switches for ELK and Splunk:
python
ELK_ENABLED = True
SPLUNK_ENABLED = True
  1. SIEM credentials are read from PLUGINS/ELK/CONFIG and PLUGINS/Splunk/CONFIG respectively

Runtime Parameters

Configure in settings.py:

ParameterDefaultDescription
EPS10Events generated per second
BATCH_SIZE100Batch send size
MALICIOUS_PERCENTAGE0.05Malicious log injection ratio (5%)

Log Generators

GeneratorIndex NameDescription
NetworkGeneratorsiem-network-trafficNetwork traffic logs, including source/destination IP, port, protocol
HostGeneratorsiem-host-eventsHost event logs, including process creation, file operations, registry changes
CloudGeneratorsiem-aws-cloudtrailAWS CloudTrail logs, including IAM, S3, EC2 operations

Attack Scenarios

Each generator has corresponding attack scenarios, injected with a 5% probability:

ScenarioAssociated GeneratorDescription
BruteForceScenarioNetwork5-10 failed SSH/RDP logins + 1 successful login, attacker IP 45.95.11.22
RansomwareScenarioHostThree phases: delete shadow copies -> encrypt and rename 20 files -> create ransom note file
CloudPrivilegeEscalationScenarioCloudFull AWS kill chain: reconnaissance -> privilege enumeration -> create backdoor user -> privilege escalation -> AssumeRole

Running

bash
python PLUGINS/Mock/SIEM/main.py

Generated logs can be used with the siem-network-traffic.yaml, siem-host-events.yaml, and siem-aws-cloudtrail.yaml configuration files in the SIEM Plugin.

SIRP

Generates complete Case, Alert, Artifact, and Enrichment test data with automatic inter-data linking.

Creating Mock Data

bash
python PLUGINS/Mock/SIRP/main.py

Cleaning Up Mock Data

bash
python PLUGINS/Mock/SIRP/delete_all.py

Mock Data Overview

Data TypeCountDescription
Case13Covers phishing, lateral movement, ransomware, brute force, data exfiltration, cloud misconfiguration, and other scenarios
Alert16Includes MITRE ATT&CK mapping, data sources, remediation suggestions, linked to SIEM attack scenarios
Artifact37IOC data: IP, domain, hash, process, user, etc., linked to Enrichment
Enrichment24Multi-vendor intelligence: OTX, VirusTotal, AbuseIPDB, CrowdStrike, Shodan, etc.

Developers can refer to files such as mock_case.py and mock_alert.py to understand how SIRP data models are constructed.