<pre id="vvttv"><mark id="vvttv"><progress id="vvttv"></progress></mark></pre>
    <pre id="vvttv"></pre>

      <p id="vvttv"></p>

          <p id="vvttv"></p>

                <p id="vvttv"></p>

                <pre id="vvttv"><cite id="vvttv"><progress id="vvttv"></progress></cite></pre>

                  <output id="vvttv"><dfn id="vvttv"><th id="vvttv"></th></dfn></output>

                    <p id="vvttv"></p>

                    Path Manipulation

                    ABSTRACT

                    通過用戶輸入控制 file system 操作所用的路徑,借此攻擊者可以訪問或修改其他受保護的系統資源。

                    EXPLANATION

                    當滿足以下兩個條件時,就會產生 path manipulation 錯誤:

                    1. 攻擊者能夠指定某一 file system 操作中所使用的路徑。

                    2. 攻擊者可以通過指定特定資源來獲取某種權限,而這種權限在一般情況下是不可能獲得的。

                    例如,在某一程序中,攻擊者可以獲得特定的權限,以重寫指定的文件或是在其控制的配置環境下運行程序。

                    例 1: 下面的代碼使用來自于 HTTP 請求的輸入來創建一個文件名。程序員沒有考慮到攻擊者可能使用像 "../../tomcat/conf/server.xml" 一樣的文件名,從而導致應用程序刪除它自己的配置文件。


                    var rName = document.URL.indexOf("reportName=")+10;
                    window.requestFileSystem(window.TEMPORARY, 1024*1024, function(fs) {
                    fs.root.getFile('/usr/local/apfr/reports/' + rName, {create:false}, function(fileEntry) {
                    fileEntry.remove(function() {
                    console.log('File removed.');
                    }, errorHandler);

                    }, errorHandler);
                    }, errorHandler);


                    例 2:以下代碼使用來自于本地存儲的輸入來決定該打開哪個文件,并返回到用戶。如果惡意用戶能夠更改本地存儲的內容,就可以使用該程序來讀取系統中擴展名為 .txt 的任何文件。


                    ...
                    var filename = localStorage.sub + '.txt';
                    function oninit(fs) {
                    fs.root.getFile(filename, {}, function(fileEntry) {
                    fileEntry.file(function(file) {
                    var reader = new FileReader();
                    reader.onloadend = function(e) {
                    var txtArea = document.createElement('textarea');
                    txtArea.value = this.result;
                    document.body.appendChild(txtArea);
                    };
                    reader.readAsText(file);
                    }, errorHandler);
                    }, errorHandler);
                    }

                    window.requestFileSystem(window.TEMPORARY, 1024*1024, oninit, errorHandler);
                    ...

                    REFERENCES

                    [1] Standards Mapping - OWASP Top 10 2004 - (OWASP 2004) A1 Unvalidated Input

                    [2] Standards Mapping - OWASP Top 10 2007 - (OWASP 2007) A4 Insecure Direct Object Reference

                    [3] Standards Mapping - OWASP Top 10 2010 - (OWASP 2010) A4 Insecure Direct Object References

                    [4] Standards Mapping - Security Technical Implementation Guide Version 3 - (STIG 3) APP3510 CAT I, APP3600 CAT II

                    [5] Standards Mapping - Security Technical Implementation Guide Version 3.4 - (STIG 3.4) APP3510 CAT I, APP3600 CAT II

                    [6] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 22, CWE ID 73

                    [7] G. Hoglund, G. McGraw Exploiting Software Addison-Wesley

                    [8] Standards Mapping - Web Application Security Consortium 24 + 2 - (WASC 24 + 2) Path Traversal

                    [9] Standards Mapping - Payment Card Industry Data Security Standard Version 1.2 - (PCI 1.2) Requirement 6.3.1.1, Requirement 6.5.4

                    [10] Standards Mapping - Payment Card Industry Data Security Standard Version 1.1 - (PCI 1.1) Requirement 6.5.1

                    [11] Standards Mapping - Payment Card Industry Data Security Standard Version 2.0 - (PCI 2.0) Requirement 6.5.8

                    [12] Standards Mapping - SANS Top 25 2010 - (SANS 2010) Risky Resource Management - CWE ID 022

                    [13] Standards Mapping - SANS Top 25 2011 - (SANS Top 25 2011) Risky Resource Management - CWE ID 022

                    [14] Standards Mapping - SANS Top 25 2009 - (SANS 2009) Risky Resource Management - CWE ID 426

                    [15] Standards Mapping - FIPS200 - (FISMA) SI


                    Copyright 2013 Fortify Software - All rights reserved.
                    (Generated from version 2013.1.1.0008 of the Fortify Secure Coding Rulepacks)
                    desc.dataflow.javascript.path_manipulation

                      <pre id="vvttv"><mark id="vvttv"><progress id="vvttv"></progress></mark></pre>
                      <pre id="vvttv"></pre>

                        <p id="vvttv"></p>

                            <p id="vvttv"></p>

                                  <p id="vvttv"></p>

                                  <pre id="vvttv"><cite id="vvttv"><progress id="vvttv"></progress></cite></pre>

                                    <output id="vvttv"><dfn id="vvttv"><th id="vvttv"></th></dfn></output>

                                      <p id="vvttv"></p>

                                      这里只有精品视频