SiemplifyAction 모듈

클래스 SiemplifyAction.SiemplifyAction

SiemplifyAction.SiemplifyAction(mock_stdin=None, get_source_file=False)

기본: Siemplify

add_alert_entities_to_custom_list

add_alert_entities_to_custom_list(category_name)

지정된 카테고리를 사용하여 맞춤 목록 레코드에 알림의 항목을 추가합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
category_name {string} 맞춤 목록 카테고리 'CustomList' 해당 사항 없음

반환

추가된 객체의 {[CustomList]} 목록입니다.

입력: 명시적으로 category_name 범위를 사용하는 항목(암시적)
add_alert_entities_to_custom_list을 실행하면 'CustomList' 객체 목록과 설정의 구성 변경이 발생합니다.

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
result = siemplify.add_alert_entities_to_custom_list("WhiteListed HOSTs")

결과 동작

WhiteListed HOSTs 카테고리가 추가되었습니다.

결과 값

[<SiemplifyDataModel.CustomList object at 0x0000000003476E10>, <SiemplifyDataModel.CustomList object at 0x0000000003476B00>]

add_attachment

add_attachment(file_path, case_id=None, alert_identifier=None, description=None, is_favorite=False)

케이스 월에 첨부파일을 추가합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
file_path {string} 파일 경로 "C:\Program Files (x86)\Google\Chrome\Application\chrome_proxy.exe" 해당 사항 없음
case_id {string} 케이스 식별자 234 해당 사항 없음
alert_identifier {string} 알림 식별자 12345 해당 사항 없음
설명 {string} 파일 설명 해당 사항 없음 해당 사항 없음
is_favorite 부울 해당 사항 없음 True/False 해당 사항 없음

반환

{long} attachment_id

입력: 명시적으로 파일 경로, 설명, is_favorite 암시적으로 case_idalert_identifier

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
result = siemplify.add_attachment("C:\Program Files (x86)\Google\Chrome\Application\chrome_proxy.exe", case_id="234", alert_identifier=None, description=None, is_favorite=True)

결과 동작

경로에 언급된 파일이 케이스 ID 234에 첨부되고 첨부 파일 ID가 반환됩니다.

결과 값

5 [첨부파일 ID]

add_comment

add_comment(comment, case_id=None, alert_identifier=None)

특정 케이스에 새 댓글을 추가합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
댓글 {string} 케이스 월에 추가할 댓글 해당 사항 없음 해당 사항 없음
case_id {string} 케이스 식별자 234 case_id이 제공되지 않으면 현재 케이스가 사용됩니다.

기본값은 없음 (선택사항)
alert_identifier {string} 알림 식별자 12345 alert_identifier이 제공되지 않으면
현재 알림이 사용됩니다.
기본값은 없음 (선택사항)

반환

NoneType

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
comment = "Ran some tests on the hash and it seems fine"
siemplify.add_comment(comment=comment)

결과 동작

지정된 댓글이 현재 케이스에 추가됩니다.

결과 값

없음

add_entity_insight

add_entity_insight(domain_entity_info, message, triggered_by=None, original_requesting_user=None)

사용 중인 케이스에 엔티티 통계를 추가합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
domain_entity_info {DomainEntityInfo} 통계를 추가할 항목을 나타내는 항목 객체 해당 사항 없음 해당 사항 없음
메시지 {string} 통계 메시지 해당 사항 없음 해당 사항 없음
triggered_by {string} 통합 이름 해당 사항 없음 통합 이름이 제공되지 않으면 작업에 선택된 통합이 사용됩니다.
기본적으로 없음 (선택사항)
original_requesting_user {string} 요청 사용자 해당 사항 없음 기본값은 없음입니다 (선택사항).

반환

{boolean} 성공한 경우 True 그 이외의 경우 False를 사용합니다.

결과 동작

결과 값

add_entity_to_case

add_entity_to_case(entity_identifier, entity_type, is_internal, is_suspicious, is_enriched, is_vulnerable, properties, case_id=None, alert_identifier=None, environment=None)

