1. 程式人生 > >php://filter(檔案包含漏洞利用)

php://filter(檔案包含漏洞利用)

 檔案包含漏洞:https://blog.csdn.net/fageweiketang/article/details/80699051

篩選過濾應用: 

1、 字串過濾器:

  • string.rot13 對字串執行ROT13轉換
  • string.toupper轉換為大寫
  • string.tolower 轉換為小寫
  • string.strip_tags去除html和php標記

2、 轉換過濾器:

  • convert.base64-encode & convert.base64-decode base64編碼/解碼
  • convert.quoted-printable-encode & convert.quoted-printable-decode
    將 quoted-printable 字串轉換為 8-bit 字串

3、 壓縮過濾器:

  • zlib.deflate zlib.inflate
  • bzip2.compress bzip2.decompress

4、 加密過濾器:

  •  mcrypt.tripledes和mdecrypt.tripledes等

利用例子:Bugku  flag在index裡

 

像這樣:http://120.24.86.145:8005/post/index.php?file=php://filter/read=convert.base64-encode/resource=index.php

說說file=php://filter/read=convert.base64-encode/resource=index.php的含義

首先這是一個file關鍵字的get引數傳遞,php://是一種協議名稱,php://filter/是一種訪問本地檔案的協議,/read=convert.base64-encode/表示讀取的方式是base64編碼後,resource=index.php表示目標檔案為index.php。