Skip to content

Instantly share code, notes, and snippets.

@agnivesh
agnivesh / discovery.md
Created July 28, 2018 06:40
Nmap scanning strategy

Discovery:

nmap -sn -T4 -oA Discovery 192.168.1.0/24

Generate Live Hosts List:

grep "Status: Up" Discovery.gnmap | cut -f 2 -d ' ' > LiveHosts.txt

Common Ports:

<#
.NOTES
https://go.microsoft.com/fwlink/p/?LinkId=286152
Requirements (Powershell Gallery):
- Install-Module MSOnline
- Install-Module ReportHTML
- Install-Module Microsoft.Online.SharePoint.PowerShell
or Download
  1. What is information security and how is it achieved?
  2. What are the core principles of information security?
  3. What is non-repudiation (as it applies to IT security)?
  4. What is the relationship between information security and data availability?
  5. What is a security policy and why do we need one?
  6. What is the difference between logical and physical security? Can you give an example of both?
  7. What's an acceptable level of risk?
  8. What are the most common types of attacks that threaten enterprise data security?
  9. What is the difference between a threat and a vulnerability?
  10. Can you give me an example of common security vulnerabilities?
# Check and install required modules
$requiredModules = @('AWS.Tools.SecretsManager', 'Microsoft.Graph')
foreach ($module in $requiredModules) {
if (-not (Get-Module -ListAvailable -Name $module)) {
Write-Host "Installing $module module..."
Install-Module -Name $module -Force -Scope CurrentUser
}
Import-Module $module
}