Cylabs
  • 😊Welcome to CyLabs
  • 101 Series
    • Cyber Security 101
      • Introduction to Cyber Security and core concepts
      • Getting Started into Cyber Security Career
      • Online Cybersecurity Practice Labs to Sharpen Your Skills
      • Cyber Security Interview Q&A
        • Careers in Cybersecurity
      • Stay Tuned : Cyber Resources
        • Blogs for Cyber Security
          • Blogs
            • Penetration Testing Automation
            • Security
              • Metasploit Framework
              • Jenkins Servers: Identifying Vulnerabilities and Exploiting Unauthenticated Access with Groovy Scrip
              • Securing Your Network: Printer Vulnerabilities, LDAP Exploits, and Defense Strategies
              • SSH for Red Teaming and Security Analysis
              • Operating Systems for Penetration Testing: Enhancing Your Cybersecurity Arsenal
              • Hacking Notes
                • Phineas Fisher
        • Cyber News
        • Leading Cybersecurity Companies to follow
        • Cybersecurity Courses and Certifications: Trends in 2024
        • ISACs: Enhancing Cybersecurity through Collaboration and Information Sharing
        • Global and National Cybersecurity Agencies: Guardians of the Digital Realm
        • Cyber Security News Feed Resources
    • Kubernetes 101
    • Web 101
    • Operating Systems
      • Linux 101
        • Linux Kernel
        • Basic Commands and Usage
          • Shell Commands
        • Linux File System
        • apt
        • su and sudo
        • File Search
        • Linux Services
        • Networking
          • Netcat
        • Corn Jobs
        • Shell Scripting
        • Linux OS API's
      • Windows 101
        • Windows system calls
        • Windows Event Logs and IDs
        • Windows UAC
        • Windows Registry
        • Windows Bit Locker
        • Volume Shadow Copy Service
        • Windows OS API's
    • Building the Security Lab
      • Virtualization with Virtual Box
        • Installing and setting Virtual Box
        • Vritual Box Networking
      • Home Lab Setup
        • PF Sense Installation
        • Ubuntu Installation
        • Metasploit Installation
        • Kali Linux Installation
    • Fundamentals of Programming
      • Python 101
      • Powershell 101
      • SQL 101
    • AI/ML and Data Science for Cyber Security and Analytics
    • IT Infrastructure and Hardware
    • Governance, Risk and Compliance
    • Networking 101
      • Network Packets and Frames
      • Network Switches and Routers: The Backbone of Connectivity
      • Network Security Devices and Strategies
      • Network Design and Architecture: A Foundation for Robust Connectivity
      • Specialized Network Equipment and Functions
      • Network Traffic Management and Analysis
      • Advanced Networking Concepts
      • ARP and RARP
      • How DNS, HTTP and HTTPS works
      • Understanding the Basics of Networking
  • Introduction to Cyber Security Operations
    • Security Architecture and Engineering
      • Security Controls
        • Preventive
        • Deterrent
        • Detective
        • Corrective
        • Compensating
        • Directive
    • GRC
      • Information Security and Risk Management
        • Risk Management
        • Supply Chain Risk Management
        • Governance
        • Asset Management
        • Cyber Security Road Map
        • Cyber Security Controls
        • Cyber Security Strategy and Architecture
        • Cyber Security Architecture
        • Risk Assessment and Security Questionnaire
        • Ransomware Prevention
        • Gap Assessment
        • Principle of Least Privilege
      • Governance
      • Asset Security
      • Communication and Network Security
      • Identity and Access Management
      • Security Assessment and Testing
      • Security Operations
      • Software Development Security
      • Security Baselines
      • Security Reporting
      • Data Loss Prevention
      • Zero Trust
      • MFA
      • Compliance
    • Security Policies and Procedures
    • Offensive Security
      • Stages of Penetration Testing
    • Cyber Defense
      • Security Operations Center (SOC)
        • SOC Architecture Development with ELK Stack:
      • Different Classes of Threat Actor
    • Security Principles, Controls and Strategies
      • Defense in Depth
      • Least Privilege
      • Zero Trust
  • Cyber Security Assessment
    • Planning and Scoping
      • Security Engagement
      • Security Assessment Questionaire
      • Who Targeting you
    • Reconnaissance
      • Active Recon
        • Tools
          • NMAP
          • Maascan
          • Recon-NG
          • Maltego
          • Spider Foot
          • Whois
          • TraceRoute
          • Amass
          • The Harvester
          • Nslookup
          • DNS Dumpster
          • BloodHound
          • Relay Attacks
          • Packet Crafting
          • NMAP+Proxychains+TOR
      • Passive Reconnaissance
        • Network Sniffing
          • Wireshark
          • TCPDump
        • Whois (online services)
        • EMail Account Enumeration
          • Hunter.io
        • Search Engine Analysis
          • Google Hacking Database
          • Shodan
          • Censys.io
        • Information Disclousre
        • Banner Grabbing
        • HTML Scrapping
        • Certificate Transparency Logs
        • Open Source Intelligence (OSINT)
          • Ship OSINT
          • Social Media
          • Code Repositories
          • Darkweb Analysis
          • DNS
          • Cached Pages
          • Password Dumps
          • Anonymity
    • Enumeration
      • OS Finger Printing
      • Service Discovery
      • Protocol Enumeration
      • DNS Enumeration
      • FTP Service
      • HTTP/HTTPS
      • WMI
      • DCOM
      • RPC Remote Procedure Call
      • Directory Enumeration
      • Host Discovery
      • Share Enumeration
        • SMB
      • Local User Enumeration
      • Email Account Enumeration
      • SSH Service
      • Wireless Enumeration
        • Wigle.net
        • InSSIDer
        • Aircrack-ng
      • Permission Enumeration
      • Secrets Enumeration
        • Passwords
        • Session Tokens
        • Cloud Access Keys
      • Attack Path Mapping
      • VNC
      • Web Application Firewall
      • Wordpress Scan
      • Remote Desktop Protocol
      • SNMP
      • SMTP
      • Web Crawling
        • Platform Plugins
        • Sitemap
        • Robots.txt
      • Active Directory Enumeration
    • Vulnerability Assessment and Management
      • Terminology
      • Vulnerability Database
      • Vulnerability Scoring
        • CWE
        • CVSS
        • CVE
        • EPSS
      • Vulnerability Scan
        • Authenticated vs Unauthenticated Scans
        • OS Security Assessment
        • Tenable
        • Nikto
        • Open VAS
      • Exploit Databases
      • Tools
        • Tenable.IO
        • Open VAS
    • Exploitation
      • Attack Surface and Target Prioritization
        • High Valued Assets and Identification
        • Vulnerability Metrics
        • End of Life Softwares
        • Default Configuration
        • Running Services
        • Vulnerable Encryption Methods
        • Defensive Capabilities
        • Attack Path
      • Attack Types
        • Network Attacks
          • Virtual LAN Hopping
          • Packet Crafting
            • Attacks Scenario
          • Default Credentials
          • On-Path / Man in the Middle Attacks
          • Certificate Services Attacks
      • Host Based Attacks
        • Privilege Escalation
        • Credential Dumping
        • Shell Escape
        • UAC Bypass
        • Payload Obfuscation
        • Endpoint Security Bypass
        • Process Hallowing
        • Log Tampering
        • DLL Injection
        • Service Path Injection
      • Authentication Attacks
        • LDAP Injection
        • SAML Attacks
        • Open ID Connect Attacks
        • Dictionary Attacks
        • Credential Stuffing
        • MFA Fatigue
        • Pass the Hash attacks
        • Kerberos Attacks
        • Pass the Ticket Attacks
      • Vulnerable Encryption Methods
      • Tools
        • Metsploit
        • Netcat
        • LOLbins
        • Mimikatz
        • Rubeus
        • Certify
        • AD Search
        • Powerview
        • SeaBelt
        • Evil winRM
        • PSEXEC
        • Powersploit
        • Metasploit
        • Impacket
        • Responder
        • CrackMapExec
        • Msfvenom
        • Responder
        • Searhsploit
        • Powersploit
      • Password Attacks
        • Password Cracking
        • Password Spraying
        • Tools
          • Medusa
          • Burpsuite
          • John the Ripper
          • Hydra
          • Hashcat
        • Password Attacks
    • Lateral Movement
      • Relay Creation
      • String Searches
      • Service Discovery
      • Tunneling
        • SSH Tunneling
      • Pivoting
      • Exfiltration
        • DNS
        • HTTPS
        • EMail
        • Cloud Storage
      • Tools
        • sshuttle
        • Page 1
    • Post Exploitation
      • Persistance
        • Scheduled Taks
        • Bind Shell
        • Registry Keys
        • C2 Frameworks
        • Tampering Security Controls
        • Back Door
          • Trojan
          • Root Kit
          • Web Shell
        • Searching Valid Account Credetials
        • New Account Creation
        • Reverse Shell
        • Service Creation
        • Cron Jobs
      • Command and Control
    • Reporting
  • Cybersecurity Frameworks and Standards
    • CREST
    • CIS
    • NIST Publications
      • NIST SP 800-171
      • NIST CSF
      • NIST SP 800-115
    • MITRE
      • MITRE D3FEND
      • MITRE ATT&CK
    • Penetration Testing Execution Standard (PTES)
    • OWASP Top 10
    • Purdue Model
    • Open Source Security Testing Methodology Manual (OSSTMM)
    • Council of Registered Ethical Security Testers (CREST)
    • Zero Trust
    • CMMC
    • Threat Modeling Frameworks
      • STRIDE
      • OCTAVE
      • DREAD
    • Mitigation Strategies
      • Network Segmentaion
      • Access Control
      • Application Control
      • Isolation Techniques
      • Default Password Changes
      • Host based firewall
      • Protocol blocking
      • Port blocking
      • Host based intrusion prevention
      • Endpoint Management
      • Decommissioning
      • Configuration Management
      • Least Privilege
      • Logging
      • Monitoring
      • Encryption
      • Patching
    • Security Governance
      • Data and System: Roles and Responsiblities
      • Security Policies
        • Access Use Policy
      • Security Standards
        • Access Control
        • Encryption
        • Password
      • Security Procedures
        • Change Management
  • Security Domains
    • Security Designing
    • Application Security
      • Cryptographic Attacks
      • Password Attacks
      • Web Application Security
        • Enumeration
          • Cookie and Header Security Review
        • Bruteforce Attack
        • Directory Traversal
        • Insecure Direct Object Reference (IDOR)
        • Session Hijacking
        • File Inclusion Attacks
          • LFI
          • Webshell
          • RFI
        • Server-Side Request Forgery (SSRF)
        • Deserialization Attacks
        • Command Injection
        • Server Side Template Injection
        • Cross Site Scripting (XSS)
        • SQL Injection
          • Union Based SQL Injection
          • Blind SQL Injection
        • Cross-Site Request Forgery (CSRF)
        • XML External Entity (XXE)
        • File Upload Vulnerabilites
        • Remote Code Execution (RCE)
        • Tools
          • Hetty
      • OWASP TOP 10 API
        • API Abuse
        • JWT Token manipulation
        • Graph QL security
        • API security
      • OWASP Top 10 Mobile
      • OWASP Top 10 IOT
      • Web Application Security
        • Getting Started in BugBounty Hutning
        • Subdomain Enumeration
        • Subdomain Takeover: Understanding the Risks and Prevention
        • Tools and Technologies
      • Microservices
      • WPscan
        • Burpsuite
        • Ffuf
        • Gobuster
        • Postman
        • Dirbuster
        • Wfuzz
        • ZAP
      • Tools
        • BurpSuite
        • SQLmap
    • Cloud Security
      • Metadata Service Attacks
      • IAM misconfigurations
      • Tools
        • Pacu
        • Prowler
        • Scoutsuite
        • Docker Bench
      • Container Escape
      • Workload Runtime Attacks
      • Supply Chain Attacks
      • Misconfigurations
        • Network Segmentation
        • Network Controls
        • IAM Credentials
        • Public Access to Services
        • Exposed Storage Buckets
        • Logging Information Exposure
      • Azure Security : Components and Assessment Guide
        • Azure Security Assessment Tools : Installation and usuage
    • Identity and Access Management
    • Cloud Security
      • Cloud Engineering and Architecture concepts
      • Cloud Data Security
      • Cloud Platform and Infrastructure Security
      • Cloud Application Security
      • Cloud Security Operations
      • Cloud Legal, Risk and Compliance
      • Azure Security
      • Azure Pentest
    • DevSecOps
      • Static Application Security Testing (SAST)
        • Code Quality
        • CheckMarx
        • Sonarqube
          • Sonarqube Installation using Helm Chart on AKS
      • Interactive Application Security Testing (IAST)
      • Dynamic Application Security Testing (DAST)
      • SCA
      • Wazuh SIEM and XDR
        • Wazuh on Azure AKS
        • Azure + Argo
      • DevSecOps
    • Social Engineering
      • Vishing
      • Spearphishing
      • Smishing
      • Eavesdropping
      • Impersonation
      • Watering Hole
      • Shoulder Surfing
      • Whaling
      • Phishing
      • Tools
        • GoPhish
        • Beef
        • Evilginx
        • SET social engineering toolkit
    • DevOps
      • Kubernetes
        • Kubernetes Architecture and Components
        • Mastering kubectl: The Command Line Interface for Kubernetes
        • Overview of Kubernetes Tools and Utilities
        • Container vs Pod vs Deployment
        • Kubernetes and Docker Swarm
        • Deploying a Kubernetes Cluster Using Minikube
        • Deploying a Kubernetes Cluster Using Kind
        • Integrating Kubernetes with Azure Key Vault
        • Containers vs Virtual Machines
        • Comprehensive Guide to Kubernetes Security and Analysis Tools
        • Monitoring Kubernetes with Prometheus and Grafana
        • Introduction to Azure Kubernetes Service (AKS) and Deploying Your First Cluster
        • Kubernetes Persistence with Backend Databases
        • Kubernetes StatefulSet vs. Deployment
        • DevSecOps Architecture for Kubernetes
      • Docker
      • Helm
        • Scenario : Configuring Azure Key Vault and Using Secrets in Helm Deployments
      • Git Ops
        • Argo CD
      • Git and Versioning
      • Terraform
      • Virtualization
    • Mobile Security
      • Android Mobile App Security Assessment
      • Suspicious Malware App Analysis
      • Android App Penetration Testing
      • Permission Abuse
      • Jailbreak/Rooting
      • Tools
        • MobSF
        • Drozer
        • Frida
    • IOT/OT/SCADA
      • Power Supply
        • Juice Jacking
      • RFID
      • Bluetooth
        • BlueJacking
        • Bluetooth Spamming
      • Ports and Services
      • Port Mirroring
      • Modbus Attack
      • CAN Bus Attack
      • Replay Attack
      • Memory Registry Attacks
      • Tools
        • BlueCrack
        • Scapy
        • TCP Replay
    • Network Security
      • Network Attacks
        • DNS Attacks
        • DDOS
      • Network Assessment
      • Wireshark
      • Zeek
      • Snort
      • TCPDump
      • Defensive Network
        • Firewalls
        • Intrusion Detection System
    • Wireless Attacks
      • Service Set Identifier (SSID)
      • Wardriving
      • Evil Twin Attack
      • Deauthentication Attacks
      • Signal Jamming
      • Channel Scanning
      • Signal Strength Scanning
      • Tools
        • WiFi Pumpkin
        • AirCrack Ng
        • Kismet
    • Purple Teaming
      • Tools
        • Infection Monkey
        • Atomic RedTeam
        • Caldera
    • Kubernetes Security
      • AKS Security
      • Kube-Hunter
      • KubeEscape
    • Hardware Security
    • Container Security
      • Grype
      • Trivy
      • Clair
    • AI
      • LLM (Large Language Models)
      • Prompt Engineering
      • AI Cyber Security Risk Management
        • AI Policies
      • AI Security
      • AI Attacks
        • Prompt Injection
        • Model Manipulation
      • Security Frameworks
        • MITRE ATLAS
        • OWASP Top 10 LLMs
        • NIST AI Risk Management Framework
    • Reverse Engineering
      • Scenarios
        • Browser Plugin
        • PDF document
        • Word Doc
        • Windows Binary File
        • Mobile App
      • Buffer Overflow
  • Operational Security
    • Identity and Access Management
      • Identity
      • Authentication
      • Accountability
      • Access Management
      • Authorization
      • Access Controls
    • Deception Technology
      • Honeypot
      • Honeynet
      • Honeyfile
      • Honey Token
    • Cryptography
      • Data at Rest
      • Data at Transit
      • Hashing
      • BlockChain
      • Digital Signatures
      • Certificates
      • Encryption
        • Public Key Infrastructure (PKI)
          • Public Key
          • Private Key
        • Tools
      • Certification Preparation
        • Penetration Testing
        • GRC and Audit
    • File Integrity Monitoring
    • Data Security
      • DLP
    • Change Management
      • Impact Analysis
    • Malware Analysis
      • Malware Analysis Tool
      • Malware Analysis Books
      • university courses and resources related to malware analysis
      • Binary Analysis
    • Data Loss Prevention
    • Threat Modeling
      • Attack Surface Management
        • Introduction
      • Threats, Technologies, Procedures
        • Threat Actors
      • Threat Hunting
        • Indicators of Compromise
      • Threat Assessment
        • Threat Modeling
          • OCTAVE
          • DREAD
          • STRIDE
        • Threat Hunting
          • Threat Hunting Blogs
          • Ransomware: An Overview
          • Threat Hunting and Incident Response Q&A
          • Network Traffic Analysis: Wireshark
          • Threat Hunting Questionnaire
          • KQL
          • Email Header Analysis
          • TH
          • Windows Process Exploration
        • Threat Intelligence
          • Threat Intelligence Tools and Techniques
            • Yara
      • Malware Attacks
    • Digital Forensics
      • Network Forensics
      • Forensic Tool Analysis
      • Data Recovery
    • Endpoint Management
    • SOC/SOAR
      • Threat hunting scenarios
      • Log Management
        • AWS VPC flow log analysis
        • Linux Logs
        • Windows Logs
    • Ransomware Prevention
      • APT Groups
    • Security Automation
      • C
      • Powershell
      • Python
      • C++
      • GO
      • Rust
    • Incident Response
      • Scenarios
        • Windows : No Event Logs
      • Tools
        • Chainsaw
    • Defensive Security Controls
    • Physical Security
      • Physical Attacks
        • USB (Universal Serial Bus)
        • Tailgating
        • Lock Picking
        • RFID Cloning
          • Badge Cloning
    • Personal Security
    • Security Awareness and Training
    • Firewall
    • Network Access Control
    • Intrusion Detection System
    • Intrusion Prevention System
    • Operating System Security
    • Secure Protocol Usuage
    • Business Continuity
    • Email Security
    • DNS Filtering
    • user behaviour analytics
    • Host Security
    • Mobile Device Security
    • Change Management
    • Vulnerability Management
      • Vulnerability Assessment
        • Vulnerability Analysis
      • Types of Vulnerabilites
    • Penetration Testing/Red Teaming
    • Disaster Recovery
    • Logging and Monitoring
      • Monitoring
        • Systems
        • Infrastructure
        • Applications
      • Logging
        • Log Data
          • Application Logs
          • Network Logs
          • WAF Logs
          • IDS/IPS logs
          • OS logs
          • Endpoint Logs
          • Firewall Logs
        • Alerting
        • Log Aggregation
      • Tools
    • Endpoint
    • Security Metrics
  • Industry Specific Security:Case Studies
    • Aviation Security
      • The Integral Role of Airports in National Security : Operations Perspective
      • Cyber Attacks on Airports
      • Navigating the Complex Web of Airport Operations: Key Components and Leading Industry Providers
    • Aviation Security
  • Computational Science
    • Quantum Computing
      • Quantum Computing: Unleashing the Power of Qubits
    • Probability
  • Data Engineering
  • AI/ML and Data Science
    • Installation
      • Ollama
    • Machine Learning
    • Large Language Models (LLM)
    • Security Analytics
    • Untitled
      • Roles and Responsibilites
      • Azure AI Services
        • AI Services Security
        • Monitoring Azure AI Services
        • AI services on containers
  • Application Development
    • Django
  • Radom Topics :)
    • CSA WAI
  • CISSP
