如何计算AccessRequest RADIUS数据包的加密密码值

2024-05-20 10:26:35 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在努力找回我在FreeRadius设置中使用的密码明文

以下是我从pcap文件中获得的属性:

Plaintext password = "cisco123"
sharedkey = "sharedsecret"
Ciphertext password = "6ed3a35440abe69b2e8698109b809932" <-- plaintext password is cisco123
authenticator = "344c71c77a2b845b8856ffa968740b73"

因此,根据研究http://www.untruth.org/~josh/security/radius/radius-auth.html,根据第2.1节推导加密密码的步骤如下所示:

连接sharedkey和authenticator并存储在变量中:

SharedKey + Authenticator:  sharedsecret344c71c77a2b845b8856ffa968740b73

MD5哈希连接的值:

Md5(SharedKey+Authenticator):  46608024c8f48fd0977bb944ae0eb89a

将明文密码与MD5关联结果异或,结果应与密文匹配

cisco12300000000 XOR 46608024c8f48fd0977bb944ae0eb89a

请参见下面的代码调试结果(注意,假设c1与捕获的密文匹配,但事实并非如此):

Shared Key:  sharedsecret
Authenticator:  344c71c77a2b845b8856ffa968740b73
SharedKey + Authenticator:  sharedsecret344c71c77a2b845b8856ffa968740b73
Md5(SharedKey+Authenticator):  46608024c8f48fd0977bb944ae0eb89a
p1(ascii):  cisco123
p1(hex):  636973636f3132330000000000000000
b1:  46608024c8f48fd0977bb944ae0eb89a
c1(p1 XOR b1):  2509f347a7c5bde3977bb944ae0eb89a
Captured Ciphertext  6ed3a35440abe69b2e8698109b809932

我能澄清一下我的步骤是否错了吗


Tags: authenticator密码步骤passwordmd5p1ciphertextradius
1条回答
网友
1楼 · 发布于 2024-05-20 10:26:35

Radius密码已使用身份验证类型加密。
这取决于您的身份验证类型。如果设置为CHAP,则使用CHAP方法对密码进行加密。对我来说,我无法解密它

您可能需要将明文密码的身份验证类型设置为PAP

相关问题 更多 >