현재 케이스에 항목을 추가합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
entity_identifier {string} 엔티티 식별자 192.0.2.1, example.com 해당 사항 없음
entity_type {string} 항목 유형 'ADDRESS' 해당 사항 없음
is_internal {boolean} 해당 사항 없음 내부/외부 해당 사항 없음
is_suspicious {boolean} 해당 사항 없음 의심스러움/의심스럽지 않음 해당 사항 없음
is_enriched {boolean} 해당 사항 없음 True/False 기본적으로 False
is_vulnerable {boolean} 해당 사항 없음 True/False 기본적으로 False
속성 {dict} {"Property1":"PropertyValue", "Property2":"PropertyValue2"} 해당 사항 없음 해당 사항 없음

반환

NoneType

기존 항목이 있으면 다음 오류가 표시됩니다. /

500 Server Error: Internal Server Error for url: https://localhost:8443/api/external/v1/sdk/CreateEntity?format=snake: \"ErrorMessage\":\"Cannot add entity [Identifier:Entities Identifies - Type:siemplify.parameters[] to alert [MONITORED MAILBOX <EXAMPLE@EXAMPLE.COM>_633997CB-D23B-4A2B-92F2-AD1D350284FF] in case [12345] because the entity already exists >there.\"

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
siemplify.add_entity_to_case(entity_identifier, entity_type, is_internal, is_suspicious, is_enriched, is_vulnerable, properties, case_id, alert_identifier, environment)

결과 동작

이 함수는 케이스에 없는 경우 케이스에 새 항목을 추가합니다.

결과 값

없음

add_tag

add_tag(tag, case_id=None, alert_identifier=None)

특정 케이스에 새 태그를 추가합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
태그 {string} 추가할 태그 태그로 사용할 문자열 해당 사항 없음
case_id {string} 케이스 식별자 12345 case_id이 제공되지 않으면
현재 케이스 ID가 사용됩니다.
기본값은 없음 (선택사항)
alert_identifier {string} 알림 식별자 123 alert_identifier이 제공되지 않으면
현재 알림 ID가 사용됩니다.
기본값은 없음(선택사항)

반환

NoneType

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
tag_to_be_added = "MaliciousMail"
siemplify.add_tag(tag=tag_to_be_added)

결과 동작

현재 케이스에 'MaliciousMail' 태그가 추가됩니다.

결과 값

없음

any_alert_entities_in_custom_list

any_alert_entities_in_custom_list(category_name)

알림의 항목에 지정된 카테고리가 있는 맞춤 목록 레코드가 있는지 확인합니다.
이 함수는 CustomLists에서 카테고리 이름을 가져오고 범위 내 항목이 해당 카테고리에 있으면 True (불리언)을 반환합니다. 식별자가 CustomLists 테이블의 설정에 이 카테고리와 함께 나열되면 항목이 해당 카테고리에 있는 것으로 간주됩니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
category_name {string} 맞춤 목록 카테고리 이름 BlackListed IPs 해당 사항 없음

반환

{boolean} 카테고리에 항목이 있으면 True, 그렇지 않으면 False입니다.

예 1

from SiemplifyAction import SiemplifyAction \
siemplify = SiemplifyAction() \
result = siemplify.any_entity_in_custom_list("BlackListed IPs")

예 2

from SiemplifyAction import SiemplifyAction \
siemplify = SiemplifyAction() \
result = siemplify.any_entity_in_custom_list("Executive IPs")

결과 동작

샘플 코드 1 결과는 True입니다. 샘플 코드 2 결과는 False입니다.

결과 값

True 또는 False

assign_case

assign_case(user, case_id=None, alert_identifier=None)

사용자에게 케이스를 할당합니다.

