<pre id="bbfd9"><del id="bbfd9"><dfn id="bbfd9"></dfn></del></pre>

          <ruby id="bbfd9"></ruby><p id="bbfd9"><mark id="bbfd9"></mark></p>

          <p id="bbfd9"></p>

          <p id="bbfd9"><cite id="bbfd9"></cite></p>

            <th id="bbfd9"><form id="bbfd9"><dl id="bbfd9"></dl></form></th>

            <p id="bbfd9"><cite id="bbfd9"></cite></p><p id="bbfd9"></p>
            <p id="bbfd9"><cite id="bbfd9"><progress id="bbfd9"></progress></cite></p>
            php語言

            php中allow-url-include的應用分析

            時間:2025-05-06 20:53:29 php語言 我要投稿
            • 相關推薦

            php中allow-url-include的應用分析

              php常因為它可能允許URLS被導入和執行語句被人們指責。這是導致稱為Remote URL Include vulnerabilities的php應用程序漏洞的最重要的原因之一。就跟隨百分網小編一起去了解下吧,想了解更多相關信息請持續關注我們應屆畢業生考試網!

              php常因為它可能允許URLS被導入和執行語句被人們指責。

              這是導致稱為Remote URL Include vulnerabilities的php應用程序漏洞的最重要的原因之一。

              也因為如此,有些安全人員建議在php.ini配置中禁用指向allow_url_fopen。

              不過,這樣會破壞很多的應用并且并不能保證100%的解決remote URL includes以及他帶來的不安全性。

              通常,用戶要求在他們使用其他的文件系統函數的時候,php允許禁止URL包含和請求聲明支持。

              鑒于此,計劃在PHP6中提供allow_url_include。在這些討論之后,這些特性在php5.2.0 中被backported。現在大多數的安全研究人員已經改變了他們的建議,只建議人們禁止allow_url_include。

              allow_url_fopen和allow_url_include并不是導致問題的原因。一方面來說在應用中包含本地文件仍然是一件足夠危險的事情,因為攻擊者經常通過sessiondata, fileupload, logfiles,...等方法獲取php代碼………

              另一方面allow_url_fopen和allow_url_include只是保護了against URL handles標記為URL.這影響了http(s) and ftp(s)但是并沒有影響php或date(new in php5.2.0) urls.這些url形式,都可以非常簡單的進行php代碼注入。

              例1: Use php://input to read the POST data

              復制代碼 代碼如下:

              <?php

              // Insecure Include

              // The following Include statement will

              // include and execute everything POSTed

              // to the server

              include "php://input";

              ?>

              例2: Use data: to Include arbitrary code

              復制代碼 代碼如下:

              <?php

              // Insecure Include

              // The following Include statement will

              // include and execute the base64 encoded

              // payload. Here this is just phpinfo()

              include "data:;base64,PD9waHAgcGhwaW5mbygpOz8+";

              ?>

              把這些放到運算里將會發現既不是url_allow_fopen也不是url_allor_include 被保障。

              只是因為過濾器很少對矢量進行過濾。如果要完全解決這個URL include vulnerabilities的方法則需要應用Suhosin擴展。

            【php中allow-url-include的應用分析】相關文章:

            PHP中Json應用03-01

            PHP中CURL的幾個經典應用08-12

            php中引用的用法分析06-22

            php中return的用法實例分析03-25

            php中的socket框架性能分析07-17

            淺談php中curl和fsockopen的應用05-07

            php中in-array函數用法分析01-18

            PHP中redis的用法深入分析04-28

            php-smarty模版引擎中的緩存應用04-23

                    <pre id="bbfd9"><del id="bbfd9"><dfn id="bbfd9"></dfn></del></pre>

                    <ruby id="bbfd9"></ruby><p id="bbfd9"><mark id="bbfd9"></mark></p>

                    <p id="bbfd9"></p>

                    <p id="bbfd9"><cite id="bbfd9"></cite></p>

                      <th id="bbfd9"><form id="bbfd9"><dl id="bbfd9"></dl></form></th>

                      <p id="bbfd9"><cite id="bbfd9"></cite></p><p id="bbfd9"></p>
                      <p id="bbfd9"><cite id="bbfd9"><progress id="bbfd9"></progress></cite></p>
                      飘沙影院