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
PowerShell for Penetration Testing

You're reading from   PowerShell for Penetration Testing Explore the capabilities of PowerShell for pentesters across multiple platforms

Arrow left icon
Product type Paperback
Published in May 2024
Publisher Packt
ISBN-13 9781835082454
Length 298 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Dr. Andrew Blyth Dr. Andrew Blyth
Author Profile Icon Dr. Andrew Blyth
Dr. Andrew Blyth
Arrow right icon
View More author details
Toc

Table of Contents (23) Chapters Close

Preface 1. Part 1: Introduction to Penetration Testing and PowerShell
2. Chapter 1: Introduction to Penetration Testing FREE CHAPTER 3. Chapter 2: Programming Principles in PowerShell 4. Part 2: Identification and Exploitation
5. Chapter 3: Network Services and DNS 6. Chapter 4: Network Enumeration and Port Scanning 7. Chapter 5: The WEB, REST, and SOAP 8. Chapter 6: SMB, Active Directory, LDAP and Kerberos 9. Chapter 7: Databases: MySQL, PostgreSQL, and MSSQL 10. Chapter 8: Email Services: Exchange, SMTP, IMAP, and POP 11. Chapter 9: PowerShell and FTP, SFTP, SSH, and TFTP 12. Chapter 10: Brute Forcing in PowerShell 13. Chapter 11: PowerShell and Remote Control and Administration 14. Part 3: Penetration Testing on Azure and AWS cloud Environments
15. Chapter 12: Using PowerShell in Azure 16. Chapter 13: Using PowerShell in AWS 17. Part 4: Post Exploitation and Command and Control
18. Chapter 14: Command and Control 19. Chapter 15: Post-Exploitation in Microsoft Windows 20. Chapter 16: Post-Exploitation in Linux 21. Index 22. Other Books You May Enjoy

Remote access and PowerShell

PowerShell, developed by Microsoft, offers robust remote management and automation capabilities in Windows environments. The Windows Remote Management (WinRM) protocol primarily facilitates remote access to PowerShell. Next, I’ll describe various aspects of PowerShell remoting, including its setup, configuration, and execution of remote commands.

Enabling PowerShell remoting

The first step in remote access is enabling PowerShell remoting on the target machine. The Enable-PSRemoting cmdlet is used for this purpose:

Enable-PSRemoting -Force

The -Force parameter ensures that existing configurations are overwritten if needed. This command configures the WinRM service on the machine, allowing it to accept remote PowerShell commands.

Configuring WinRM

WinRM relies on the HTTP or HTTPS protocol for communication. To configure WinRM settings, you can use the winrm command-line tool or PowerShell cmdlets. Here’s an example of configuring...

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