이 함수는 사용자 ID 또는 사용자 역할과 함께 작동합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
사용자 {string} 사용자 ID 또는 사용자 역할 USER_ID, 관리자, @Tier1 해당 사항 없음
case_id {string} 케이스 식별자 12345 case_id이 제공되지 않으면
현재 케이스 ID가 사용됩니다.
기본값은 없음 (선택사항)
alert_identifier {string} 알림 식별자 123 alert_identifier이 제공되지 않으면
현재 알림 ID가 사용됩니다.
기본값은 없음 (선택사항)

반환

NoneType

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
assigned_user= "Admin"
siemplify.assign_case(assigned_user)

결과 동작

케이스가 관리자 사용자에게 할당됩니다.

결과 값

없음

attach_workflow_to_case

attach_workflow_to_case(workflow_name, cyber_case_id=None, indicator_identifier=None)

현재 알림에 플레이북을 연결합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
workflow_name {string} 워크플로 (플레이북) 이름 해당 사항 없음 해당 사항 없음
cyber_case_id {string} 케이스 식별자 234 케이스가 제공되지 않으면 현재 케이스가 사용됩니다.
기본값은 없음 (선택사항)
indicator_identifier {string} 알림 식별자 12345 알림 식별자가 제공되지 않으면
현재 알림이 사용됩니다.
기본값은 없음 (선택사항)

반환

NoneType

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
siemplify.attach_workflow_to_case(workflow_name, cyber_case_id, indicator_identifier)

결과 동작

지정된 워크플로를 지정된 표시기 식별자의 케이스에 연결합니다.

결과 값

없음

property 케이스

change_case_priority

change_case_priority(priority, case_id=None, alert_identifier=None)

케이스 우선순위를 변경합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
우선순위 {int} 각 숫자가 나타내는 우선순위는 각각 낮음, 중간, 높음, 심각입니다.
{"Low": 40, "Medium": 60, "High": 80, "Critical": 100} 해당 사항 없음
case_id {string} 케이스 식별자 12345 케이스가 제공되지 않으면 현재 케이스가 사용됩니다.
alert_identifier {string} 알림 식별자 123 알림 식별자가 제공되지 않으면 현재 알림이 사용됩니다.

반환

NoneType

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
priority_to_change_to = 60
siemplify.change_case_priority(priority=priority_to_change_to )

결과 동작

케이스 우선순위가 '보통'으로 변경됩니다.

결과 값

없음

change_case_stage

change_case_stage(stage, case_id=None, alert_identifier=None)

케이스 단계 변경

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
각 단계에서 {string} 단계는 케이스 단계 표에 정의된 문자열과 정확히 일치해야 합니다. 사고,
조사
해당 사항 없음
case_id {string} 케이스 식별자 12345 케이스가 제공되지 않으면 현재 케이스가 사용됩니다.
alert_identifier {string} 알림 식별자 123 알림 식별자가 제공되지 않으면 현재 알림이 사용됩니다.

반환

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
stage_to_change_to = "Investigation"
siemplify.change_case_stage(stage=stage_to_change_to)

결과 동작

케이스 상태가 '조사 중'으로 변경됩니다.

결과 값

없음

close_alert

close_alert(root_cause, comment, reason, case_id=None, alert_id=None)

현재 알림을 닫습니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
root_cause {string} 케이스 종료 근본 원인 설정의 '케이스 종료 근본 원인'
표에서 가져온 문자열
해당 사항 없음
댓글 {string} 댓글 여기에 모든 문자열을 사용할 수 있습니다. 의견은 케이스를 설명해야 하지만
제한되지는 않습니다.
reason {ApiSyncAlertCloseReasonEnum} 수동으로 완료할 때 대화상자에서 사용할 수 있는 사전 정의된 세 개의 문자열 중 하나입니다. 'NotMalicious', 'Malicious', 'Maintenance'

SiemplifyDataModel.ApiSyncAlertCloseReasonEnum을 참고하세요.

반환

{dict} 서버 작업 결과

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
reason = "Maintenance"
root_cause = "Employee Error"
comment = "User accidentally activated a correlation before it was ready to be used and triggered this alert"
siemplify.close_alert(reason=reason, root_cause=root_cause, comment=comment)

