Retour au classement

Qianlitp/WatchAD

Python

AD Security Intrusion Detection System

securityactive-directorypython3defcon27intrusion-detection-systemkerberosevent-logntlmblue-teamwatchad
Croissance des étoiles
Étoiles
1.3k
Forks
298
Croissance hebdomadaire
Issues
24
5001k
oct. 2019janv. 2022avr. 2024juil. 2026
ArtefactsPyPIpip install watchad
README

WatchAD

PyPI version ElasticSearch version Logstash version RabbitMQ version DEF CON 27 Blue Team Village

AD Security Intrusion Detection System

English Document | 中文文档

After Collecting event logs and kerberos traffic on all domain controllers, WatchAD can detect a variety of known or unknown threats through features matching, Kerberos protocol analysis, historical behaviors, sensitive operations, honeypot accounts and so on.The WatchAD rules cover the many common AD attacks.

The WatchAD has been running well on the Qihoo 360 intranet for more than six months and has found several threat activities.

In order to support the open-source community and promote the improvement of the project, we decided to open source part of the system that based on the event log detections.

The following are currently supported detections:

  • Discovery: Reconnaissance using Directory Services queries, Reconnaissance using PsLoggedOn, Honeypot accounts Activity.
  • Credential Dumping: Kerberoasting [NT], AS-REP Roasting, Remotely dump the password of DC.
  • Lateral Movement: Brute Force , Suspicious remotely logon using credentials, Remote execution targeting to DC、Abnormal windows file share name, Encryption downgrade activity [NT], Abnormal Kerberos ticket request [NT].
  • Privilege Escalation: Abnormal modification of ACL, Detection of MS17-010 attacks, Creation of new Group Policy, NTLM Relay Activity, Sensitive permission of resource-based constraint delegation granted, Attacking printer services with SpoolSample, Privilege escalation with MS14-068 Attacks [NT], Suspicious Kerberos Constraint Delegation activity [NT]
  • Persistence: Modification of AdminSDHolder, DCShadow Attack Detection, Modification of the DSRM password, Sensitive permission of Group Policy delegation granted, Sensitive permission of Kerberos constraint delegated granted, Modification of sensitive groups, Creation of new System Service on DC, Creation of new Scheduled Task on DC, Modification of SIDHistory, Skeleton Key active detection, Skeleton Key passive detection [NT], Kerberos Golden Ticket Activity [NT].
  • Defense Evasion: Malicous clearance of event logs, Event log service shut down

[NT] represent "based on Network traffic". Up to now, these part is not in this open-source plan. We will continue to open source based on the feedback.

Our talk "Evaded Microsoft ATA? But You Are Completely Exposed By Event Logs" about detecting AD attacks based on event log is shown at the DEF CON 27 @ Blue Team Village.

Installation

WatchAD is a completely detection system with lots of components. Please refer to the installation tutorial to install. To set up a honeypot account, please refer to the honeypot account tutorial

Architecture

Architecture

This project WatchAD only contains part of the code, which associated with the detection engine. In order to format the display you can put alarm data into your platform, or use the Web platform we developed -- WatchAD-Web, which is a simple platform tailored to WatchAD for some common operations. If you have more needs for interface design or operation experience, please customize the development according to WatchAD's alarm data.

Custom detection module

WatchAD supports the development of custom detection modules, please refer to our development tutorial

If you don't need some module,You can delete the module's .py file directly and restart the detection engine.

Do not delete files in the "record" directory, which is not involved in threat detections and just record for key activities of entities.

// TODO

  • English code comment
  • Compatible with ElasticSearch 6.X
  • Reduce false positives
  • Kerberoasting: the detection based on event log was replaced by kerberos traffic analysis. We are considering add it back.
  • Pass-the-Hash(PtH): There are some false positives, optimizing
  • Pass-the-Ticket(PtT): There are some false positives, optimizing
  • Silver-Ticket: There are some false positives, optimizing
  • Fake account information:There are some false positives, optimizing
  • Compromised account detection based on historical behaviors
  • Detections Based on Kerberos traffic open source
  • NTLM protocol traffic Analysis

If you find other attack methods that can be added to WatchAD detection, please submit a issue to let us know, or submit a PR to become a contributor to this project.

If you find that a detection module has many false positives (more than 10 per day), please submit a issue to tell us or submit a PR after fixing.

Follow me

Github: @9ian1i Twitter: @9ian1i

Reference

Dépôts similaires
trimstray/the-book-of-secret-knowledge

A collection of inspiring lists, manuals, cheatsheets, blogs, hacks, one-liners, cli/web tools and more.

MIT Licenseawesomeawesome-list
234.5k14k
Hack-with-Github/Awesome-Hacking

A collection of various awesome lists for hackers, pentesters and security researchers

Creative Commons Zero v1.0 Universalhackingsecurity
116.6k10.5k
Developer-Y/cs-video-courses

List of Computer Science courses with video lectures.

computer-sciencealgorithms
82.6k11.4k
swisskyrepo/PayloadsAllTheThings

A list of useful payloads and bypass for Web Application Security and Pentest/CTF

PythonPyPIMIT Licensepentestpayload
swisskyrepo.github.io/PayloadsAllTheThings/
79.3k17.2k
caddyserver/caddy

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

GoGo ModulesApache License 2.0goweb-server
caddyserver.com
74.2k4.8k
x64dbg/x64dbg

An open-source user mode debugger for Windows. Optimized for reverse engineering and malware analysis.

C++Otherdebuggerwindows
x64dbg.com
49k2.8k
mitmproxy/mitmproxy

An interactive TLS-capable intercepting HTTP proxy for penetration testers and software developers.

PythonPyPIMIT Licensepythonsecurity
mitmproxy.org
44.4k4.6k
usestrix/strix

Open-source AI penetration testing tool to find and fix your app’s vulnerabilities.

PythonPyPIApache License 2.0agentsartificial-intelligence
strix.ai
43.2k4.5k
GyulyVGC/sniffnet

Comfortably monitor your Internet traffic 🕵️‍♂️

Rustcrates.ioApache License 2.0network-analysisnetworking
sniffnet.app
40.1k1.8k
QuivrHQ/quivr

Opiniated RAG for integrating GenAI in your apps 🧠 Focus on your product rather than the RAG. Easy integration in existing products with customisation! Any LLM: GPT4, Groq, Llama. Any Vectorstore: PGVector, Faiss. Any Files. Anyway you want.

PythonPyPIOtheraillm
core.quivr.com
39.2k3.7k
aquasecurity/trivy

Find vulnerabilities, misconfigurations, secrets, SBOM in containers, Kubernetes, code repositories, clouds and more

GoGo ModulesApache License 2.0securitysecurity-tools
trivy.dev
37k547
lissy93/web-check

🕵️‍♂️ All-in-one OSINT tool for analysing any website

TypeScriptnpmMIT Licenseosintprivacy
web-check.xyz
34.2k2.8k