Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
도구/GitHubGitHub/halcy0nic/cve-2022-44311
Vulnerability AnalysisExploitationDebuggersFuzzingBinary AnalysisLearning & Education
GitHubhalcy0nic/cve-2022-44311

CVE-2022-44311

CVE-2022-44311에 대한 개념 증명

저장소 보기
13년 전아직 검토되지 않음

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

CVE-2022-44311 설명

html2xhtml v1.3은 procesador.c의 static void elm_close(tree_node_t *nodo) 함수에서 Out-Of-Bounds(범위를 벗어난) 읽기가 발생하는 것으로 발견되었습니다. 이 취약점으로 인해 공격자는 조작된 html 파일을 통해 민감한 파일에 접근하거나 서비스 거부(DoS)를 유발할 수 있습니다.

재현

취약점을 재현하려면 취약한 버전의 html2xhtml(v1.3)을 다운로드하고 프로젝트를 컴파일합니다:

root@kitploit:~
wget http://www.it.uc3m.es/jaf/html2xhtml/downloads/html2xhtml-1.3.tar.gz
tar -xzvf html2xhtml-1.3.tar.gz
cd html2xhtml-1.3
./configure
make
cd src

프로젝트가 컴파일되면 이 저장소에 포함된 개념 증명(PoC) 파일(CVE-2022-44311_crash)을 대상으로 html2xhtml을 실행할 수 있습니다:

root@kitploit:~
./html2xhtml -t frameset ./CVE-2022-44311_crash

위 명령은 크래시를 발생시키고 오류 메시지를 반환합니다:

root@kitploit:~
zsh: segmentation fault  ./src/html2xhtml -t frameset ./CVE-2022-44311_crash

프로그램에 valgrind를 연결하면 크래시의 원인을 파악하는 데 도움이 됩니다:

root@kitploit:~
└─$ valgrind ./src/html2xhtml -t frameset ./CVE-2022-44311_crash
==267753== Memcheck, a memory error detector
==267753== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==267753== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==267753== Command: ./src/html2xhtml -t frameset ./CVE-2022-44311_crash
==267753== 
==267753== Invalid read of size 4
==267753==    at 0x11B18A: elm_close (procesador.c:944)
==267753==    by 0x11B18A: err_html_struct (procesador.c:1889)
==267753==    by 0x11BBB5: err_content_invalid (procesador.c:1291)
==267753==    by 0x11BBB5: elm_close.part.0 (procesador.c:959)
==267753==    by 0x11C4C0: elm_close (procesador.c:944)
==267753==    by 0x11C4C0: saxEndDocument (procesador.c:233)
==267753==    by 0x1144AE: main (html2xhtml.c:117)
==267753==  Address 0x3ec404 is not stack'd, malloc'd or (recently) free'd
==267753== 

Valgrind는 procesador.c의 944번째 줄에서 크기 4의 범위를 벗어난 읽기(out-of-bounds read)가 발생하고 있음을 알려줍니다. 프로그램에 gdb를 연결하고 악성 파일을 실행하면 valgrind 출력을 확인할 수 있습니다:

root@kitploit:~
$ gdb src/html2xhtml
pwndbg> r -t frameset ./CVE-2022-44311_crash

LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA                                                     
────────────────────────────────────────────────────────────────────────────────────────────────[ REGISTERS ]────────────────────────────────────────────────────────────────────────────────────────────────
 RAX  0xb11ae                                                                                         
 RBX  0x5555555dd344 ◂— 0x3                                                                                                                                                                                  
 RCX  0x5a
 RDX  0x2                                                                                             
 RDI  0x555555573d40 (elm_list) ◂— 0x6c6d7468 /* 'html' */
 RSI  0x555555573160 (elm_buffer) ◂— 0xd9810100028b8101                                                                                                                                                      
 R8   0x1
 R9   0x5555555ee520 ◂— 0x5555555ee                                                                   
 R10  0x0                                                                                                                                                                                                    
 R11  0x7ffff7df2800 (iconv_close) ◂— cmp    rdi, -1
 R12  0x5555555dd2d6 ◂— 0x0                                                                           
 R13  0x7ffffffedc70 ◂— 0x600000001                                                                   
 R14  0x5555555dd2d6 ◂— 0x0                                                                           
 R15  0x4
 RBP  0x555555573d40 (elm_list) ◂— 0x6c6d7468 /* 'html' */                    
 RSP  0x7ffffffedc30 ◂— 0x1                                                                                                                                                                                  
 RIP  0x55555556718a (err_html_struct+474) ◂— cmp    dword ptr [rbp + rax*4 + 0xc], 4
─────────────────────────────────────────────────────────────────────────────────────────────────[ DISASM ]──────────────────────────────────────────────────────────────────────────────────────────────────
 ► 0x55555556718a <err_html_struct+474>    cmp    dword ptr [rbp + rax*4 + 0xc], 4
   0x55555556718f <err_html_struct+479>    jne    err_html_struct+489                <err_html_struct+489>
    ↓                                                                                                 
   0x555555567199 <err_html_struct+489>    mov    rbx, qword ptr [rbx + 8]
   0x55555556719d <err_html_struct+493>    test   rbx, rbx           
   0x5555555671a0 <err_html_struct+496>    jne    err_html_struct+448                <err_html_struct+448>
    ↓                         
   0x555555567170 <err_html_struct+448>    cmp    r12, rbx
   0x555555567173 <err_html_struct+451>    je     err_html_struct+498                <err_html_struct+498>
    ↓  
   0x5555555671a2 <err_html_struct+498>    xor    edi, edi                                                                                                                                                   
   0x5555555671a4 <err_html_struct+500>    mov    qword ptr [rip + 0x4d6d5], r12 <actual_element>
   0x5555555671ab <err_html_struct+507>    call   new_tree_node                <new_tree_node>
                                                                                                      
   0x5555555671b0 <err_html_struct+512>    mov    dword ptr [rax + 0x18], 0x59
──────────────────────────────────────────────────────────────────────────────────────────────[ SOURCE (CODE) ]──────────────────────────────────────────────────────────────────────────────────────────────
In file: /dev/shm/html2xhtml-1.3/src/procesador.c                                                     
   939 static void elm_close(tree_node_t *nodo)
   940 {                          
   941   DEBUG("elm_close()");                                                                                                                                                                               
   942   EPRINTF1("cerrando elemento %s\n",ELM_PTR(nodo).name);
   943                                     
 ► 944   if (ELM_PTR(nodo).contenttype[doctype]==CONTTYPE_CHILDREN) {
   945     /* si es de tipo child se comprueba su contenido */
   946     int content[16384];           
   947     int i, num;                   
   948     tree_node_t *elm;    
   949           

GDB는 프로그램이 다음 소스 코드 줄들을 실행할 때 유효하지 않은 메모리 주소에서 읽기를 시도하고 있음을 확인했습니다:

root@kitploit:~
 ► 944   if (ELM_PTR(nodo).contenttype[doctype]==CONTTYPE_CHILDREN) {
   945     /* si es de tipo child se comprueba su contenido */
   946     int content[16384];           
   947     int i, num;                   
   948     tree_node_t *elm; 

참조

  • https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-44311
  • https://cwe.mitre.org/data/definitions/125.html
도구 다운로드