Skip to main content

Hello,

Looking for a worklet that will install Rapid7 Agent with a custom token to link it back to the orgs insightVM platform.

 

The MSI and Custom Token 

msiexec /i agentInstaller-x86_64.msi /l*v insight_agent_install_log.log /quiet CUSTOMTOKEN=us3:787e4f09-834b-48f6-******************

Notes from Rapid7

 

The command above and the MSI must have the same filename path to apply the token.

 

######## EDIT WITHIN THIS BLOCK #######
$fileName = 'agentInstaller-x86_64.msi'
$custArgs = 'CUSTOMTOKEN=us3:787e4f09-834b-48f6-a*******************'
#######################################

############### MAIN CODE #############
# MSI/Script location. Joined with filename to pass a single variable to function.
$sPath = Split-Path $Script:MyInvocation.MyCommand.Path -Parent
$fPath = "$sPath\$fileName"
$lPath = "$env:WINDIR\temp"
 

 

would the custargs work in this case or do I need to do something else?

like CD  C:\$sPath\$fileName\CUSTOMTOKEN=us3:787e4f09-834b-48f6-a*******************

 

I’m shocked Automox is integrated with Rapid7 and their is no worklets out there. 

 

Thanks for reaching out. 

 

Here is a link to a Github with the ps script built to deploy Rapid7 using an Automox Worklet:

Rapid7 Deployment

 

It includes both the evaluation code at the top (line 1 through 31), and remediation code at the bottom (line 37-74).

 

The only thing you will need to add is your Rapid7 custom token in the remediation section, this is on line 39. The script has the silent install and logging switches are already added, as well as the agent file name ‘agentInstaller-x86_64.msi’ 

 

The rapid7 agent file name shouldn’t change, but if so, you will also need to edit that at line 41 in the msiexec command.

 

Feel free to reach out if you have any questions.

 

Thanks!
Adam 

 


Reply