Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Cybersecurity Attacks – Red Team Strategies

You're reading from   Cybersecurity Attacks – Red Team Strategies A practical guide to building a penetration testing program having homefield advantage

Arrow left icon
Product type Paperback
Published in Mar 2020
Publisher Packt
ISBN-13 9781838828868
Length 524 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Johann Rehberger Johann Rehberger
Author Profile Icon Johann Rehberger
Johann Rehberger
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Section 1: Embracing the Red
2. Chapter 1: Establishing an Offensive Security Program FREE CHAPTER 3. Chapter 2: Managing an Offensive Security Team 4. Chapter 3: Measuring an Offensive Security Program 5. Chapter 4: Progressive Red Teaming Operations 6. Section 2: Tactics and Techniques
7. Chapter 5: Situational Awareness – Mapping Out the Homefield Using Graph Databases 8. Chapter 6: Building a Comprehensive Knowledge Graph 9. Chapter 7: Hunting for Credentials 10. Chapter 8: Advanced Credential Hunting 11. Chapter 9: Powerful Automation 12. Chapter 10: Protecting the Pen Tester 13. Chapter 11: Traps, Deceptions, and Honeypots 14. Chapter 12: Blue Team Tactics for the Red Team 15. Assessments 16. Another Book You May Enjoy

Notifications for file audit events on Windows

We covered this topic when we walked through monitoring for successful and failed logon events. Like the logon notification Sentinel that we built in the previous chapter, it's possible to build out a file audit Sentinel with notifications by subscribing to new Audit ACL events and notifying the user when an interesting one is generated.

The following steps show the code/commands in PowerShell to do so:

  1. First, we create an EventLogWatcher for the Security event log and enable it:
    $watcher = New-Object System.Diagnostics.Eventing.Reader.EventLogWatcher("Security")
    $watcher.Enabled = $true
  2. Then, we implement the method that should be called whenever a new event is created. We will call it OnEventWritten:
    $OnEventWritten =
    {
       $e = $event.sourceEventArgs.EventRecord
       if ($e.Id -eq 4656)
       {
         if ($e.FormatDescription() -like "*passwords...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime