eWPTXv3 - Notes
GitHubPortfolioTwitter/X MediumCont@ctHome
  • 📝eWPTXv3
    • Web Application Penetration Testing Methodology
      • 1.1 Introduction to Web App Security Testing
        • 1.1.1 Web Application
        • 1.1.2 Web App Architecture
        • 1.1.3 HTTP/HTTPS
      • 1.2 Web App Pentesting Methodology
    • Web Application Reconnaissance
      • 2.1 Information Gathering
        • 2.1.1 DNS Recon
          • 2.1.1.1 DNS Zone Transfer
          • 2.1.1.2 Subdomain Enumeration
        • 2.1.2 WAF Recon
      • 2.2 Passive Crawling & Spidering
      • 2.3 Web Server Fingerprinting
        • 2.3.1 File & Directory Brute-Force
      • 2.4 Web Proxies
        • 2.4.1 Burp Suite
        • 2.4.2 OWASP ZAP
    • Authentication Attacks
      • 6.1 HTTP Attacks
        • 6.1.1 HTTP Method Tampering
        • 6.1.2 Attacking HTTP Authentication
      • 6.2 Session Attacks
        • 6.2.1 Session Hijacking
        • 6.2.2 Session Fixation
        • 6.2.3 Session Hijacking via Cookie Tampering
      • 6.3 JWT Attacks
      • 6.4 CSRF
    • Injection Vulnerabilities
      • 4.1 Command Injection
      • 4.2 Cross-Site Scripting (XSS)
        • 4.2.1 XSS Anatomy
        • 4.2.2 Reflected XSS
        • 4.2.3 Stored XSS
        • 4.2.4 DOM-Based XSS
        • 4.2.5 Identifying & Exploiting XSS with XSSer
      • 4.3 ​SQL Injection (SQLi)
        • 4.3.1 DB & SQL Introduction
        • 4.3.2 SQL Injection (SQLi)
        • 4.3.3 In-Band SQLi
        • 4.3.4 Blind SQLi
        • 4.3.5 NoSQL
        • 4.3.6 SQLMap
        • 4.3.7 Mitigation Strategies
    • API Penetration Testing
      • 5.1 API Testing
    • Server-Side Attacks
      • 6.1 Server-side request forgery (SSRF)
      • 6.2 Deserialization
      • 6.3 ​File & Resource Attacks
        • 6.1 File Upload Vulnerability
        • 6.2 Directory Traversal
        • 6.3 File Inclusion (LFI and RFI)
          • 6.3.1 Local File Inclusion (LFI)
          • 6.3.2 Remote File Inclusion (RFI)
        • 6.4 CMS Pentesting
          • 6.4.1 Wordpress, Drupal & Magento
    • Filter Evasion & WAF Bypass
      • 7.1 Obfuscating attacks using encodings
    • 📄Report
      • How to write a PT Report
  • 🛣️RoadMap / Exam Preparation
  • 📔eWPTX Cheat Sheet
Powered by GitBook
On this page
  • Database (DB):
  • Database Management System (DBMS):
  • Relational Database Management System (RDBMS):
  • Relational Database (SQL Datase)
  • Non-Relational Database (NoSQL Database):
  1. eWPTXv3
  2. Injection Vulnerabilities
  3. 4.3 ​SQL Injection (SQLi)

4.3.1 DB & SQL Introduction

Database (DB):

A database is a structured collection of data that is organized in a way that allows for efficient storage, retrieval, and manipulation.

Databases are used to store various types of information, ranging from simple lists to complex multimedia data. They are essential components of most software applications, providing a centralized location for storing and managing data.

Database Management System (DBMS):

A DBMS is software that provides an interface for users to interact with databases. It facilitates the creation, modification, and querying of databases.

DBMS handles tasks such as data storage, retrieval, security, concurrency control, and data integrity.

Users interact with the DBMS through a query language (such as SQL for relational databases) or through programming interfaces.

Relational Database Management System (RDBMS):

An RDBMS is a type of DBMS that organizes data into tables, where each table consists of rows and columns. Relationships between tables are established using keys, which are unique identifiers for rows within a table.

RDBMS enforces data integrity through constraints such as primary keys, foreign keys, and unique constraints. SQL (Structured Query Language) is used to define, manipulate, and query data in relational databases.

Relational Database (SQL Datase)

SQL stands for Structured Query Language. It is a domain-specific language used for managing and manipulating data in relational databases. SQL provides a standardized way to perform various operations on relational databases, including:

  1. Data Querying: SQL allows users to retrieve data from databases using SELECT statements. Users can specify the columns they want to retrieve, apply filters using WHERE clauses, and sort results using ORDER BY clauses.

    Example:

    sqlCopy codeSELECT * FROM employees WHERE department = 'Sales';
  2. Data Manipulation: SQL enables users to add, update, and delete data in relational databases using INSERT, UPDATE, and DELETE statements, respectively.

    Example:

    sqlCopy codeINSERT INTO employees (name, age, department) VALUES ('John Doe', 30, 'Marketing');
  3. Data Definition: SQL supports defining and modifying the structure of databases and tables. Users can create, alter, and drop tables, as well as define constraints such as primary keys, foreign keys, and unique constraints.

    Example:

    sqlCopy codeCREATE TABLE employees (
        id INT PRIMARY KEY,
        name VARCHAR(100),
        age INT,
        department VARCHAR(100)
    );
  4. Data Control: SQL provides commands for managing access to data, including granting and revoking privileges on database objects such as tables, views, and procedures.

    Example:

    sqlCopy codeGRANT SELECT, INSERT ON employees TO user1;

Non-relational databases, often referred to as NoSQL databases, do not adhere to the traditional relational model. They are designed to handle various types of data, including unstructured, semi-structured, and structured data.

NoSQL databases provide flexibility and scalability, making them suitable for modern applications with high volumes of data and varying data requirements.

NoSQL databases use different data models, such as key-value, document, columnar, and graph-based models, to organize and store data.

Examples of NoSQL databases include MongoDB, Cassandra, Redis, and Neo4j.

Previous4.3 ​SQL Injection (SQLi)Next4.3.2 SQL Injection (SQLi)

Non-Relational Database ():

📝
NoSQL Database