결과 동작

현재 알림이 새 케이스로 이동된 후 알림과 함께 종료됩니다.

결과 값

없음

close_case

close_case(root_cause, comment, reason, case_id=None, alert_identifier=None)

케이스를 종료합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
root_cause {string} 케이스 종료 근본 원인 해당 사항 없음 해당 사항 없음
댓글 {string} 댓글 여기에 모든 문자열을 사용할 수 있습니다. 댓글은 케이스를 설명해야 하지만 제한되지는 않습니다.
reason {ApiSyncAlertCloseReasonEnum} 케이스 종료 이유 수동으로 완료할 때 대화상자에서 사용할 수 있는 사전 정의된 세 개의 문자열 중 하나입니다('NotMalicious', 'Malicious', 'Maintenance').
case_id {string} 케이스 식별자 12345 케이스가 제공되지 않으면 현재 케이스가 사용됩니다.
alert_identifier {string} 알림 식별자 123 알림 식별자가 제공되지 않으면 현재 알림이 사용됩니다.

반환

NoneType

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
reason = "Maintenance"
root_cause = "Employee Error"
comment = "User accidentally activated a correlation before it was ready to be used and triggered this alert"
siemplify.close_case(reason=reason, root_cause=root_cause, comment=comment)

결과 동작

케이스가 지정된 이유, 근본 원인, 의견과 함께 종료됩니다.

결과 값

없음

create_case_insight

create_case_insight(triggered_by, title, content, entity_identifier, severity, insight_type, additional_data=None, additional_data_type=None, additional_data_title=None)

케이스에 통계를 추가합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
triggered_by {string} 통합 이름 VirusTotal, XForce 해당 사항 없음
제목 {string} 유용한 정보 제목 VirusTotal에서 보강 해당 사항 없음
콘텐츠 {string} 통계 메시지 통계 메시지 해당 사항 없음
entity_identifier {string} 엔티티 식별자 example.com 해당 사항 없음
줄이는 것을 {int} 심각도 수준 0 = info,
1 = warning,
2 = error
insight_type {int} 통계 유형 0 = 일반,
1 = 항목
해당 사항 없음
additional_data {string} 통계를 위한 추가 데이터 {"checked against": "VT", "malicious": "No"} 해당 사항 없음
additional_data_type {int} 추가 데이터의 유형 'General'=0,
'Entity'=1
해당 사항 없음
additional_data_title {string} 통계의 추가 데이터 제목 VT 확인 해당 사항 없음

반환

{boolean} 성공한 경우 True 그 이외의 경우 False를 사용합니다.

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
siemplify.create_case_insight(triggered_by, title, content, entity_identifier, severity, insight_type, additional_data, additional_data_type, additional_data_title)

결과 동작

정의된 데이터로 케이스의 통계를 만듭니다.
True(케이스 통계가 생성된 경우) 그 외의 경우에는 False입니다.

결과 값

True 또는 False

property current_alert

dismiss_alert

dismiss_alert(alert_group_identifier, should_close_case_if_all_alerts_were_dismissed, case_id=None)

property 환경

escalate_case

escalate_case(comment, case_id=None, alert_identifier=None)

케이스를 에스컬레이션합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
댓글 {string} 댓글 에스컬레이션 해당 사항 없음 해당 사항 없음
case_id {string} 케이스 식별자 12345 해당 사항 없음
alert_identifier {string} 알림 식별자 123 해당 사항 없음

extract_action_param

extract_action_param(param_name, default_value=None, input_type=<class 'str'>, is_mandatory=False, print_value=False)

작업 스크립트 매개변수를 가져옵니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 설명
param_name {string} 매개변수 이름 작업에 사용할 수 있는 매개변수 이름 해당 사항 없음
default_value {any} 매개변수의 기본값 매개변수가 설정되지 않은 경우 지정된 값이 반환됩니다.
(is_mandatory이 False로 설정된 경우)
매개변수가 전달되지 않으면 이 값을 기본값으로 사용합니다.
기본값은 없음 (선택사항)
input_type {obj} 매개변수를 다른 유형으로 변환 int 기본값은 str입니다 (선택사항).
is_mandatory {boolean} 매개변수가 비어 있으면 예외 발생 True/False 기본적으로 False
print_value {boolean} 값을 로그에 출력 True/False 기본적으로 False

