This assignment explores the Domain Name System (DNS) and demonstrates DNS amplification attacks in a controlled environment. You'll learn how DNS works, implement DNS queries, and understand distributed denial-of-service (DDoS) attack vectors.
CRITICAL:
- DNS amplification attacks are ILLEGAL when conducted without authorization
- This assignment must be completed in an isolated lab environment ONLY
- Never target external DNS servers or networks
- Violation will result in immediate course failure and legal prosecution
- Use ONLY the provided lab infrastructure
Implement a basic DNS resolver that:
- Constructs DNS query packets manually
- Sends queries via UDP to DNS servers
- Parses DNS response packets
- Extracts A, AAAA, MX, NS records
Support query types:
- A (IPv4 address)
- AAAA (IPv6 address)
- MX (Mail exchange)
- NS (Name server)
- TXT (Text records)
Implement recursive resolution:
- Start from root servers
- Follow referrals
- Cache responses
- Measure query resolution time
dig and nslookupSetup Isolated Lab Environment:
- Create isolated virtual network (NO INTERNET ACCESS)
- Deploy DNS server (BIND9)
- Configure attacker, amplifier, and victim VMs
- Ensure complete isolation from external networks
Implement Amplification Attack (for education ONLY):
- Create program that sends DNS queries with spoofed source IP
- Request large DNS records (e.g., ANY queries)
- Demonstrate amplification factor
- Measure traffic volume multiplication
Measurements:
- Calculate amplification factor (response size / query size)
- Measure bandwidth consumption at victim
- Test with different query types
- Analyze packet captures
Vulnerability Analysis:
- Identify why DNS amplification works
- Explain role of UDP and source IP spoofing
- Analyze open resolver problem
- Study real-world DDoS incidents
Mitigation Research:
- Response Rate Limiting (RRL)
- BCP 38 (ingress filtering)
- DNS cookies (RFC 7873)
- DNSSEC implications
Implementation:
- Configure DNS server with RRL
- Demonstrate effectiveness
- Measure impact on legitimate traffic
Implement attack detection:
- Monitor DNS query patterns
- Identify spoofed source IPs
- Detect abnormal query rates
- Generate alerts
Test defensive measures:
- Rate limiting
- Query filtering
- Source IP validation
- Cache poisoning prevention
Research and demonstrate (in isolated lab):
- NTP amplification
- SNMP amplification
- SSDP amplification
- Compare amplification factors
Submit a ZIP file containing:
Attacker VM:
- Linux with Python/Scapy
- No internet access
- IP: 192.168.100.10
DNS Amplifier VM:
- BIND9 DNS server
- Open resolver configuration
- IP: 192.168.100.20
Victim VM:
- Traffic monitoring tools
- IP: 192.168.100.30
# Ensure isolation - NO default gateway
# Use host-only or internal network in VirtualBox/VMware
# Verify isolation with: ping 8.8.8.8 (should FAIL)
| Component | Points |
|---|---|
| DNS Query Implementation | 30 |
| Amplification Demonstration | 35 |
| Security Analysis | 25 |
| Detection and Defense | 10 |
| Lab Isolation | 10 (mandatory) |
| Code Quality | 10 |
| Report | 10 |
| Bonus | 10 |
| Total | 130 |
Three weeks from assignment date
DNS Header Format:
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| ID |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|QR| Opcode |AA|TC|RD|RA| Z | RCODE |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| QDCOUNT |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| ANCOUNT |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| NSCOUNT |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| ARCOUNT |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
DNS(rd=1, qd=DNSQR(qname="example.com"))dnsdig @server domain typetcpdump -n port 53 to monitor DNS trafficBefore beginning Part 2, you must:
1. Submit lab topology diagram
2. Demonstrate network isolation to TA/instructor
3. Receive written approval to proceed
4. Sign ethics agreement
"I understand that DNS amplification attacks are illegal and harmful. I will only conduct this assignment in an isolated lab environment. I will never perform these attacks against unauthorized systems. I understand the serious legal and ethical implications and commit to responsible use of this knowledge."
Signature: __ Date: ______
This is an individual assignment. The attack implementation must be your own work. Sharing attack code or conducting unauthorized scanning will result in severe academic and potentially legal consequences.