肆、DVWA 官方文件 — Features
一、DVWA Security
注意: 2015版本已分為: impossible, high, medium, low


二、PHP-IDS(Instruction Detection System)


伍、User Security(說明)
- DVWA is not emilate !!! It’s real!!

- external link處理


陸、Usage(使用方式)—XSS


一、XSS範例 — Security: Low
右下角有功能鈕
- View Source
View Help

DVWA 舊版頁面
二、網頁正常行為描述
User留下Name(必填)、Comment,並傳送到Database

三、Source Code 描述
兩個主要參數: $name, $message,兩者先經過trim()函式移除空白鍵
Sanitize: 移除user input 有危害的地方
$message
stripslashes(): 移除斜線
mysql_real)escape_string():移除特殊字元(可以避免SQL injection)
$name
- stripslashes(): 移除斜線





四、攻擊方式
可以直接輸入 攻擊

五、XSS範例 — Security: High
- 新增htmlspecialchars()函式,把user input多做一層轉換,變為HTML形式,而非 being excuted 形式



六、XSS的可能危害
Complex AJAX Script Attack, like:
攻擊者可以從remote web server獲得session cookies
可以安裝malware
可以竊取bank account username & password
