Skip to content

Commit

Permalink
feat: add elastic endpoint rule (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
arush15june authored Dec 9, 2021
1 parent 6d8f554 commit d2ee597
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 9 deletions.
6 changes: 6 additions & 0 deletions pkg/edrRecon/edrdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,11 @@ var EdrList = []string{
"threat",
"xagt.exe",
"xagtnotif.exe",
"Elastic Agent",
"elastic-agent.exe",
"elastic-endpoint.exe",
"elastic-endpoint-driver",
"ElasticEndpoint",
}

var ReconList = []string{
Expand All @@ -300,6 +305,7 @@ var ReconList = []string{
"SystemProductName",
"LocalAccountTokenFilterPolicy",
"LsaCfgFlags",
"elastic",
}

var McafeeList = []string{
Expand Down
19 changes: 10 additions & 9 deletions pkg/resources/scan_edr.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ type EDRDetection interface {
type EDRType string

var (
WinDefenderEDR EDRType = "defender"
KaskperskyEDR EDRType = "kaspersky"
CrowdstrikeEDR EDRType = "crowdstrike"
McafeeEDR EDRType = "mcafee"
SymantecEDR EDRType = "symantec"
CylanceEDR EDRType = "cylance"
CarbonBlackEDR EDRType = "carbon_black"
SentinelOneEDR EDRType = "sentinel_one"
FireEyeEDR EDRType = "fireeye"
WinDefenderEDR EDRType = "defender"
KaskperskyEDR EDRType = "kaspersky"
CrowdstrikeEDR EDRType = "crowdstrike"
McafeeEDR EDRType = "mcafee"
SymantecEDR EDRType = "symantec"
CylanceEDR EDRType = "cylance"
CarbonBlackEDR EDRType = "carbon_black"
SentinelOneEDR EDRType = "sentinel_one"
FireEyeEDR EDRType = "fireeye"
ElasticAgentEDR EDRType = "elastic_agent"
)
31 changes: 31 additions & 0 deletions pkg/scanners/scan_elastic.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package scanners

import "github.com/FourCoreLabs/EDRHunt/pkg/resources"

type ElasticAgentDetection struct{}

func (w *ElasticAgentDetection) Name() string {
return "Elastic Endpoint Security"
}

func (w *ElasticAgentDetection) Type() resources.EDRType {
return resources.ElasticAgentEDR
}

var ElasticAgentHeuristic = []string{
"Elastic Endpoint Security",
"Elastic Agent",
"elastic-agent.exe",
"elastic-endpoint.exe",
"elastic-endpoint-driver",
"ElasticEndpoint",
}

func (w *ElasticAgentDetection) Detect(data resources.SystemData) (resources.EDRType, bool) {
_, ok := data.CountMatchesAll(ElasticAgentHeuristic)
if !ok {
return "", false
}

return resources.ElasticAgentEDR, true
}
1 change: 1 addition & 0 deletions pkg/scanners/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ var (
&SymantecDetection{},
&SentinelOneDetection{},
&WinDefenderDetection{},
&ElasticAgentDetection{},
}
)

0 comments on commit d2ee597

Please sign in to comment.