mirror of
https://github.com/davidalvarezp/websec-audit.git
synced 2026-06-23 11:48:28 +02:00
9 lines
32 KiB
HTML
9 lines
32 KiB
HTML
|
|
<!doctype html><html lang=en class=no-js> <head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Directory brute-forcing and sensitive file path probing."><meta name=author content=davidalvarezp><link href=https://davidalvarezp.github.io/websec-audit/modules/dirbrute/ rel=canonical><link href=../headers/ rel=prev><link href=../nikto/ rel=next><link rel=icon href=../../assets/favicon.png><meta name=generator content="mkdocs-1.6.1, mkdocs-material-9.7.6"><title>Module 06 · Dir & File Enumeration - WebSec-Audit</title><link rel=stylesheet href=../../assets/stylesheets/main.484c7ddc.min.css><link rel=stylesheet href=../../assets/stylesheets/palette.ab4e12ef.min.css><link rel=preconnect href=https://fonts.gstatic.com crossorigin><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Inter:300,300i,400,400i,700,700i%7CJetBrains+Mono:400,400i,700,700i&display=fallback"><style>:root{--md-text-font:"Inter";--md-code-font:"JetBrains Mono"}</style><link rel=stylesheet href=../../assets/extra.css><script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script></head> <body dir=ltr data-md-color-scheme=slate data-md-color-primary=blue data-md-color-accent=light-blue> <input class=md-toggle data-md-toggle=drawer type=checkbox id=__drawer autocomplete=off> <input class=md-toggle data-md-toggle=search type=checkbox id=__search autocomplete=off> <label class=md-overlay for=__drawer></label> <div data-md-component=skip> <a href=#module-06-dir-file-enumeration class=md-skip> Skip to content </a> </div> <div data-md-component=announce> </div> <header class="md-header md-header--shadow md-header--lifted" data-md-component=header> <nav class="md-header__inner md-grid" aria-label=Header> <a href=../.. title=WebSec-Audit class="md-header__button md-logo" aria-label=WebSec-Audit data-md-component=logo> <img src=../../assets/logo.svg alt=logo> </a> <label class="md-header__button md-icon" for=__drawer> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg> </label> <div class=md-header__title data-md-component=header-title> <div class=md-header__ellipsis> <div class=md-header__topic> <span class=md-ellipsis> WebSec-Audit </span> </div> <div class=md-header__topic data-md-component=header-topic> <span class=md-ellipsis> Module 06 · Dir & File Enumeration </span> </div> </div> </div> <form class=md-header__option data-md-component=palette> <input class=md-option data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme=slate data-md-color-primary=blue data-md-color-accent=light-blue aria-label="Switch to light mode" type=radio name=__palette id=__palette_0> <label class="md-header__button md-icon" title="Switch to light mode" for=__palette_1 hidden> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M12 7a5 5 0 0 1 5 5 5 5 0 0 1-5 5 5 5 0 0 1-5-5 5 5 0 0 1 5-5m0 2a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3m0-7 2.39 3.42C13.65 5.15 12.84 5 12 5s-1.65.15-2.39.42zM3.34 7l4.16-.35A7.2 7.2 0 0 0 5.94 8.5c-.44.74-.69 1.5-.83 2.29zm.02 10 1.76-3.77a7.131 7.131 0 0 0 2.38 4.14zM20.65 7l-1.77 3.79a7.02 7.02 0 0 0-2.38-4.15zm-.01 10-4.14.36c.59-.51 1.12-1.14 1.54-1.86.42-.73.69-1.5.83-2.29zM12 22l-2.41-3.44c.74.27 1.55.44 2.41.44.82 0 1.63-.17 2.37-.44z"/></svg> </label> <input class=md-option data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme=default data-md-color-primary=blue data-md-color-accent=light-blue aria-label="Switch to dark mode" type=radio name=__palette id=__palette_1> <label class="md-header__button md-icon" title="Switch to dark mode" for=__palette_0 hidden> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="m17.75 4.09-2.53 1.94.91 3.06-2.63-1.81-2.63 1.81.91-3.06-2.53-1.94L12.44 4l1.06
|
||
|
|
</span><span id=__span-0-2><a id=__codelineno-0-2 name=__codelineno-0-2 href=#__codelineno-0-2></a>./websec-audit.sh<span class=w> </span>-t<span class=w> </span>https://target.com<span class=w> </span>--wl-dirs-small<span class=w> </span>/path/to/custom.txt
|
||
|
|
</span></code></pre></div> <hr> <h2 id=sensitive-path-probing>Sensitive path probing<a class=headerlink href=#sensitive-path-probing title="Permanent link">¶</a></h2> <p>40+ paths are probed directly with <code>curl</code> regardless of the brute-force wordlist. Findings are severity-classified automatically:</p> <div class="tabbed-set tabbed-alternate" data-tabs=1:4><input checked=checked id=__tabbed_1_1 name=__tabbed_1 type=radio><input id=__tabbed_1_2 name=__tabbed_1 type=radio><input id=__tabbed_1_3 name=__tabbed_1 type=radio><input id=__tabbed_1_4 name=__tabbed_1 type=radio><div class=tabbed-labels><label for=__tabbed_1_1>Critical</label><label for=__tabbed_1_2>High</label><label for=__tabbed_1_3>Medium</label><label for=__tabbed_1_4>Low / Info</label></div> <div class=tabbed-content> <div class=tabbed-block> <table> <thead> <tr> <th>Path</th> <th>Why</th> </tr> </thead> <tbody> <tr> <td><code>/.git/HEAD</code></td> <td>Git repository exposed</td> </tr> <tr> <td><code>/.git/config</code></td> <td>Git config exposed</td> </tr> <tr> <td><code>/.env</code></td> <td>Environment file with credentials</td> </tr> <tr> <td><code>/.env.local</code></td> <td>Local environment file</td> </tr> <tr> <td><code>/.env.production</code></td> <td>Production secrets</td> </tr> <tr> <td><code>/wp-config.php</code></td> <td>WordPress database credentials</td> </tr> <tr> <td><code>/wp-config.php.bak</code></td> <td>Backup of WP config</td> </tr> <tr> <td><code>/configuration.php</code></td> <td>Joomla config</td> </tr> <tr> <td><code>/config/database.yml</code></td> <td>Rails DB config</td> </tr> <tr> <td><code>/.aws/credentials</code></td> <td>AWS credentials file</td> </tr> <tr> <td><code>/db.sql</code>, <code>/dump.sql</code>, <code>/backup.sql</code></td> <td>Database dumps</td> </tr> </tbody> </table> </div> <div class=tabbed-block> <table> <thead> <tr> <th>Path</th> <th>Why</th> </tr> </thead> <tbody> <tr> <td><code>/phpinfo.php</code>, <code>/info.php</code></td> <td>PHP environment disclosure</td> </tr> <tr> <td><code>/phpmyadmin/</code>, <code>/adminer.php</code></td> <td>Database admin interfaces</td> </tr> <tr> <td><code>/web.config</code></td> <td>IIS config / credentials</td> </tr> <tr> <td><code>/backup.zip</code>, <code>/backup.tar.gz</code></td> <td>Backup archives</td> </tr> <tr> <td><code>/console</code></td> <td>Interactive console (RCE risk)</td> </tr> <tr> <td><code>/Dockerfile</code>, <code>/docker-compose.yml</code></td> <td>Infrastructure secrets</td> </tr> </tbody> </table> </div> <div class=tabbed-block> <table> <thead> <tr> <th>Path</th> <th>Why</th> </tr> </thead> <tbody> <tr> <td><code>/admin/</code>, <code>/administrator/</code></td> <td>Admin panels</td> </tr> <tr> <td><code>/.htaccess</code></td> <td>Apache config</td> </tr> <tr> <td><code>/server-status</code>, <code>/server-info</code></td> <td>Apache status pages</td> </tr> <tr> <td><code>/_profiler/</code>, <code>/_debugbar</code></td> <td>Framework debug panels</td> </tr> <tr> <td><code>/graphiql</code></td> <td>GraphQL IDE</td> </tr> <tr> <td><code>/.DS_Store</code></td> <td>Directory structure leak</td> </tr> <tr> <td><code>/package.json</code>, <code>/composer.json</code></td> <td>Dependency exposure</td> </tr> </tbody> </table> </div> <div class=tabbed-block> <table> <thead> <tr> <th>Path</th> <th>Why</th> </tr> </thead> <tbody> <tr> <td><code>/robots.txt</code></td> <td>May disclose hidden paths</td> </tr> <tr> <td><code>/sitemap.xml</code></td> <td>Site structure</td> </tr> <tr> <td><code>/api/swagger.json</code>, <code>/swagger-ui.html</code></td> <td>API docs</td> </tr> <tr> <td><code>/graphql</code></td> <td>GraphQL endpoint</td> </tr> <tr> <td><code>/.well-known/security.txt</code></td> <td>Security contact policy</td> </tr> </tbody> </table> </div> </div> </div> <hr> <h2 id=output-files>Output files<a class=headerlink href=#output-files title="Permanent link">¶</a></h2> <div class="language-text highlight"><pre><span></span><code><span id=__span-1-1><a id=__codelineno-1-1 name=__codelineno-1-1 href=#__codelineno-1-1></a>dirs/
|
||
|
|
</span><span id=__span-1-2><a id=__codelineno-1-2 name=__codelineno-1-2 href=#__codelineno-1-2></a>├── gobuster_dirs.txt
|
||
|
|
</span><span id=__span-1-3><a id=__codelineno-1-3 name=__codelineno-1-3 href=#__codelineno-1-3></a>├── gobuster_dns.txt
|
||
|
|
</span><span id=__span-1-4><a id=__codelineno-1-4 name=__codelineno-1-4 href=#__codelineno-1-4></a>├── ffuf_results.json
|
||
|
|
</span><span id=__span-1-5><a id=__codelineno-1-5 name=__codelineno-1-5 href=#__codelineno-1-5></a>├── dirb_results.txt
|
||
|
|
</span><span id=__span-1-6><a id=__codelineno-1-6 name=__codelineno-1-6 href=#__codelineno-1-6></a>└── sensitive_paths_found.txt # only paths that returned 200/301/302
|
||
|
|
</span></code></pre></div> </article> </div> <script>var tabs=__md_get("__tabs");if(Array.isArray(tabs))e:for(var set of document.querySelectorAll(".tabbed-set")){var labels=set.querySelector(".tabbed-labels");for(var tab of tabs)for(var label of labels.getElementsByTagName("label"))if(label.innerText.trim()===tab){var input=document.getElementById(label.htmlFor);input.checked=!0;continue e}}</script> <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script> </div> <button type=button class="md-top md-icon" data-md-component=top hidden> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg> Back to top </button> </main> <footer class=md-footer> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class=md-copyright> <div class=md-copyright__highlight> Copyright © 2026 <a href=https://davidalvarezp.com>davidalvarezp</a>. </div> </div> <div class=md-social> <a href=https://github.com/davidalvarezp target=_blank rel=noopener title="davidalvarezp on GitHub" class=md-social__link> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 512 512"><!-- Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M173.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M252.8 8C114.1 8 8 113.3 8 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C436.2 457.8 504 362.9 504 252 504 113.3 391.5 8 252.8 8M105.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg> </a> <a href=https://www.linkedin.com/in/davidalvarezp target=_blank rel=noopener title="davidalvarezp on LinkedIn" class=md-social__link> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 448 512"><!-- Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3M135.4 416H69V202.2h66.5V416zM102.2 96a38.5 38.5 0 1 1 0 77 38.5 38.5 0 1 1 0-77m282.1 320h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9z"/></svg> </a> <a href=https://davidalvarezp.com target=_blank rel=noopener title=davidalvarezp.com class=md-social__link> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 512 512"><!-- Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M351.9 280H161c2.9 64.5 17.2 123.9 37.5 167.4 11.4 24.5 23.7 41.8 35.1 52.4 11.2 10.5 18.9 12.2 22.9 12.2s11.7-1.7 22.9-12.2c11.4-
|