Powered by GitBook
On this page

Was this helpful?

  1. Operational Security
  2. Threat Modeling
  3. Threat Assessment
  4. Threat Hunting

KQL

#chinese

DeviceEvents

| where ActionType == "ProcessCreate"

| where (ProcessCommandLine contains "certutil" or ProcessCommandLine contains "ntdsutil" or ProcessCommandLine contains "xcopy")

| project Timestamp, DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine, InitiatingProcessParentFileName, ProcessCommandLine, AccountDomain

# WMI spawning

DeviceProcessEvents

| where InitiatingProcessFileName in~ ("winword.exe", "excel.exe", "outlook.exe")

and FileName =~"wmic.exe"

#deleteing shadow copies

DeviceProcessEvents

| where FileName =~ "wmic.exe"

| where ProcessCommandLine has "shadowcopy" and ProcessCommandLine has "delete"

| project DeviceId, Timestamp, InitiatingProcessFileName, FileName,

ProcessCommandLine, InitiatingProcessIntegrityLevel, InitiatingProcessParentFileName

DeviceProcessEvents

| where SHA256 has_any ('d4f545691c8441b5bcb86535b1d0fd16dc06786eb4080087588cd4d0f388d5ca',

'882d95bdbca75ab9d13486e477ab76b3978e14d6fca30c11ec368f7e5fa1d0cb',

'8ac52ca0792baf2a4075fe7c68e5cbe2262da604e2fcdfb9b39656430925c168',

'3771846f010fcad26d593ea3771bee7cf3dec4d7604a8c719cef500fbf491820',

'3033913c51e0bf9a13c7ad2d5a481e174a1a3f19041c339e6ac900824793a1c6',

'095fbb7685f5ad054bab28346d744e137564beabc33c13a25818936ddc739f5b',

)

