Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
85b1580
feature: correlation offline mode to avoid rules update
javjodar Mar 7, 2025
7e71905
integrate dependencies from agent manager
Kbayero Mar 11, 2025
00a3e72
Add connection checker utility for AWS modules
yllada Mar 11, 2025
dcfa01e
Add connection checker utility for Bitdefender modules
yllada Mar 11, 2025
111a9bb
Change fatal logging to error for connection failures in AWS and Bitd…
yllada Mar 11, 2025
d7c4b51
add timeout
yllada Mar 11, 2025
a8bf2a2
Add connection checker utility for office 365 modules.
JocLRojas Mar 11, 2025
f97476b
Add connection checker utility for sophos module.
JocLRojas Mar 11, 2025
b2ca910
Include arm64 agents
Kbayero Mar 13, 2025
4197aa3
Merge branch 'bugfix/10.6.2/update_dependencies' of github.com:utmsta…
Kbayero Mar 13, 2025
79d1dee
update dependencies
Kbayero Mar 13, 2025
5b13f1b
update CI/CD pipelines
Kbayero Mar 13, 2025
2546878
remove arm builds
Kbayero Mar 17, 2025
616de08
fix message when there is no command output
Kbayero Mar 17, 2025
9b18bed
Merge branch 'main' into bugfix/10.6.2/update_dependencies
Kbayero Mar 17, 2025
da0a342
update version and changelog
Kbayero Mar 17, 2025
b628807
Update dependencies
Kbayero Mar 17, 2025
264b117
add connection mode
Kbayero Mar 17, 2025
09a53d1
include agent debugger, remove mTLS and fix module names
Kbayero Mar 20, 2025
8b3abdd
Solve problems between branches
Kbayero Mar 20, 2025
2323f12
add arm64 icons
Kbayero Mar 20, 2025
98e05e2
Update changelog
Kbayero Mar 20, 2025
73c65b8
change agent version
Kbayero Mar 21, 2025
9041c36
feat: update agent guides
mjabascal10 Mar 21, 2025
14c6e8e
Merge branch 'main' into bugfix/10.6.2/update_dependencies
Kbayero Mar 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agent/agent/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ func DeleteAgent(cnf *config.Config) error {
utils.Logger.ErrorF("error removing UTMStack Agent from Agent Manager %v", err)
}

utils.Logger.Info("UTMStack Agent removed successfully")
utils.Logger.LogF(100, "UTMStack Agent removed successfully from agent manager")
return nil
}
4 changes: 3 additions & 1 deletion agent/collectors/windows_arm64.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,16 @@ func (w Windows) SendSystemLogs() {
return
}

utils.Logger.LogF(100, "output: %s", string(output))

logLines := strings.Split(string(output), "\n")

validatedLogs := make([]string, 0, len(logLines))

