php2shell-scanner.git

php2shell-scanner

~ Check PHP2Shell (CVE-2026-109618, CVE-2026-109619) from inside your server: distribution backports, missed restarts and interim mitigations, verdicts computed in the browser.
git clone https://github.com/debuman/php2shell-scanner.git

site/kr/index.html (19858B)

      1 <!doctype html>
      2 <html lang="ko" data-root="../">
      3 <head>
      4   <meta charset="utf-8">
      5   <meta name="viewport" content="width=device-width, initial-scale=1">
      6   <meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data:; font-src 'self'; connect-src 'self'; base-uri 'none'; form-action 'none'">
      7   <meta name="referrer" content="no-referrer">
      8   <meta name="color-scheme" content="light">
      9   <meta name="theme-color" content="#ffffff">
     10   <title>PHP2Shell 노출 점검 · CVE-2026-109618, CVE-2026-109619</title>
     11   <meta name="description" content="서버에서 직접 수집한 정보로 PHP가 PHP2Shell(CVE-2026-109618, CVE-2026-109619)의 영향을 받는지 확인합니다. 배포판 백포트, 재시작 누락, 임시 완화 설정까지 반영하며 브라우저 안에서만 실행됩니다.">
     12   <meta property="og:type" content="website">
     13   <meta property="og:title" content="PHP2Shell 노출 점검">
     14   <meta property="og:description" content="서버에서 수집한 정보로 CVE-2026-109618, CVE-2026-109619의 영향을 확인합니다. 배포판 백포트, 재시작 누락, 임시 완화 설정까지 반영합니다.">
     15   <link rel="alternate" hreflang="en" href="../">
     16   <link rel="alternate" hreflang="ko" href="./">
     17   <link rel="icon" href="../favicon.svg" type="image/svg+xml">
     18   <link rel="preload" href="../fonts/jetbrains-mono-400.woff2" as="font" type="font/woff2" crossorigin>
     19   <link rel="stylesheet" href="../fonts/pretendard.css">
     20   <link rel="stylesheet" href="../style.css">
     21   <script type="module" src="../app.js"></script>
     22 </head>
     23 <body>
     24   <a class="skip" href="#input">입력으로 건너뛰기</a>
     25 
     26   <header class="topbar">
     27     <div class="topbar-in">
     28       <a class="brand" href="./">
     29         <svg viewBox="0 0 32 32" width="22" height="22" aria-hidden="true" focusable="false"><rect width="32" height="32" rx="7" fill="#000"/><path d="M11 24V8h5.5a4.5 4.5 0 0 1 0 9H11" fill="none" stroke="#fff" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"/></svg>
     30         <span>php2shell-scanner</span>
     31       </a>
     32       <nav class="cves" aria-label="취약점 공식 권고">
     33         <a href="https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w" rel="noreferrer">CVE-2026-109618</a>
     34         <a href="https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp" rel="noreferrer">CVE-2026-109619</a>
     35       </nav>
     36       <div class="topbar-end">
     37         <a class="lang-toggle" href="../" hreflang="en" lang="en" aria-label="View in English" title="View in English">
     38           <svg viewBox="0 0 24 24" width="17" height="17" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m5 8 6 6"/><path d="m4 14 6-6 2-3"/><path d="M2 5h12"/><path d="M7 2h1"/><path d="m22 22-5-10-5 10"/><path d="M14 18h6"/></svg>
     39           <span>EN</span>
     40         </a>
     41         <a class="report-link" href="https://sqzer.com/writing/2026/php2shell-cve-2026-109618-cve-2026-109619_kr/" target="_blank" rel="noopener" aria-label="보고서 보기" title="sqzer.com의 보고서를 새 탭에서 엽니다"><svg viewBox="0 0 24 24" width="15" height="15" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"/><path d="M14 3v5h5M9 13h6M9 17h6"/></svg><span>보고서 보기</span></a>
     42         <a class="source" id="repo-link" href="https://github.com/debuman/php2shell-scanner" aria-label="GitHub 소스 코드" title="GitHub 소스 코드">
     43           <svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true" focusable="false"><path fill="currentColor" d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>
     44         </a>
     45       </div>
     46     </div>
     47   </header>
     48 
     49   <main class="workspace">
     50     <section class="pane" aria-labelledby="title">
     51       <h1 id="title">PHP2Shell 노출 점검</h1>
     52       <p class="lede">서버에서 직접 수집한 정보로 PHP가 CVE-2026-109618, CVE-2026-109619의 영향을 받는지 확인합니다. 배포판 백포트, 재시작 누락, 임시 완화 설정까지 반영합니다. 확인은 이 탭 안에서만 이루어지며, 붙여넣은 내용은 어디에도 전송되지 않습니다.</p>
     53 
     54       <div class="step">
     55         <h2 class="step-head"><span class="step-n">1</span>수집</h2>
     56         <div class="collector">
     57           <div class="tabs" role="tablist" aria-label="수집 방법">
     58             <button class="tab" type="button" role="tab" id="tab-probe" aria-controls="panel-probe" aria-selected="true">PHP 프로브 <span class="tab-hint">권장</span></button>
     59             <button class="tab" type="button" role="tab" id="tab-script" aria-controls="panel-script" aria-selected="false" tabindex="-1">서버 스크립트</button>
     60             <button class="tab" type="button" role="tab" id="tab-header" aria-controls="panel-header" aria-selected="false" tabindex="-1">응답 헤더</button>
     61           </div>
     62 
     63           <div class="tab-panel" role="tabpanel" id="panel-probe" aria-labelledby="tab-probe">
     64             <h3 class="panel-title">PHP 프로브</h3>
     65             <div class="get">
     66               <a class="btn btn-download" href="../downloads/php2shell-selfcheck.php" download aria-label="php2shell-selfcheck.php 내려받기" title="내려받기"><svg viewBox="0 0 24 24" width="15" height="15" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v12m0 0-5-5m5 5 5-5M4 21h16"/></svg>php2shell-selfcheck.php</a>
     67             </div>
     68             <p class="or">또는 서버에서 바로 받기</p>
     69             <div class="cmdline"><code class="cmd" data-download="php2shell-selfcheck.php">curl -fsSLO https://php2shell.sqzer.com/downloads/php2shell-selfcheck.php</code><button class="copy" type="button" aria-label="명령 복사"><svg class="i-copy" viewBox="0 0 24 24" width="15" height="15" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="12" height="12" rx="2"/><path d="M5 15V5a2 2 0 0 1 2-2h10"/></svg><svg class="i-check" viewBox="0 0 24 24" width="15" height="15" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg></button></div>
     70             <p class="sha" data-sha-for="php2shell-selfcheck.php"></p>
     71             <ol class="howto">
     72               <li>파일 안의 <code>$TOKEN</code>을 영문자, 숫자, <code>-</code>, <code>_</code>로 이루어진 12자 이상의 임의 문자열로 바꿉니다. 예를 들어 <code>openssl rand -hex 16</code>의 출력을 쓰면 됩니다.</li>
     73               <li>파일 이름을 추측하기 어렵게 바꿔 사이트의 웹 루트에 올립니다.</li>
     74               <li><code>https://&lt;사이트&gt;/&lt;파일&gt;.php?k=&lt;TOKEN&gt;</code>을 한 번 엽니다. 실행 후 파일은 스스로 삭제를 시도하며, 삭제하지 못하면 출력에 그 사실을 표시합니다.</li>
     75               <li>vhost와 PHP-FPM 풀마다 반복합니다. 각각 다른 PHP를 쓸 수 있습니다.</li>
     76             </ol>
     77           </div>
     78 
     79           <div class="tab-panel" role="tabpanel" id="panel-script" aria-labelledby="tab-script" hidden>
     80             <h3 class="panel-title">서버 스크립트</h3>
     81             <div class="get">
     82               <a class="btn btn-download" href="../downloads/php2shell-server-check.sh" download aria-label="php2shell-server-check.sh 내려받기" title="내려받기"><svg viewBox="0 0 24 24" width="15" height="15" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v12m0 0-5-5m5 5 5-5M4 21h16"/></svg>php2shell-server-check.sh</a>
     83             </div>
     84             <p class="or">또는 서버에서 바로 받기</p>
     85             <div class="cmdline"><code class="cmd" data-download="php2shell-server-check.sh" data-then="sha256sum php2shell-server-check.sh">curl -fsSLO https://php2shell.sqzer.com/downloads/php2shell-server-check.sh &amp;&amp; sha256sum php2shell-server-check.sh</code><button class="copy" type="button" aria-label="명령 복사"><svg class="i-copy" viewBox="0 0 24 24" width="15" height="15" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="12" height="12" rx="2"/><path d="M5 15V5a2 2 0 0 1 2-2h10"/></svg><svg class="i-check" viewBox="0 0 24 24" width="15" height="15" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg></button></div>
     86             <p class="sha" data-sha-for="php2shell-server-check.sh"></p>
     87             <p class="or">내용을 확인한 뒤 실행</p>
     88             <div class="cmdline"><code class="cmd">sudo sh php2shell-server-check.sh --logs</code><button class="copy" type="button" aria-label="명령 복사"><svg class="i-copy" viewBox="0 0 24 24" width="15" height="15" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="12" height="12" rx="2"/><path d="M5 15V5a2 2 0 0 1 2-2h10"/></svg><svg class="i-check" viewBox="0 0 24 24" width="15" height="15" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg></button></div>
     89             <ol class="howto">
     90               <li>POSIX sh로 작성됐고 읽기만 하며 네트워크에 접속하지 않습니다. 실행하기 전에 출력된 해시를 위에 표시된 값(<a href="../downloads/SHA256SUMS">SHA256SUMS</a>에도 있음)과 비교하고 스크립트 내용을 읽어 보세요.</li>
     91               <li>설치된 PHP 패키지와 변경 이력의 CVE 기록, 업데이트로 교체된 파일을 아직 쓰는 PHP 프로세스를 출력합니다.</li>
     92               <li><code class="lit">--logs</code>는 웹 서버, PHP-FPM, 커널 로그에서 침해 지표를 찾고, <code class="lit">--webroot DIR</code>은 최근 3일 안에 바뀐 PHP 파일을 보여 줍니다.</li>
     93               <li>다른 계정의 프로세스까지 확인하려면 root로 실행하세요.</li>
     94             </ol>
     95           </div>
     96 
     97           <div class="tab-panel" role="tabpanel" id="panel-header" aria-labelledby="tab-header" hidden>
     98             <h3 class="panel-title">응답 헤더</h3>
     99             <div class="cmdline"><code class="cmd">curl -sI https://&lt;사이트&gt;/ | grep -i x-powered-by</code><button class="copy" type="button" aria-label="명령 복사"><svg class="i-copy" viewBox="0 0 24 24" width="15" height="15" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="12" height="12" rx="2"/><path d="M5 15V5a2 2 0 0 1 2-2h10"/></svg><svg class="i-check" viewBox="0 0 24 24" width="15" height="15" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg></button></div>
    100             <ol class="howto">
    101               <li>서버에 접근할 수 없을 때만 쓰세요.</li>
    102               <li>헤더가 노출된 경우에만 동작하며, 그 URL을 처리한 PHP 하나만 알 수 있습니다.</li>
    103               <li>헤더에 담긴 Debian·Ubuntu 패키지 리비전은 인식하지만 설정, 다른 vhost, 재시작 여부는 알 수 없습니다.</li>
    104             </ol>
    105           </div>
    106         </div>
    107       </div>
    108 
    109       <form class="step" id="check-form" novalidate>
    110         <div class="step-head-row">
    111           <h2 class="step-head"><span class="step-n">2</span><label for="input">출력 붙여넣기</label></h2>
    112           <div class="examples">
    113             <select id="example" class="select-sm" aria-label="예시 입력">
    114               <option value="">예시 선택</option>
    115               <option value="backport">Ubuntu 22.04, 백포트된 수정</option>
    116               <option value="restart">Ubuntu 22.04, 재시작 안 함</option>
    117               <option value="docker">공식 Docker 이미지, 오래된 태그</option>
    118               <option value="rhel">AlmaLinux 9, 서버 스크립트</option>
    119             </select>
    120             <button type="button" id="load-example" class="btn btn-sm">불러오기</button>
    121           </div>
    122         </div>
    123         <textarea id="input" rows="12" spellcheck="false" autocomplete="off" autocapitalize="off" placeholder="프로브 출력(-----BEGIN PHP2SHELL SELFCHECK-----), 서버 스크립트 출력(-----BEGIN PHP2SHELL SERVERCHECK-----), 또는 둘 다 붙여넣으세요. X-Powered-By 헤더나 버전 문자열만 붙여넣어도 됩니다."></textarea>
    124         <div class="form-row">
    125           <label class="field">
    126             <span>배포판</span>
    127             <select id="distro"><option value="auto">자동 감지</option></select>
    128           </label>
    129           <div class="form-buttons">
    130             <button type="button" id="clear" class="btn">지우기</button>
    131             <button type="submit" class="btn btn-primary">결과확인</button>
    132           </div>
    133         </div>
    134       </form>
    135     </section>
    136 
    137     <section class="pane pane-result" aria-labelledby="result-title">
    138       <div class="step-head-row">
    139         <h2 class="step-head" id="result-title"><span class="step-n">3</span>결과</h2>
    140         <button type="button" class="btn btn-sm" id="copy-report" hidden>결과 복사</button>
    141       </div>
    142       <noscript><p class="noscript">확인은 브라우저의 JavaScript로 실행됩니다. JavaScript를 켜거나, 사용 중인 PHP를 <a href="../data/upstream.json">upstream.json</a>의 수정 릴리스와 배포판 보안 권고에 직접 비교하세요.</p></noscript>
    143       <div id="result">
    144         <div class="empty">
    145           <p>아직 결과가 없습니다. 서버에서 정보를 수집하고 출력을 붙여넣은 뒤 결과를 확인하세요.</p>
    146           <table class="legend">
    147             <caption class="sr-only">확인 결과 종류</caption>
    148             <tbody>
    149               <tr><th scope="row"><span class="badge badge-patched">패치됨</span></th><td>업스트림 수정 릴리스 이상이거나, 두 수정이 모두 들어간 배포판 패키지입니다.</td></tr>
    150               <tr><th scope="row"><span class="badge badge-vulnerable">취약</span></th><td>수정 릴리스보다 낮습니다. 지원 종료(EOL) 브랜치의 업스트림 빌드도 포함합니다.</td></tr>
    151               <tr><th scope="row"><span class="badge badge-pending">수정 대기</span></th><td>배포판이 CVE를 추적하고 있지만 수정 패키지를 아직 내놓지 않았습니다.</td></tr>
    152               <tr><th scope="row"><span class="badge badge-restart">재시작 필요</span></th><td>수정 패키지는 설치됐지만 실행 중인 PHP는 여전히 이전 빌드입니다.</td></tr>
    153               <tr><th scope="row"><span class="badge badge-unknown">판단 불가</span></th><td>근거가 부족합니다. 근거 없이 안전하다는 결과를 내지 않습니다.</td></tr>
    154             </tbody>
    155           </table>
    156         </div>
    157       </div>
    158     </section>
    159   </main>
    160 
    161   <section class="reference" aria-labelledby="ref-title">
    162     <div class="reference-in">
    163       <div class="ref-col">
    164         <h2 id="ref-title">영향 릴리스</h2>
    165         <noscript><p class="noscript">릴리스 표와 패키지 표는 JavaScript가 있어야 표시됩니다. JavaScript를 켜거나 <a href="../data/upstream.json">upstream.json</a>과 <a href="../data/distro.json">distro.json</a>의 데이터를 직접 확인하세요.</p></noscript>
    166         <table class="data" id="upstream-table">
    167           <thead><tr><th scope="col">브랜치</th><th scope="col">영향 범위</th><th scope="col">수정 버전</th></tr></thead>
    168           <tbody></tbody>
    169         </table>
    170         <details class="disclosure">
    171           <summary>배포판 패키지</summary>
    172           <table class="data" id="distro-table">
    173             <thead><tr><th scope="col">배포판</th><th scope="col">소스 패키지</th><th scope="col">수정 버전</th></tr></thead>
    174             <tbody></tbody>
    175           </table>
    176         </details>
    177         <details class="disclosure">
    178           <summary>Red Hat 보안 권고</summary>
    179           <div id="redhat-list"></div>
    180         </details>
    181         <p class="fine" id="data-status"></p>
    182       </div>
    183 
    184       <div class="ref-col">
    185         <h2>확인 방법</h2>
    186         <ol class="method">
    187           <li>브랜치별 업스트림 수정 릴리스 이상이면 패치된 것으로 봅니다.</li>
    188           <li>Debian·Ubuntu 패키지는 dpkg 버전 비교 규칙으로 배포판 수정 버전과 비교합니다.</li>
    189           <li>RHEL 계열은 서버 스크립트가 수집한 패키지 변경 이력의 CVE 기록을 근거로 씁니다.</li>
    190           <li>실행 중인 버전이 설치된 패키지보다 오래됐거나 PHP 프로세스가 삭제된 파일을 매핑하고 있으면 재시작 필요로 봅니다.</li>
    191           <li>deb.sury.org 빌드, 공식 Docker 이미지, 직접 빌드한 PHP는 업스트림 릴리스 기준으로 확인합니다.</li>
    192           <li>임시 완화 설정은 보고만 하며 결과를 바꾸지 않습니다.</li>
    193           <li>근거가 없으면 판단 불가로 두며, 안전하다는 결과를 내지 않습니다.</li>
    194         </ol>
    195         <h2>범위</h2>
    196         <p class="fine-block">이 페이지는 서버에 요청을 보내지 않습니다. 프로브는 버전, 패키지, 설정을 읽습니다. 서버 스크립트는 여기에 더해 패키지 변경 이력, 명령줄을 포함한 프로세스 목록, 각 PHP 프로세스가 매핑한 파일, PHP와 웹 서버 설정 파일을 읽습니다. <code class="lit">--logs</code>와 <code class="lit">--webroot</code> 옵션을 주면 로그, 세션 파일 크기, PHP 파일의 이름과 변경 날짜도 읽습니다. 터미널 출력에는 명령줄과 로그 내용이 나타날 수 있으며, 이 페이지에는 BEGIN 줄부터 END 줄까지만 붙여넣으면 됩니다.</p>
    197         <p class="fine-block">확인 결과는 공격이 실패한다는 증명이 아닙니다. 업스트림 공식 권고와 배포판 보안 권고도 함께 확인하세요.</p>
    198       </div>
    199     </div>
    200   </section>
    201 
    202   <footer class="footer">
    203     <p>php2shell-scanner · MIT · <a class="repo-link" href="https://github.com/debuman/php2shell-scanner">소스</a> · <a href="../data/distro.json">distro.json</a> · <a href="../data/upstream.json">upstream.json</a> · <a href="../downloads/SHA256SUMS">SHA256SUMS</a> · by <a href="https://sqzer.com">Hyukjin An</a></p>
    204   </footer>
    205 </body>
    206 </html>