proftpd.conf 檔如下
Continue reading “[Linux][CentOs] 續 proftpd + MySQL + virtual user @CentOs5” »
ionCube loader 和 Zend Optimizer 共存實際上必不難,
只要注意一下載入的先後優先順序 ionCube 一定要修先於 Zend 否則一定會失敗
詳細設定檔如下
Continue reading “[Linux][PHP] ionCube loader 和 Zend Optimizer 共存” »
原則上 ssh port 能不要全部開啟事最好的,如果一定要開啟的話,必需要作些防護措施,
port 22 一旦開啟後最容易遇到的就是會有人不斷的try密碼
設計原理:
Continue reading “[Linux] 防 ssh 暴力攻擊 使用iptables & shell @ CentOS” »
mkdir /etc/firewall
touch /etc/firewall/iptables.sh
chmod 755 /etc/firewall
vi /etc/firewall/iptables.sh
寫入以下內容
近日公司部份客戶發現有被hacker 嘗試的 存取 linux 下的 /etc/passowrd 檔,請參照下圖

很明顯的看到是在要取得 password 檔的內容,另外在從MySQL資料庫中也發現到
看到這幾筆資料 , 就覺得有問題了:
| 44 | `cat /etc/passwd` | y |
| 45 | cat /etc/passwd | y |
| 46 | ;cat /etc/passwd; | y |
| 47 | |cat /etc/passwd | y |
| 48 | cat /etc/passwd | y |
| 49 | <cat /etc/passwd | y |
| 50 | ../../../../../../../../etc/passwd | y |
| 51 | ../../../../../../../../etc/passwd | y |
| 52 | ../../../../../../../../etc/passwd | y |
| 53 | ../../../../../../../../etc/passwd .html | y |
| 54 | ../../../../../../../../etc/passwd .jpg | y |
| 55 | .\\./.\\./.\\./.\\./.\\./.\\./etc/passwd | y |
| 56 | /etc/passwd | y |
| 57 | /./././././././etc/passwd | y |
| 58 | ..\..\..\..\..\..\..\..\etc/passwd | y |
| 59 | ../..//../..//../..//../..//../..//../..//../..//../..//etc/passwd | y |
| 60 | ../…/.././../…/.././../…/.././../…/.././../…/.././../…/.././etc/passwd | y |
| 61 | <../../../../../../../../etc/passwd | y |
function denySystemConfig($aryParm){
if (!eregi("/etc",$aryParm)) return $aryParm;
else return false;
}
安裝proftp MySQL 模組,位於 sentos 上可以找到 rpm 安裝
[root@phptw home]#yum install proftpd-mysql
登入 MySQL
[root@phptw home]#mysql -u root -p
或可以輸入
Continue reading “[Linux][CentOs] proftpd + MySQL + virtual user @CentOs5” »