-
Notifications
You must be signed in to change notification settings - Fork 24
/
ssl-log-ext-firefox-mitm.bro
executable file
·74 lines (63 loc) · 1.85 KB
/
ssl-log-ext-firefox-mitm.bro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Add list of SSL/TLS cipher suites supported by clients to ssl log file
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# The Initial Developer of the Original Code is
# Mozilla Corporation
# Portions created by the Initial Developer are Copyright (C) 2014
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Original code and idea - Johanna Amann, Bro/ICSI - [email protected]
# Random bugs and extensions support - Michal Purzynski [email protected]
@load base/protocols/ssl
module SSL;
export {
redef record SSL::Info += {
client_ciphers: index_vec &log &optional;
client_curves: index_vec &log &optional;
extensions: index_vec &log &optional;
point_formats: index_vec &log &optional;
};
}
event ssl_client_hello (c: connection, version: count, possible_ts: time, client_random: string, session_id: string, ciphers: index_vec)
{
if (!c?$ssl)
return;
if (|ciphers| == 0)
return;
c$ssl$client_ciphers = ciphers;
}
event ssl_extension (c: connection, is_orig: bool, code: count, val: string)
{
if (!c?$ssl)
return;
if (!is_orig)
return;
if (!c$ssl?$extensions)
c$ssl$extensions = vector(code);
else
c$ssl$extensions[|c$ssl$extensions|] = code;
}
event ssl_extension_elliptic_curves (c: connection, is_orig: bool, curves: index_vec)
{
if (!c?$ssl)
return;
if (|curves| == 0)
return;
if (!is_orig)
return;
c$ssl$client_curves = curves;
}
event ssl_extension_ec_point_formats(c: connection, is_orig: bool, point_formats: index_vec)
{
if (!c?$ssl)
return;
if (|point_formats| == 0)
return;
if (!is_orig)
return;
c$ssl$point_formats = point_formats;
}