DeviceNetworkEvents

| where RemoteUrl contains "amazonaws.com/package/update.js"

DeviceNetworkEvents

| summarize Port= count() by RemotePort

| sort by Port

| where RemotePort <1024

DeviceNetworkEvents

| summarize Port= count() by RemotePort

| where RemotePort <10000

| sort by Port desc

DeviceNetworkEvents

| summarize Rurl= count() by RemoteUrl

| sort by Rurl desc

DeviceNetworkEvents

| summarize ProcessName = count() by InitiatingProcessFileName

| sort by ProcessName desc

DeviceNetworkEvents

| summarize ProcessName = count() by InitiatingProcessCommandLine

| sort by ProcessName asc

DeviceNetworkEvents

| summarize ProcessName = count() by InitiatingProcessFolderPath

| sort by ProcessName desc

DeviceLogonEvents

| where IsLocalAdmin == true and LogonType != 'RemoteInteractive'

| extend IsLocalLogon = tobool(todynamic(AdditionalFields).IsLocalLogon)

| where IsLocalLogon==false

DeviceProcessEvents

| where InitiatingProcessFileName == "ONENOTE.EXE" and not( FileName in~ ('protocolhandler.exe','notepad.exe','Teams.exe','powerpnt.exe','ai.exe','msedge.exe','msedgewebview2.exe','chrome.exe','firefox.exe','opera.exe','acrobat.exe','brave.exe','iexplore.exe','winword.exe','excel.exe' ,'AcroRd32.exe','ONENOTEM.EXE','OUTLOOK.EXE','ONENOTE.EXE','splwow64.exe'))

