Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/topic/jsiwek/gh-566-fix-ssh-encr…
…ypted-packet' * origin/topic/jsiwek/gh-566-fix-ssh-encrypted-packet: GH-566: fix cases where ssh_encrypted_packet event wasn't raised
- Loading branch information
Showing
10 changed files
with
156 additions
and
11 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 |
---|---|---|
@@ -1 +1 @@ | ||
3.1.0-dev.116 | ||
3.1.0-dev.118 |
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
18 changes: 18 additions & 0 deletions
18
.../btest/Baseline/scripts.base.protocols.ssh.ssh_segmented_encryption_transition/client.out
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,18 @@ | ||
0, T, 64 | ||
1, F, 64 | ||
2, T, 80 | ||
3, F, 80 | ||
4, T, 272 | ||
5, F, 48 | ||
6, T, 80 | ||
7, F, 528 | ||
8, F, 64 | ||
9, T, 176 | ||
10, F, 160 | ||
11, F, 736 | ||
12, F, 96 | ||
13, T, 64 | ||
14, F, 64 | ||
15, F, 64 | ||
16, F, 48 | ||
17, F, 128 |
46 changes: 46 additions & 0 deletions
46
.../btest/Baseline/scripts.base.protocols.ssh.ssh_segmented_encryption_transition/server.out
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,46 @@ | ||
0, F, 172 | ||
1, T, 44 | ||
2, F, 44 | ||
3, T, 68 | ||
4, F, 52 | ||
5, T, 148 | ||
6, F, 28 | ||
7, T, 112 | ||
8, F, 500 | ||
9, F, 44 | ||
10, T, 460 | ||
11, F, 108 | ||
12, F, 100 | ||
13, F, 36 | ||
14, F, 36 | ||
15, F, 76 | ||
16, F, 36 | ||
17, F, 84 | ||
18, F, 36 | ||
19, F, 84 | ||
20, F, 36 | ||
21, F, 36 | ||
22, F, 36 | ||
23, F, 92 | ||
24, F, 36 | ||
25, F, 108 | ||
26, F, 36 | ||
27, F, 68 | ||
28, F, 36 | ||
29, F, 36 | ||
30, F, 68 | ||
31, F, 36 | ||
32, F, 68 | ||
33, F, 36 | ||
34, F, 36 | ||
35, F, 68 | ||
36, F, 36 | ||
37, F, 92 | ||
38, F, 36 | ||
39, F, 100 | ||
40, T, 36 | ||
41, F, 44 | ||
42, F, 36 | ||
43, F, 140 | ||
44, T, 36 | ||
45, T, 60 |
Binary file added
BIN
+8.6 KB
testing/btest/Traces/ssh/ssh_client_sends_first_enc_pkt_with_newkeys.pcap
Binary file not shown.
Binary file added
BIN
+13.5 KB
testing/btest/Traces/ssh/ssh_server_sends_first_enc_pkt_with_newkeys.pcap
Binary file not shown.
21 changes: 21 additions & 0 deletions
21
testing/btest/scripts/base/protocols/ssh/ssh_segmented_encryption_transition.zeek
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,21 @@ | ||
# In the pcaps used here, the first encrypted packet is sent along with NEWKEYS | ||
# message of either the client (1st pcap) or the server (2nd pcap) instead of | ||
# separately. The "ssh_encrypted_packet" should be raised for such encrypted | ||
# data appearing within the same tcp segment delivery as other non-encrypted | ||
# messages. | ||
|
||
# @TEST-EXEC: zeek -b -C -r $TRACES/ssh/ssh_client_sends_first_enc_pkt_with_newkeys.pcap %INPUT > client.out | ||
# @TEST-EXEC: zeek -b -C -r $TRACES/ssh/ssh_server_sends_first_enc_pkt_with_newkeys.pcap %INPUT > server.out | ||
# @TEST-EXEC: btest-diff client.out | ||
# @TEST-EXEC: btest-diff server.out | ||
|
||
@load base/protocols/ssh | ||
|
||
global pkts: count = 0; | ||
redef SSH::disable_analyzer_after_detection = F; | ||
|
||
event ssh_encrypted_packet(c: connection, orig: bool, len: count) | ||
{ | ||
print pkts, orig, len; | ||
++pkts; | ||
} |