Security
[wargame] strcmp
이무쿤
2021. 9. 17. 16:41
반응형
http://wargame.kr:8080/strcmp/
php strcmp()의 취약점
- 인자로 배열이 들어온 경우 NULL을 반환
- NULL== 0은 두 비교 인자가 같다는 True로 처리되어 인증 우회됨.
HTML input element는 name에 의해 array-ready
php 같은 경우 name에 배열 값을 주면 $_POST['education']
<p><label>Please enter your most recent education<br>
<input type="text" name="education[]">
</p>
<p><label>Please enter any previous education<br>
<input type="text" name="education[]">
</p>
<p><label>Please enter any previous education<br>
<input type="text" name="education[]">
</p>
같은 name의 여러 input value를 배열로 받아올 수 있음.
https://stackoverflow.com/questions/4688880/html-element-array-name-something-or-name-something
반응형