Skip to content

Commit 28a1e23

Browse files
committed
Added warnings to all key exchanges that do not provide protection against quantum attacks.
1 parent a01baad commit 28a1e23

26 files changed

+475
-162
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ For convenience, a web front-end on top of the command-line tool is available at
217217
## ChangeLog
218218

219219
### v3.4.0-dev
220+
- Added warning to all key exchanges that do not include protections against quantum attacks due to the Harvest Now, Decrypt Later strategy (see https://en.wikipedia.org/wiki/Harvest_now,_decrypt_later).
220221
- Migrated from deprecated `getopt` module to `argparse`; partial credit [oam7575](https://github.com/oam7575).
221222

222223
### v3.3.0 (2024-10-15)

src/ssh_audit/ssh2_kexdb.py

Lines changed: 100 additions & 99 deletions
Large diffs are not rendered by default.

test/docker/expected_results/dropbear_2019.78_test1.json

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@
116116
"info": [
117117
"default key exchange from OpenSSH 7.4 to 8.9",
118118
"available since OpenSSH 7.4, Dropbear SSH 2018.76"
119+
],
120+
"warn": [
121+
"does not provide protection against post-quantum attacks"
119122
]
120123
}
121124
},
@@ -125,6 +128,9 @@
125128
"info": [
126129
"default key exchange from OpenSSH 6.5 to 7.3",
127130
"available since OpenSSH 6.4, Dropbear SSH 2013.62"
131+
],
132+
"warn": [
133+
"does not provide protection against post-quantum attacks"
128134
]
129135
}
130136
},
@@ -136,6 +142,9 @@
136142
],
137143
"info": [
138144
"available since OpenSSH 5.7, Dropbear SSH 2013.62"
145+
],
146+
"warn": [
147+
"does not provide protection against post-quantum attacks"
139148
]
140149
}
141150
},
@@ -147,6 +156,9 @@
147156
],
148157
"info": [
149158
"available since OpenSSH 5.7, Dropbear SSH 2013.62"
159+
],
160+
"warn": [
161+
"does not provide protection against post-quantum attacks"
150162
]
151163
}
152164
},
@@ -158,6 +170,9 @@
158170
],
159171
"info": [
160172
"available since OpenSSH 5.7, Dropbear SSH 2013.62"
173+
],
174+
"warn": [
175+
"does not provide protection against post-quantum attacks"
161176
]
162177
}
163178
},
@@ -168,7 +183,8 @@
168183
"available since OpenSSH 7.3, Dropbear SSH 2016.73"
169184
],
170185
"warn": [
171-
"2048-bit modulus only provides 112-bits of symmetric strength"
186+
"2048-bit modulus only provides 112-bits of symmetric strength",
187+
"does not provide protection against post-quantum attacks"
172188
]
173189
}
174190
},
@@ -182,7 +198,8 @@
182198
"available since OpenSSH 3.9, Dropbear SSH 0.53"
183199
],
184200
"warn": [
185-
"2048-bit modulus only provides 112-bits of symmetric strength"
201+
"2048-bit modulus only provides 112-bits of symmetric strength",
202+
"does not provide protection against post-quantum attacks"
186203
]
187204
}
188205
},
@@ -191,6 +208,9 @@
191208
"notes": {
192209
"info": [
193210
"available since Dropbear SSH 2013.57"
211+
],
212+
"warn": [
213+
"does not provide protection against post-quantum attacks"
194214
]
195215
}
196216
}
@@ -349,12 +369,6 @@
349369
"name": "twofish256-ctr",
350370
"notes": ""
351371
}
352-
],
353-
"kex": [
354-
{
355-
"name": "diffie-hellman-group16-sha512",
356-
"notes": ""
357-
}
358372
]
359373
}
360374
},
@@ -371,9 +385,21 @@
371385
}
372386
],
373387
"kex": [
388+
{
389+
"name": "curve25519-sha256",
390+
"notes": ""
391+
},
392+
{
393+
"name": "[email protected]",
394+
"notes": ""
395+
},
374396
{
375397
"name": "diffie-hellman-group14-sha256",
376398
"notes": ""
399+
},
400+
{
401+
"name": "[email protected]",
402+
"notes": ""
377403
}
378404
],
379405
"mac": [

test/docker/expected_results/dropbear_2019.78_test1.txt

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,30 @@
55
(gen) compression: enabled ([email protected])
66

77
# key exchange algorithms
8-
(kex) curve25519-sha256 -- [info] available since OpenSSH 7.4, Dropbear SSH 2018.76
9-
 `- [info] default key exchange from OpenSSH 7.4 to 8.9
10-
(kex) [email protected] -- [info] available since OpenSSH 6.4, Dropbear SSH 2013.62
11-
 `- [info] default key exchange from OpenSSH 6.5 to 7.3
8+
(kex) curve25519-sha256 -- [warn] does not provide protection against post-quantum attacks
9+
`- [info] available since OpenSSH 7.4, Dropbear SSH 2018.76
10+
`- [info] default key exchange from OpenSSH 7.4 to 8.9
11+
(kex) [email protected] -- [warn] does not provide protection against post-quantum attacks
12+
`- [info] available since OpenSSH 6.4, Dropbear SSH 2013.62
13+
`- [info] default key exchange from OpenSSH 6.5 to 7.3
1214
(kex) ecdh-sha2-nistp521 -- [fail] using elliptic curves that are suspected as being backdoored by the U.S. National Security Agency
15+
 `- [warn] does not provide protection against post-quantum attacks
1316
`- [info] available since OpenSSH 5.7, Dropbear SSH 2013.62
1417
(kex) ecdh-sha2-nistp384 -- [fail] using elliptic curves that are suspected as being backdoored by the U.S. National Security Agency
18+
 `- [warn] does not provide protection against post-quantum attacks
1519
`- [info] available since OpenSSH 5.7, Dropbear SSH 2013.62
1620
(kex) ecdh-sha2-nistp256 -- [fail] using elliptic curves that are suspected as being backdoored by the U.S. National Security Agency
21+
 `- [warn] does not provide protection against post-quantum attacks
1722
`- [info] available since OpenSSH 5.7, Dropbear SSH 2013.62
1823
(kex) diffie-hellman-group14-sha256 -- [warn] 2048-bit modulus only provides 112-bits of symmetric strength
24+
 `- [warn] does not provide protection against post-quantum attacks
1925
`- [info] available since OpenSSH 7.3, Dropbear SSH 2016.73
2026
(kex) diffie-hellman-group14-sha1 -- [fail] using broken SHA-1 hash algorithm
2127
 `- [warn] 2048-bit modulus only provides 112-bits of symmetric strength
28+
 `- [warn] does not provide protection against post-quantum attacks
2229
`- [info] available since OpenSSH 3.9, Dropbear SSH 0.53
23-
(kex) [email protected] -- [info] available since Dropbear SSH 2013.57
30+
(kex) [email protected] -- [warn] does not provide protection against post-quantum attacks
31+
`- [info] available since Dropbear SSH 2013.57
2432

2533
# host-key algorithms
2634
(key) ecdsa-sha2-nistp256 -- [fail] using elliptic curves that are suspected as being backdoored by the U.S. National Security Agency
@@ -74,13 +82,15 @@
7482
(rec) -hmac-sha1-96 -- mac algorithm to remove 
7583
(rec) -ssh-dss -- key algorithm to remove 
7684
(rec) -ssh-rsa -- key algorithm to remove 
77-
(rec) +diffie-hellman-group16-sha512 -- kex algorithm to append 
7885
(rec) +twofish128-ctr -- enc algorithm to append 
7986
(rec) +twofish256-ctr -- enc algorithm to append 
8087
(rec) -aes128-cbc -- enc algorithm to remove 
8188
(rec) -aes256-cbc -- enc algorithm to remove 
89+
(rec) -curve25519-sha256 -- kex algorithm to remove 
90+
(rec) [email protected] -- kex algorithm to remove 
8291
(rec) -diffie-hellman-group14-sha256 -- kex algorithm to remove 
8392
(rec) -hmac-sha2-256 -- mac algorithm to remove 
93+
(rec) [email protected] -- kex algorithm to remove 
8494

8595
# additional info
8696
(nfo) For hardening guides on common OSes, please see: <https://www.ssh-audit.com/hardening_guides.html>

test/docker/expected_results/openssh_4.0p1_test1.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@
173173
],
174174
"info": [
175175
"available since OpenSSH 2.3.0"
176+
],
177+
"warn": [
178+
"does not provide protection against post-quantum attacks"
176179
]
177180
}
178181
},
@@ -186,7 +189,8 @@
186189
"available since OpenSSH 3.9, Dropbear SSH 0.53"
187190
],
188191
"warn": [
189-
"2048-bit modulus only provides 112-bits of symmetric strength"
192+
"2048-bit modulus only provides 112-bits of symmetric strength",
193+
"does not provide protection against post-quantum attacks"
190194
]
191195
}
192196
},
@@ -201,6 +205,9 @@
201205
"info": [
202206
"removed in OpenSSH 6.9: https://www.openssh.com/txt/release-6.9",
203207
"available since OpenSSH 2.3.0, Dropbear SSH 0.28"
208+
],
209+
"warn": [
210+
"does not provide protection against post-quantum attacks"
204211
]
205212
}
206213
}

