@staticmethod<EOL><INDENT>def _get_NTLM2_response(password, server_challenge, client_challenge):<DEDENT>
ntlm_hash = comphash._ntowfv1(password)<EOL>challenge = server_challenge + client_challenge<EOL>nt_session_hash = hashlib.md5(challenge).digest()[:<NUM_LIT:8>]<EOL>response = ComputeResponse._calc_resp(ntlm_hash, nt_session_hash[<NUM_LIT:0>:<NUM_LIT:8>])<EOL>session_base_key = hashlib.new('<STR_LIT>', ntlm_hash).digest()<EOL>return response, session_base_key<EOL>
[MS-NLMP] v28.0 2016-07-14

This name is really misleading as it isn't NTLM v2 authentication
rather this authentication is only used when the ntlm_compatibility
level is set to a value < 3 (No NTLMv2 auth) but the
NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY flag is set in the negotiate
flags section. The documentation for computing this value is on page 56
under section 3.3.1 NTLM v1 Authentication

:param password: The password of the user we are trying to authenticate
    with
:param server_challenge: A random 8-byte response generated by the
    server in the CHALLENGE_MESSAGE
:param client_challenge: A random 8-byte response generated by the
    client for the AUTHENTICATE_MESSAGE
:return response: NtChallengeResponse to the server_challenge
:return session_base_key: A session key calculated from the user
    password challenge