📝
Basic Penetration Testing
  • About Knowledge
  • Server Enumeration
    • Scanning
    • Common Services
      • FTP - 21
      • SMTP - 25
      • SMB - 139, 445
  • Web Application
    • Enumeration
    • Exploitation
    • Execute Commands
    • Databases
      • MySQL
      • SQLite
      • MSSQL
      • PostgreSQL
  • Remote Code Execution
  • File Transfer
    • HTTP Server
    • SMB Protocol
    • FTP Server on Kali Linux
  • Hash Cracking
  • Privilege Escalation
    • Windows Privilege Escalation
    • Linux Privilege Escalation
  • Buffer Overflow
  • About LeeCyberSec
Powered by GitBook
On this page
  • Connection
  • Query
  • Readfile

Was this helpful?

  1. Web Application
  2. Databases

PostgreSQL

Connection

$ su postgres
Password: 
$ psql
psql (9.4.15)
Type "help" for help.

Query

postgres=# \list
postgres=# \c database_name
pentesterlab=# \d
pentesterlab=# select * from users;

Readfile

$ psql -U photoblog -W photoblog
# CREATE TABLE demo(t text);
# COPY demo from '[FILENAME]';
# SELECT * FROM demo;
PreviousMSSQLNextRemote Code Execution

Last updated 4 years ago

Was this helpful?