bWAPP A2 Broken Authentication - Logout Management
itsecgames.com
www.itsecgames.com
here 단어를 클릭하면 로그아웃을 해주는 웹페이지이다.
[사진 2]와 같이 here를 클릭하면 [사진 3]처럼 로그인 페이지가 출력된다.
low
low 레벨의 경우 [사진 3]의 로그인 웹페이지에서 뒤로 가기를 누를 경우 위와 같이 다시 로그인한 상태가 된다.
burp로 프록시를 설정하고 here를 클릭하면 위와 같이 cookie 값을 삭제하는 것을 확인할 수 있다. 로그인이 cookie 값이 아닌 세션으로 유지되기 때문에 뒤로 가기를 클릭하면 다시 로그인 상태가 되는 것으로 보인다.
medium
medium, high 레벨의 경우 뒤로 가기를 클릭해도 로그인이 유지되지 않는다. 서버 코드를 보면 medium, high 레벨일 때 PHP session_destroy() 함수로 세션 정보를 삭제하는 것을 확인할 수 있다. 또한, high 레벨에서는 $_SESSION 변수를 array()로 초기화하는 것도 확인할 수 있다.
따라서, 세션이 초기화되므로 low 레벨과 다르게 뒤로 가기를 클릭해도 로그인이 되지 않는다. 로그아웃을 할 때는 세션을 초기화해주면 되겠다.
* PHP setcookie() Function
PHP: setcookie - Manual
The server my php code is running on has sessions disabled so I am forced to store a fair bit of arbitrary data in cookies. Using array names was impractical and problematic, so I implemented a splitting routine. I do not serialize any class instances,
www.php.net
* PHP session_destroy() Function
PHP: session_destroy - Manual
www.php.net
'Wargame > bWAPP' 카테고리의 다른 글
bWAPP A2 Broken Authentication - Weak Passwords (0) | 2020.11.17 |
---|---|
bWAPP A2 Broken Authentication - Password Attacks (0) | 2020.11.17 |
bWAPP A2 Broken Authentication - Insecure Login Forms (0) | 2020.11.16 |
bWAPP A2 Broken Authentication - Forgotten Function (0) | 2020.11.16 |
bWAPP A2 Broken Authentication - CAPTCHA Bypassing (0) | 2020.11.16 |