| 1 |
# Copyright: (c) 2020, Jordan Borean (@jborean93) <[email protected]> |
| 2 |
# MIT License (see LICENSE or https://opensource.org/licenses/MIT) |
| 3 |
|
| 4 |
from spnego._ntlm_raw.messages import NegotiateFlags |
| 5 |
|
| 6 |
# https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-nlmp/7fc694c9-397a-446a-bd80-4635000f2c0f |
| 7 |
TEST_USER = "User" |
| 8 |
TEST_USER_DOM = "Domain" |
| 9 |
TEST_PASSWD = "Password" |
| 10 |
TEST_SERVER_NAME = "Server" |
| 11 |
TEST_WORKSTATION_NAME = "COMPUTER" |
| 12 |
TEST_RANDOM_SESSION_KEY = b"\x55" * 16 |
| 13 |
TEST_TIME = b"\x00" * 8 |
| 14 |
TEST_CLIENT_CHALLENGE = b"\xAA" * 8 |
| 15 |
TEST_SERVER_CHALLENGE = b"\x01\x23\x45\x67\x89\xAB\xCD\xEF" |
| 16 |
|
| 17 |
# https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-nlmp/2624850f-36e9-403c-a832-1d9c7243acc2 |
| 18 |
TEST_NTLMV1_FLAGS = ( |
| 19 |
NegotiateFlags.key_exch |
| 20 |
| NegotiateFlags.key_56 |
| 21 |
| NegotiateFlags.key_128 |
| 22 |
| NegotiateFlags.version |
| 23 |
| NegotiateFlags.target_type_server |
| 24 |
| NegotiateFlags.always_sign |
| 25 |
| NegotiateFlags.ntlm |
| 26 |
| NegotiateFlags.seal |
| 27 |
| NegotiateFlags.sign |
| 28 |
| NegotiateFlags.oem |
| 29 |
| NegotiateFlags.unicode |
| 30 |
) |
| 31 |
|
| 32 |
# https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-nlmp/62b3a421-8a57-4778-82df-9064a282f207 |
| 33 |
TEST_NTLMV1_CLIENT_CHALLENGE_FLAGS = ( |
| 34 |
NegotiateFlags.key_56 |
| 35 |
| NegotiateFlags.version |
| 36 |
| NegotiateFlags.extended_session_security |
| 37 |
| NegotiateFlags.target_type_server |
| 38 |
| NegotiateFlags.always_sign |
| 39 |
| NegotiateFlags.ntlm |
| 40 |
| NegotiateFlags.seal |
| 41 |
| NegotiateFlags.sign |
| 42 |
| NegotiateFlags.oem |
| 43 |
| NegotiateFlags.unicode |
| 44 |
) |
| 45 |
|
| 46 |
# https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-nlmp/125f7a94-933e-4023-a146-a449e49bf774 |
| 47 |
TEST_NTLMV2_FLAGS = ( |
| 48 |
NegotiateFlags.key_exch |
| 49 |
| NegotiateFlags.key_56 |
| 50 |
| NegotiateFlags.key_128 |
| 51 |
| NegotiateFlags.version |
| 52 |
| NegotiateFlags.target_info |
| 53 |
| NegotiateFlags.extended_session_security |
| 54 |
| NegotiateFlags.target_type_server |
| 55 |
| NegotiateFlags.always_sign |
| 56 |
| NegotiateFlags.ntlm |
| 57 |
| NegotiateFlags.seal |
| 58 |
| NegotiateFlags.sign |
| 59 |
| NegotiateFlags.oem |
| 60 |
| NegotiateFlags.unicode |
| 61 |
) |