当前位置:网站首页>三步轻松理解Kerberos协议
三步轻松理解Kerberos协议
2020-11-06 22:38:00 【公众号_Bypass】
Kerberos是一种身份验证协议,它作为一种可信任的第三方认证服务,通过使用对称加密技术为客户端/服务器应用程序提供强身份验证。在域环境下,AD域使用Kerberos协议进行验证,熟悉和掌握Kerberos协议是学习域渗透的基础。
Kerberos协议中主要的三个角色:
1.访问服务的Client
2.提供服务的Server
3.KDC:密钥分发中心,默认安装在域控上
AS:身份验证服务
TGS:票证授予服务
Kerberos协议认证过程:
协议可以分为三个步骤:一是获得票据许可票据,二是获取服务许可票据,三是获得服务。
第一步:获得票据许可票据
KRB_AS_REQ:用于向KDC请求TGT
当用户在客户端输入域用户和密码时,客户端将用户密码转换为hash作为加密密钥,对时间戳进行加密作为请求凭据。
cipher:加密的时间戳,即客户端的当前时间与用户的hash加密后的结果
KRB_AS_REQ 数据包如下:
KRB_AS_REP:用于通过KDC传递TGT
收到请求后,KDC从AD域数据库中找到对用用户的hash解密时间戳来验证用户身份。如果时间戳在允许的时间范围内,那么它就会生成一个会话密钥(Session key),以AS_REP 数据包进行响应。
AS_REP 包含信息:
ticket:使用krbtgt hash加密,包含用户名/会话密钥和到期时间等信息.
enc-part:使用用户hash加密,包含会话密钥/TGT到期时间和随机数(防重放)
KRB_AS_REP数据包如下:
第二步:获得服务许可票据
KRB_TGS_REQ:使用TGT向KDC请求TGS
客户端获得TGT和用户密钥加密的enc-part
,使用用户hash解密enc-part
获得会话密钥(Session key),然后使用会话密钥将用户名/时间戳进行加密,生成authenticator和TGT发送给TGS。
ticket:实质上就是一张TGT,客户端没有 krbtgt hash,故无法解密TGT.
KRB_TGS_REQ 数据包如下:
KRB_TGS_REP:通过KDC传递TGS
TGS 收到KRB_TGS_REQ请求后,使用 krbtgt hash解密ticket 获取会话密钥(Session key),然后使用会话密钥解密 authenticator 获取用户名和时间戳进行身份验证。确认信息后,创建一个服务会话密钥(Service Session key)。
ticket:使用对应的服务密钥进行加密,包含服务会话密钥/用户名/到期时间等信息,本质上就是一张ST(Service Ticket)。
enc-part:包含使用会话密钥加密的服务会话密钥(Service Session key)
KRB_TGS_REP
数据包如下:
第三步:获得服务
KRB_AP_REQ:使用TGS,服务对用户身份验证
客户端已经拥有了有效的TGS可以与服务进行交互,使用会话密钥解密 enc-part,得到 服务会话密钥(Service Session key),将用户名/时间戳等信息使用服务会话密钥(Service Session key)进行加密,得到新的Authentication。
KRB_AP_REP:由服务用来针对用户标识自身
服务端接收到请求,使用自己的hash解密TGS获得服务会话密钥(Service Session key)和授权用户信息,然后使用服务会话密钥解密Authentication,比对用户名和时间戳等信息,如果有相互验证标记,服务端使用服务会话密钥加密时间戳发给客户端,客户端解密时间戳验证服务端,然后开始请求服务。
本文分享自微信公众号 - Bypass(Bypass--)。
如有侵权,请联系 [email protected] 删除。
本文参与“OSC源创计划”,欢迎正在阅读的你也加入,一起分享。
版权声明
本文为[公众号_Bypass]所创,转载请带上原文链接,感谢
https://my.oschina.net/bypass/blog/4699656
边栏推荐
- How to start the hidden preferences in coda 2 on the terminal?
- Introduction to Huawei cloud micro certification examination
- How to create an interactive kernel density chart
- What grammar is it? ]
- Characteristics of magnetic memory chip STT-MRAM
- The 4th China BIM (digital construction) manager Summit Forum will be held in Hangzhou in 2020
- Event monitoring problem
- List to map (split the list according to the key, and the value of the same key is a list)
- Plug in bilibilibili new version 0.5.5
- 2020-08-15:什么情况下数据任务需要优化?
猜你喜欢
Jenkins installation and deployment process
Practice of Xiaoxiong school development board: real equipment access of smart street lamp sandbox experiment
磁存储芯片STT-MRAM的特点
预留电池接口,内置充放电电路及电量计,迅为助力轻松搞定手持应用
How to start the hidden preferences in coda 2 on the terminal?
Stm32f030f4p6 compatible with smart micro mm32f031f4p6
Summary of common SQL statements
Experiment one
How to make characters move
超高频RFID医疗血液管理系统应用
随机推荐
2020-08-18:介绍下MR过程?
Git remote library rollback specified version
image operating system windows cannot be used on this platform
Stickinengine architecture 12 communication protocol
Web API interface design: swaggerui document / unified response format / unified exception handling / unified authority verification
高速公路二维码定位报警系统
The first choice for lightweight GPU applications is the NVIDIA vgpu instance launched by Jingdong Zhilian cloud
消防器材RFID固定资产管理系统
STM32F030C6T6兼容替换MM32SPIN05PF
Countdown | 2020 PostgreSQL Asia Conference - agenda arrangement of Chinese sub Forum
Empty test suite appears in JUnit test
2020-08-29: process thread differences, in addition to the inclusion relationship, the underlying details?
A good thing for working people -- to temper the will of iron and steel requires such an efficient computer
[doodling the footprints of Internet of things] Introduction to Internet of things
NAND FLASH的接口控制设计
Utility class functions (continuous update)
The isolation level of transaction and its problems
2020 database technology conference helps technology upgrade
STM32F030K6T6兼容替换灵动MM32F031K6T6
[elastic search engine]