Slide 71
Slide 71 text
{"timestamp":1659448860658487909,"threadStartTime":1056204106432,"processorId":0,"processId":3820,"cgroupId":1,"threadId":3820,"parentProcessId":3819,"hostProcessId":3820,"hostThreadId":3
820,"hostParentProcessId":3819,"userId":1000,"mountNamespace":4026531840,"pidNamespace":4026531836,"processName":"bash","hostName":"ip-10-1-0-33.ap","containerId":"","containerImage":
"","containerName":"","podName":"","podNamespace":"","podUID":"","eventId":"724","eventName":"security_socket_create","argsNum":4,"returnValue":0,"stackAddresses":null,"args":[{"name":"fam
ily","type":"int","value":16},{"name":"type","type":"int","value":3},{"name":"protocol","type":"int","value":9},{"name":"kern","type":"int","value":0}]}
{"timestamp":1659448860658483828,"threadStartTime":1056204106432,"processorId":0,"processId":3820,"cgroupId":1,"threadId":3820,"parentProcessId":3819,"hostProcessId":3820,"hostThreadId":3
820,"hostParentProcessId":3819,"userId":1000,"mountNamespace":4026531840,"pidNamespace":4026531836,"processName":"bash","hostName":"ip-10-1-0-33.ap","containerId":"","containerImage":
"","containerName":"","podName":"","podNamespace":"","podUID":"","eventId":"41","eventName":"socket","argsNum":3,"returnValue":3,"stackAddresses":null,"args":[{"name":"domain","type":"int",
"value":16},{"name":"type","type":"int","value":3},{"name":"protocol","type":"int","value":9}]}
{"timestamp":1659448860658608569,"threadStartTime":1056204106432,"processorId":0,"processId":3820,"cgroupId":1,"threadId":3820,"parentProcessId":3819,"hostProcessId":3820,"hostThreadId":3
820,"hostParentProcessId":3819,"userId":1000,"mountNamespace":4026531840,"pidNamespace":4026531836,"processName":"bash","hostName":"ip-10-1-0-33.ap","containerId":"","containerImage":
"","containerName":"","podName":"","podNamespace":"","podUID":"","eventId":"711","eventName":"cap_capable","argsNum":1,"returnValue":0,"stackAddresses":null,"args":[{"name":"cap","type":"i
nt","value":29}]}
(以下略)
● tracee-ebpfを実行する
○ bashが生成するプロセスによるイベントを全て出力する
● 別のターミナルからコマンドを実行してみる
○ コマンドの実行から終了までの間のイベントが全て出力される
Linux環境での利用
https://github.com/aquasecurity/tracee/blob/main/cmd/tracee-ebpf/flags/filter.go
$ sudo ./dist/tracee-ebpf --trace comm=bash --trace follow --output json