반환

매개변수 값이며, input_type이 지정되지 않는 한 기본적으로 {string}입니다.

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
param_value= siemplify.extract_action_param(
 "Threshold",
 default_value=-1,
 input_type=int,
 is_mandatory=False,
 print_value=False)

결과 동작

선택한 매개변수의 값이 선택한 유형으로 변환되어 반환됩니다.

결과 값

20

fetch_and_save_timestamp

fetch_and_save_timestamp(datetime_format=False, timezone=False, new_timestamp=1683033493671)

타임스탬프를 가져와 케이스 컨텍스트에 저장합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 설명
datetime_format {boolean} 날짜/시간 형식 날짜 시간 형식으로 가져오려면 True, Unix로 가져오려면 False 기본값은 false입니다 (선택사항).
timezone 더 이상 지원되지 않는 매개변수
new_timestamp {int} 저장할 타임스탬프 해당 사항 없음 기본값은 Unix epoch 시간입니다 (선택사항).

반환

{int} datetime.

from SiemplifyAction import SiemplifyAction
sa = SiemplifyAction()
sa.fetch_and_save_timestamp(self, datetime_format=False, new_timestamp=SiemplifyUtils.Unix_now())

결과 동작

최신 타임스탬프가 가져와 현재 디렉터리에 TIMESTAMP 파일로 저장됩니다.

결과 값

datetime.datetime(2019, 7, 16, 14, 26, 2, 26000)/1563276380

fetch_timestamp

fetch_timestamp(datetime_format=False, timezone=False)

save_timestamp로 저장된 타임스탬프를 가져옵니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 설명
datetime_format {boolean} True인 경우 타임스탬프를 날짜/시간으로 반환합니다. 그렇지 않으면 Unix에서 반환합니다. True/False 기본값은 false입니다 (선택사항).
timezone 더 이상 지원되지 않는 매개변수

반환

저장된 Unix 에포크 시간 및 날짜 및 시간입니다.

from SiemplifyAction import SiemplifyAction
sa = SiemplifyAction()
result = sa.fetch_timestamp(datetime_format=True)

결과 동작

최신 타임스탬프가 가져와 현재 디렉터리에 TIMESTAMP 파일로 저장됩니다.

결과 값

datetime.datetime(2019, 7, 16, 14, 26, 2, 26000)/1563276380

get_alert_context_property

get_alert_context_property(property_key)

현재 알림에서 컨텍스트 속성을 가져옵니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 설명
property_key {string} 요청된 속성의 키입니다. 해당 사항 없음 해당 사항 없음

반환

{string} 속성 값

get_alerts_ticket_ids_from_cases_closed_since_timestamp

get_alerts_ticket_ids_from_cases_closed_since_timestamp(timestamp_unix_ms, rule_generator)

타임스탬프 이후에 종료된 케이스의 알림을 가져옵니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
timestamp_unix_ms {long} 타임스탬프 1550409785000L 해당 사항 없음
rule_generator {string} 해당 사항 없음 피싱 이메일 감지기 해당 사항 없음

반환

{[string]} 알림 ID 목록

get_attachments

get_attachments(case_id=None)

케이스에서 첨부파일을 가져옵니다.
이 함수는 카테고리 및 항목 목록에서 맞춤 목록 항목 목록을 가져와 맞춤 목록 항목 객체 목록을 반환합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
case_id {string} 케이스 식별자 234 케이스가 제공되지 않으면 현재 케이스가 사용됩니다 (선택사항).

반환

{dict} 첨부파일

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
result = siemplify.get_attachments(case_id="234")

결과 동작

