Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2024-35333 — CVE-2024-35333(html2xhtml 1.3におけるスタックバッファオーバーフロー)の再現と根本原因分析、ASanクラッシュ出力、コードレベルの緩和ガイダンス。 | Kitploit
ツール/GitHubGitHub/momo1239/cve-2024-35333
静的分析脆弱性分析エクスプロイトファジング学習と教育バイナリエクスプロイト
GitHubmomo1239/cve-2024-35333

CVE-2024-35333

CVE-2024-35333(html2xhtml 1.3におけるスタックバッファオーバーフロー)の再現と根本原因分析、ASanクラッシュ出力、コードレベルの緩和ガイダンス。

リポジトリを見る
32年前未レビュー

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

CVE-2024-35333

html2xhtml バージョン 1.3 の文字セット処理機能に、スタックバッファオーバーフローの脆弱性が存在します。攻撃者は特別に細工された入力を提供することでこの脆弱性を悪用し、スタック上にある 'buf' 変数のオーバーフローを引き起こす可能性があります。この脆弱性を悪用されると、攻撃者により任意のコードが実行されたり、アプリケーションがクラッシュしてサービス拒否状態に陥る可能性があります。

クラッシュ再現フェーズ

クラッシュを再現するには、プロジェクトのウェブサイトにアクセスし、最新バージョン 1.3 をダウンロードします。

tar ファイルを入手したら、tar xvf XYZ.tar を実行します。

実行:

root@kitploit:~
./configure
make
./html2xhtml poc.html

セグメンテーションフォールトが発生するはずです。これを Address Sanitizer で解析してみましょう。

実行:

root@kitploit:~
make clean
make CFLAGS=-fsanitize=address
./html2xhtml poc.html

以下の出力が得られます:

root@kitploit:~
=================================================================
==3468537==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffffffde70 at pc 0x7ffff7493fc4 bp 0x7fffffffdc00 sp 0x7fffffffd3a8
READ of size 86 at 0x7fffffffde70 thread T0
    #0 0x7ffff7493fc3 in __interceptor_memmem ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:686
    #1 0x5555555f5f35 in read_charset_decl /home/kenny/Downloads/html2xhtml-1.3/src/charset.c:680
    #2 0x5555555f7d89 in guess_charset /home/kenny/Downloads/html2xhtml-1.3/src/charset.c:508
    #3 0x5555555f7d89 in charset_auto_detect /home/kenny/Downloads/html2xhtml-1.3/src/charset.c:343
    #4 0x555555568d49 in main /home/kenny/Downloads/html2xhtml-1.3/src/html2xhtml.c:100
    #5 0x7ffff7029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #6 0x7ffff7029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #7 0x55555556b914 in _start (/home/kenny/Downloads/html2xhtml-1.3/src/html2xhtml+0x17914)

Address 0x7fffffffde70 is located in stack of thread T0 at offset 544 in frame
    #0 0x5555555e86bf in read_charset_decl /home/kenny/Downloads/html2xhtml-1.3/src/charset.c:536

  This frame has 1 object(s):
    [32, 544) 'buf' (line 537) <== Memory access at offset 544 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:686 in __interceptor_memmem
Shadow bytes around the buggy address:
  0x10007fff7b70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10007fff7b80: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00
  0x10007fff7b90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10007fff7ba0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10007fff7bb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x10007fff7bc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00[f3]f3
  0x10007fff7bd0: f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00
  0x10007fff7be0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1
  0x10007fff7bf0: f1 f1 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00
  0x10007fff7c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10007fff7c10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
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
==3468537==ABORTING

根本原因解析

ソースコードを見て、脆弱性のある関数 read_charset_decl() を確認しましょう。この関数は 100 行を超える長さです。簡略化して、この特定のループを見てみます。

root@kitploit:~
  for (i = ini, len = 0; i < avail && len < SCAN_LEN; i += step, len++) {
    buf[len] = tolower(buffer[i]);
  }

このループは、buffer 配列から buf にデータをコピーし、その際に文字を小文字に変換します。問題は、avail が SCAN_LEN より大きい場合、ループが buf の上限を超えていないかをチェックしていないことです。

対策としては、len が SCAN_LEN を超えないように境界チェックを行う必要があります。

ツールをダウンロード