April 19, 2019

WebGoat write up(Insecure direct object references 5 Playing with the Patterns)

To comply with the rule, in this write up, some hints related to this challenge only will be mentioned.

룰을 준수하기 위해, 여기서는 챌린지와과 관련된 몇 가지 힌트만이 언급됩니다.

Playing with the Patterns
이 패턴 가지고 놀기.

View Another Profile
View someone else’s profile by using the alternate path you already used to view your own profile. Use the 'View Profile' button and intercept/modify the request to view another profile. Alternatively, you may also just be able to use a manual GET request with your browser.

타인 프로필 열람.
이전 챌린지에서 직접 객체 참조를 통해 본인의 프로필을 보았던 것처럼, 타인의 프로필을 열람해보라. 이를 위해, 아래의 "View Profile" 버튼을 클릭 후 해당 요청을 인터셉트 및 변조하는 방식을 사용한다. 또는 브라우저에서 수동으로 GET 요청을 보내도 된다.

Edit Another Profile
Older apps may follow different patterns, but RESTful apps (which is what’s going on here) often just change methods (and include a body or not) to perform different functions.

타 계정 프로필 수정.
과거 애플리케이션은 다른 패턴을 따를 것이다. 그러나 RESTful 애플리케이션들(WebGoat 포함)은 단지 메소드만 변경하는 경우가 종종 있다.

Use that knowledge to take the same base request, change its method, path and body (payload) to modify another user’s (Buffalo Bill’s) profile. Change the role to something lower (since higher privilege roles and users are ususally lower numbers). Also change the user’s color to 'red'.

이러한 지식을 활용하여, 동일한 요청 메시지를 바탕으로, 메소드와 경로 그리고 바디를 변경하여 타인(Buffalo Bill)의 프로필을 변경하라. 권한을 더 낮은 등급으로 변경하고(높은 권한으로 변경하면 발각되기 쉽다는 의미로 생각됨.), 해당 계정의 색상을 "red"로 변경하라.

clue of Insecure direct object references 5 Playing with the Patterns

Since the type of data that the server responds to when viewing the profile was JSON, I thought that the server can handle JSON. So I changed the "Content-Type" in the header part to "application/json". And I changed the body part data to JSON type after bringing the names that can be viewed from the data (output) received at the time of accessing the account.

프로필 열람 시 서버가 응답하는 데이터의 형태가 JSON이기에, 이를 취급할 수 있다고 생각하여 헤더 부분의 "Content-Type"을 "application/json"으로 변경하였고, 바디 부분의 데이터는 계정 열람 시 전달 받은 데이터(output)에서 확인할 수 있는 이름들을 그대로 가져와 JSON 형태로 변경하였다.

result of Insecure direct object references 5 Playing with the Patterns