Skip to content

Commit

Permalink
Add chrome.extensions.vm
Browse files Browse the repository at this point in the history
  • Loading branch information
d35ha committed Sep 30, 2024
1 parent 6b95e46 commit 1a889b1
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/chrome.extensions.vm/chrome.extensions.vm.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>chrome.extensions.vm</id>
<version>0.0.1.20240930</version>
<authors>Mandiant</authors>
<description>A package for multiple useful chrome extensions from the chrome webstore.</description>
<dependencies>
<dependency id="common.vm" />
<dependency id="googlechrome.vm" />
</dependencies>
</metadata>
</package>
39 changes: 39 additions & 0 deletions packages/chrome.extensions.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
$ErrorActionPreference = 'Stop'
Import-Module vm.common -Force -DisableNameChecking

try {

# Important: Chrome should be opened with internet access for
# ONLY one time to load these extensions.

$extensions = @(
# MetaMask
'nkbihfbeogaeaoehlefnkodbefgpgknn'
# Phantom
'bfnaelmomeimhlpmgjnjophhpkkoljpa'
# BNB Chain Wallet
'fhbohimaelbohpjbbldcngcnapndodjp'
# Avira Password Manager
'caljgklbbfbcjjanaijlacgncafpegll'
# KeePassXC-Browser
'oboonakemofpalcgghocfoadofidjkkk'
# Yoroi
'ffnbelfdoeiohenkjibnmadjiehjhajb'
# XDEFI Wallet
'hmeobnfnfcmdkdcmlblgagmfpfboieaf'
# ...
)
$regKeyPath = "HKLM:\SOFTWARE\WOW6432Node\Policies\Google\Chrome\ExtensionInstallForcelist"
$updateUrl = "https://clients2.google.com/service/update2/crx"

New-Item -Path $regKeyPath -Force -ea 0 | Out-Null
$valueName = 1
Foreach ($extensionId in $extensions)
{
New-ItemProperty -Path "$regKeyPath" -Name "$valueName" -Type String -Value "$extensionId;$updateUrl" -Force -ea 0 | Out-Null
$valueName += 1
}

} catch {
VM-Write-Log-Exception $_
}
5 changes: 5 additions & 0 deletions packages/chrome.extensions.vm/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$ErrorActionPreference = 'Continue'
Import-Module vm.common -Force -DisableNameChecking

$regKeyPath = "HKLM:\SOFTWARE\WOW6432Node\Policies\Google\Chrome\ExtensionInstallForcelist"
Remove-Item -Path $regKeyPath -Recurse -Force -ea 0
1 change: 1 addition & 0 deletions scripts/test/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ class UsesInvalidCategory(Lint):
"python3.vm",
"x64dbgpy.vm",
"vscode.extension.",
"chrome.extensions.vm",
]

root_path = os.path.abspath(os.path.join(__file__, "../../.."))
Expand Down

0 comments on commit 1a889b1

Please sign in to comment.