DeviceProcessEvents

| where Timestamp >= ago(10d)

| where InitiatingProcessFileName in~ ("sqlservr.exe", "sqlagent.exe",

"sqlps.exe", "launchpad.exe")

| summarize tostring(makeset(ProcessCommandLine))

by DeviceId, bin(Timestamp, 2m)

| where

set_ProcessCommandLine has "certutil" or

set_ProcessCommandLine has "netstat" or

set_ProcessCommandLine has "ping" or

set_ProcessCommandLine has "sysinfo" or

set_ProcessCommandLine has "systeminfo" or

set_ProcessCommandLine has "taskkill" or

set_ProcessCommandLine has "wget" or

set_ProcessCommandLine has "whoami" or

set_ProcessCommandLine has "Invoke-WebRequest" or

set_ProcessCommandLine has "Copy-Item" or

set_ProcessCommandLine has "WebClient" or

set_ProcessCommandLine has "advpack.dll" or

set_ProcessCommandLine has "appvlp.exe" or

set_ProcessCommandLine has "atbroker.exe" or

set_ProcessCommandLine has "bash.exe" or

set_ProcessCommandLine has "bginfo.exe" or

set_ProcessCommandLine has "bitsadmin.exe" or

set_ProcessCommandLine has "cdb.exe" or

