Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated API & Selenium tests for Create Remote Threads panel #408

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"winlog": {
"computer_name": "testing.lme.local",
"event_id": "4625",
"task": "Logon",
"keywords": [
"Audit Failure"
],
"provider_name": "Microsoft-Windows-Sysmon",
"event_data": {
"LogonType": "3",
"IpAddress": "194.165.16.73",
"TargetUserName": "Administrator",
"TargetDomainName": "testserver.LME.LOCAL",
"LogonProcessName": "NtLmSsp ",
"AuthenticationPackageName": "NTLM",
"SourceImage": "testsource",
"TargetImage": "testtarget"
}
},
"@timestamp": "2024-05-08T08:40:18.252Z",
"host": {
"name": "testing.lme.local"
},
"event": {
"code": "8",
"provider": "Microsoft-Windows-Sysmon",
"action": "Logon",
"outcome": "failure"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"aggs": {
"2": {
"terms": {
"field": "winlog.event_data.SourceImage",
"order": {
"_count": "desc"
},
"size": 100
}
}
},
"size": 100,
"runtime_mappings": {
"day_of_week": {
"type": "long",
"script": {
"source": "emit(doc['@timestamp'].value.dayOfWeekEnum.getValue())"
}
},
"hour_of_day": {
"type": "long",
"script": {
"source": "emit (doc['@timestamp'].value.getHour())"
}
}
},
"_source": false,
"query": {
"bool": {
"must": [],
"filter": [
{
"bool": {
"filter": [
{
"bool": {
"should": [
{
"term": {
"event.code": {
"value": "8"
}
}
}
],
"minimum_should_match": 1
}
},
{
"bool": {
"should": [
{
"term": {
"event.provider": {
"value": "Microsoft-Windows-Sysmon"
}
}
}
],
"minimum_should_match": 1
}
}
]
}
},
{
"range": {
"@timestamp": {
"format": "strict_date_optional_time",
"gte": "2009-08-14T14:46:35.172Z",
"lte": "2024-08-14T14:46:35.172Z"
}
}
}
],
"should": [],
"must_not": []
}
},
"highlight": {
"pre_tags": [
"@kibana-highlighted-field@"
],
"post_tags": [
"@/kibana-highlighted-field@"
],
"fields": {
"*": {}
},
"fragment_size": 2147483647
}
}
7 changes: 7 additions & 0 deletions testing/tests/api_tests/data_insertion_tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,11 @@ def test_file_suspicious_powershell(es_host, es_port, username, password):
# Check to make sure the data was inserted
assert(second_response_loaded['aggregations']['2']['buckets'][0]['key'] == 'powershell.exe')

def test_createRemoteThread(es_host, es_port, username, password):

second_response_loaded=insert_winlog_data(es_host, es_port, username, password, 'filter_createRemoteThreads.json', 'createRemoteThreads.json', 1)

# Check to make sure the data was inserted
assert 1==1
assert(second_response_loaded['aggregations']['2']['buckets'][0]['key'] == 'testsource')

Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ def test_application_crashing_and_hanging_count(self, setup_login, kibana_url, t
driver = setup_login
dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Application Crashing and Hanging Count", ".tbvChart",".visError")

@pytest.mark.skip(reason="Skipping this test")
#@pytest.mark.skip(reason="Skipping this test")
def test_create_remote_threat_events(self, setup_login, kibana_url, timeout):
driver = setup_login
dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "CreateRemoteThread events", ".tbvChart",".visError")
dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "CreateRemoteThread events", ".euiDataGrid",".visError")

def test_filter_hosts(self, setup_login, kibana_url, timeout):
driver = setup_login
Expand Down
Loading