NTLM验证过程

简介:

参考文献:

Microsoft NTLM

Kerberos连接过程

正文

NTLM有Interactive和Noninteractive两种,Interactive就是用户登录类型的,只有client和DC两个参与者,而Noninteractive则是Client要去连接一个Server。Microsoft NTLM给出了NTLM的Noninteractive验证过程,有如下7步过程:

  1. (Interactive authentication only) A user accesses a client computer and provides a domain name, user name, and password. The client computes a cryptographic hash of the password and discards the actual password.
  2. The client sends the user name to the server (in plaintext).
  3. The server generates a 16-byte random number, called a challenge or nonce, and sends it to the client.
  4. The client encrypts this challenge with the hash of the user's password and returns the result to the server. This is called the response.
  5. The server sends the following three items to the domain controller:

    • User name
    • Challenge sent to the client
    • Response received from the client
  6. The domain controller uses the user name to retrieve the hash of the user's password from the Security Account Manager database. It uses this password hash to encrypt the challenge.
  7. The domain controller compares the encrypted challenge it computed (in step 6) to the response computed by the client (in step 4). If they are identical, authentication is successful.

但是其中有些地方不够详细,我在本文中加以补充。NTLM是windows验证的一种,其过程如下图所示:

下面来详细解析NTLM验证过程,仍然是七步过程:

  1. 用户登录时输入的user name、password和domain name,然后Client端计算password的hash值并保存在本地
  2. 客户端将user name的明文发送给DC
  3. DC生成一个16-byte的随机数,叫做challenge,传输给client
  4. client收到challenge以后,在复制一份拷贝,然后将其中一个challenge用password hash加密,这个叫做response,然后将challenge,response以及user name传送给server
  5. server端在收到client传送过来的三份内容以后将它们转发给DC
  6. DC在收到user name,response,challenge以后,根据user name在account database中找到其对应的password hash,然后用这个password hash加密challenge
  7. 最后一步是客户端将response跟加密后的challenge进行比较,如果相同则NTLM验证成功。

Microsoft NTLM的最后还提到了另外一点,就是让我们不要直接使用NTLM,而是使用negotiate。如果使用negotiate的话,那么windows会判断kerberos是否可用,如果可用就优先使用kerberos,否则使用NTLM。kerberos的安全性要比NTLM要高。

在sharepoint的中就有NTLM和negotiate的选择,默认选择的是NTLM,如果知道如何配置kerberos的话,建议使用negotiate模式



本文转自xwdreamer博客园博客,原文链接:http://www.cnblogs.com/xwdreamer/archive/2012/08/23/2652541.html,如需转载请自行联系原作者


目录
相关文章
|
Ubuntu Linux 网络安全
/var/log/auth.log日志详解
【4月更文挑战第7天】`/var/log/auth.log`是Linux(尤其是Debian系如Ubuntu)记录身份验证和授权事件的日志文件,包括登录尝试(成功或失败)、SSH活动、sudo使用和PAM模块操作。此文件也记录其他认证相关事件,如Kerberos和NFS。查看日志通常需root权限,可使用`tail`、`less`或`grep`命令。例如,`sudo tail /var/log/auth.log`显示最后几行,`sudo grep "failed password" /var/log/auth.log`搜索失败密码尝试。内容和格式可能因发行版及配置而异。
1606 5
/var/log/auth.log日志详解
|
存储 缓存 分布式计算
Spark cache()与unpersist()使用位置
Spark在执行过程中是懒加载模式,RDD转换仅仅是构建DAG描述而不执行,只有遇到action算子才会真正的运行
128 9
|
前端开发 IDE Java
基于Springboot+MYSQL+Maven实现的宠物医院管理系统(源码+数据库+运行指导文档+项目运行指导视频)
基于Springboot+MYSQL+Maven实现的宠物医院管理系统(源码+数据库+运行指导文档+项目运行指导视频)
582 0
日志框架log4j打印异常堆栈信息携带traceId,方便接口异常排查
日常项目运行日志,异常栈打印是不带traceId,导致排查问题查找异常栈很麻烦。
|
Python
PyCharm中运行jupyter
PyCharm中运行jupyter
297 0
|
机器学习/深度学习 传感器 算法
【RF分类】基于随机森林算法的数据分类附matlab代码
【RF分类】基于随机森林算法的数据分类附matlab代码
|
存储 弹性计算 文件存储
阿里云文件系统SMB访问协议服务及使用指南
阿里云于2016年发布了支持NFS网络文件系统访问协议的阿里云文件系统。2017年3月,又增加了SMB文件系统访问协议的支持,正式对外公测。2018年1月,阿里云NAS SMB支持正式提供商业化服务。本文简单描述了SMB文件系统访问协议以及阿里云NAS支持的SMB协议功能,并简单介绍了该服务的使用场景以及使用流程。
6845 0
|
JavaScript 前端开发
解决ts\tsx文件引入模块飘红线的问题
解决ts\tsx文件引入模块飘红线的问题
852 0
|
Java BI Nacos
SpringBoot项目集成logback日志分等级配置
SpringBoot项目集成logback日志分等级配置
520 0
|
存储 运维 关系型数据库
替换Kudu,Hologres助力好未来网校实时数仓降本增效
本文将会介绍好未来如何通过Hologres构建新一代实时数仓。
2505 2
替换Kudu,Hologres助力好未来网校实时数仓降本增效