code: def _get_NTLM2_response(password, server_challenge, client_challenge):
          
          ntlm_hash = comphash._ntowfv1(password)
          challenge = server_challenge + client_challenge
          nt_session_hash = hashlib.md5(challenge).digest()[:8]
          response = ComputeResponse._calc_resp(ntlm_hash, nt_session_hash[0:8])
  
          session_base_key = hashlib.new('md4', ntlm_hash).digest()
  
          return response, session_base_key
docs: [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