케이스 ID 234에 대한 첨부파일 사전 목록이 반환됩니다.

결과 값

[{u'is_favorite': False, u'description': u'test', u'type': u'.exe', u'id': 4, u'name': u'chrome_proxy'}]

get_case_comments

get_case_comments(case_id=None)

케이스 댓글을 가져옵니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
case_id {string} 케이스 식별자 234 케이스가 제공되지 않으면 현재 케이스가 사용됩니다.

반환

{[dict]} 케이스 댓글

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
siemplify.get_case_comments(case_id)

결과 동작

케이스에 속한 모든 댓글이 가져와집니다.

결과 값

[{'comment': u'this is a comment',
u'is_deleted': False,
u'last_editor_full_name': u'example user',
u'modification_time_unix_time_in_ms_for_client': 0,
u'creation_time_unix_time_in_ms': 1681904404087, u'id': 12,
u'modification_time_unix_time_in_ms': 1681904404087,
u'case_id': 234,
u'is_favorite': False,
u'alert_identifier': None,
u'creator_user_id': u'cd1c112a-0277-44a9-b68d-98ceef9b0399',
u'last_editor': u'cd1c112a-0277-44a9-b68d-98ceef9b0399',
u'type': 5,
u'comment_for_client': None,
u'creator_full_name': u'example user'}]

get_case_context_property

get_case_context_property(property_key)

케이스 컨텍스트 속성을 가져옵니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 설명
property_key {string} 요청된 키 속성 해당 사항 없음 해당 사항 없음

반환

{string} 속성 값

get_configuration

get_configuration(provider, environment=None, integration_instance=None)

통합 구성을 가져옵니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 설명
제공업체 {string} 통합 이름 VirusTotal
환경 {string} 특정 환경 또는 'all'의 구성 (선택사항)
제공된 경우 사용자 인증 정보는 해당
환경 구성에서 가져옵니다. 환경을 지정하지 않으면 기본적으로 케이스 환경이 사용됩니다.

특정 환경의 구성이 없으면
기본 구성이 반환됩니다.
integration_instance {string} 통합 인스턴스의 식별자 해당 사항 없음 해당 사항 없음

반환

{dict} 구성 세부정보

get_similar_cases

get_similar_cases(consider_ports, consider_category_outcome, consider_rule_generator, consider_entity_identifiers, days_to_look_back, case_id=None, end_time_unix_ms=None)

유사한 케이스를 가져옵니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
consider_ports {boolean} 매개변수는 포트 필터 사용 여부를 구성합니다. 참/거짓 해당 사항 없음
consider_category_outcome {boolean} 매개변수는 이벤트의 카테고리 결과를 고려할지 여부를 구성합니다. 참/거짓 해당 사항 없음
consider_rule_generator {boolean} 매개변수는 알림에 규칙 생성기를 고려할지 여부를 구성합니다. 참/거짓 해당 사항 없음
consider_entity_identifiers {boolean} 매개변수는 알림에 항목 식별자를 고려할지 여부를 구성합니다. 참/거짓 해당 사항 없음
days_to_look_back {int} 유사한 케이스를 검색하기 전의 일수를 구성하는 파라미터 365 해당 사항 없음

반환

케이스 ID {[int]} 목록

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
result = siemplify.get_similar_cases(consider_ports=True,
 consider_category_outcome=False,
 consider_rule_generator=False,
 consider_entity_identifiers=False,
 days_to_look_back=30, case_id="234", end_time_unix_ms=None)

결과 동작

케이스 234와 유사한 케이스 ID 목록이 반환됩니다.

결과 값

[4, 231]

get_ticket_ids_for_alerts_dismissed_since_timestamp

get_ticket_ids_for_alerts_dismissed_since_timestamp(timestamp_unix_ms)

property is_timeout_reached

load_case_data

load_case_data()

이 함수는 케이스 데이터를 로드합니다.

매개변수

필요한 매개변수가 없습니다.

반환

NoneType

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
result = siemplify.load_case_data()

결과 동작

