Saturday, May 16, 2015

Batch Script for Windows to Disable Firewall, start Terminal Services, and Create a User

I wrote the following batch script for windows to disable the firewall, start terminal services and create a new local user.  I have tested this on Windows Server 2008.

@echo off

netsh firewall set opmode disable

reg add "hklm\system\currentControlSet\Control\Terminal Server" /v "AllowTSConnections" /t REG_DWORD /d 0x1 /f

reg add "hklm\system\currentControlSet\Control\Terminal Server" /v "fDenyTSConnections" /t REG_DWORD /d 0x0 /f

sc config TermService start=auto

net start TermService

net user /add dalma iamin538!

net localgroup administrators dalma /add

No comments:

Post a Comment

Test Authentication from Linux Console using python3 pexpect

Working with the IT420 lab, you will discover that we need to discover a vulnerable user account.  The following python3 script uses the pex...