| عنوان | Panabit Panabit Smart Application Gateway TANGr7p10 OS Command Injection |
|---|
| الوصف | In Panabit Smart Application Gateway firmware TANGr7p10, the SAC (centralized wireless-AP management) module contains a two-stage (second-order) code injection:
Write side — admin/cgi-bin/sac/ajax_sac_crontab (#!/bin/sh, line 38), action=add_crontab writes the request parameter "cmd" VERBATIM into the persistent configuration ${PGETC}/App/sac/crontab.conf (no escaping, no whitelist; ";" "#" ">" "$" land on disk verbatim).
Read side — the root-resident daemon app/webui/bin/sac_crontab re-reads that configuration every ~50 seconds and runs eval "sch_${val}" on EVERY whitespace-separated field of each line (lines 114-133). eval is a parse boundary: the injected cmd=x=1;id>/tmp/X;# becomes eval "sch_cmd=x=1;id>/tmp/X;#", parsed as assignment ; command ; comment — executing arbitrary commands as root.
POST /cgi-bin/sac/ajax_sac_crontab (valid session only)
action=add_crontab&month=day&day=1&hour=99&min=99&cmd=x=1;id>/tmp/qtest/CRONRCE;echo${IFS}CRON-RCE-OK>/tmp/qtest/CRONRCE2;#
This is a second-order AND persistent injection: the configuration lives in a persistent directory (expected to be re-read after reboot; not exercised in emulation), write and execution are decoupled (delay <= 50 s), so the attacker can walk away right after sending the request.
Payload constraints (measured): no quotes allowed (the outer eval supplies the closing quote; an odd quote count fails the whole eval); use ${IFS} instead of literal spaces (the daemon field-splits on whitespace). The daemon script declares #!/bin/sh but uses bash syntax ([[ ]], arrays), so it must run under bash.
Verified with the real ipe_httpd (HTTPS 18443) plus the vendor sac_crontab daemon started manually under bash: /tmp/qtest/CRONRCE -> uid=0(root) gid=0(root). Only non-destructive commands (id/echo/cp) were used. |
|---|
| المصدر | ⚠️ https://github.com/nenghun/IoT/blob/main/Panabit/rce5/Post-authentication%20second-order%20(stored)%20code%20injection_rce.md |
|---|
| المستخدم | nenghun (UID 102476) |
|---|
| ارسال | 24/10/2026 08:19 PM (1 شهر منذ) |
|---|
| الاعتدال | 24/11/2026 09:40 AM (1 month later) |
|---|
| الحالة | تمت الموافقة |
|---|
| إدخال VulDB | 442757 [Panabit Smart Application Gateway TANGr7p10 SAC ajax_sac_crontab add_crontab cmd تجاوز الصلاحيات] |
|---|
| النقاط | 20 |
|---|