set_ProcessCommandLine has "certutil.exe" or

set_ProcessCommandLine has "cl_invocation.ps1" or

set_ProcessCommandLine has "cl_mutexverifiers.ps1" or

set_ProcessCommandLine has "cmstp.exe" or

set_ProcessCommandLine has "csi.exe" or

set_ProcessCommandLine has "diskshadow.exe" or

set_ProcessCommandLine has "dnscmd.exe" or

set_ProcessCommandLine has "dnx.exe" or

set_ProcessCommandLine has "dxcap.exe" or

set_ProcessCommandLine has "esentutl.exe" or

set_ProcessCommandLine has "expand.exe" or

set_ProcessCommandLine has "extexport.exe" or

set_ProcessCommandLine has "extrac32.exe" or

set_ProcessCommandLine has "findstr.exe" or

set_ProcessCommandLine has "forfiles.exe" or

set_ProcessCommandLine has "gpscript.exe" or

set_ProcessCommandLine has "hh.exe" or

set_ProcessCommandLine has "ie4uinit.exe" or

set_ProcessCommandLine has "ieadvpack.dll" or

set_ProcessCommandLine has "ieaframe.dll" or

set_ProcessCommandLine has "ieexec.exe" or

set_ProcessCommandLine has "infdefaultinstall.exe" or

