Skip to content
This repository has been archived by the owner. It is now read-only.

Commit 9bae714

Browse files
authored
Merge pull request #23 from HubbleStack/develop
Merge to master (prep for v2016.10.2)
2 parents c7430b3 + 1f2d29c commit 9bae714

File tree

3 files changed

+12
-31
lines changed

3 files changed

+12
-31
lines changed

FORMULA

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: hubblestack_nebula
22
os: RedHat, CentOS, Debian, Ubuntu
33
os_family: RedHat, Debian
4-
version: 2016.9.1
4+
version: 2016.10.1
55
release: 1
66
summary: HubbleStack Nebula
77
description: HubbleStack Nebula

README.rst

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -122,38 +122,19 @@ These queries have been designed to give detailed insight into system activity.
122122
Schedule
123123
--------
124124

125-
Nebula is designed to be used on a schedule. Here is a set of sample schedules
126-
for use with the sample queries.
125+
Nebula is meant to be run on a schedule. Unfortunately, in it's present state,
126+
the Salt scheduler has a memory leak. Pending a solution we're suggesting the
127+
use of cron for the scheduled jobs:
127128

128-
**hubble_nebula.sls (cont.)**
129+
**/etc/cron.d/hubble**
129130

130131
.. code-block:: yaml
131132
132-
schedule:
133-
nebula_fifteen_min:
134-
function: nebula.queries
135-
seconds: 900
136-
args:
137-
- fifteen_min
138-
returner: splunk_nebula_return
139-
return_job: False
140-
run_on_start: False
141-
nebula_hour:
142-
function: nebula.queries
143-
seconds: 3600
144-
args:
145-
- hour
146-
returner: splunk_nebula_return
147-
return_job: False
148-
run_on_start: False
149-
nebula_day:
150-
function: nebula.queries
151-
seconds: 86400
152-
args:
153-
- day
154-
returner: splunk_nebula_return
155-
return_job: False
156-
run_on_start: False
133+
MAILTO=""
134+
SHELL=/bin/bash
135+
*/15 * * * * root /usr/bin/salt '*' nebula.queries fifteen_min --return splunk_nebula_return
136+
@hourly root /usr/bin/salt '*' nebula.queries hour --return splunk_nebula_return
137+
@daily root /usr/bin/salt '*' nebula.queries day --return splunk_nebula_return
157138
158139
.. _nebula_configuration:
159140

hubblestack_nebula/hubblestack_nebula_queries.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
fifteen_min:
22
- query_name: running_procs
3-
query: SELECT p.name AS process, p.pid AS process_id, p.cmdline, p.cwd, p.on_disk, p.resident_size AS mem_used, p.parent, g.groupname, u.username AS user, p.path, h.md5, h.sha1, h.sha256 FROM processes AS p LEFT JOIN users AS u ON p.uid=u.uid LEFT JOIN groups AS g ON p.gid=g.gid LEFT JOIN hash AS h ON p.path=h.path;
3+
query: SELECT p.name AS process, p.pid AS process_id, p.cmdline, p.cwd, p.on_disk, p.resident_size AS mem_used, p.parent, g.groupname, u.username AS user, p.path, h.md5, h.sha1, h.sha256 FROM processes AS p LEFT JOIN users AS u ON p.uid=u.uid LEFT JOIN groups AS g ON p.gid=g.gid LEFT JOIN hash AS h ON p.path=h.path WHERE parent IS NOT 2 AND username NOTNULL AND process NOTNULL AND parent NOTNULL;
44
- query_name: established_outbound
55
query: SELECT t.iso_8601 AS _time, pos.family, h.*, ltrim(pos.local_address, ':f') AS src, pos.local_port AS src_port, pos.remote_port AS dest_port, ltrim(remote_address, ':f') AS dest, name, p.path AS file_path, cmdline, pos.protocol, lp.protocol FROM process_open_sockets AS pos JOIN processes AS p ON p.pid=pos.pid LEFT JOIN time AS t LEFT JOIN (SELECT * FROM listening_ports) AS lp ON lp.port=pos.local_port AND lp.protocol=pos.protocol LEFT JOIN hash AS h ON h.path=p.path WHERE NOT remote_address='' AND NOT remote_address='::' AND NOT remote_address='0.0.0.0' AND NOT remote_address='127.0.0.1' AND port is NULL;
66
- query_name: listening_procs
77
query: SELECT t.iso_8601 AS _time, h.md5 AS md5, p.pid, name, ltrim(address, ':f') AS address, port, p.path AS file_path, cmdline, root, parent FROM listening_ports AS lp LEFT JOIN processes AS p ON lp.pid=p.pid LEFT JOIN time AS t LEFT JOIN hash AS h ON h.path=p.path WHERE NOT address='127.0.0.1';
88
- query_name: suid_binaries
9-
query: SELECT sb.*, t.iso_8601 AS _time FROM suid_bin AS sb JOIN time AS t;
9+
query: SELECT sb.*, t.iso_8601 AS _time, h.sha1, h.sha256 FROM suid_bin AS sb JOIN time AS t LEFT JOIN hash AS h ON sb.path=h.path;
1010
hour:
1111
- query_name: crontab
1212
query: SELECT c.*,t.iso_8601 AS _time FROM crontab AS c JOIN time AS t;

0 commit comments

Comments
 (0)