Exploit databaseDownload repository ZIP
GH-1cc4206b01e1f77cb6722e923615f238
mr-r3b00t/cve-2021-44228
Sources for CVE-2021-44228
465 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files2
mr-r3b00t/cve-2021-44228Revision b99405f467f2
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
horizon_backdoor_detection.ps1
PowerShell · 3,139 bytes# Vmware horizon backdoor checker
# created by mRr3b00t - has input from friends who if you know you know.
# 05/01/2022
# version 0.4
# This checks for a specific backdoor implant used against Vmware horizon, the backdoor gets implanted by Log4j exploitation.
# The backdoor runs on TCP 8443. It's fairly stealthy from a logging perspective but it writes to disk. The write to disk isn't as stealthy as it could be.
# use at own risk.
# we have a canary token in here - if you want to share the data great, if you don't that's not a problem either just don't press Y/y and [enter] when prompoted to share. It's not for pitching it's so we can help people understand the impact of this.
# if the server has been patched then the backdoor will have been overwritten (not to say others don't exist etc.)
$path = 0
$authorise = 0
$blast = 0
$data_header = 0
#find if conection server and html access are installed
Get-WmiObject -Class Win32_Product | where vendor -Like '*vmware*' | select Name, Version
#check if service is installed
$blast = Get-WmiObject win32_service| where {$_.Name -like "*VMBlastSG*"}
if($blast.Name){
write-host "Vmware Blast Node JS Server Service Detected" -ForegroundColor Cyan
}
$path
# look for the Data header in the backdoor
$path=gwmi win32_service|?{$_.Name -like "*VMBlastSG*"}|%{$_.PathName -replace "nssm.exe","lib\absg-worker.js"};$path = $path -replace'"','' ;Get-Content $path|Select-String "req.headers\[\'data\'\]"
$data_header=(Get-Content(gwmi win32_service|?{$_.Name -like "*VMBlastSG*"}|%{$_.PathName -replace "nssm.exe","lib\absg-worker.js" -replace'"',''})|Select-String "req.headers\[\'data\'\]")
$data_header
# we should also look for base64 (it's no in the original file) - sample = Buffer.from(req.headers['data'], 'base64').toString('ascii')
$path=gwmi win32_service|?{$_.Name -like "*VMBlastSG*"}|%{$_.PathName -replace "nssm.exe","lib\absg-worker.js"};$path = $path -replace'"','' ;Get-Content $path|Select-String "base64"
$base64string =(Get-Content(gwmi win32_service|?{$_.Name -like "*VMBlastSG*"}|%{$_.PathName -replace "nssm.exe","lib\absg-worker.js" -replace'"',''})|Select-String "base64")
$base64string
if($data_header -or $base64_string){
write-host "##########################################################################" -ForegroundColor Red
write-host " Backdoor detected - recommend invoking an incident response process!!!!! " -ForegroundColor Red
write-host "##########################################################################" -ForegroundColor Red
write-host "" -ForegroundColor White
$authorise = Read-Host "Share precense of backdoor and egress IP Data with PwnDefend team? Press Y and ENTER to accept or any other entry to not share."
if($authorise -like 'y'){
write-host "Sharing Backdoor data via Canary Token HTTP call" -ForegroundColor Green
wget http://canarytokens.com/tags/4ubjlxzkd8a2i0ncakgvru5zc/post.jsp
}
write-host "" -ForegroundColor White
write-host "" -ForegroundColor White
write-host "" -ForegroundColor White
write-host "Be safe! we'll keep publishing what we find to help people! - PwnDefend Team" -ForegroundColor White
}