forked from dfirdeferred/Create-Vulnerable-ADDS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHacktiveDNS.ps1
More file actions
24 lines (19 loc) · 950 Bytes
/
HacktiveDNS.ps1
File metadata and controls
24 lines (19 loc) · 950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#################################################################################
# HacktiveDNS.ps1 v1.0 #
# #
# This script is intended to setup DNS Forward to other AD Servers #
# WRITTEN BY: Dev Badlu aka badc0d3, OSCP #
#################################################################################
Param
(
[string]$RemoteADDomainName = 'da.vulndomain.corp',
[string]$RemoteADIP = '192.168.20.3',
[string]$RootDir = 'C:\TM\'
)
# CREATE FOLDER
New-Item -Type Directory -Path $RootDir -Force | Out-Null
# LOG FILE
$TimeVal = Get-Date -UFormat '%Y-%m-%d-%H-%M'
Start-Transcript "$RootDir\HackADTranscript-$TimeVal.txt" -Force
Add-DnsServerConditionalForwarderZone -Name $RemoteADDomainName -MasterServers $RemoteADIP -PassThru
Stop-Transcript