[題目]

The purpose of this challenge is to demonstrate the MITRE Top 25 programming flaw: 'Download of Code Without Integrity Check'.

 

Security breaches are usually done by leveraging multiple vulnerabilities also known as "death by 1000 cuts".

In the previous challenge you broke into the admin's account using a password guessing attack. Now you take the breach to the next level by taking control over the server. You have to download the malware from your C&C server: evil.bad.

Conveniently, there are no integrity checks in place. 

 

[題目說明]

  這一題是要我們在使用密碼猜測攻擊駭進Admin管理頁面之後,在一個可上傳檔案的頁面植入惡意程式碼檔案,這樣user下載檔案時將可能下載到該惡意程式檔。

[弱點提示]

 

    The product downloads source code or an executable from a remote location and executes the code without sufficiently verifying the origin and integrity of the code.

From MITRE CWE494

 

  當使用者下載伺服端應用程式的檔案時,由於應用程式端並未檢查自己是否被植入惡意程式檔,因此使用者執行該應用程式就有可能下載到惡意程式碼並執行,造成對使用者端的危害。

 

[解答]

  1. 進入網頁: https://abc.xxx.elasticbeanstalk.com/cwe494.jsp
  2. 使用密碼猜測攻擊駭入admin帳號(密碼: iloveyou)
  3. 此時hacker進入到一個可上傳檔案的頁面,在update server 欄位輸入 evil.bad 按下update便可以成功上載惡意程式檔evil.bad到Server的application上。

 

[安全原理]

  該弱點被利用的關鍵在於hacker 駭進網站管理者頁面之後,進行上傳檔案時並未有任何檔案格式的檢查,且使用者可以直接任意指定檔案路徑與名稱藉由手動輸入方式來上傳檔案,如此便可以方便的上傳惡意程式檔或執行檔,當使用者使用該應用程式便可能下載到該惡意檔案並執行惡意程式碼而遭受損害。

 

2019221日星期四

arrow
arrow

    jackterrylau 發表在 痞客邦 留言(0) 人氣()