This repository has been archived by the owner on May 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
client_downgrade.py
348 lines (333 loc) · 10.4 KB
/
client_downgrade.py
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
##
# Client refuses tls 1.2, tls 1.1 and tls 1.0 with openssl
# morpheus : openssl s_server -key /...key -cert /...crt -accept 443 -www
# trinity : openssl s_client -connect morpheus:443 \
# -no_tls1_2 -no_tls1_1 -no_tls1
# smith : sniff(iface="eth1", filter="tcp", prn=lambda p: p["TCP"].show())
##
###[ TCP ]###
sport= 42134
dport= https
seq= 596964978
ack= 0
dataofs= 10
reserved= 0
flags= S
window= 64240
chksum= 0x5859
urgptr= 0
options= [('MSS', 1460), ('SAckOK', b''), ('Timestamp', (2277548314, 0)), ('NOP', None), ('WScale', 7)]
###[ TCP ]###
sport= https
dport= 42134
seq= 1459475212
ack= 596964979
dataofs= 10
reserved= 0
flags= SA
window= 65160
chksum= 0x5859
urgptr= 0
options= [('MSS', 1460), ('SAckOK', b''), ('Timestamp', (3126222250, 2277548314)), ('NOP', None), ('WScale', 7)]
###[ TCP ]###
sport= 42134
dport= https
seq= 596964979
ack= 1459475213
dataofs= 8
reserved= 0
flags= A
window= 502
chksum= 0x5851
urgptr= 0
options= [('NOP', None), ('NOP', None), ('Timestamp', (2277548314, 3126222250))]
###[ TCP ]###
sport= 42134
dport= https
seq= 596964979
ack= 1459475213
dataofs= 8
reserved= 0
flags= PA
window= 502
chksum= 0x58cb
urgptr= 0
options= [('NOP', None), ('NOP', None), ('Timestamp', (2277548314, 3126222250))]
###[ TLS ]###
type= handshake
version= SSLv3
len= 117
iv= b''
\msg\
|###[ TLS Handshake - Client Hello ]###
| msgtype= client_hello
| msglen= 113
| version= SSLv3
| gmt_unix_time= Fri, 10 Nov 2034 17:09:05 +0000 (2046791345)
| random_bytes= 11fe6e7ba0a3dfdb8c48902b3b586e23d37110ddb06cac0168d9ee26
| sidlen= 0
| sid= ''
| cipherslen= 74
| ciphers= [TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_CAMELLIA_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_SEED_CBC_SHA, TLS_DHE_DSS_WITH_SEED_CBC_SHA, TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_SEED_CBC_SHA, TLS_RSA_WITH_CAMELLIA_128_CBC_SHA, TLS_ECDHE_RSA_WITH_RC4_128_SHA, TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLS_ECDH_RSA_WITH_RC4_128_SHA, TLS_ECDH_ECDSA_WITH_RC4_128_SHA, TLS_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_RC4_128_MD5, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA, TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_RSA_WITH_3DES_EDE_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
| complen= 1
| comp= null
| extlen= None
| ext= None
mac= b''
pad= b''
padlen= None
###[ TCP ]###
sport= https
dport= 42134
seq= 1459475213
ack= 596965101
dataofs= 8
reserved= 0
flags= A
window= 509
chksum= 0x5851
urgptr= 0
options= [('NOP', None), ('NOP', None), ('Timestamp', (3126222250, 2277548314))]
###[ TCP ]###
sport= https
dport= 42134
seq= 1459475213
ack= 596965101
dataofs= 8
reserved= 0
flags= PA
window= 509
chksum= 0x5d1a
urgptr= 0
options= [('NOP', None), ('NOP', None), ('Timestamp', (3126222254, 2277548314))]
###[ TLS ]###
type= handshake
version= SSLv3
len= 81
iv= b''
\msg\
|###[ TLS Handshake - Server Hello ]###
| msgtype= server_hello
| msglen= 77
| version= SSLv3
| gmt_unix_time= Sun, 24 Aug 2104 21:04:49 +0000 (4249055089)
| random_bytes= 86e08878dcf73cfba886c8854a557e87ef589523797758d467991ccf
| sidlen= 32
| sid= '\xea\x1d\xb6\xc1\xab\xc9q\x8fk\x90\x7fkg\xe5F\xa3\xbb*j\xe1\x99\x80\xe0\x91V\xb7.\x8bK\x97\xc7U'
| cipher= TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
| comp= null
| extlen= 5
| \ext\
| |###[ TLS Extension - Renegotiation Indication ]###
| | type= renegotiation_info
| | len= 1
| | reneg_conn_len= 0
| | renegotiated_connection= ''
mac= b''
pad= b''
padlen= None
###[ TLS ]###
type= handshake
version= SSLv3
len= 789
iv= b''
\msg\
|###[ TLS Handshake - Certificate ]###
| msgtype= certificate
| msglen= 785
| certslen= 782
| certs= [(779, [X.509 Cert. Subject:/CN=catwoman, Issuer:/CN=catwoman])]
mac= b''
pad= b''
padlen= None
###[ TLS ]###
type= handshake
version= SSLv3
len= 331
iv= b''
\msg\
|###[ TLS Handshake - Server Key Exchange ]###
| msgtype= server_key_exchange
| msglen= 327
| \params\
| |###[ Server ECDH parameters - Named Curve ]###
| | curve_type= named_curve
| | named_curve= secp256r1
| | pointlen= 65
| | point= '\x043\xa32j\x07eI\xc5]\xc2\xba\xb8v\xec\xb5\x1e\x16^\xc5\x9e\xe3\x87\xbeM\xa3\xef\xc0\x92\x17_4\x7f<\xbcG\x91\xc7Nd^;\xa3m\x19o\xce\xa7O\x07\xaa\xb6S\xcb\x7f\xf1\xad\xe2\xdcP \x9fK\xeb\xcb'
| \sig\
| |###[ TLS Digital Signature ]###
| | sig_alg= None
| | sig_len= 256
| | sig_val= 'r\xad.\xd1\x83\x7f\xd5\'N\x83\xc0t\x92\xe9zE\xac\xcc\x0f\xd4\x1a\xff\xc6".a\x98\x9fP\x04\xb31\x9fwCn\t\xd5N^1\x9ex\xdf\xbb\xb4\x8a\xa1Zgg\x8f\x0c\xb2V\xa9\x89\x97\xbc\x90Y\xb4\x8f\x02\xa9\xe5\x8eM\xf1\x88]N2\x7f\x96\xd4s"\x15\x18\xdc\xd5\xf1\xb3\xe76\xb5\xaa:\xfa&g}\xee\x87`\x05\x89O,&\xa7d\x0el\xa4\x92\xd5Ui\x8e\xc8;\'vFql</\xc2\xe5\x8a\xeaF\xe2\x1f\x88{&\xe8\xe2\x01\xe1h\xc5\xda\xda\x9d\xdd\xa5\x03\xbe\x8d)\xa1|l\x0c\x82xD\x9fOj\x1f\xa8\xabNp`gp\rB\xa7H\xa7z\x99\xc6\xa9\xe2&\x90\xbd\xab\x9a\x96y\xd2R-\x92\xf3\x17\xabj\x942P\xe0\xb5\x10[\xb4\r\xa3\xf9\x0f\x8d"\xf8$\x99\x9as\xfb\xbe\xb1K\x06\xbf!\x0e\x16\xbb\xf6G0\x1fm\'\xcb\xb5\xc1\t\x07\xca/ \x0b\xce\xa9\x0cx1~$\xed\xc8\xee?\r\x9af\x99\xdaCr\xde\x82\x9f4\x16A'
mac= b''
pad= b''
padlen= None
###[ TLS ]###
type= handshake
version= SSLv3
len= 4
iv= b''
\msg\
|###[ TLS Handshake - Server Hello Done ]###
| msgtype= server_hello_done
| msglen= 0
mac= b''
pad= b''
padlen= None
###[ TCP ]###
sport= 42134
dport= https
seq= 596965101
ack= 1459476438
dataofs= 8
reserved= 0
flags= A
window= 501
chksum= 0x5851
urgptr= 0
options= [('NOP', None), ('NOP', None), ('Timestamp', (2277548318, 3126222254))]
###[ TCP ]###
sport= 42134
dport= https
seq= 596965101
ack= 1459476438
dataofs= 8
reserved= 0
flags= PA
window= 501
chksum= 0x58e7
urgptr= 0
options= [('NOP', None), ('NOP', None), ('Timestamp', (2277548320, 3126222254))]
###[ TLS ]###
type= handshake
version= SSLv3
len= 70
iv= b''
\msg\
|###[ TLS Handshake - Client Key Exchange ]###
| msgtype= client_key_exchange
| msglen= 66
| \exchkeys\
| |###[ Raw ]###
| | load= 'A\x04=\xae\xd9$rAga\x90\x8d\xd3hO\xcf\xb9k\xe234d\xb1\xc1j\x80!\x7f\x03\x97\xe0a\xb5\x06C\x1aJ~ga\xfd#onlB\x94\x00\xff\xf3\x01\x1c+\xf4\x04@\x93\x12Z\xff\xbf\x01\x0c\xa4\xd6*'
mac= b''
pad= b''
padlen= None
###[ TLS ]###
type= change_cipher_spec
version= SSLv3
len= 1
iv= b''
\msg\
|###[ TLS ChangeCipherSpec ]###
| msgtype= change_cipher_spec
mac= b''
pad= b''
padlen= None
###[ TLS ]###
type= handshake
version= SSLv3
len= 64
iv= b''
\msg\
|###[ Raw ]###
| load= "\xa0\xb2\xeaD\xcfN\xba\x8e\x7f\xd8\xe1\xe2&'d\rv\x19\x9eBc\xde`\xd0\x14\xda\x05\t\xab\xe4`\xfb\xcb\x91A\x16\xf5\x9dty\xd2\xa2[\x08\x0b0\x98\xeb\xb4\x89\xe5[MH\xe8%\xf6S\x99\xa5bn\xd2\xb0"
mac= b''
pad= b''
padlen= None
###[ TCP ]###
sport= https
dport= 42134
seq= 1459476438
ack= 596965251
dataofs= 8
reserved= 0
flags= A
window= 508
chksum= 0x5851
urgptr= 0
options= [('NOP', None), ('NOP', None), ('Timestamp', (3126222256, 2277548320))]
###[ TCP ]###
sport= https
dport= 42134
seq= 1459476438
ack= 596965251
dataofs= 8
reserved= 0
flags= PA
window= 508
chksum= 0x589c
urgptr= 0
options= [('NOP', None), ('NOP', None), ('Timestamp', (3126222256, 2277548320))]
###[ TLS ]###
type= change_cipher_spec
version= SSLv3
len= 1
iv= b''
\msg\
|###[ TLS ChangeCipherSpec ]###
| msgtype= change_cipher_spec
mac= b''
pad= b''
padlen= None
###[ TLS ]###
type= handshake
version= SSLv3
len= 64
iv= b''
\msg\
|###[ Raw ]###
| load= '\xbc\xb1fc\xaf\x06o\xaf\x81|[\x8e\x90t\xb3\x080\x02\xb8\xf0R\x8c}\xf4lqczF1n\x19h\xdcb\x05H\x93b\\\xa5\xffP\xe9\x14\xfa\x98\\\xb0U6\xcf\x9dC\xe6F\xda\xaf\xfcRMX\xddE'
mac= b''
pad= b''
padlen= None
###[ TCP ]###
sport= 42134
dport= https
seq= 596965251
ack= 1459476513
dataofs= 8
reserved= 0
flags= A
window= 501
chksum= 0x5851
urgptr= 0
options= [('NOP', None), ('NOP', None), ('Timestamp', (2277548320, 3126222256))]
###[ TCP ]###
sport= 42134
dport= https
seq= 596965251
ack= 1459476513
dataofs= 8
reserved= 0
flags= FA
window= 501
chksum= 0x5851
urgptr= 0
options= [('NOP', None), ('NOP', None), ('Timestamp', (2277550225, 3126222256))]
###[ TCP ]###
sport= https
dport= 42134
seq= 1459476513
ack= 596965252
dataofs= 8
reserved= 0
flags= FA
window= 508
chksum= 0x5851
urgptr= 0
options= [('NOP', None), ('NOP', None), ('Timestamp', (3126224161, 2277550225))]
###[ TCP ]###
sport= 42134
dport= https
seq= 596965252
ack= 1459476514
dataofs= 8
reserved= 0
flags= A
window= 501
chksum= 0x5851
urgptr= 0
options= [('NOP', None), ('NOP', None), ('Timestamp', (2277550225, 3126224161))]
<Sniffed: TCP:14 UDP:0 ICMP:0 Other:0>