set_ProcessCommandLine has "installutil.exe" or

set_ProcessCommandLine has "makecab.exe" or

set_ProcessCommandLine has "manage-bde.wsf" or

set_ProcessCommandLine has "mavinject.exe" or

set_ProcessCommandLine has "mftrace.exe" or

set_ProcessCommandLine has "microsoft.workflow.compiler.exe" or

set_ProcessCommandLine has "mmc.exe" or

set_ProcessCommandLine has "msbuild.exe" or

set_ProcessCommandLine has "msconfig.exe" or

set_ProcessCommandLine has "msdeploy.exe" or

set_ProcessCommandLine has "msdt.exe" or

set_ProcessCommandLine has "mshta.exe" or

set_ProcessCommandLine has "mshtml.dll" or

set_ProcessCommandLine has "msiexec.exe" or

set_ProcessCommandLine has "msxsl.exe" or

set_ProcessCommandLine has "odbcconf.exe" or

set_ProcessCommandLine has "pcalua.exe" or

set_ProcessCommandLine has "pcwrun.exe" or

set_ProcessCommandLine has "pcwutl.dll" or

set_ProcessCommandLine has "pester.bat" or

set_ProcessCommandLine has "presentationhost.exe" or

set_ProcessCommandLine has "pubprn.vbs" or

