Skip to content

1 ‐ Deployment

last - @last0x00 edited this page Oct 8, 2023 · 4 revisions

Introduction

This page explains how to deploy PersistenceSniper on a host.

Importing the module through the PowerShell gallery

Whenever a new version of PersistenceSniper is pushed on the main branch, a Github action automatically uploads it to the PowerShell Gallery. This means the module can be installed directly using PowerShell's Install-Module cmdlet, if the host has an active internet connection, and then imported in the current PowerShell session using the Import-Module cmdlet:

Install-Module PersistenceSniper
Import-Module PersistenceSniper

Importing the module downloaded from Github

If you don't want to (or simply can't) use an active internet connection, you can download the repository from Github elsewhere, move it on the machine you want to use PersistenceSniper from, navigate to the folder in which the zip file is located and run the following commands:

Expand-Archive -Path .\PersistenceSniper-main.zip -Destination .\
Import-Module .\PersistenceSniper-main\PersistenceSniper\PersistenceSniper.psd1

Checking the digital signature

Since PersistenceSniper is digitally signed with a valid code signing certificate, it should be a best practice to check its digital signature before importing it. To do this you can use PowerShell's Get-AuthenticodeSignature cmdlet:

Get-AuthenticodeSignature .\PersistenceSniper-main\PersistenceSniper\PersistenceSniper.psd1

Next step

That's pretty much it, once you have imported the module, either using the Github version or through the PowerShell gallery, you can start using it. Head to the Usage section of this document for more information on that.