Back to skill

Security audit

ent-zalo-bridge

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Zalo Bot webhook bridge installer, with sensitive but purpose-aligned system service and bot API actions users should approve deliberately.

Install this only if you want a persistent Zalo Bot webhook receiver on the target machine. Use a dedicated service user, keep the bot token and secret out of chat and logs, confirm before running sudo/systemd or setWebhook commands, and remember that webhook payloads are written to local log files.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (13)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest description and all user-facing instructions are written as Vietnamese-only directives, with no indication that the user may choose another language or locale. That constitutes a natural-language locale constraint without documented opt-in or justification as a region-specific compliance requirement.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The activation language is broad enough that an agent could proceed from a vague request like 'Cài bridge nhận tin Zalo Bot' into infrastructure setup, webhook registration, and persistence changes. Even though the text later says to ask for missing token/domain and only execute for the owner, the trigger still risks over-eager execution of sensitive actions with incomplete confirmation.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 72)May include surrounding context.

3.1 Kiểm tra bot

bash
curl -s "https://bot-api.zaloplatforms.com/bot$ZALO_BOT_TOKEN/getMe"

3.2 Gửi tin (kiểm thử / nhắc việc)

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes a bridge for receiving Zalo Bot messages via webhook and registering that webhook, with an attached test script. However, this section documents a general-purpose sendMessage API call using the bot token, which is a separate bot action capability unrelated to standing up the inbound webhook receiver itself.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest scope says 'KHÔNG xoá webhook/dữ liệu của bot khác' and presents the skill as setting up inbound webhook infrastructure, but the document also provides a concrete deleteWebhook operation. That goes beyond the narrowly described setup path and introduces destructive webhook modification capability not needed for the stated bridge-install purpose.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · SKILL.md (reported line 272)May include surrounding context.

md
[Service]
Type=simple
WorkingDirectory=/opt/zalo-bridge
# Secret KHONG dat truc tiep trong unit file (unit file thuong world-readable).
# Dat trong EnvironmentFile co quyen 600, vd /opt/zalo-bridge/bridge.env:
#   ZALO_BOT_TOKEN=<TOKEN>
#   ZALO_SECRET=<SECRET>

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 288)May include surrounding context.

text
```bash
# File chua secret: quyen 600, chi user chay service doc duoc
sudo install -m 600 -o <user> -g <user> /dev/null /opt/zalo-bridge/bridge.env
sudo nano /opt/zalo-bridge/bridge.env      # dien ZALO_BOT_TOKEN + ZALO_SECRET

sudo systemctl daemon-reload

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 289)May include surrounding context.

text
```bash
# File chua secret: quyen 600, chi user chay service doc duoc
sudo install -m 600 -o <user> -g <user> /dev/null /opt/zalo-bridge/bridge.env
sudo nano /opt/zalo-bridge/bridge.env      # dien ZALO_BOT_TOKEN + ZALO_SECRET

sudo systemctl daemon-reload

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 291)May include surrounding context.

text
```bash
# File chua secret: quyen 600, chi user chay service doc duoc
sudo install -m 600 -o <user> -g <user> /dev/null /opt/zalo-bridge/bridge.env
sudo nano /opt/zalo-bridge/bridge.env      # dien ZALO_BOT_TOKEN + ZALO_SECRET

sudo systemctl daemon-reload

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 293)May include surrounding context.

text
```bash
# File chua secret: quyen 600, chi user chay service doc duoc
sudo install -m 600 -o <user> -g <user> /dev/null /opt/zalo-bridge/bridge.env
sudo nano /opt/zalo-bridge/bridge.env      # dien ZALO_BOT_TOKEN + ZALO_SECRET

sudo systemctl daemon-reload

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
82% confidence
Finding

Enabling and starting a persistent systemd service creates durable execution on the host, which is a sensitive action for an agent skill. In combination with the broad activation language, this can make unintended deployment survive reboots and continue handling inbound traffic without an additional explicit approval step.

Content

Scanner excerpt · SKILL.md (reported line 292)May include surrounding context.

sudo nano /opt/zalo-bridge/bridge.env # dien ZALO_BOT_TOKEN + ZALO_SECRET

sudo systemctl daemon-reload sudo systemctl enable --now zalo-bridge sudo systemctl status zalo-bridge

text

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

The skill explicitly instructs the agent to enable a boot-persistent service, which is a persistence mechanism on the host. Persistence is not inherently malicious here, but it materially increases risk if activated from an insufficiently confirmed request or on the wrong system because the service remains active across reboots.

Content

Scanner excerpt · SKILL.md (reported line 292)May include surrounding context.

sudo nano /opt/zalo-bridge/bridge.env # dien ZALO_BOT_TOKEN + ZALO_SECRET

sudo systemctl daemon-reload sudo systemctl enable --now zalo-bridge sudo systemctl status zalo-bridge

text

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 401)May include surrounding context.

md
| Service exit ngay, log `refuse to start` | Thiếu `ZALO_SECRET` hoặc < 8 ký tự | Thêm secret vào `bridge.env` |
| Zalo gọi tới nhưng 401 | `ZALO_SECRET` khác `secret_token` lúc `setWebhook` | Gọi lại `setWebhook` với đúng secret, hoặc sửa env cho khớp |
| `getUpdates` lỗi 400 | Đã set webhook (hoặc gọi GET thay vì POST) | `getUpdates` là **POST**; nếu đã set webhook thì bình thường — dùng webhook |
| Service chết sau reboot | Chưa `systemctl enable` | `enable --now` |
| Không nhận tin | Bot chưa vào nhóm / sai chat | Add bot vào nhóm |

## 11. Bảo mật — BẮT BUỘC