for _, logLine := range logLines {
validatedLog, _, err := validations.ValidateString(logLine, false)
if err != nil {
_ = utils.Logger.LogF(100, "error validating log: %s: %v", logLine, err)
utils.Logger.LogF(100, "error validating log: %s: %v", logLine, err)
continue
}

Expand Down
8 changes: 4 additions & 4 deletions agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,13 @@ func main() {
time.Sleep(5 * time.Second)

case "uninstall":
fmt.Println("Uninstalling UTMStackAgent service ...")
fmt.Print("Uninstalling UTMStackAgent service ...")

cnf, err := config.GetCurrentConfig()
if err != nil {
fmt.Println("Error getting config: ", err)
os.Exit(1)
}

fmt.Print("Deleting agent ... ")
if err = pb.DeleteAgent(cnf); err != nil {
utils.Logger.ErrorF("error deleting agent: %v", err)
}
Expand All @@ -127,7 +125,9 @@ func main() {
os.Remove(config.ConfigurationFile)

serv.UninstallService()
utils.Logger.Info("UTMStackAgent service uninstalled correctly")

fmt.Println("[OK]")
fmt.Println("UTMStackAgent service uninstalled correctly")
os.Exit(1)
case "help":
Help()
Expand Down
2 changes: 1 addition & 1 deletion agent/version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "10.6.0"
"version": "10.7.0"
}
6 changes: 4 additions & 2 deletions frontend/src/app/app-module/app-module.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ import {UtmListComponent} from './guides/shared/components/utm-list.component';
import {ModuleIntegrationComponent} from './module-integration/module-integration.component';
import {AppModuleSharedModule} from './shared/app-module-shared.module';
import {LogCollectorComponent} from './guides/shared/components/log-collector.component';
import {InstallLogCollectorComponent} from "./guides/shared/components/install-log-collector.component";
import {InstallLogCollectorComponent} from './guides/shared/components/install-log-collector.component';
import {AgentInstallSelectorComponent} from './guides/shared/components/agent-install-selector.component';


@NgModule({
Expand Down Expand Up @@ -111,7 +112,8 @@ import {InstallLogCollectorComponent} from "./guides/shared/components/install-l
StepComponent,
StepDirective,
LogCollectorComponent,
InstallLogCollectorComponent
InstallLogCollectorComponent,
AgentInstallSelectorComponent
],
imports: [
CommonModule,
Expand Down
26 changes: 14 additions & 12 deletions frontend/src/app/app-module/guides/guide-as400/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ export const PLATFORM = [
id: 1,
name: 'WINDOWS',
install: `New-Item -ItemType Directory -Force -Path "C:\\Program Files\\UTMStack\\UTMStack Collectors\\AS400"; ` +
`cd "C:\\Program Files\\UTMStack\\UTMStack Collectors\\AS400"; ` +
`Invoke-WebRequest -Uri "https://cdn.utmstack.com/collectors/as400/v3.0.1/windows-as400-collector.zip" ` +
`-OutFile ".\\windows-as400-collector.zip"; Expand-Archive -Path ".\\windows-as400-collector.zip" ` +
`-DestinationPath "."; Remove-Item ".\\windows-as400-collector.zip"; Start-Process ".\\utmstack_collectors_installer.exe" ` +
`-ArgumentList 'install', 'as400', 'V_IP', '<secret>V_TOKEN</secret>' -NoNewWindow -Wait`,
`cd "C:\\Program Files\\UTMStack\\UTMStack Collectors\\AS400"; ` +
`Invoke-WebRequest -Uri "https://V_IP:9001/private/dependencies/collector/windows-as400-collector.zip" ` +
`-OutFile ".\\windows-as400-collector.zip"; Expand-Archive -Path ".\\windows-as400-collector.zip" ` +
`-DestinationPath "."; Remove-Item ".\\windows-as400-collector.zip"; Start-Process ".\\utmstack_collectors_installer.exe" ` +
`-ArgumentList 'install', 'as400', 'V_IP', '<secret>V_TOKEN</secret>' -NoNewWindow -Wait`,

uninstall: `cd "C:\\Program Files\\UTMStack\\UTMStack Collectors\\AS400"; ` +
uninstall: `cd "C:\\Program Files\\UTMStack\\UTMStack Collectors\\AS400"; ` +
`Start-Process ".\\utmstack_collectors_installer.exe" -ArgumentList ` +
` 'uninstall', 'as400' -NoNewWindow -Wait -ErrorAction SilentlyContinue ` +
`| Out-Null; Start-Process -FilePath "sc.exe" -ArgumentList 'stop', ` +
Expand All @@ -28,13 +28,15 @@ export const PLATFORM = [
id: 2,
name: 'LINUX UBUNTU',
install: `sudo bash -c "apt update -y && apt install wget unzip -y && mkdir -p ` +
`/opt/utmstack-linux-collectors/as400 && cd /opt/utmstack-linux-collectors/as400 && ` +
`wget https://cdn.utmstack.com/collectors/as400/v3.0.1/linux-as400-collector.zip ` +
`&& unzip linux-as400-collector.zip && rm linux-as400-collector.zip && chmod -R 777 ` +
`utmstack_collectors_installer && ./utmstack_collectors_installer install as400 ` +
`V_IP <secret>V_TOKEN</secret>"`,
`/opt/utmstack-linux-collectors/as400 && cd /opt/utmstack-linux-collectors/as400 && ` +
`wget --no-check-certificate --header='connection-key: V_TOKEN' ` +
`https://V_IP:9001/private/dependencies/collector/linux-as400-collector.zip ` +
`&& unzip linux-as400-collector.zip && rm linux-as400-collector.zip && chmod -R 777 ` +
`utmstack_collectors_installer && ./utmstack_collectors_installer install as400 ` +
`V_IP V_TOKEN"`,

uninstall: `sudo bash -c " cd /opt/utmstack-linux-collectors/as400 && ./utmstack_collectors_installer ` +

uninstall: `sudo bash -c " cd /opt/utmstack-linux-collectors/as400 && ./utmstack_collectors_installer ` +
`uninstall as400 && echo 'Removing UTMStack AS400 Collector dependencies...' && sleep 5 && rm ` +
`-rf /opt/utmstack-linux-collectors/as400 && echo 'UTMStack AS400 Collector removed successfully.'"`,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,14 @@ <h4 class="card-title mb-0 text-primary">
<div>
<p class="step-guide">
<span class="step_number">1</span>
Install according to your operating system:
Install or uninstall the UTMStack agent according to your operating system:
</p>
<div class="alert alert-warning alert-styled-right">
The following commands contains sensitive information, don't share it.
</div>
<h6 class="font-weight-semibold mt-3 mb-3">Ubuntu 16/18/20+</h6>

<app-utm-code-view [code]="getCommandUbuntu()"></app-utm-code-view>

<h6 class="font-weight-semibold mt-3 mb-3">Centos 7/Red Hat Enterprise Linux</h6>
<app-utm-code-view [code]="getCommandCentos7RedHat()"></app-utm-code-view>


<h6 class="font-weight-semibold mt-3 mb-3">Centos 8/AlmaLinux</h6>

<app-utm-code-view [code]="getCommandCentos8Almalinux()"></app-utm-code-view>
<app-agent-install-selector [platforms]="architectures"></app-agent-install-selector>
</div>
</li>
</ol>
<div class="alert alert-warning alert-styled-right">
The next information is not part of the installation process, is just in case you need to uninstall the agent
</div>
<p>
To uninstall linux agent, run the following command:
<app-utm-code-view [code]="getUninstallCommand()"></app-utm-code-view>
</p>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,27 @@ export class GuideLinuxAgentComponent implements OnInit {
@Input() version: string;
token: string;

architectures = [
{
id: 1, name: 'Ubuntu 16/18/20+',
install: this.getCommandUbuntu('utmstack-linux-agent'),
uninstall: this.getUninstallCommand('utmstack-linux-agent'),
shell: ''
},
{
id: 2, name: 'Centos 7/Red Hat Enterprise Linux',
install: this.getCommandCentos7RedHat('utmstack-linux-agent'),
uninstall: this.getUninstallCommand('utmstack-linux-agent'),
shell: ''
},
{
id: 3, name: 'Centos 8/AlmaLinux',
install: this.getCommandCentos8Almalinux('utmstack-linux-agent'),
uninstall: this.getUninstallCommand('utmstack-linux-agent'),
shell: ''
}
];

constructor(private federationConnectionService: FederationConnectionService) { }

ngOnInit() {
Expand All @@ -31,33 +52,38 @@ export class GuideLinuxAgentComponent implements OnInit {
});
}

getCommandUbuntu(): string {
getCommandUbuntu(installerName: string): string {
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;

return `sudo bash -c "apt update -y && apt install wget -y && mkdir -p /opt/utmstack-linux-agent && \
wget -P /opt/utmstack-linux-agent https://cdn.utmstack.com/agent_updates/release/installer/v${this.version}/utmstack_agent_installer && \
chmod -R 777 /opt/utmstack-linux-agent/utmstack_agent_installer && \
/opt/utmstack-linux-agent/utmstack_agent_installer install ${ip} <secret>${this.token}</secret> yes"`;
wget --no-check-certificate --header='connection-key: ${this.token}' -P /opt/utmstack-linux-agent \
https://${ip}:9001/private/dependencies/agent/${installerName} && \
chmod -R 777 /opt/utmstack-linux-agent/${installerName} && \
/opt/utmstack-linux-agent/${installerName} install ${ip} ${this.token} yes"`;
}
getCommandCentos7RedHat(): string {
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;

return `sudo bash -c "yum install wget -y && mkdir /opt/utmstack-linux-agent && wget -P /opt/utmstack-linux-agent \
https://cdn.utmstack.com/agent_updates/release/installer/v${this.version}/utmstack_agent_installer && \
chmod -R 777 /opt/utmstack-linux-agent/utmstack_agent_installer && \
/opt/utmstack-linux-agent/utmstack_agent_installer install ${ip} <secret>${this.token}</secret> yes"`;
getCommandCentos7RedHat(installerName: string): string {
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;

return `sudo bash -c "yum install wget -y && mkdir -p /opt/utmstack-linux-agent && \
wget --no-check-certificate --header='connection-key: ${this.token}' -P /opt/utmstack-linux-agent \
https://${ip}:9001/private/dependencies/agent/${installerName} && \
chmod -R 777 /opt/utmstack-linux-agent/${installerName} && \
/opt/utmstack-linux-agent/${installerName} install ${ip} ${this.token} yes"`;
}
getCommandCentos8Almalinux(): string {

getCommandCentos8Almalinux(installerName: string): string {
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;

return `sudo bash -c "dnf install wget -y && mkdir /opt/utmstack-linux-agent && \
wget -P /opt/utmstack-linux-agent https://cdn.utmstack.com/agent_updates/release/installer/v${this.version}/utmstack_agent_installer && \
chmod -R 777 /opt/utmstack-linux-agent/utmstack_agent_installer && \
/opt/utmstack-linux-agent/utmstack_agent_installer install ${ip} <secret>${this.token}</secret> yes"`;
return `sudo bash -c "dnf install wget -y && mkdir -p /opt/utmstack-linux-agent && \
wget --no-check-certificate --header='connection-key: ${this.token}' -P /opt/utmstack-linux-agent \
https://${ip}:9001/private/dependencies/agent/${installerName} && \
chmod -R 777 /opt/utmstack-linux-agent/${installerName} && \
/opt/utmstack-linux-agent/${installerName} install ${ip} ${this.token} yes"`;
}
getUninstallCommand(): string {
return `sudo bash -c "/opt/utmstack-linux-agent/utmstack_agent_installer uninstall || true; \

getUninstallCommand(installerName: string): string {
return `sudo bash -c "/opt/utmstack-linux-agent/${installerName} uninstall || true; \
systemctl stop UTMStackAgent 2>/dev/null || true; systemctl disable UTMStackAgent 2>/dev/null || true; \
rm /etc/systemd/system/UTMStackAgent.service 2>/dev/null || true; systemctl stop UTMStackRedline 2>/dev/null || true; \
systemctl disable UTMStackRedline 2>/dev/null || true; rm /etc/systemd/system/UTMStackRedline.service 2>/dev/null || true; \
Expand All @@ -69,4 +95,5 @@ export class GuideLinuxAgentComponent implements OnInit {
echo 'Removing UTMStack Agent dependencies...' && sleep 10 && rm -rf /opt/utmstack-linux-agent && \
echo 'UTMStack Agent dependencies removed successfully.'"`;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,12 @@ <h4 class="card-title mb-0 text-primary">
<li>
<p class="step-guide">
<span class="step_number">2</span>
To install windows agent, open a Windows powershell terminal as "<b>Administrator</b>" and run the following
command:
To install or uninstall the UTMStack agent, open a Windows PowerShell terminal as "Administrator" and run the following command:
</p>
<div class="alert alert-warning alert-styled-right">
The following command contains sensitive information, don't share it.
</div>
<app-utm-code-view [code]="getCommand()"></app-utm-code-view>
<app-agent-install-selector [platforms]="architectures"></app-agent-install-selector>
</li>
<!-- <li>-->
<!-- <p class="step-guide mb-3">-->
<!-- <span class="step_number">7</span>-->
<!-- Click on the button shown below, to activate the UTMStack features related to this integration-->
<!-- </p>-->
<!-- <app-app-module-activate-button [module]="module.WINDOWS_AGENT" [type]="'integration'"-->
<!-- [disabled]="false"-->
<!-- [serverId]="serverId"-->
<!-- class="mt-3">-->
<!-- </app-app-module-activate-button>-->
<!-- </li>-->
</ol>
<div class="alert alert-warning alert-styled-right">
The next information is not part of the installation process, is just in case you need to uninstall the agent
</div>
<p>
To uninstall windows agent, open a Windows powershell terminal as "<b>Administrator</b>" and run the following
command:
<app-utm-code-view [code]="getUninstallCommand()"></app-utm-code-view>
</p>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@ export class GuideWinlogbeatComponent implements OnInit {
token: string;
@Input() version: string;

architectures = [
{
id: 1, name: 'AMD64',
install: this.getCommand('utmstack_agent_service.exe'),
uninstall: this.getUninstallCommand('utmstack_agent_service.exe'),
shell: 'Windows Powershell terminal as “ADMINISTRATOR”'
},
{
id: 2, name: 'ARM64',
install: this.getCommand('utmstack_agent_service_arm64.exe'),
uninstall: this.getUninstallCommand('utmstack_agent_service_arm64.exe'),
shell: 'Windows Powershell terminal as “ADMINISTRATOR”'
}
];

constructor(private federationConnectionService: FederationConnectionService) {
}

Expand All @@ -32,29 +47,31 @@ export class GuideWinlogbeatComponent implements OnInit {
});
}

getCommand(): string {
getCommand(arch: string): string {
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;

return `New-Item -ItemType Directory -Force -Path "C:\\Program Files\\UTMStack\\UTMStack Agent"; ` +
`Invoke-WebRequest -Uri "https://cdn.utmstack.com/agent_updates/release/installer/v${this.version}/utmstack_agent_installer.exe" ` +
`-OutFile "C:\\Program Files\\UTMStack\\UTMStack Agent\\utmstack_agent_installer.exe"; ` +
`Start-Process "C:\\Program Files\\UTMStack\\UTMStack Agent\\utmstack_agent_installer.exe" ` +
`-ArgumentList 'install', '` + ip + `', '<secret>` + this.token + `</secret>', 'yes' -NoNewWindow -Wait`;
`& curl.exe -k -H "connection-key: <secret>${this.token}</secret>" ` +
`-o "C:\\Program Files\\UTMStack\\UTMStack Agent\\${arch}" ` +
`"https://${ip}:9001/private/dependencies/agent/${arch}"; ` +
`Start-Process "C:\\Program Files\\UTMStack\\UTMStack Agent\\${arch}" ` +
`-ArgumentList 'install', '${ip}', '<secret>${this.token}</secret>', 'yes' -NoNewWindow -Wait`;
}
getUninstallCommand(): string {
return `Start-Process "C:\\Program Files\\UTMStack\\UTMStack Agent\\utmstack_agent_installer.exe" -ArgumentList ` +
`'uninstall' -NoNewWindow -Wait -ErrorAction SilentlyContinue | Out-Null; Start-Process -FilePath "sc.exe" ` +
`-ArgumentList 'stop','UTMStackAgent' -Wait -ErrorAction SilentlyContinue | Out-Null; Start-Process -FilePath "sc.exe" ` +
`-ArgumentList 'delete','UTMStackAgent' -Wait -ErrorAction SilentlyContinue | Out-Null; Start-Process -FilePath "sc.exe" ` +
`-ArgumentList 'stop','UTMStackRedline' -Wait -ErrorAction SilentlyContinue | Out-Null; Start-Process -FilePath "sc.exe" ` +
`-ArgumentList 'delete','UTMStackRedline' -Wait -ErrorAction SilentlyContinue | Out-Null; Start-Process -FilePath "sc.exe" ` +
`-ArgumentList 'stop','UTMStackUpdater' -Wait -ErrorAction SilentlyContinue | Out-Null; Start-Process -FilePath "sc.exe" ` +
`-ArgumentList 'delete','UTMStackUpdater' -Wait -ErrorAction SilentlyContinue | Out-Null; Start-Process -FilePath "sc.exe" ` +
`-ArgumentList 'stop','UTMStackWindowsLogsCollector' -Wait -ErrorAction SilentlyContinue | Out-Null; Start-Process -FilePath "sc.exe" ` +
`-ArgumentList 'delete','UTMStackWindowsLogsCollector' -Wait -ErrorAction SilentlyContinue | Out-Null; Start-Process -FilePath "sc.exe" ` +
`-ArgumentList 'stop','UTMStackModulesLogsCollector' -Wait -ErrorAction SilentlyContinue | Out-Null; Start-Process -FilePath "sc.exe" ` +
`-ArgumentList 'delete','UTMStackModulesLogsCollector' -Wait -ErrorAction SilentlyContinue | Out-Null; ` +
`Write-Host "Removing UTMStack Agent dependencies..."; Start-Sleep -Seconds 10; Remove-Item 'C:\\Program Files\\UTMStack\\UTMStack Agent' ` +
`-Recurse -Force -ErrorAction Stop; Write-Host "UTMStack Agent removed successfully."`;

getUninstallCommand(arch: string): string {
return `Start-Process "C:\\Program Files\\UTMStack\\UTMStack Agent\\${arch}" ` +
`-ArgumentList 'uninstall' -NoNewWindow -Wait -ErrorAction SilentlyContinue | Out-Null; ` +
`Start-Process -FilePath "sc.exe" -ArgumentList 'stop','UTMStackAgent' -Wait -ErrorAction SilentlyContinue | Out-Null; ` +
`Start-Process -FilePath "sc.exe" -ArgumentList 'delete','UTMStackAgent' -Wait -ErrorAction SilentlyContinue | Out-Null; ` +
`Start-Process -FilePath "sc.exe" -ArgumentList 'stop','UTMStackWindowsLogsCollector' -Wait -ErrorAction SilentlyContinue | Out-Null; ` +
`Start-Process -FilePath "sc.exe" -ArgumentList 'delete','UTMStackWindowsLogsCollector' -Wait -ErrorAction SilentlyContinue | Out-Null; ` +
`Start-Process -FilePath "sc.exe" -ArgumentList 'stop','UTMStackModulesLogsCollector' -Wait -ErrorAction SilentlyContinue | Out-Null; ` +
`Start-Process -FilePath "sc.exe" -ArgumentList 'delete','UTMStackModulesLogsCollector' -Wait -ErrorAction SilentlyContinue | Out-Null; ` +
`Write-Host "Removing UTMStack Agent dependencies..."; ` +
`Start-Sleep -Seconds 10; ` +
`Remove-Item 'C:\\Program Files\\UTMStack\\UTMStack Agent' -Recurse -Force -ErrorAction Stop; ` +
`Write-Host "UTMStack Agent removed successfully."`;
}


}
Loading
Loading