Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
PowerShell Automation and Scripting for Cybersecurity

You're reading from   PowerShell Automation and Scripting for Cybersecurity Hacking and defense for red and blue teamers

Arrow left icon
Product type Paperback
Published in Aug 2023
Publisher Packt
ISBN-13 9781800566378
Length 572 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Miriam C. Wiesner Miriam C. Wiesner
Author Profile Icon Miriam C. Wiesner
Miriam C. Wiesner
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Part 1: PowerShell Fundamentals
2. Chapter 1: Getting Started with PowerShell FREE CHAPTER 3. Chapter 2: PowerShell Scripting Fundamentals 4. Chapter 3: Exploring PowerShell Remote Management Technologies and PowerShell Remoting 5. Chapter 4: Detection – Auditing and Monitoring 6. Part 2: Digging Deeper – Identities, System Access, and Day-to-Day Security Tasks
7. Chapter 5: PowerShell Is Powerful – System and API Access 8. Chapter 6: Active Directory – Attacks and Mitigation 9. Chapter 7: Hacking the Cloud – Exploiting Azure Active Directory/Entra ID 10. Chapter 8: Red Team Tasks and Cookbook 11. Chapter 9: Blue Team Tasks and Cookbook 12. Part 3: Securing PowerShell – Effective Mitigations In Detail
13. Chapter 10: Language Modes and Just Enough Administration (JEA) 14. Chapter 11: AppLocker, Application Control, and Code Signing 15. Chapter 12: Exploring the Antimalware Scan Interface (AMSI) 16. Chapter 13: What Else? – Further Mitigations and Resources 17. Index 18. Other Books You May Enjoy

To get the most out of this book

For most chapters, you will need PowerShell 7.3 and above, as well as a Visual Studio Code installation to examine and edit your code.

Depending on the chapter you follow, we will also look at other technologies, such as Windows PowerShell 5.1, Visual Studio, C/C++/C#, Visual Basic, Assembly, Ghidra, Wireshark, and Microsoft Excel.

Software/hardware covered in the book

Operating system requirements

PowerShell 7.3 and above

Windows 10 and above

Windows PowerShell 5.1

Windows Server 2019 and above

Visual Studio Code

Although most examples in this book might work with one test machine only, it is highly recommended to set up a demo environment to improve your experience for some parts of this book.

I used virtual machines to set up my environment, and I recommend doing the same to follow along. Hyper-V is a free hypervisor that you can use to set up your machines.

For my demo environment, I set up the following machines, which I will reference throughout this book:

  • PSSec-PC01: 172.29.0.12, Windows 10 Enterprise, 22H2, joined to the domain PSSec.local
  • PSSec-PC02: 172.29.0.13, Windows 10 Enterprise, 22H2, joined to the domain PSSec.local
  • PSSec-Server: 172.29.0.20, Windows Server 2019 Datacenter, joined to the domain PSSec.local
  • DC01: 172.29.0.10, Windows Server 2019 Datacenter, hosting the domain PSSec.local
    • Installed relevant roles: Active Directory Certificate, Active Directory Domain Services, DNS Server, and Group Policy Management
  • Azure demo environment for Chapter 7: PSSec-Demo.onmicrosoft.com
  • Optional: Linux and macOS to follow the PowerShell remoting (SSH) configuration in Chapter 3

The following diagram demonstrates the relevant setup used in this book:

Figure P.1 – The setup used in this book

This setup is only configured in a test environment and should, therefore, not be used in production environments.

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

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 $19.99/month. Cancel anytime
Banner background image