def test_get_NTLMv1_response(self): expected_response = ntlmv1_ntlmv1_response expected_key = ntlmv1_session_base_key actual_response, actual_key = ComputeResponse._get_NTLMv1_response(password, server_challenge) assert actual_response == expected_response assert actual_key == expected_key
def test_get_NTLMv1_response(self): # 4.2.2.2.1 - NTLMv1 Response server_challenge = b"\x01\x23\x45\x67\x89\xab\xcd\xef" expected_response = b"\x67\xc4\x30\x11\xf3\x02\x98\xa2" \ b"\xad\x35\xec\xe6\x4f\x16\x33\x1c" \ b"\x44\xbd\xbe\xd9\x27\x84\x1f\x94" expected_key = b"\xd8\x72\x62\xb0\xcd\xe4\xb1\xcb" \ b"\x74\x99\xbe\xcc\xcd\xf1\x07\x84" actual_response, actual_key = \ ComputeResponse._get_NTLMv1_response("Password", server_challenge) assert actual_response == expected_response assert actual_key == expected_key
response_hash = response[48:-2] print(f" Solution server number: {solution_server_number}") print(f" Challenge: {challenge.hex()}") print(f" Response Hash: {response_hash}") print(f" Username: {username}") ################################################################################################ # Crack password found in PPP challenge / response print("[STEP 2/3] Cracking password") password = None for i in range(0, 9999): guess = str(i).rjust(4, '0') guess_hash, _ = ComputeResponse._get_NTLMv1_response(guess, challenge) guess_hash = guess_hash.hex() if guess_hash == response_hash: password = guess break assert password is not None, "No matching password found" print(f" Password: {password}") ################################################################################################ # Get my phone number print("[STEP 3/3] Extracting data from my_note.txt") my_note_txt = os.path.join(generated_files_dir, "my_note.txt") with open(my_note_txt, 'r') as fh: