Book Image

Advanced Infrastructure Penetration Testing

Book Image

Advanced Infrastructure Penetration Testing

Overview of this book

It has always been difficult to gain hands-on experience and a comprehensive understanding of advanced penetration testing techniques and vulnerability assessment and management. This book will be your one-stop solution to compromising complex network devices and modern operating systems. This book provides you with advanced penetration testing techniques that will help you exploit databases, web and application servers, switches or routers, Docker, VLAN, VoIP, and VPN. With this book, you will explore exploitation abilities such as offensive PowerShell tools and techniques, CI servers, database exploitation, Active Directory delegation, kernel exploits, cron jobs, VLAN hopping, and Docker breakouts. Moving on, this book will not only walk you through managing vulnerabilities, but will also teach you how to ensure endpoint protection. Toward the end of this book, you will also discover post-exploitation tips, tools, and methodologies to help your organization build an intelligent security system. By the end of this book, you will have mastered the skills and methodologies needed to breach infrastructures and provide complete endpoint protection for your system.
Table of Contents (14 chapters)

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...