This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$b64UnicornImage = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEACAgICAiICQoKCQyNjA2MkpEPj5ESnBQVlBWUHCqanxqanxqqpa2lIqUtpb/1Ly81P////j///////////////8BICAgICIgJCgoJDI2MDYySkQ+PkRKcFBWUFZQcKpqfGpqfGqqlraUipS2lv/UvLzU////+P/////////////////CABEIAu0B9AMBIgACEQEDEQH/xAAaAAADAQEBAQAAAAAAAAAAAAAAAQIDBAUG/9oACAEBAAAAAO5tjYAYxVRj25Kelcz15N9sK6sOXq04HtgaRK0zjr0AQkkkbsbGxhxdmGPpb+N1x1+ceivL9rDyPZPH9Hs4OH215HqHnY+ueZ6evkbsEJJIW7GNtjfne1n43vebteXd4z9j5H6XD0PG9nzo9Tz+/wAnq6fJ338Lp7dfM+g4HhqCSQkLZjGU2zm6dvn/AKTg3WXd4z9jCef0fI9ePD9/x8d+zfytd/K7514Pf4L5dhISQkasYxum55tvN+g83cju8Z+x8p9Hzej43sefHqef3+T1dPlbb8W6vg97ztcNUhISAsbGynQubTg9zPhvsvyX6/g9/VXie750ejOvge5Xib9fNpGnne/lw7VCQJIGxsbHTHwz2cRoZnfjzdmGSvItTVwZZdXe+A6eQ265gEITbQ88B0SXmKqIRd5NXlZfTw6Q7OYq6ysi0wizO3fQUQHL6XEd+vje3x3hfZ4tepnwexzcnZh3+T6kedj7HN2eJ655HucfRXld+/m9+OOnT5Ps+bHfr43Y28Ec3p8Nb9fB6XidR6GHnx7J4H0PnbXj3eV6eXnYe943Xh2Pj9XLQ8nr6uD0ebij0fA+n8g79vH7m3zyc3p8T36uD0/ntezvjyul153vcN3j3eV6eXlZfQeGb9l8HrZLXyfR4MvVz4p7/C+m8k7tfG9EdcqOb08J338z1/O6uXo6fE7sdeL2+Gd47PH9bk5eD6Tg9Dx/SPN9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put your network device into monitor mode | |
# Turn off Int | |
Set interface down | |
sudo ip link set wlan0 down | |
# Set monitor mode | |
iwconfig wlan0 mode monitor | |
# Turn up interface | |
ip link set wlan0 up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################## | |
# MODULES # | |
############################################## | |
# Download the Free GeoIP DB | |
# https://lite.ip2location.com/file-download | |
# https://lite.ip2location.com/download?id=9 | |
# https://gallery.technet.microsoft.com/scriptcenter/List-the-IP-addresses-in-a-60c5bb6b | |
import-module .\Get-IPrange.ps1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Random Exchange Commands | |
# View free space on each DB | |
Get-MailboxDatabase -Status | sort name | select name,@{Name='DB Size (Gb)';Expression={$_.DatabaseSize.ToGb()}},@{Name='Available New Mbx Space Gb)';Expression={$_.AvailableNewMailboxSpace.ToGb()}} | |
# Check Exchange Servers Service Health | |
Test-ServiceHealth | |
# Return list of Databases (Name, Server, isMounted) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Display all the passwords stored in the Windows Credential Manager | |
Function Get-WindowsCredentialManagerPasswords{ | |
[void][Windows.Security.Credentials.PasswordVault,Windows.Security.Credentials,ContentType=WindowsRuntime] | |
$vault = New-Object Windows.Security.Credentials.PasswordVault | |
$vault.RetrieveAll() | % { $_.RetrievePassword();$_ } | |
} | |
Get-WindowsCredentialManagerPasswords |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# UFW Commands to make your life eaiser | |
# Install UFW | |
sudo apt-get update | |
sudo apt-get install ufw | |
# View UFW Status | |
sudo ufw status | |
# Enable UFW |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get List of Users | |
net user | |
# Get List of Local Groups | |
net localgroup | |
# Create user "bmarley" | |
net user /add bmarley S3cretP@ssword /add | |
# Add BMARLEY to local administrators group |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IP Configuration | |
ipconfig /all | |
# Local and DNS Cache | |
ipconfig /displaydns | |
# Show Open Connections | |
netstat -ano | |
# Netstat Loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Default location Windows 2003 | |
%SystemRoot%\System32\Dns | |
# Default location Windows 2008 | |
%SystemRoot%\System32\Winevt\Logs\DNS Server.evtx | |
# Default location of enhanced DNS Windows 2012 R2 | |
%SystemRoot%\System32\Winevt\Logs\Microsoft-Windows-DNSServer%4Analytical.etl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PS Function to parse Nessus Targets | |
function Scrape-NessusTargets{ | |
$nessusFiles = Get-ChildItem -Filter "*.nessus" | |
$allNessusTargets = @() | |
foreach ($file in $nessusFiles){ | |
[xml]$XmlDocument = New-Object System.Xml.XmlDocument | |
[xml]$XmlDocument = Get-Content $file | |
$NessusPreferences = $XmlDocument.NessusClientData_v2.Policy.Preferences.ServerPreferences.preference | |
$targets = $NessusPreferences | ?{$_.name -eq "target"} | %{$_.value} |
NewerOlder