Notice
Recent Posts
Recent Comments
Link
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Archives
Today
Total
관리 메뉴

White Security

ByteBandits CTF - EasyPHP 문제풀이 본문

CTF Writups

ByteBandits CTF - EasyPHP 문제풀이

POSIX 2019. 4. 14. 17:46

 

ByteBandits CTF Web 1번

parse_str 함수 취약점 문제입니다.

 

 

링크에 접속하면 parse_url 함수로부터 파싱되는

요청 URL의 ? 뒷부분이 존재하지 않는다면 소스를 출력하도록 되어 있습니다.

 

parse_str 함수에 의하여 GET 방식으로 제공된 인자는

모두 일반 php 변수로서 변환됩니다.

 

마치 register_globals = on 를 적용한 것과 

비스무리한 결과를 가져오는 것이죠.

 

sha2('posix') = 270dfabe9df986d649e48acd477c99c30245a25148b53f89b24ee34afcfdaa0f

 

따라서 get 메소드로 하여금 action, key, hashed_key 변수를

덮어씌워 주면, 인증을 우회할 수 있겠습니다. 

 

http://easyphp.ctf.euristica.in/?action=auth&hashed_key=270dfabe9df986d649e48acd477c99c30245a25148b53f89b24ee34afcfdaa0f&key=posix 
flag{exPz_pHp_0b9fd0f8}

'CTF Writups' 카테고리의 다른 글

ByteBandits CTF - Online Previewer 2 문제풀이  (0) 2019.04.14
ByteBandits CTF - Online Previewer 1 문제풀이  (0) 2019.04.14
Marcodowno 문제풀이  (0) 2019.04.06
repeaaaaaat 문제풀이  (0) 2019.04.03
Sweet 문제풀이  (0) 2019.04.03
Comments