첫 화면이다

?file=hello를 보내는 걸 보니

readfilename=$_GET['file']+.txt 이런식으로 파일을 읽을 것 같다.

우리의 목표는 password.php를 읽는 것이고 

그 말은 즉 뒤에 .txt가 있는 코드가 있다는 것인데

.txt를 무시하는 방법은

filename도 문자열이기 때문에 끝처리를 null로 해버리면 뒤에를 읽지 않는다는것


?file=password.php%00


password를 찾을 수 있다.

'war game > webhacking.kr' 카테고리의 다른 글

[webhacking.kr] 6번 100pt  (0) 2017.01.18
[webhacking.kr]23번 200pt  (0) 2017.01.18
webhacking.kr 39 100pt  (0) 2017.01.05
[webhacking.kr] 24번 REMOTE_ADDR 쿠키변조  (0) 2016.12.16
[webhacking.kr]sql injection 18  (0) 2016.12.16

+ Recent posts