Junior Cybersecurity Analyst

Case File: The Search Box

Arewa Microfinance's old customer-search page builds its database query by pasting in whatever the visitor types. In a safe, simulated copy of the page, break it: prove the bug, count the columns, find a hidden table of credentials and take a key. Then deploy the fix and replay the attack. The database is generated for you alone.

40 min

Arewa Microfinance Β· Episode 5

The Search Box

The bank's old customer-search page is still live, and a contractor says it can be made to leak secrets

Halima CISO Β· Email

Hello, it’s Halima. A contractor told Musa that our old customer-search page β€œcan be talked into” showing things it should not. I do not want to take that on trust, and I do not want anyone testing the live page.

We have put a safe copy of it in front of you. Prove it, show me what it leaks, and then show me that the fix works.

The brief

Scope and authorisation. This is a simulated copy of the page running entirely in your browser, with its own invented database. Nothing here connects to a real system, and that is the only kind of target you may test without written permission.

The page runs a query like SELECT name, branch, phone FROM customers WHERE name LIKE '%your text%'. Your text is pasted straight into it. Try the following, in order:

  1. Search for an ordinary name. Then search for a single quote, ', and read the error.
  2. Work out how many columns the query returns (ORDER BY with a number is a classic probe; the error tells you when you go too far).
  3. Ask the database for the names of its tables (UNION SELECT with three columns, from sqlite_master).
  4. Read the hidden table and find the core-banking credential.

A tip from every real tester: begin your payload with text that matches no customer, such as zzz, so that only the rows you ask for appear and are not buried among the real customers.

The flag: the core-banking key is your flag. Submit it at the bottom of this page. Then deploy the fixed version and replay your attack.

Starting the bank's test server in your browser…

πŸ”’ The debrief unlocks when you close the case. Finish the lab above.

Write your finding for Halima

Say what the flaw is, what you were able to read, why it happened, and how to fix it. Do not include the secret value itself.

0 words

πŸ§ͺ Want to practise this on your own computer? See how to set up your lab →

πŸ€–

Need clarification? Ask GT

Hi, I'm GT β€” your AI tutor for Case File: The Search Box. What would you like to know?
πŸ“

Knowledge Check

1 of 3

What is the root cause of a SQL injection vulnerability?

βš‘ Capture The Flag

Report a problem

About: /lessons/case-the-search-box