Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Advanced Infrastructure Penetration Testing

You're reading from  Advanced Infrastructure Penetration Testing

Product type Book
Published in Feb 2018
Publisher Packt
ISBN-13 9781788624480
Pages 396 pages
Edition 1st Edition
Languages

Table of Contents (14) Chapters

Preface 1. Introduction to Advanced Infrastructure Penetration Testing 2. Advanced Linux Exploitation 3. Corporate Network and Database Exploitation 4. Active Directory Exploitation 5. Docker Exploitation 6. Exploiting Git and Continuous Integration Servers 7. Metasploit and PowerShell for Post-Exploitation 8. VLAN Exploitation 9. VoIP Exploitation 10. Insecure VPN Exploitation 11. Routing and Router Vulnerabilities 12. Internet of Things Exploitation 13. Other Books You May Enjoy

PowerShell and Active Directory

PowerShell is an automated framework that provides system administrators with many capabilities to perform tasks. It supports the scripting language. Every command in the script is called a cmdlet. You can build your own cmdlets using the .NET programming language. An explanation is given here:

To check out a forest, you can use the get-adforest cmdlet, as shown:

To check all the commands type: Get-Command, as shown:

To check the domains, you can use Get-ADDomain, as shown:

To check the trust of the forest, you need to use get-adtrust, as shown:

get-aduser is used to get a specified user, as shown:

PowerShell is used as an attack platform in many cases for the following reasons:

  • It runs code in memory without touching disk
  • It downloads and executes code from another system
  • It interfaces with .NET and Windows APIs
  • Most organizations are not...
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 £13.99/month. Cancel anytime}