Wednesday, December 18, 2024
HomeWebapp PentestingWeb Application Pentesting with Manual SQL Injection - Integer Based

Web Application Pentesting with Manual SQL Injection – Integer Based

Published on

SIEM as a Service

Today we will perform manual SQL injection with an integer-based method for the MySQL database. I hope the last article on error-based string injection is useful to everyone, especially beginners. Now I will quickly drive into yet another writing for SQL injection with the integer-based method.

SQL Injection ONLINE LAB:

  • Beginners can use this website to practice skills for SQL injection
  • To Access the LAB Click Here

STEP 1: Breaking the Query

  • Visiting the website testphp.vulnweb.com/artists.php?artist=1 
  • let us add & check a single quote to the existing URL to check whether the website is vulnerable to SQL Injection by adding testphp.vulnweb.com/artists.php?artist=1′
  • Here we are trying to break the query to receive error messages with the database so that we can balance the query.
  • But we are not getting error statements with respect to our input, which means a single quote as input.
  • Now I understand that when the input string is not getting an error with the database, let me try to fix it without a single quote.
  • The above figure shows that the website is getting fixed & we have joined the query with no errors with the integer method. So this is called SQL Injection With Integer Based Method.

STEP 2: Finding the Backend Columns

  • It is time to have a conversation with the database to find the number of columns. To enumerate columns we can use order by command.
  • Let me ask the database for any number so that I can check the column’s availability in the database.
SQL injection
  • Above figure, I have asked for 4 columns, but it throws an error.
  • Keep asking the database, let me ask for 3 columns !!!
SQL injection
  • The above Figure shows no SQL errors, Yes! we have only 3 columns

STEP 3: Finding the Backend Table & Table Names

  • Let us ask the database its table path with the command union all select 
SQL injection
  • The above figure shows the execution of the union all select gives the path of tables.2 & 3 the path of the table.
SQL injection
  • The above figure shows the execution of database() & version() on the path of tables 2 & 3 providing us with the database name and version.
  • So here the database name is accurate and the version is 5.1.73-0ubuntu0.10.04.1

STEP 4: Dumping Database Tables

  • Group_concat() is the function that returns a string with the concatenated non-NULL value from a group.
  • So we can use this Function to list all Tables from the database.
  • In Addition, we can use Information_Schema to view metadata about the objects within a database
SQL injection
  • The Above Figure shows the dump of all tables as carts,categ,featured,guestbook,pictures,products,users

STEP 5: Dumping all Data in Columns of Tables

  • Here I will dump for users in the table
SQL injection
  • The Above Figure shows the dump of all columns of tables contain uname,pass,cc,address,email,name,phone,cart.

STEP 6: Dumping all Usernames & passwords

  • Here we can dump all usernames & passwords in the database.
  • Here we got the username as test and password as test !!!!
  • practice and try to dump all columns of tables containing cc, address, email, name, phone, cart. Happy Hacking !!!

You can follow us on LinkedinTwitterFacebook for daily Cybersecurity updates also you can take the Best Cybersecurity courses online to keep your self-updated.

Disclaimer

All the. This article is only for an Educational purpose. Any actions and or activities related to the material contained within this Website is solely your responsibility. The misuse of the information in this website can result in criminal charges brought against the persons in question.

- Advertisement - SIEM as a Service

The “Author” and “www.gbhackers.com” will not be held responsible in the event any criminal charges be brought against any individuals misusing the information in this website to break the law. Reproduce This Content Without Permission is Strictly Prohibited.

Latest articles

New VIPKeyLogger Via Weaponized Office Documenrs Steals Login Credentials

The VIPKeyLogger infostealer, exhibiting similarities to the Snake Keylogger, is actively circulating through phishing...

INTERPOL Urges to End ‘Pig Butchering’ & Replaces With “Romance Baiting”

INTERPOL has called for the term "romance baiting" to replace "pig butchering," a phrase...

New I2PRAT Malware Using encrypted peer-to-peer communication to Evade Detections

Cybersecurity experts are sounding the alarm over a new strain of malware dubbed "I2PRAT,"...

Earth Koshchei Employs RDP Relay, Rogue RDP server in Server Attacks

 A new cyber campaign by the advanced persistent threat (APT) group Earth Koshchei has...

API Security Webinar

72 Hours to Audit-Ready API Security

APIs present a unique challenge in this landscape, as risk assessment and mitigation are often hindered by incomplete API inventories and insufficient documentation.

Join Vivek Gopalan, VP of Products at Indusface, in this insightful webinar as he unveils a practical framework for discovering, assessing, and addressing open API vulnerabilities within just 72 hours.

Discussion points

API Discovery: Techniques to identify and map your public APIs comprehensively.
Vulnerability Scanning: Best practices for API vulnerability analysis and penetration testing.
Clean Reporting: Steps to generate a clean, audit-ready vulnerability report within 72 hours.

More like this

Web Server Penetration Testing Checklist – 2024

Web server pentesting is performed under three significant categories: identity, analysis, and reporting vulnerabilities such as...

ReconAIzer: OpenAI-based Extension for Burp Suite

Burp Suite, the renowned Bug Bounty Hunting and Web Application Penetration Testing tool, has...

HackerOne Lays off 12% of Its Employees as a One-Time Event 

HackerOne is a renowned cybersecurity company that offers bounty and penetration testing platforms to...