Skip to content

Instantly share code, notes, and snippets.

View yusufozturk's full-sized avatar
🎯
Focusing

Yusuf Ozturk yusufozturk

🎯
Focusing
View GitHub Profile
function Get-RdpLogonEvent
{
[CmdletBinding()]
param(
[Int32] $Last = 10
)
$RdpInteractiveLogons = Get-WinEvent -FilterHashtable @{
LogName='Security'
ProviderName='Microsoft-Windows-Security-Auditing'
@ajpc500
ajpc500 / log-forwarding-with-etw.ps1
Last active June 29, 2023 01:31
Quick-and-dirty PowerShell script to install Sysmon (SwiftOnSecurity config), SilkService and Winlogbeat, and forward logs to HELK based on IP set in environment variable "HELK_IP" (see Line 224).
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$wc = New-Object System.Net.WebClient
if (!(Test-Path "C:\Tools")) {
New-Item -Path "C:\" -Name "Tools" -ItemType "directory"
}
# SYSMON
# Download Sysmon
$SysmonDirectory = "C:\Tools\Sysmon\"
@fentas
fentas / main.go
Created May 26, 2020 07:10
♻ Endless running goroutine. Restart process if it fails. Manage multiple processes.
package main
import (
"log"
// replace right path
"[...]/utils"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)
@guitarrapc
guitarrapc / Get-EtwTraceProvider.ps1
Last active March 22, 2024 09:32
ETW (Event Tracing for Windows) Providers and their GUIDs for Windows 10 x64
#Requires -RunAsAdministrator
#Requires -Version 5.0
# requires Windows 10
Get-EtwTraceProvider | Select-Object SessionName, Guid | sort SessionName
# as Markdown
<#
#Requires -RunAsAdministrator
$result = Get-EtwTraceProvider | sort SessionName
$result | %{"|Name|GUID|";"|----|----|";}{"|$($_.SessionName)|$($_.Guid)|"}
#>