From 050725b7e067562b3a9750c286223c1c72048d16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E7=9A=93=E8=BD=A9?= <19828617344@163.com> Date: Mon, 10 Apr 2023 09:09:24 +0000 Subject: [PATCH] add demo/sectest/static_patch_scan/2022-06/OpenHarmony-SA-2022-0602.yara. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 杜皓轩 <19828617344@163.com> --- .../2022-06/OpenHarmony-SA-2022-0602.yara | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 demo/sectest/static_patch_scan/2022-06/OpenHarmony-SA-2022-0602.yara diff --git a/demo/sectest/static_patch_scan/2022-06/OpenHarmony-SA-2022-0602.yara b/demo/sectest/static_patch_scan/2022-06/OpenHarmony-SA-2022-0602.yara new file mode 100644 index 000000000..a3f69596f --- /dev/null +++ b/demo/sectest/static_patch_scan/2022-06/OpenHarmony-SA-2022-0602.yara @@ -0,0 +1,33 @@ + /* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import "console" +import "elf" + +rule OpenHarmony_SA_2022_0602 +{ + meta: + date = "2023-04-10" + openharmony_sa = "OpenHarmony-SA-2022-0602" + affacted_files = "libcesfwk_core.z.so" + + strings: + $fix = "Failed to write InterfaceToken" + + condition: + (elf.machine == elf.EM_ARM) and ($fix) and console.log("penHarmony-SA-2022-0602 testcase pass") + +} -- GitLab