test/docker/expected_results/openssh_4.0p1_test1.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@
1010

1111
# key exchange algorithms
1212
(kex) diffie-hellman-group-exchange-sha1 (1024-bit) -- [fail] using small 1024-bit modulus
13+
 `- [warn] does not provide protection against post-quantum attacks
1314
`- [info] available since OpenSSH 2.3.0
1415
(kex) diffie-hellman-group14-sha1 -- [fail] using broken SHA-1 hash algorithm
1516
 `- [warn] 2048-bit modulus only provides 112-bits of symmetric strength
17+
 `- [warn] does not provide protection against post-quantum attacks
1618
`- [info] available since OpenSSH 3.9, Dropbear SSH 0.53
1719
(kex) diffie-hellman-group1-sha1 -- [fail] using small 1024-bit modulus
1820
 `- [fail] vulnerable to the Logjam attack: https://en.wikipedia.org/wiki/Logjam_(computer_security)
1921
 `- [fail] using broken SHA-1 hash algorithm
22+
 `- [warn] does not provide protection against post-quantum attacks
2023
`- [info] available since OpenSSH 2.3.0, Dropbear SSH 0.28
2124
`- [info] removed in OpenSSH 6.9: https://www.openssh.com/txt/release-6.9
2225

test/docker/expected_results/openssh_5.6p1_test1.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@
195195
],
196196
"info": [
197197
"available since OpenSSH 4.4"
198+
],
199+
"warn": [
200+
"does not provide protection against post-quantum attacks"
198201
]
199202
}
200203
},
@@ -207,6 +210,9 @@
207210
],
208211
"info": [
209212
"available since OpenSSH 2.3.0"
213+
],
214+
"warn": [
215+
"does not provide protection against post-quantum attacks"
210216
]
211217
}
212218
},
@@ -220,7 +226,8 @@
220226
"available since OpenSSH 3.9, Dropbear SSH 0.53"
221227
],
222228
"warn": [
223-
"2048-bit modulus only provides 112-bits of symmetric strength"
229+
"2048-bit modulus only provides 112-bits of symmetric strength",
230+
"does not provide protection against post-quantum attacks"
224231
]
225232
}
226233
},
@@ -235,6 +242,9 @@
235242
"info": [
236243
"removed in OpenSSH 6.9: https://www.openssh.com/txt/release-6.9",
237244
"available since OpenSSH 2.3.0, Dropbear SSH 0.28"
245+
],
246+
"warn": [
247+
"does not provide protection against post-quantum attacks"
238248
]
239249
}
240250
}