set_ProcessCommandLine has "rcsi.exe" or

set_ProcessCommandLine has "regasm.exe" or

set_ProcessCommandLine has "register-cimprovider.exe" or

set_ProcessCommandLine has "regsvcs.exe" or

set_ProcessCommandLine has "regsvr32.exe" or

set_ProcessCommandLine has "replace.exe" or

set_ProcessCommandLine has "rundll32.exe" or

set_ProcessCommandLine has "runonce.exe" or

set_ProcessCommandLine has "runscripthelper.exe" or

set_ProcessCommandLine has "schtasks.exe" or

set_ProcessCommandLine has "scriptrunner.exe" or

set_ProcessCommandLine has "setupapi.dll" or

set_ProcessCommandLine has "shdocvw.dll" or

set_ProcessCommandLine has "shell32.dll" or

set_ProcessCommandLine has "slmgr.vbs" or

set_ProcessCommandLine has "sqltoolsps.exe" or

set_ProcessCommandLine has "syncappvpublishingserver.exe" or

set_ProcessCommandLine has "syncappvpublishingserver.vbs" or

set_ProcessCommandLine has "syssetup.dll" or

set_ProcessCommandLine has "te.exe" or

set_ProcessCommandLine has "tracker.exe" or

set_ProcessCommandLine has "url.dll" or

set_ProcessCommandLine has "verclsid.exe" or

set_ProcessCommandLine has "vsjitdebugger.exe" or

set_ProcessCommandLine has "wab.exe" or

set_ProcessCommandLine has "winrm.vbs" or

set_ProcessCommandLine has "wmic.exe" or

set_ProcessCommandLine has "xwizard.exe" or

set_ProcessCommandLine has "zipfldr.dll"

| sort by DeviceId , Timestamp asc

DeviceProcessEvents

| where InitiatingProcessFileName == InitiatingProcessCommandLine

| where ProcessCommandLine has_any (

"whoami /all","cmd /c set","arp -a","ipconfig /all","net view /all","nslookup -querytype=ALL -timeout=10",

"net share","route print","netstat -nao","net localgroup")

| summarize dcount(FileName), make_set(ProcessCommandLine) by DeviceId,bin(Timestamp, 1d), InitiatingProcessFileName, InitiatingProcessCommandLine

| where dcount_FileName >= 8

// The query finds attempts to list users or groups using Net commands

DeviceProcessEvents

| where Timestamp > ago(30d)

| where FileName == 'net.exe' and AccountName != "" and ProcessCommandLine !contains '\\' and ProcessCommandLine !contains '/add'

| where (ProcessCommandLine contains ' user ' or ProcessCommandLine contains ' group ') and (ProcessCommandLine contains ' /do' or ProcessCommandLine contains ' /domain')

| extend Target = extract("(?i)[user|group] (\"*[a-zA-Z0-9-_ ]+\"*)", 1, ProcessCommandLine) | filter Target != ''

| project AccountName, Target, ProcessCommandLine, DeviceName, Timestamp

| sort by AccountName, Target

// Find attempts to stop processes using net stop

DeviceProcessEvents

| where Timestamp > ago(30d)

| where FileName =~ "net.exe" and ProcessCommandLine has "stop"

| summarize netStopCount = dcount(ProcessCommandLine), NetStopList = make_set(ProcessCommandLine) by DeviceId, bin(Timestamp, 2m)

| where netStopCount > 10

DeviceProcessEvents

| where FileName == "batloader.exe"

| extend InitiatingProcessFileName = InitiatingProcessFileName

| where InitiatingProcessFileName in ("cmd.exe", "powershell.exe", "regsvr32.exe")

| summarize DeviceId = DeviceId, InitiatingProcessFileName = InitiatingProcessFileName by FileName

DeviceProcessEvents

| where ProcessCommandLine contains "route -p ADD"

DeviceNetworkEvents

| where RemoteUrl contains "edex-beta.unidata.ucar.edu"

DeviceNetworkEvents

| where RemoteUrl contains "api."

| where not(RemoteUrl contains "microsoft" or RemoteUrl contains "azure"or RemoteUrl contains "amazon")

| summarize Count = count() by RemoteUrl

| sort by Count desc

DeviceNetworkEvents

| where RemoteUrl contains "api.dfwairport"

| summarize Count = count() by RemoteUrl

| sort by Count desc

