Attacking Postgresql Database

medium.com · devanshbatham/Awesome-Bugbounty-Writeups · 23 hours ago · tutorial
quality 2/10 · low quality
0 net
AI Summary

A basic penetration testing guide on attacking PostgreSQL databases through network reconnaissance, brute-force credential attacks using Metasploit, and extracting password hashes from the pg_shadow table via psql client.

Entities
PostgreSQL Metasploit Oracle Bug Bounty Program psql pg_shadow
Attacking PostgreSQL Database | by vishnuraj - Freedium Milestone: 20GB Reached We’ve reached 20GB of stored data — thank you for helping us grow! Patreon Ko-fi Liberapay Close < Go to the original Attacking PostgreSQL Database This is write up in which I'll explain a vulnerability I recently found, and reported through oracle bug bounty program. vishnuraj Follow ~2 min read · July 16, 2018 (Updated: July 16, 2018) · Free: Yes Vulnerability Explanation : PostgreSQL is a database that comes with MacOS X Lion, as a default standard database. According to wikipedia the majority of Linux distributions have the PostgreSQL in the supplied packages.So besides the regular databases (Oracle,MySQL etc.) there will be times as a penetration tester that we will need to assess and this database Network Mapping : Lets say that we have perform a port scan on a server and we have identify that is running a PostgreSQL database at port 5432 Vulnerability Identification : We will try a brute force attack in order to discover any weak credentials that will allow us then to connect to the database.We will open the metasploit framework and we will use the postgres_login scanner. Penetration Now that we have a valid username and password we can use that to connect to the database by using a psql client.The first query that we want to execute is the select usename, passwd from pg_shadow; because it will return to us the password hashes of the database from the pg_shadow table. Hope You liked this finding and i apologize for if there is any mistakes in this post. ☺ reference : https://medium.com/@cryptocracker99/a-penetration-testers-guide-to-postgresql-d78954921ee9 #postgres #bug-bounty #remote-code-execution #hacking #responsible-disclosure Reporting a Problem Sometimes we have problems displaying some Medium posts. If you have a problem that some images aren't loading - try using VPN. Probably you have problem with access to Medium CDN (or fucking Cloudflare's bot detection algorithms are blocking you).