Skip to content

kuzushiki/cache-deception-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cache-deception-demo

30回 初心者のためのセキュリティ勉強会(オンライン開催)で発表した Web Cache Deception Attack のデモです

発表資料はこちら

なにか質問等あればTwitterで連絡ください

環境構築 (要Docker Compose)

  1. 本リポジトリをクローンします
git clone [email protected]:kuzushiki/cache-deception-demo.git
  1. ディレクトリを移動します
cd cache-deception-demo
  1. Docker Composeでコンテナを起動します
docker compose up
  1. URLにアクセスして、ページが表示されることを確認します
http://localhost:12345

デモ手順

<被害者としての操作>

  1. 適当なブラウザでURLにアクセスします
http://localhost:12345

image

  1. ログインページにて、ID:admin PW:adminでログインします

  2. ログイン後の管理者ページ (http://localhost:12345/index.php) にてセンシティブな情報 (phpinfo()) が出力されていることを確認しましょう

image

  1. (攻撃者が作成した罠リンクにアクセスする体で) 下記のようなURLにアクセスします
    管理者のページが返ってくることを確認しましょう
http://localhost:12345/index.php/hogehoge.css

image

<攻撃者としての操作>

  1. 新しいシークレットウィンドウを立ち上げ、管理者ページ (http://localhost:12345/index.php) にアクセスします
    Cookieが発行されていないため、ログインページに飛ばされることでしょう

image

  1. 手順4でアクセスしたURLにシークレットウィンドウでアクセスします
    キャッシュされた管理者ページのコンテンツが返ってくることを確認しましょう

image

  1. phpinfo()の出力に被害者のCookieの値が含まれることを利用して、
    Cookie内のPHPSESSIDの値を管理者ページ内のPHPSESSIDの値に差し替えてみましょう

image

  1. その後、管理者ページ (http://localhost:12345/index.php) にアクセスすると管理者ページのコンテンツが表示されます
    被害者になりすますことができました (いわゆるAccount Takeover)

image

About

Web Cache Deception Attackのデモです

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published