케이스 데이터가 로드됩니다.

결과 값

없음

property log_location

mark_case_as_important

mark_case_as_important(case_id=None, alert_identifier=None)

케이스를 중요로 표시합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
case_id {string} 케이스 식별자 234 해당 사항 없음
alert_identifier {string} 알림 식별자 12345 해당 사항 없음

반환

NoneType

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
siemplify.mark_case_as_important()

결과 동작

현재 케이스가 중요로 표시되어 있습니다.

결과 값

없음

raise_incident

raise_incident(case_id=None, alert_identifier=None)

인시던트 발생

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
case_id {string} 케이스 식별자 234 해당 사항 없음
alert_identifier {string} 알림 식별자 12345 해당 사항 없음

반환

NoneType

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
siemplify.raise_incident(case_id, alert_identifier)

결과 동작

케이스가 인시던트 상태로 전환되었습니다.

결과 값

없음

remove_alert_entities_from_custom_list

remove_alert_entities_from_custom_list(category_name)

지정된 카테고리가 있는 맞춤 목록 레코드에서 알림의 항목을 삭제합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
category_name {string} 맞춤 목록 카테고리 `WhiteListed HOSTs` 해당 사항 없음

반환

삭제된 CustomList 객체의 {[CustomList]} 목록입니다.

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
result = siemplify.remove_alert_entities_from_custom_list("WhiteListed HOSTs")

결과 동작

WhiteListed HOSTS이 삭제되었습니다.

결과 값

[<SiemplifyDataModel.CustomList object at 0x0000000003476E10>,
<SiemplifyDataModel.CustomList object at 0x0000000003476B00>]

save_timestamp

save_timestamp(datetime_format=False, timezone=False, new_timestamp=1683033493671)

타임스탬프를 현재 스크립트 컨텍스트에 저장합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 설명
datetime_format {boolean} 해당 사항 없음 날짜 및 시간 형식인 경우 True, Unix인 경우 False 기본값은 False입니다 (선택사항).
timezone 더 이상 지원되지 않는 매개변수
new_timestamp {long} 컨텍스트에 저장할 타임스탬프 해당 사항 없음 타임스탬프는 메서드 호출의 Unix 타임스탬프로 기본 설정됩니다.

반환

NoneType

from SiemplifyAction import SiemplifyAction
sa = SiemplifyAction()
sa.save_timestamp(self, datetime_format=False, new_timestamp=SiemplifyUtils.unix_now())

결과 동작

새 타임스탬프는 현재 디렉터리에 TIMESTAMP 파일로 저장됩니다.

결과 값

없음

set_alert_context_property

set_alert_context_property(property_key, property_value)

키-값 쌍으로 알림 컨텍스트 속성을 설정합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 설명
property_key {string} 컨텍스트에 저장할 속성의 키 해당 사항 없음 해당 사항 없음
property_value {string} 컨텍스트에 저장할 속성의 값 해당 사항 없음 해당 사항 없음

set_alert_sla

set_alert_sla(period_time, period_type, critical_period_time, critical_period_type, case_id=None, alert_id=None)

지정된 case_idalert_identifier SLA를 설정합니다. 이 API를 사용하여 설정된 SLA는 다른 모든 알림 SLA 유형을 능가해야 합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
period_time {int/str} 총 SLA 기간 해당 사항 없음 period_time > 0
period_type {string} period_time의 시간 단위입니다. ApiPeriodTypeEnum으로 표현됩니다. 해당 사항 없음 해당 사항 없음
critical_period_time {int/str} 중요 SLA 기간 해당 사항 없음 critical_period_time >= 0
중요 기간 (시간 단위로 조정 후)은
전체 기간보다 작아야 합니다.
critical_period_type {string} critical_period_time의 시간 단위로,
ApiPeriodTypeEnum으로 표시됩니다.
case_id {long} 케이스 식별자 234 해당 사항 없음
alert_id {string} 알림 식별자 12345 해당 사항 없음

set_case_context_property