test/docker/expected_results/openssh_5.6p1_test1.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@
66

77
# key exchange algorithms
88
(kex) diffie-hellman-group-exchange-sha256 (1024-bit) -- [fail] using small 1024-bit modulus
9+
 `- [warn] does not provide protection against post-quantum attacks
910
`- [info] available since OpenSSH 4.4
1011
(kex) diffie-hellman-group-exchange-sha1 (1024-bit) -- [fail] using small 1024-bit modulus
12+
 `- [warn] does not provide protection against post-quantum attacks
1113
`- [info] available since OpenSSH 2.3.0
1214
(kex) diffie-hellman-group14-sha1 -- [fail] using broken SHA-1 hash algorithm
1315
 `- [warn] 2048-bit modulus only provides 112-bits of symmetric strength
16+
 `- [warn] does not provide protection against post-quantum attacks
1417
`- [info] available since OpenSSH 3.9, Dropbear SSH 0.53
1518
(kex) diffie-hellman-group1-sha1 -- [fail] using small 1024-bit modulus
1619
 `- [fail] vulnerable to the Logjam attack: https://en.wikipedia.org/wiki/Logjam_(computer_security)
1720
 `- [fail] using broken SHA-1 hash algorithm
21+
 `- [warn] does not provide protection against post-quantum attacks
