Skip to content

Commit 14c53dc

Browse files
committed
recompile app v2.2 to add ostiarius parser
1 parent 404a04b commit 14c53dc

File tree

13 files changed

+33
-39
lines changed

13 files changed

+33
-39
lines changed

Security Growler Light.app.zip

17.4 KB
Binary file not shown.

Security Growler Light.app/Contents/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>2.1</string>
20+
<string>2.2</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleVersion</key>
24-
<string>2.1</string>
24+
<string>2.2</string>
2525
<key>LSMinimumSystemVersion</key>
2626
<string>10.7.0</string>
2727
<key>LSUIElement</key>

Security Growler Light.app/Contents/Resources/AppSettings.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20644,7 +20644,7 @@
2064420644
<key>Suffixes</key>
2064520645
<array/>
2064620646
<key>TextBackground</key>
20647-
<string>#ffffff</string>
20647+
<string>#dadada</string>
2064820648
<key>TextEncoding</key>
2064920649
<integer>4</integer>
2065020650
<key>TextFont</key>

Security Growler Light.app/Contents/Resources/parsers/connections.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
TITLE = 'PORT {0} <- {1}'
2-
BODY = '{0} {1} ({2}) @ {3}'
1+
TITLE = 'PORT {port} <- {source}'
2+
BODY = '{user} {process} ({pid}) @ {target}'
33

44
def parse_connection(log_line, port=None):
55
details = log_line.split()[:10]
@@ -25,13 +25,5 @@ def parse_connection(log_line, port=None):
2525
def parse(line, source=None):
2626
conn = parse_connection(line, source)
2727
if conn:
28-
return ('notify',
29-
TITLE.format(conn['port'], conn['source']),
30-
BODY.format(
31-
conn['user'],
32-
conn['process'],
33-
conn['pid'],
34-
conn['target'],
35-
),
36-
)
28+
return ('notify', TITLE.format(**conn), BODY.format(**conn))
3729
return (None, '', '')
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import re
2+
3+
#27/04/16 09:42:38,000 kernel[0]: OSTIARIUS: /Applications/Xoib.app/Contents/MacOS/Xoib is from the internet & is unsigned -> BLOCKING!
4+
OSTIARIUS_EVENT_FILTER = re.compile('OSTIARIUS: .+BLOCKING')
5+
6+
def parse(line, source=None):
7+
if OSTIARIUS_EVENT_FILTER.findall(line):
8+
return ('alert', 'Ostiarius', line.split('OSTIARIUS: ', 1)[-1])
9+
return (None, '', '')

Security Growler Light.app/Contents/Resources/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
3306: 'connections', # MySQL
1515
5432: 'connections', # PostgreSQL
1616
5900: 'vnc', # VNC
17-
'/var/log/system.log': ('sudo', 'ssh', 'portscan'),
17+
'/var/log/system.log': ('sudo', 'ssh', 'portscan', 'ostiarius'),
1818
}
1919

2020
# Enabled output/display methods

Security Growler Light.app/Contents/Resources/sources/logfile.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,4 @@ def gen_lines(path):
88
logfile.seek(0, 2) # jump to end
99
yield 'ready' # otherwise it will hang until the first change appears
1010
while True:
11-
next_line = logfile.readline().strip()
12-
if next_line:
13-
yield next_line
14-
else:
15-
yield None
11+
yield logfile.readline().strip() or None

Security Growler.app.zip

17.7 KB
Binary file not shown.

Security Growler.app/Contents/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>2.1</string>
20+
<string>2.2</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleVersion</key>
24-
<string>2.1</string>
24+
<string>2.2</string>
2525
<key>LSMinimumSystemVersion</key>
2626
<string>10.7.0</string>
2727
<key>LSUIElement</key>

Security Growler.app/Contents/Resources/parsers/connections.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
TITLE = 'PORT {0} <- {1}'
2-
BODY = '{0} {1} ({2}) @ {3}'
1+
TITLE = 'PORT {port} <- {source}'
2+
BODY = '{user} {process} ({pid}) @ {target}'
33

44
def parse_connection(log_line, port=None):
55
details = log_line.split()[:10]
@@ -25,13 +25,5 @@ def parse_connection(log_line, port=None):
2525
def parse(line, source=None):
2626
conn = parse_connection(line, source)
2727
if conn:
28-
return ('notify',
29-
TITLE.format(conn['port'], conn['source']),
30-
BODY.format(
31-
conn['user'],
32-
conn['process'],
33-
conn['pid'],
34-
conn['target'],
35-
),
36-
)
28+
return ('notify', TITLE.format(**conn), BODY.format(**conn))
3729
return (None, '', '')

0 commit comments

Comments
 (0)