Lina
Lina
Platform: spbctf | Category: Web | Type: Challenge | Difficulty: Easy | OS: NA | Author: XESXOR | Date: 2026-03-09 | Status: Solved Techniques: limit_bypass, sql_comment_injection
Summary
Task: SQL injection with LIMIT 0 preventing results. Solution: Use comment injection (-- ) to bypass LIMIT clause.
Lina — Web Kids 2.0
Description
SQL injection task at https://2019-10-20-sqlinj.ctf.su/lina
Beginner-level SQL injection challenge (1 point) from Web Kids 2.0 CTF platform.
Analysis
The task is a basic SQL injection. Upon analyzing the query, it was discovered that LIMIT 0 is appended to the SQL query, which prevents any results from being returned even when the query executes successfully.
Key problem: the query has the form:
sql read-only • copy allowedSELECT * FROM table WHERE condition LIMIT 0
Solution
Using classic SQL injection with a comment to bypass LIMIT:
Payload:
' OR 1=1 --
This payload:
'— closes the string literalOR 1=1— makes the condition always true, returning all records--— comments out the rest of the query, includingLIMIT 0
The resulting query becomes:
sql read-only • copy allowedSELECT * FROM table WHERE field='' OR 1=1 -- LIMIT 0