DeviceEvents

| where DeviceId == "28bacf007232ea3f8ba2e8459307f76526d42071"

| where ActionType contains "ScheduledTask"

let EncodedList = dynamic(['-encodedcommand', '-enc']); // -e and -en can also be added, be aware of FPs

let ReconVariables = dynamic(['Get-ADGroupMember', 'Get-ADComputer', 'Get-ADUser', 'Get-NetGPOGroup', 'net user', 'whoami', 'net group', 'hostname', 'netsh firewall', 'tasklist', 'arp', 'systeminfo']);

let TimeFrame = 48d; //Customizable h = hours, d = days

DeviceProcessEvents

| where Timestamp > ago(TimeFrame)

| where ProcessCommandLine contains "powershell" or InitiatingProcessCommandLine contains "powershell"

| where ProcessCommandLine has_any (EncodedList) or InitiatingProcessCommandLine has_any (EncodedList)

| extend base64String = extract(@'\s+([A-Za-z0-9+/]{20}\S+$)', 1, ProcessCommandLine)

| extend DecodedCommandLine = base64_decode_tostring(base64String)

| extend DecodedCommandLineReplaceEmptyPlaces = replace_string(DecodedCommandLine, '\u0000', '')

| where isnotempty(base64String) and isnotempty(DecodedCommandLineReplaceEmptyPlaces)

| where DecodedCommandLineReplaceEmptyPlaces has_any (ReconVariables)

| project

Timestamp,

ActionType,

DecodedCommandLineReplaceEmptyPlaces,

ProcessCommandLine,

InitiatingProcessCommandLine,

DeviceName,

AccountName,

AccountDomain

DeviceEvents

| where ActionType == 'AsrVulnerableSignedDriverBlocked'

| distinct FolderPath, FileName, DeviceId

| summarize deviceCount = count() by FolderPath, FileName

| join (DeviceEvents| where ActionType == "AsrVulnerableSignedDriverBlocked"| summarize ruleCount = count() by FolderPath, FileName) on $left.FolderPath == $right.FolderPath and $left.FileName == $right.FileName

| project FolderPath, FileName, deviceCount, ruleCount

| order by ruleCount desc

DeviceEvents

| where ActionType startswith 'asr'

| distinct ActionType, DeviceId

| summarize deviceCount = count() by ActionType

| join (DeviceEvents | where ActionType startswith 'Asr' | summarize ruleCount = count() by ActionType) on $left.ActionType == $right.ActionType

| project ActionType, deviceCount, ruleCount

DeviceNetworkEvents

| where RemoteIP in ("37.220.87.69", "94.142.138.4", "99.230.89.236", "144.76.173.247", "3.142.81.166", "3.141.177.1", "94.142.138.61", "37.221.93.196", "2.57.122.154", "146.70.45.213", "146.70.45.212", "51.81.155.128", "45.14.227.137", "47.89.189.43", "138.199.63.93", "103.172.41.208", "47.90.254.4", "192.145.124.4", "164.92.205.166", "103.165.168.142", "163.172.83.95", "172.98.87.184", "173.231.16.77")

DeviceProcessEvents

| where ActionType == "ProcessCreate" and FileName == "rundll32.exe"

| extend CommandLine = extract(".*\"(.*)\".*", 1, ProcessCommandLine)

| where CommandLine contains "RestartManager" or CommandLine contains "RegisterApplicationRestart"

| project Timestamp, DeviceName, FileName, ProcessCommandLine

| order by Timestamp desc

EmailEvents

| where NetworkMessageId in ("8f71c3b4-d18b-49ba-4a9f-08db5596bf99","72725b7e-9a3f-4bf6-9031-08db5593d7f4","04ed6e5d-1cb4-48dc-c889-08db559437d7","a52ce6f6-6d3a-42ab-2dde-08db55b49601","37ffb799-b873-4469-c53e-08db55aaee96","9312d239-7dc0-411e-06f6-08db55ac4e25","7f0e0a93-50ef-4713-8fb2-08db55b558cd","c02d8af0-f778-4098-7ec9-08db55ace635","f1ebc63f-279b-4b34-d392-08db55ab47e0","b028bc08-d720-4084-b8ed-08db55abd090","7caef4cf-f820-4a2a-8f3c-08db55b4f033","f3737190-321b-410b-1d8a-08db55abb435","a9606500-11fa-4522-6a16-08db55b481c2","198ad17e-b67c-4161-1278-08db55b4a310")

| take 100

PreviousThreat Hunting QuestionnaireNextEmail Header Analysis

Last updated 1 year ago

Was this helpful?

set_ProcessCommandLine has "" or

ftp.exe