图数据库:如何触发事件?
Graph db: how to trigger on event?
我们希望在图形数据库中存储 Windows 进程树信息。
我们有一个端点检测工具,可以收集进程创建和删除信息。比如进程id,启动进程的命令,父进程等等。
数据将实时加载到图数据库中。
Neo4j 中是否有一种方法可以在我们将 "iexplore.exe" 视为 "powershell.exe" 或 "cmd.exe" 等进程的父进程时随时触发事件?在某些情况下,iexplore 和 powershell/cmd.
之间可能还有其他几个进程
例如:攻击者利用IE的一个漏洞,将一个文件放到磁盘上执行,然后使用powershell.exe
.
图形数据库是否为我们提供了构建规则以捕获更复杂事件的能力?
您可以使用 apoc triggers
for set trigger and apoc.es.postRaw
进行外部 API 调用。例如:
CALL apoc.trigger.add(
'iexplorer',
'MATCH (P:Process {name:"iexplore.exe"})-[:parent_of*]->(C:Process)
WHERE C.name IN ["powershell.exe", "cmd.exe"]
WITH collect(distinct id(P)) as ids
CALL apoc.es.postRaw("http://localhost", "neo4jevent", ids) yield value
RETURN value',
'{phase:'after'}'
)
我们希望在图形数据库中存储 Windows 进程树信息。
我们有一个端点检测工具,可以收集进程创建和删除信息。比如进程id,启动进程的命令,父进程等等。
数据将实时加载到图数据库中。
Neo4j 中是否有一种方法可以在我们将 "iexplore.exe" 视为 "powershell.exe" 或 "cmd.exe" 等进程的父进程时随时触发事件?在某些情况下,iexplore 和 powershell/cmd.
之间可能还有其他几个进程例如:攻击者利用IE的一个漏洞,将一个文件放到磁盘上执行,然后使用powershell.exe
.
图形数据库是否为我们提供了构建规则以捕获更复杂事件的能力?
您可以使用 apoc triggers
for set trigger and apoc.es.postRaw
进行外部 API 调用。例如:
CALL apoc.trigger.add(
'iexplorer',
'MATCH (P:Process {name:"iexplore.exe"})-[:parent_of*]->(C:Process)
WHERE C.name IN ["powershell.exe", "cmd.exe"]
WITH collect(distinct id(P)) as ids
CALL apoc.es.postRaw("http://localhost", "neo4jevent", ids) yield value
RETURN value',
'{phase:'after'}'
)