https://github.com/manmolecular/dnstrike
:anger: Weaponized DNS Resolver
https://github.com/manmolecular/dnstrike
dns-resolver dns-server ssrf
Last synced: 3 months ago
JSON representation
:anger: Weaponized DNS Resolver
- Host: GitHub
- URL: https://github.com/manmolecular/dnstrike
- Owner: manmolecular
- Created: 2022-08-06T21:41:44.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-08-06T22:16:53.000Z (over 3 years ago)
- Last Synced: 2025-01-16T16:52:48.846Z (12 months ago)
- Topics: dns-resolver, dns-server, ssrf
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dnstrike
A small set of DNS utilities in the form of a weaponized DNS resolver. Use cases: SSRF exploitation, playing with DNS, anything you want.
## Commands
- `.bind` - resolves IPv4-like subdomain in the form of `%d-%d-%d-%d` to the IPv4 address, example: `1-1-1-1.bind.domain.tld` resolves to `1.1.1.1`
- `random` - resolves to random IPv4 address, example: `random.domain.tld` returns a random IPv4 address
- `.as.` - creates record to resolve subdomain name to the IPv4 address, example: `testname.as.1-1-1-1.domain.tld` resolves to `1.1.1.1`
- `.lookup` - returns created on the previous step IPv4 record for the subdomain, example: `testname.lookup.domain.tld` resolves to `1.1.1.1`
See tests for more details.
## Install
```bash
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
```
## Run in Docker
Run:
```
make up
```
Check container status:
```
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e353becd50f4 dnstrike:0.1.0 "python3 resolver.py…" 23 seconds ago Up 22 seconds (healthy) 0.0.0.0:53->55053/udp dnstrike
```
Test:
```bash
dig @127.0.0.1 1-2-3-4.bind.localhost
```
Expected output:
```
;; QUESTION SECTION:
;1-2-3-4.bind.localhost. IN A
;; ANSWER SECTION:
1-2-3-4.bind.localhost. 60 IN A 1.2.3.4
;; Query time: 3 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Aug 07 00:47:58 +03 2022
;; MSG SIZE rcvd: 56
```
## Self-Host
Requirements: domain name, VPS or any available machine.
Create NS records so they will point to the resolver, example configuration:
```
Type: A, Name: ns1, Data:
Type: A, Name: ns2, Data:
Type: NS, Name: anything you want, Data: ns1.
Type: NS, Name: anything you want, Data: ns2.
```
## Tests
```bash
make test
```
Expected output:
```
Ran 7 tests in 0.007s
OK
```