舊站逆向工程 - ntouind/sites.ind.ntou.edu.tw GitHub Wiki

管理方式

  • 有使用者帳號且有 shell 登入權限者可以用 SSH 協定存取系統終端
  • 有 VMware Esxi Hypervisor 管理權限者可以用 vSphere Client 登入(VMware 自 Esxi 6.0 update3 版起不再提供 vSphere Client 軟體)
    Download URLs for VMware vSphere Client (2089791)

磁碟分割設定

  • /dev/da0s1a -> /
  • /dev/da1s1e -> /home
  • /dev/da2s1e -> /mail
  • /dev/da0s1e -> /usr
  • /dev/da0s1f -> /var
  • procfs -> /proc

磁碟空間用量(擷取時間:2018/5/18)

% df -h
Filesystem    Size   Used  Avail Capacity  Mounted on
/dev/da0s1a   5.9G   180M   5.3G     3%    /
/dev/da1s1e    33G    30G   420M    99%    /home
/dev/da2s1e    33G   5.1G    26G    17%    /mail
/dev/da0s1e    17G   3.9G    11G    25%    /usr
/dev/da0s1f   9.8G    70M   8.9G     1%    /var
procfs        4.0K   4.0K     0B   100%    /proc

Apache Web 伺服器

版本

1.3

安裝路徑前綴

/usr/local

設定檔所在目錄

`〈安裝路徑前綴〉/etc‵

首頁網頁所在路徑

根據 〈安裝路徑前綴〉/etc/apache/httpd.conf Apache Web 伺服器設定檔

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
#DocumentRoot "/usr/local/www/data"
DocumentRoot "/home/server/www"

位於 /home/server/www

註冊程式所在路徑

似乎位於 /root/www/cgi-bin 但是不知道相關設定的位置(還是不需要?)

系統管理相關

切換為 root 身份妥善命令

sudo -s -H

服務

  • pop3 : 參閱 /etc/inetd.conf
  • postfix: /etc/rc.conf

網站托管服務相關

登入/更換密碼等功能程式位於 /root/www/cgi-bin/*.pl

實用操作

列舉特定日期之後有修改內容的帳號

find /home -type d -maxdepth 2 -mindepth 2 -newermt "2017-01-01"

查看特定使用者的磁碟配額

sudo quota _username_
Password:
Disk quotas for user _username_ (uid 12345): 
     Filesystem   usage   quota   limit   grace   files   quota   limit   grace
          /home  583538 1900000 2000000            4288   10000   20000        
          /mail    4432   19000   20000               2   20000   20000

單位:KiB?

疑問
Questions

rsync daemon 的用途為何?

已知問題

cron 會自動寄送排程程式的輸出,造成 /var/spool/clientmqueue 爆滿

於 /etc/crontab 設定 MAILTO 環境變數後應已停用此行為

資安問題

  • xten 191 0.0 0.1 1132 704 ?? Ss 5:03U 0:00.49 /usr/local/sbin/daemon1
  • pid 97323 (ballmsg.cgi), uid 20002: exited on signal 11 -> 推測應該是社團留言版用的非惡意CGI程式
⚠️ **GitHub.com Fallback** ⚠️