SecureBank
  • About SecureBank
  • A01:2021 – Broken Access Control
    • About
    • Challenges
  • A02:2021 – Cryptographic Failures
    • About
    • Challenges
  • A03:2021 – Injection
    • About
    • Challenges
  • A04:2021 – Insecure Design
    • About
    • Challenges
  • A05:2021 – Security Misconfiguration
    • About
    • Challenges
  • A06:2021 – Vulnerable and Outdated Components
    • About
    • Challenges
  • A07:2021 – Identification and Authentication Failures
    • About
    • Challenges
  • A08:2021 – Software and Data Integrity Failures
    • About
    • Challenges
  • A09:2021 – Security Logging and Monitoring Failures
    • About
  • A10:2021 – Server-Side Request Forgery (SSRF)
    • About
    • Challenges
  • CROSS SITE SCRIPTING (XXS)
    • About
    • Challenges
  • XML External Entities (XXE)
    • About
    • Challenges
  • Miscellaneous
    • Invalid Model
    • Invalid Redirect
    • Directory Browsing
    • Simultaneous Request
    • reDOS
Powered by GitBook
On this page
  • SQLi
  • Solution

Was this helpful?

  1. A03:2021 – Injection

Challenges

PreviousAboutNextAbout

Last updated 2 years ago

Was this helpful?

SQLi

In this challenge, you need to get all transactions from the database.

The most common and used test case for SQLi is to try the ' sign in the input field. If we receive an error or weird result, there is a strong possibility that the app has SQLi. For SQLi cheatsheet, you can see on .

You can also test your application with various tools like , which is one of the best tools available for testing your application against SQLi.

Solution

  1. Go to /Transaction/Index

  2. In the search field, if you will try with ' , you will notice that you receive an exception as seen on the image below (The exception inside the browser)

  3. We can continue looking for this issue inside the dev tool window to see the response. From it, we can notice that an error occurs on the server.

  4. For the final result, we need to modify the search string appropriately to create a proper SQL injection.

If you are using CTF mode, you will find the flag in the response header.

GitHub
SQLmap
The exception inside the browser
Response inside DevTools