forked from mantvydasb/Red-Team-Infrastructure-Automation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdns.tf
107 lines (97 loc) · 2.72 KB
/
dns.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# c2 redirector A #1
resource "digitalocean_record" "c2-http-rdr-a1" {
domain = "${var.domain-rdir}"
name = "${var.sub1}"
value = "${digitalocean_droplet.c2-http-rdr.ipv4_address}"
type = "A"
ttl = 6020
}
# c2 redirector A #2
resource "digitalocean_record" "c2-http-rdr-a2" {
domain = "${var.domain-rdir}"
name = "${var.sub2}"
value = "${digitalocean_droplet.c2-http-rdr.ipv4_address}"
type = "A"
ttl = 6020
}
# c2 http A #2
resource "cloudflare_record" "c2-http-a1" {
domain = "${var.domain-c2}"
name = "${var.sub3}"
value = "${digitalocean_droplet.c2-http.ipv4_address}"
type = "A"
ttl = 6020
}
# c2 http A #2
resource "cloudflare_record" "c2-http-a2" {
domain = "${var.domain-c2}"
name = "${var.sub4}"
value = "${digitalocean_droplet.c2-http.ipv4_address}"
type = "A"
ttl = 6020
}
# phishing redirector A #1
resource "digitalocean_record" "phishing-rdr-a0" {
domain = "${var.domain-rdir}"
name = "@"
value = "${digitalocean_droplet.phishing-rdr.ipv4_address}"
type = "A"
ttl = 60
}
# phishing redirector A #3
resource "digitalocean_record" "phishing-rdr-a1" {
domain = "${var.domain-rdir}"
name = "${var.sub6}"
value = "${digitalocean_droplet.phishing-rdr.ipv4_address}"
type = "A"
ttl = 60
}
# mail relay A
resource "digitalocean_record" "phishing-rdr-mail-a1" {
domain = "${var.domain-rdir}"
name = "mail"
value = "${digitalocean_droplet.phishing-rdr.ipv4_address}"
type = "A"
ttl = 60
}
# mail relay MX
resource "digitalocean_record" "phishing-rdr-mail-mx" {
domain = "${var.domain-rdir}"
name = "@"
value = "mail.${var.domain-rdir}."
type = "MX"
priority = 5
ttl = 60
}
# mail relay TXT SPF
resource "digitalocean_record" "phishing-rdr-mail-spf" {
domain = "${var.domain-rdir}"
name = "@"
value = "v=spf1 ip4:${digitalocean_droplet.phishing-rdr.ipv4_address} include:_spf.google.com ~all"
type = "TXT"
ttl = 60
}
# mail relay TXT DKIM placeholder
resource "digitalocean_record" "phishing-rdr-mail-dkim" {
domain = "${var.domain-rdir}"
name = "mail._domainkey"
value = "I am DKIM, but change me with the DKIM provided by finalize.sh"
type = "TXT"
ttl = 60
}
# mail relay TXT DMARC
resource "digitalocean_record" "phishing-rdr-mail-dmarc" {
domain = "${var.domain-rdir}"
name = "_dmarc"
value = "v=DMARC1; p=reject"
type = "TXT"
ttl = 60
}
# phishing server
resource "cloudflare_record" "phishing-a1" {
domain = "${var.domain-c2}"
name = "${var.sub6}"
value = "${digitalocean_droplet.phishing.ipv4_address}"
type = "A"
ttl = 120
}