NTLM Type3 message

来源:互联网 发布:python开发一个软件 编辑:程序博客网 时间:2024/05/16 03:17

Type3 message是client收到proxy的407含有type2 message请求时候返回的消息,经过base64扰码后,放置在Proxy-Authentication中。下面来描述一下它的结构。

 0-7字节: char protocol[8]
表明属于NTLMSSP协议,依次位'N', 'T', 'L', 'M', 'S', 'S', 'P', '/0' 8-11字节 unsigned int type
为0x03000000(little-endian的方式,即0x00000003),即为3,表示是type3 message 12-19字节 LM response信息
12-13字节:LM response的长度
14-15字节:LM response分配的长度
16-19字节:LM response放置的偏移量offset
 20-27字节 NTLM response信息
20-21字节:NT response的长度
22-23字节:NT response分配的长度
24-27字节:NT response放置的偏移量offset
 28-35字节 target name信息
28-29字节:target name的长度
30-31字节:target name分配的长度
32-35字节:target name放置的偏移量offset
 36-43字节:user name信息
36-37字节:user name的长度
38-39字节:user name分配的长度
40-43字节:user name放置的偏移量offset
 44-51字节:host name信息即workstation信息
44-45字节:host name的长度
46-47字节:host name分配的长度
48-51字节:host name放置的偏移量offset
 52-59字节:session key信息(可选)
52-53字节:长度
54-55字节:分配的长度
56-59字节:放置的偏移量offset
我们可以将52-55字节置0,56-59字节设置为type3 message的长度,即不放置session key信息
60-63字节:flags
详细见http://blog.sina.com.cn/s/blog_5cf79a900100c1b6.html中关于type1 message中的flags
 64-71字节:OS信息(可选)
最简单的方式,就是不放置这信息
 放置LM response、NTLMP response、domain、user、host、session key等信息


  需要注意的是,host、domain、user名字使用Unicode的格式。

原创粉丝点击