
Application developers who develop their own session IDs frequently forget to incorporate the complexity and randomness necessary for security. If the user specific session ID is not complex and random, then the application is highly susceptible to session-based brute force attacks.
자체 Session ID를 개발하는 응용 프로그램 개발자들은 보안에 필수적인 무작위성과 복잡성을 포함하는 것을 종종 잊어버린다. 유저의 Session ID가 복잡하고 무작위가 아니라면, 응용 프로그램은 세션 기반 Broute Force 공격에 매우 취약해진다.
Gain access to an authenticated session belonging to someone else.
타인의 인증된 세션의 접근 권한을 얻어라.

In this lesson we are trying to predict the 'hijack_cookie' value. The 'hijack_cookie' is used to differentiate authenticated and anonymous users of WebGoat.
이 수업에서는 'hijack_cookie' 값을 예측해보려 한다. 'hijack_cooki'는 WebGoat의 인증된 유저와 익명 유저를 구별하는 데 사용된다.
로그인 요청마다 응답으로 오는 쿠키를 제거해 매 요청마다 새로운 쿠키를 받을 수 있도록 한다.
8386282288552906574-1715653562898
8386282288552906575-1715653563054
8386282288552906576-1715653563206
8386282288552906578-1715653563334
8386282288552906579-1715653564072
8386282288552906581-1715653564222
8386282288552906582-1715653564355
요청을 연달아 7번 보냈을 때 쿠키는 위와 같다. 하이픈 기준 왼쪽의 값이 요청마다 1씩 증가하는 것을 확인할 수 있다. 그러나 중간에 2가 증가한 부분이 있는데, 만약 내가 5번을 로그인하는 사이에 다른 유저가 로그인을 요청했다면 그 유저에게 80으로 끝나는 쿠키 값이 반환되었을 것으로 추측해볼 수 있다.
하이픈 오른쪽의 값은 이후 동일한 요청을 10회 정도 더 해보았을 때 숫자가 증가하는 것을 확인했다. 따라서 1715653564072 초과 1715653564222 미만의 숫자일 것으로 추측해볼 수 있다.
그렇다면 조건을 만족하는 값을 대입해 Brute Force 공격을 시도해볼 수 있다.
HTTP/1.1 200 OK
Connection: keep-alive
Content-Type: application/json
Date: Tue, 14 May 2024 02:42:18 GMT
Content-Length: 203
{
"lessonCompleted" : true,
"feedback" : "Congratulations. You have successfully completed the assignment.",
"output" : null,
"assignment" : "HijackSessionAssignment",
"attemptWasMade" : true
}