Command Injection & XSS
Claire
Command Injection
XSS
後端程式會呼叫作業系統指令(shell command)
使用者輸入被拼到指令字串裡
攻擊者可以插入額外指令讓伺服器去執行
$ stock <productID> <storeID> 可以看此商品是否有存貨
& echo hahahaha &
$ stock <productID> <storeID>Error - productID was not provided
aiwefwlguh
22: command not foundhttp://www.example.com/upload.asp?id=<script>alert(1);</script>
<img src=# onerror=”alert(1)”><svg onload=alert(1)>留言欄位:我是壞人! <script>alert(1);</script>