-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
281 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
{ | ||
"type": "object", | ||
"required": [], | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"hostIdentifier": { | ||
"type": "string" | ||
}, | ||
"calendarTime": { | ||
"type": "string" | ||
}, | ||
"unixTime": { | ||
"type": "number" | ||
}, | ||
"epoch": { | ||
"type": "string" | ||
}, | ||
"counter": { | ||
"type": "number" | ||
}, | ||
"numerics": { | ||
"type": "string" | ||
}, | ||
"columns": { | ||
"type": "object", | ||
"required": [], | ||
"properties": { | ||
"cmdline": { | ||
"type": "string" | ||
}, | ||
"cwd": { | ||
"type": "string" | ||
}, | ||
"disk_bytes_read": { | ||
"type": "string" | ||
}, | ||
"disk_bytes_written": { | ||
"type": "string" | ||
}, | ||
"egid": { | ||
"type": "string" | ||
}, | ||
"euid": { | ||
"type": "string" | ||
}, | ||
"gid": { | ||
"type": "string" | ||
}, | ||
"name": { | ||
"type": "string" | ||
}, | ||
"nice": { | ||
"type": "string" | ||
}, | ||
"on_disk": { | ||
"type": "string" | ||
}, | ||
"parent": { | ||
"type": "string" | ||
}, | ||
"path": { | ||
"type": "string" | ||
}, | ||
"pgroup": { | ||
"type": "string" | ||
}, | ||
"pid": { | ||
"type": "string" | ||
}, | ||
"resident_size": { | ||
"type": "string" | ||
}, | ||
"root": { | ||
"type": "string" | ||
}, | ||
"sgid": { | ||
"type": "string" | ||
}, | ||
"start_time": { | ||
"type": "string" | ||
}, | ||
"state": { | ||
"type": "string" | ||
}, | ||
"suid": { | ||
"type": "string" | ||
}, | ||
"system_time": { | ||
"type": "string" | ||
}, | ||
"threads": { | ||
"type": "string" | ||
}, | ||
"total_size": { | ||
"type": "string" | ||
}, | ||
"uid": { | ||
"type": "string" | ||
}, | ||
"user_time": { | ||
"type": "string" | ||
}, | ||
"wired_size": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"action": { | ||
"type": "string" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
-- A new stream will be created for the output of this pipeline. | ||
-- The stream name will match the name used in the 'insert' statement. | ||
insert into suspicious_osquery_cleansed | ||
select | ||
`name` as osquery_name, | ||
hostIdentifier, | ||
calendarTime, | ||
cast(unixTime as bigint) as unixTime, | ||
cast(epoch as bigint) as epoch, | ||
cast(counter as int) as counter, | ||
cast(numerics as boolean) as numerics, | ||
columns['cmdline'] as cmdline, | ||
columns['cwd'] as cwd, | ||
cast(columns['disk_bytes_read'] as bigint) as disk_bytes_read, | ||
cast(columns['disk_bytes_written'] as bigint) as disk_bytes_written, | ||
cast(columns['egid'] as int) as egid, | ||
cast(columns['euid'] as int) as euid, | ||
cast(columns['gid'] as int) as gid, | ||
columns['name'] as process_name, | ||
cast(columns['nice'] as int) as nice, | ||
cast(columns['on_disk'] as int) as on_disk, | ||
cast(columns['parent'] as bigint) as parent, | ||
columns['path'] as path, | ||
cast(columns['pgroup'] as bigint) as pgroup, | ||
cast(columns['pid'] as bigint) as pid, | ||
cast(columns['resident_size'] as bigint) as resident_size, | ||
columns['root'] as root, | ||
cast(columns['sgid'] as int) as sgid, | ||
cast(columns['start_time'] as bigint) as start_time, | ||
cast(columns['state'] as int) as state, | ||
cast(columns['suid'] as int) as suid, | ||
cast(columns['system_time'] as bigint) as `system_time`, | ||
cast(columns['threads'] as int) as threads, | ||
cast(columns['total_size'] as bigint) as total_size, | ||
cast(columns['uid'] as int) as uid, | ||
cast(columns['user_time'] as bigint) as user_time, | ||
cast(columns['wired_size'] as int) as wired_size, | ||
action | ||
from suspicious_processes |