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
import subprocess | |
f = open("hosts.txt", "r") | |
for line in f.readlines(): | |
ip=line.strip() | |
report='masscan-' + ip + '.xml' | |
subprocess.call(['./masscan',ip,'-p0-65535','--rate','100','-oX',report]) | |
ip="" | |
report="" |
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
###################################### | |
# Enumerating Service Vulnerabilities | |
###################################### | |
# Returns services with unquoted paths that also have a space in the name. | |
Get-UnquotedService | |
# Returns services where the current user can write to the service binary path or its config. | |
Get-ModifiableServiceFile | |
# Returns services the current user can modify. |
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
################################### | |
# Domain Enumeration | |
################################### | |
# Get SID for the current domain. | |
Get-DomainSID | |
# Get object of another domain. | |
Get-Domain -Domain domain.local | |
# Get domain controllers for the current/specified domain. |
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
Function Get-SystemInfo { | |
<# | |
.SYNOPSIS | |
Retrieves key system version and model information from one to ten computers. | |
.DESCRIPTION | |
Get-SystemInfo uses Windows Management Instrumentation (WMI) to retrieve information from one or more computers. | |
Specify computers by name or by IP address. | |
.INPUTS |
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
Function Get-SystemInfo { | |
<# | |
.SYNOPSIS | |
Retrieves key system version and model information from one to ten computers. | |
.DESCRIPTION | |
Get-SystemInfo uses Windows Management Instrumentation (WMI) to retrieve information from one or more computers. | |
Specify computers by name or by IP address. | |
.INPUTS |
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
Function Get-PSHComputerSystemData{ | |
[cmdletBinding()] | |
param( | |
[Parameter( Mandatory=$True, | |
ValueFromPipeline=$True)] | |
[string []] $ComputerName, | |
[string] $ErrorLog = 'C:\Users\Public\errLab.txt', | |
[switch] $LogError | |
) |
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
function <name> { | |
[cmdletBinding()] | |
param( | |
) | |
BEGIN{} | |
PROCESS{} | |
END{} | |
} |
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
.NET: | |
----- | |
- C# Programming Yellow Book by Rob Miles | |
Powershell: | |
----------- | |
- Learn Windows PowerShell in a Month of Lunches 3rd Edition by Donald W. Jones (Author), Jeffrey Hicks (Author) | |
- Learn PowerShell Scripting in a Month of Lunches 1st Edition by Don Jones (Author), Jeffery Hicks (Author) | |
Python: |
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
<Subscription xmlns="http://schemas.microsoft.com/2006/03/windows/events/subscription"> | |
<SubscriptionId>Domain Controller Events</SubscriptionId> | |
<SubscriptionType>SourceInitiated</SubscriptionType> | |
<Description>Important Domain Controller Events</Description> | |
<Enabled>True</Enabled> | |
<Uri>http://schemas.microsoft.com/wbem/wsman/1/windows/EventLog</Uri> | |
<ConfigurationMode>MinLatency</ConfigurationMode> | |
<Query> | |
<![CDATA[<QueryList> | |
<Query Id="0" Path="Security"> |