set_case_context_property(property_key, property_value)

키-값 쌍을 사용하여 케이스 컨텍스트 속성을 설정합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 설명
property_key {string} 속성의 키 해당 사항 없음 해당 사항 없음
property_value {string} 속성 값 해당 사항 없음 해당 사항 없음

set_case_sla

set_case_sla(period_time, period_type, critical_period_time, critical_period_type, case_id=None)

제공된 경우 지정된 case_id의 SLA를 설정하고, 그렇지 않으면 현재 케이스의 SLA를 설정합니다. 이 API를 사용하여 설정된 SLA는 다른 모든 케이스 SLA 유형을 능가해야 합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
period_time {int/str} 총 SLA 기간 해당 사항 없음 period_time > 0
period_type {string} period_time의 시간 단위입니다. ApiPeriodTypeEnum으로 표현됩니다. 해당 사항 없음 해당 사항 없음
critical_period_time {int/str} 중요 SLA 기간 해당 사항 없음 critical_period_time >0
중요 기간 (시간 단위로 조정 후)은
전체 기간보다 작아야 합니다.
critical_period_type {string} critical_period_time의 시간 단위로,
ApiPeriodTypeEnum으로 표시됩니다.
해당 사항 없음 해당 사항 없음
case_id {long} 케이스 식별자 해당 사항 없음 해당 사항 없음

signal_handler

signal_handler(sig, frame)

property target_entities

target_entities 객체는 구성된 작업이 실행될 수 있는 엔티티 객체의 목록입니다. 각 항목 객체는 다음 속성과 메서드를 노출합니다.

항목 속성

다음은 항목 객체의 직접 데이터 보유 속성입니다.

속성 데이터 유형 설명
identifier string 항목의 고유 식별자 (UUID)입니다.
creation_time int 엔티티가 생성된 시점의 Unix 타임스탬프입니다.
modification_time int 항목이 마지막으로 수정된 시간의 Unix 타임스탬프입니다.
additional_properties dict 항목에 관한 추가 세부정보가 포함된 사전입니다.
case_identifier string 엔티티가 속한 상위 케이스의 ID입니다.
alert_identifier string 엔티티와 연결된 알림의 ID입니다.
entity_type string 항목 유형입니다 (예: 'HOSTNAME', 'USERUNQNAME').
is_internal bool 엔티티가 내부 애셋인지 여부를 나타냅니다.
is_suspicious bool 엔티티가 의심스러운 것으로 신고되었는지 여부를 나타냅니다.
is_artifact bool 엔티티가 아티팩트인지 여부를 나타냅니다.
is_enriched bool 엔티티가 풍부해졌는지 여부를 나타냅니다.
is_vulnerable bool 엔티티가 취약한 것으로 표시되었는지 여부를 나타냅니다.
is_pivot bool 엔티티가 피벗 엔티티인지 여부를 나타냅니다.

엔티티 메서드

다음은 항목 객체에서 사용할 수 있는 실행 가능한 함수입니다.

메서드 설명
to_dict() 엔티티 객체를 표준 Python 사전으로 변환합니다.

try_set_alert_context_property

try_set_alert_context_property(property_key, property_value)

try_set_case_context_property

try_set_case_context_property(property_key, property_value)

update_alerts_additional_data

update_alerts_additional_data(alerts_additional_data, case_id=None)

알림 추가 데이터를 업데이트합니다.

매개변수

매개변수 이름 매개변수 유형 정의 가능한 값 댓글
case_id {string} 케이스 식별자 234 해당 사항 없음
alerts_additional_data {string:string} 해당 사항 없음 해당 사항 없음 해당 사항 없음

반환

NoneType

from SiemplifyAction import SiemplifyAction
siemplify = SiemplifyAction()
additional_data = {"testKey":"testValue"}
siemplify.update_alerts_additional_data(alerts_additional_data=additional_data, case_id=caseid)

결과 동작

testKey:testValue와 같은 추가 데이터로 알림을 업데이트합니다.

결과 값

없음