Utilizing Windows PowerShell
for Host-based IDS
Log Monitoring
What is PowerShell
From Wikipedia:
1) Windows PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the .NET Framework.
2) object-oriented interface where you can interact with .NET classes (or COM/WMI objects)
Application Host Console
Scripting Environment
What is PowerShell for?
Advanced Users and Administrators
Windows PowerShell is powerful tool where:
- you can deal with any kind of task,
- as many times as you will be requested to
- reducing repetitiveness by writing & using scripts & modules
- giving best results
- with one tool in use: PowerShell
PowerShell vs CMD
implementing if stats, for while
variables
casts everything
object-oriented
scripts
.NET Framework
extendable
use pipes
adopts all CMD commands
batch
predefined commands
complicated
Verb-Noun cmdlet pattern
Get-Verb
Get-Command -Noun * | select Noun
cmdlet structure
Verb-Noun -Parameter inputValue
Object Oriented Interface
get-process | get -member
get-date | get-member
[ipaddress]$sampleIp = "192.168.1.1" | gm
access properties & and methods
Help System
Get-Help Get-Help
Get-Help Get-Process
help *process
help *event*
help Get-Service -Full
other type of view:
Detailed, Examples
Get-Help cmdlet ("help" alias)
Help is updatable:
Get the latest and greatest help by typing:
"Update-Help"
Command Help
Conceptual Help
Get-Help about_*
The Pipeline
Connecting Commands
Doing Administration
Where-Object
Group-Object
Sort-Object
Select-Object
Doing Administration (2)
ConvertTo-Csv
ConvertTo-Html
ConvertTo-Json
ConvertTo-Xml
Export-Csv
Export-Clixml
Out-File
Compare-Object
Extending the Shell
Create Scripts
Create Modules
Security Concerns
Basic Security cmdlets
Firewall Configuration
Access Control
Event Log access
Security Concerns (2)
Host Intrusion Detection System
Utilizing Windows PowerShell
for Host-based IDS
Log Monitoring
Overview
Overview
Overview
Modules:
LogAnalysis
LogDatabase
Scripts:
ScheduleLogs.ps1
JobScheduler.ps1
LogVisualization.ps1
My Git Hub PowerShell Repository
My Git Hub PowerShell Repository:
http://github.com/greekit/PowerShell