To comply with the rule, in this write up, some hints related to this challenge only will be mentioned.
룰을 준수하기 위해, 여기서는 챌린지와과 관련된 몇 가지 힌트만이 언급됩니다.
Try It! Numeric SQL Injection
뉴메릭 SQL 인젝션 실습!
The query in the code builds a dynamic query as seen in the previous example. The query in the code builds a dynamic query by concatenating a number making it susceptible to Numeric SQL injection:
아래의 쿼리는 이전 예제에서와 비슷한 느낌의 동적 쿼리다. 이 쿼리는 단순히 숫자 값을 연결하여 동적 쿼리를 구성하는데 뉴메릭 SQL 인젝션에 취약하다.
"select * from users where USERID = " + userID;
Using the form below try to retrieve all the users from the users table. You shouldn’t need to know any specific user name to get the complete list, however you can use '101' to see the data for one user.
아래의 입력 폼을 활용하여 "users"테이블에서 모든 사용자를 검색하라. 전체 사용자 리스트를 얻기 위해서 특정 사용자의 이름을 알 필요는 없다. 그러나 "101"를 사용하면 한 사용자의 데이터를 검색할 수 있다.
뉴메릭 SQL 인젝션 실습!
The query in the code builds a dynamic query as seen in the previous example. The query in the code builds a dynamic query by concatenating a number making it susceptible to Numeric SQL injection:
아래의 쿼리는 이전 예제에서와 비슷한 느낌의 동적 쿼리다. 이 쿼리는 단순히 숫자 값을 연결하여 동적 쿼리를 구성하는데 뉴메릭 SQL 인젝션에 취약하다.
"select * from users where USERID = " + userID;
Using the form below try to retrieve all the users from the users table. You shouldn’t need to know any specific user name to get the complete list, however you can use '101' to see the data for one user.
아래의 입력 폼을 활용하여 "users"테이블에서 모든 사용자를 검색하라. 전체 사용자 리스트를 얻기 위해서 특정 사용자의 이름을 알 필요는 없다. 그러나 "101"를 사용하면 한 사용자의 데이터를 검색할 수 있다.
As with string SQL injection challenge, the final "1=1" condition is always true, so all records in that table are output. The fact that annotation is not needed to hide the right side of the condition is a subtle difference from the string SQL injection challenge, so comparing would be helpful to understand.
스트링 SQL 인젝션 실습과 마찬가지로, 최종적으로 "1=1" 조건은 항상 참이기 때문에, 해당 테이블의 모든 레코드들이 출력된다. 조건 우측의 내용을 감추기 위해서 주석처리가 굳이 필요하지 않다는 점은 스트링 SQL 인젝션 실습과 미묘한 차이가 있으므로 비교해가며 이해하면 도움이 될 것이다.