SSH + No Password Login(public key)
作者:cross 日期:2006-11-14 22:59
建置SSL憑證 - OpenSSL
作者:cross 日期:2006-11-14 22:57
利用設定檔方式修改並產生CA、CSR、CRT
Fedora Core release 6 (Zod) + OpenSSL 0.9.8b 04 May 2006
[1.] 製作 CA
/etc/pki/tls/misc/CA -newca
(enter)
Making CA certificate ...
Generating a 1024 bit RSA private key
...................++++++
.........................................................................++++++
writing new private key to '../../CA/private/./cakey.pem'
Enter PEM pass phrase: (輸入密碼)
Verifying - Enter PEM pass phrase: (輸入密碼)
-----
PostgreSQL + SSL
作者:cross 日期:2006-11-14 22:55
前提: 編輯 pg_hba.conf 設定權限存取
vi pg_hba.conf
host all all 192.168.1.12/32 md5 # md5加密
# 雖然 password用了md5加密過,在作select等動作並未加密
host all all 192.168.1.12/32 password # 明碼
host all all 192.168.1.12/32 trust # 不用密碼
pg_ctl reload
server端
[1.] vi postgresql.conf
ssl = true
[2.] cd /var/lib/pgsql/data
openssl req -new -text -out server.req
openssl rsa -in privkey.pem -out server.key
rm privkey.pem
openssl req -x509 -in server.req -text -key server.key -out server.crt
chmod og-rwx server.key
cp server.crt root.crt
[3.] pg_ctl restart
client端
複製server端的server.key及server.crt到自已家目錄的".postgresql"裡
scp server.key ~/.postgresql/postgresql.key
scp server.crt ~/.postgresql/postgresql.crt
CA + Apache + IIS
作者:cross 日期:2006-11-14 22:54
Fedora Linux 2.4.22-1.2115.nptl
套件: openssl-0.9.7a-23
流程:
製作Root CA
產生憑證
簽發憑證
測試 Apache Web (httpd-2.0.47-10)
修改 /etc/httpd/conf.d/ssl.conf
SSLEngine On
SSLCertificateFile /path/server.cert.cert
SSLCertificateKeyFile /path/server.cert.key
Run: service httpd start
# 產生訊息
Starting httpd:Apache/2.0.47 mod_ssl/2.0.47 (Pass Phrase Dialog)
Some of your private key files are encrypted for security reasons.
In order to read them you have to provide us with the pass phrases.
Server 192.168.1.111:443 (RSA)
Enter pass phrase: (輸入密碼)
入侵防護工具(IPS) - Snort-Inline
作者:cross 日期:2006-11-14 22:50
Fedora Linux core 4
套件:
。snort_inline-2.2.0a
。libnet-1.0.2a
[1.] 編譯 libnet
wget http://www.packetfactory.net/libnet/dist/deprecated/libnet-1.0.2a.tar.gz
tar zxvf libdnet-1.11.tar.gz
cd libdnet-1.11
./configure
make
make install
編譯 snort-inline
Snortcenter
作者:cross 日期:2006-11-14 22:48
web介面,用來管理 snort 的 rules ,並由中央管理其它台有snort的主機
snortcenter-console
[1.] tar zxvf snortcenter-console-3-31-05.tar.gz
mv snortcenter-release snortcenter
mv snortcenter /var/www/html/
[2.] install adodb
[3.] echo "CREATE DATABASE snortcenter;" | mysql -u root -p
[4.] vi /var/www/html/snortcenter/config.php
$DBlib_path = "./adodb/";
$curl_path = "";
惡意程式檢測工具-Tripwire
作者:cross 日期:2006-11-14 22:44
Quote: http://www.rtfiber.com.tw/~changyj/linuxtips/html/tripwire-easy.html
它能把檔案的特徵,如物件大小、擁有者、群組、存取權限等建立成指紋資料庫(fingerprints),並定期執行檢查。當發現檔案現況與指紋資料庫不符合時,tripwire 會提出警告,告知你哪些項目與指紋資料庫不符。
ChangeLog: 2007/06/10
Fedora Core 6
[1.] yum install tripwire
tripwire --version
Tripwire(R) 2.4.1.1 built for i686-pc-linux-gnu
[2.] Generate the system-specific cryptographic key files
/usr/sbin/tripwire-setup-keyfiles




