- Notifications
You must be signed in to change notification settings - Fork33
Gis 8397 Add CarbonBlack render#224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Uh oh!
There was an error while loading.Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| platform: CarbonBlack | ||
| source: default |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| platform: CarbonBlack | ||
| source: linux_dns_query | ||
| field_mapping: | ||
| User: | ||
| - childproc_username | ||
| - process_username |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| platform: CarbonBlack | ||
| source: linux_network_connection | ||
| field_mapping: | ||
| DestinationHostname: | ||
| - netconn_domain | ||
| - netconn_proxy_domain | ||
| DestinationPort: netconn_port |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| platform: CarbonBlack | ||
| source: macos_dns_query | ||
| field_mapping: | ||
| User: | ||
| - childproc_username | ||
| - process_username |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| platform: CarbonBlack | ||
| source: macos_network_connection | ||
| field_mapping: | ||
| DestinationHostname: | ||
| - netconn_domain | ||
| - netconn_proxy_domain | ||
| DestinationPort: netconn_port |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| platform: CarbonBlack | ||
| source: windows_create_remote_thread | ||
| field_mapping: | ||
| SourceImage: parent_name | ||
| StartModule: modload_name |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| platform: CarbonBlack | ||
| source: windows_dns_query | ||
| field_mapping: | ||
| User: | ||
| - childproc_username | ||
| - process_username |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| platform: CarbonBlack | ||
| source: windows_file_event | ||
| field_mapping: | ||
| User: | ||
| - childproc_username | ||
| - process_username |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| platform: CarbonBlack | ||
| source: windows_image_load | ||
| field_mapping: | ||
| OriginalFileName: process_original_filename |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| platform: CarbonBlack | ||
| source: windows_network_connection | ||
| field_mapping: | ||
| DestinationHostname: | ||
| - netconn_domain | ||
| - netconn_proxy_domain | ||
| DestinationPort: netconn_port |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| platform: CarbonBlack | ||
| source: windows_process_creation | ||
| field_mapping: | ||
| Hashes: | ||
| - md5 | ||
| - filewrite_md5 | ||
| - childproc_md5 | ||
| - parent_md5 | ||
| User: | ||
| - childproc_username | ||
| - process_username | ||
| OriginalFileName: process_original_filename |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| platform: CarbonBlack | ||
| source: windows_registry_event | ||
| field_mapping: | ||
| TargetObject: regmod_name | ||
| User: | ||
| - childproc_username | ||
| - process_username |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| platform: CarbonBlack | ||
| source: windows_security | ||
| field_mapping: | ||
| AccountName: | ||
| - process_username | ||
| - childproc_username | ||
| ComputerName: device_name | ||
| NewProcessName: process_name | ||
| DeviceDescription: | ||
| - process_product_name | ||
| - process_product_version | ||
| - process_publisher | ||
| - process_file_description | ||
| DestPort: netconn_port | ||
| UserID: parent_name |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| platform: CarbonBlack | ||
| source: windows_sysmon | ||
| field_mapping: | ||
| CommandLine: process_cmdline | ||
| Image: process_name | ||
| ParentImage: parent_name | ||
| Company: process_publisher | ||
| Description: | ||
| - process_product_name | ||
| - process_product_version | ||
| - process_publisher | ||
| - process_file_description | ||
| DestinationHostname: | ||
| - netconn_domain | ||
| - netconn_proxy_domain | ||
| DestinationIp: | ||
| - netconn_ipv4 | ||
| - netconn_ipv6 | ||
| DestinationIsIpv6: ipaddr | ||
| Hashes: | ||
| - md5 | ||
| - filewrite_md5 | ||
| - childproc_md5 | ||
| - parent_md5 | ||
| IntegrityLevel: process_integrity_level | ||
| ParentCommandLine: parent_cmdline | ||
| Product: | ||
| - process_product_name | ||
| - process_file_description | ||
| SourceIp: | ||
| - netconn_ipv4 | ||
| - netconn_ipv6 | ||
| - netconn_local_ipv4 | ||
| - netconn_local_ipv6 | ||
| SourcePort: netconn_port | ||
| TargetFilename: filemod_name | ||
| User: childproc_username;process_username | ||
| OriginalFileName: process_original_filename | ||
| Signature: | ||
| - childproc_publisher | ||
| - filemod_publisher | ||
| - modload_publisher | ||
| - parent_publisher | ||
| - process_publisher | ||
| ImageLoaded: modload_name | ||
| StartModule: modload_name | ||
| TargetImage: filemod_name | ||
| FileVersion: process_product_version |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| from app.translator.platforms.carbonblack.renders.carbonblack import CarbonBlackQueryRender # noqa: F401 | ||
| from app.translator.platforms.carbonblack.renders.carbonblack_cti import CarbonBlackCTI # noqa: F401 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,23 @@ | ||
| from app.translator.core.models.platform_details import PlatformDetails | ||
| CARBON_BLACK_QUERY_DETAILS = { | ||
| "platform_id": "carbonblack", | ||
| "name": "Carbon Black Cloud", | ||
| "group_name": "VMware Carbon Black", | ||
| "group_id": "carbonblack-pack", | ||
| "platform_name": "Query (Cloud)", | ||
| } | ||
| DEFAULT_CARBONBLACK_CTI_MAPPING = { | ||
| "SourceIP": "netconn_local_ipv4", | ||
| "DestinationIP": "netconn_ipv4", | ||
| "Domain": "netconn_domain", | ||
| "URL": "netconn_domain", | ||
| "HashMd5": "hash", | ||
| "HashSha256": "hash", | ||
| "Files": "filemod_name", | ||
| "Emails": "process_username", | ||
| } | ||
| carbonblack_query_details = PlatformDetails(**CARBON_BLACK_QUERY_DETAILS) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| from typing import ClassVar | ||
| from app.translator.core.custom_types.values import ValueType | ||
| from app.translator.core.escape_manager import EscapeManager | ||
| from app.translator.core.models.escape_details import EscapeDetails | ||
| class CarbonBlackEscapeManager(EscapeManager): | ||
| escape_map: ClassVar[dict[str, list[EscapeDetails]]] = { | ||
| ValueType.value: [ | ||
| EscapeDetails( | ||
| pattern='([\s+\\-=&?!|(){}.\\[\\]^"~:/]|(?<!\\\\)\\\\(?![*?\\\\])|\\\\u|&&|\\|\\|)', | ||
| escape_symbols="\\\\\g<1>", | ||
| ) | ||
| ], | ||
| ValueType.regex_value: [EscapeDetails(pattern=r"([$^*+()\[\]{}|.?\-\\])", escape_symbols=r"\\\1")], | ||
| } | ||
| carbon_black_escape_manager = CarbonBlackEscapeManager() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| from app.translator.core.mapping import BaseStrictLogSourcesPlatformMappings, LogSourceSignature | ||
| from app.translator.platforms.carbonblack.const import carbonblack_query_details | ||
| class CarbonBlackLogSourceSignature(LogSourceSignature): | ||
| def is_suitable(self) -> bool: | ||
| return True | ||
| def __str__(self) -> str: | ||
| return "" | ||
| class CarbonBlackMappings(BaseStrictLogSourcesPlatformMappings): | ||
| def prepare_log_source_signature(self, mapping: dict) -> CarbonBlackLogSourceSignature: | ||
| ... | ||
| carbonblack_query_mappings = CarbonBlackMappings(platform_dir="carbonblack", platform_details=carbonblack_query_details) |
This file was deleted.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.