1822
`- [info] available since OpenSSH 2.3.0, Dropbear SSH 0.28
1923
`- [info] removed in OpenSSH 6.9: https://www.openssh.com/txt/release-6.9
2024

test/docker/expected_results/openssh_5.6p1_test2.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@
185185
],
186186
"info": [
187187
"available since OpenSSH 4.4"
188+
],
189+
"warn": [
190+
"does not provide protection against post-quantum attacks"
188191
]
189192
}
190193
},
@@ -197,6 +200,9 @@
197200
],
198201
"info": [
199202
"available since OpenSSH 2.3.0"
203+
],
204+
"warn": [
205+
"does not provide protection against post-quantum attacks"
200206
]
201207
}
202208
},
@@ -210,7 +216,8 @@
210216
"available since OpenSSH 3.9, Dropbear SSH 0.53"
211217
],
212218
"warn": [
213-
"2048-bit modulus only provides 112-bits of symmetric strength"
219+
"2048-bit modulus only provides 112-bits of symmetric strength",
220+
"does not provide protection against post-quantum attacks"
214221
]
215222
}
216223
},
@@ -225,6 +232,9 @@
225232
"info": [
226233
"removed in OpenSSH 6.9: https://www.openssh.com/txt/release-6.9",
227234
"available since OpenSSH 2.3.0, Dropbear SSH 0.28"
235+
],
236+
"warn": [
237+
"does not provide protection against post-quantum attacks"
228238
]
229239
}
230240
}

test/docker/expected_results/openssh_5.6p1_test2.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@
66

77
# key exchange algorithms
88
(kex) diffie-hellman-group-exchange-sha256 (1024-bit) -- [fail] using small 1024-bit modulus
9+
 `- [warn] does not provide protection against post-quantum attacks
910
`- [info] available since OpenSSH 4.4
1011
(kex) diffie-hellman-group-exchange-sha1 (1024-bit) -- [fail] using small 1024-bit modulus
12+
 `- [warn] does not provide protection against post-quantum attacks
1113
`- [info] available since OpenSSH 2.3.0
1214
(kex) diffie-hellman-group14-sha1 -- [fail] using broken SHA-1 hash algorithm
1315
 `- [warn] 2048-bit modulus only provides 112-bits of symmetric strength
16+
 `- [warn] does not provide protection against post-quantum attacks
1417
`- [info] available since OpenSSH 3.9, Dropbear SSH 0.53
1518
(kex) diffie-hellman-group1-sha1 -- [fail] using small 1024-bit modulus
1619
 `- [fail] vulnerable to the Logjam attack: https://en.wikipedia.org/wiki/Logjam_(computer_security)
1720
 `- [fail] using broken SHA-1 hash algorithm
21+
 `- [warn] does not provide protection against post-quantum attacks
1822
`- [info] available since OpenSSH 2.3.0, Dropbear SSH 0.28
1923
`- [info] removed in OpenSSH 6.9: https://www.openssh.com/txt/release-6.9
2024

test/docker/expected_results/openssh_5.6p1_test3.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@
185185
],
186186
"info": [
187187
"available since OpenSSH 4.4"
188+
],
189+
"warn": [
190+
"does not provide protection against post-quantum attacks"
188191
]
189192
}
190193
},
@@ -197,6 +200,9 @@
197200
],
198201
"info": [
199202
"available since OpenSSH 2.3.0"
203+
],
204+
"warn": [
205+
"does not provide protection against post-quantum attacks"
200206
]
201207
}
202208
},
@@ -210,7 +216,8 @@
210216
"available since OpenSSH 3.9, Dropbear SSH 0.53"
211217
],
212218
"warn": [
213-
"2048-bit modulus only provides 112-bits of symmetric strength"
219+
"2048-bit modulus only provides 112-bits of symmetric strength",
220+
"does not provide protection against post-quantum attacks"
214221
]
215222
}
216223
},
@@ -225,6 +232,9 @@
225232
"info": [
226233
"removed in OpenSSH 6.9: https://www.openssh.com/txt/release-6.9",
227234
"available since OpenSSH 2.3.0, Dropbear SSH 0.28"
235+
],
236+
"warn": [
237+
"does not provide protection against post-quantum attacks"
228238
]
229239
}
230240
}

0 commit comments

Comments
 (0)