Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
RCEへの近道
Search
kawakatz
July 20, 2024
Research
1.9k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
RCEへの近道
kawakatz
July 20, 2024
Other Decks in Research
See All in Research
Apache Gravitinoで実現する Icebergカタログ統合とアクセスの一元化
matsumooon
0
490
IA for theory
gpeyre
1
400
[Fishers] DIVER OSINT CTF 2026 特化AIエージェントハーネスで挑戦するOSINT CTF
analokmaus
0
550
LLM の Attention 機構まとめ — 数式・計算量・メモリ
puwaer
8
2.6k
PGDM: Physically Guided Diffusion Model for L Downscaling
satai
3
460
XDPerf: A High-Performance Traffic Generator Built with WASM and eBPF
takehaya
1
290
進学校の生徒にはア行の苗字が多いのか
ozekinote
0
560
人間中心の意思決定支援AI
yukinobaba
PRO
7
4k
RS-Agent: Automating Remote Sensing Tasks through Intelligent Agent
satai
3
530
最先端NLP勉強会2026 論文紹介:Reasoning with Sampling: Your Base Model is Smarter Than You Think (ICLR 2026 paper)
kogoro
4
580
適応的スパムフィルタのための軽量な類似メッセージカウンタ / jsai2026-adaptive-spam-filter
monochromegane
0
5.3k
重要だけど測れていないもの:高齢者ケアの見えない課題
theoriatec2024
0
510
Featured
See All Featured
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
290
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.2k
Prompt Engineering for Job Search
mfonobong
0
440
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
The Cost Of JavaScript in 2023
addyosmani
55
10k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
320
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
The untapped power of vector embeddings
frankvandijk
2
1.9k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Transcript
None
None
X: @kawakatz 自己紹介 GMOサイバーセキュリティ byイエラエ株式会社 オフェンシブセキュリティ部ペネトレーションテスト課 川田 柾浩 • 業務領域
(5年目) ツール・マルウェア開発 ペネトレーションテスト・レッドチーム その他調査・研究 • 資格 • CVE CVE-2023-27966: macOS App Sandbox escape (>$10,000, Apple Inc.) CVE-2024-XXXXX: Remotely accessible TightVNC passwords (GlavSoft LLC) CVE-2024-XXXXX: RCE * 2 + LPE CVE-2024-XXXXX: RCE * 3 (Vuln * 5)
1. 自己紹介 2. メインテーマ 3. 調査目的 4. 脆弱性概要 5. TightVNCとは
6. 解析対象ソフトウェアの選定 7. 名前付きパイプに関する処理の解析 8. PoCの実装 9. TightVNC側の対策 10. CVEの発行 11. タイムライン 目次
None
ü 解析対象ソフトウェアの選定基準 ü 解析対象箇所の特定に至るまで メインテーマ 対象 選定 入力 受取 入力
解析 後続 処理
None
RCE(かLPE)に至る脆弱性の検出を目的としたソフトウェア解析の練習 調査目的
None
TightVNCに対してリモートからパスワードを読み込み可能な脆弱性 脆弱性概要
None
TightVNC 2.8.81 (2023/05/04) インストーラ: https://www.tightvnc.com/download/2.8.81/tightvnc-2.8.81- gpl-setup-64bit.msi ソースコード: https://www.tightvnc.com/download/2.8.81/tightvnc-2.8.81- src-gpl.zip TightVNCとは
対象 選定 入力 受取 入力 解析 後続 処理
オープンポート 名前付きパイプ 解析対象ソフトウェアの選定 プログラムに対する入力の入口 5営業日で脆弱性の 発見から悪用まで
オープンポート 名前付きパイプ 解析対象ソフトウェアの選定 プログラムに対する入力の入口 5営業日で脆弱性の 発見から悪用まで
5900/tcp recv(), recvfrom() WSARecv(), WSARecvFrom() send(), sendto() WSASend(), WSASendTo() tvnserver.exe
-service オープンポート: TCP/UDP通信の入口 解析対象ソフトウェアの選定
オープンポート 名前付きパイプ 解析対象ソフトウェアの選定 プログラムに対する入力の入口 5営業日で脆弱性の 発見から悪用まで
\\.\pipe\TightVNC_Service_Control tvnserver.exe -service tvnserver.exe –controlservice -slave ConnectNamedPipe(), ReadFile(), WriteFile() 名前付きパイプ:
プロセス間通信の入口 解析対象ソフトウェアの選定
ツール # オープンポート - Process Hacker https://processhacker.sourceforge.io/ # 名前付きパイプ -
Get-ProcessPipes.ps1 https://gist.github.com/Wra7h/62b42c8a2219ae94d865c1c2f7196e61 解析対象ソフトウェアの選定
0.0.0.0 5800/tcp: tvnserver.exe –service 0.0.0.0 5900/tcp: tvnserver.exe -service 解析対象ソフトウェアの選定
\\.\pipe\TVN_log_pipe_public_name: tvnserver.exe -service \\.\pipe\TightVNC_Service_Control: tvnserver.exe –service 解析対象ソフトウェアの選定
# tvnserver.exe -service - オープンポート 0.0.0.0 5800/tcp 0.0.0.0 5900/tcp -
名前付きパイプ \\.\pipe\TVN_log_pipe_public_name \\.\pipe\TightVNC_Service_Control 解析対象ソフトウェアの選定
# tvnserver.exe -service - オープンポート 0.0.0.0 5800/tcp 0.0.0.0 5900/tcp -
名前付きパイプ \\.\pipe\TVN_log_pipe_public_name \\.\pipe\TightVNC_Service_Control 解析対象ソフトウェアの選定
\\.\pipe\TightVNC_Service_Control 解析対象ソフトウェアの選定
\\.\pipe\TightVNC_Service_Control tvnserver-app/TvnServer.cpp 解析対象ソフトウェアの選定
\\.\pipe\TightVNC_Service_Control tvnserver-app/TvnServer.cpp 解析対象ソフトウェアの選定
対象 選定 入力 受取 入力 解析 後続 処理
ツール # 動的解析 - x64dbg https://x64dbg.com/ # 静的解析 - IDA
Pro https://hex-rays.com/ida-pro/ - Ghidra https://ghidra-sre.org/ # Windows APIの監視 - Frida https://frida.re/ 名前付きパイプに関する処理の解析
ReadFile関数の呼び出し元特定 Modules CPU 名前付きパイプに関する処理の解析
ReadFile関数の呼び出し元特定 サンプルコードで対象の名前付きパイプと紐づく呼び出しであることを確認 名前付きパイプに関する処理の解析
Fridaを用いたReadFile関数、WriteFile関数の監視 名前付きパイプに関する処理の解析
ReadFile関数の引数 名前付きパイプに関する処理の解析
ReadFile関数の呼び出し元特定 Execute till return + Step over (Step into) 名前付きパイプに関する処理の解析
ReadFile関数の呼び出し元特定 Modules 名前付きパイプに関する処理の解析
ReadFile関数の呼び出し元特定 Edit > Segments > Rebase program... 名前付きパイプに関する処理の解析
ReadFile関数の呼び出し元特定 Jump > Jump to address... 名前付きパイプに関する処理の解析
ReadFile関数の呼び出し元特定 Jump > Jump to address... 名前付きパイプに関する処理の解析
対象 選定 入力 受取 入力 解析 後続 処理
ReadFile関数を呼び出している関数の呼び出し元特定 名前付きパイプに関する処理の解析
ReadFile関数で受け取った入力値の扱い 名前付きパイプに関する処理の解析
ReadFile関数で受け取った入力値の扱い 名前付きパイプに関する処理の解析
ReadFile関数で受け取った入力値の扱い 名前付きパイプに関する処理の解析
対象 選定 入力 受取 入力 解析 後続 処理
tvnserver-app/ControlClient.cpp > ControlClient::execute() 名前付きパイプに関する処理の解析
tvnserver-app/ControlClient.cpp > ControlClient::execute() 名前付きパイプに関する処理の解析
tvnserver-app/ControlClient.cpp > ControlClient::execute() 名前付きパイプに関する処理の解析
server-config-lib/ServerConfig.cpp > ServerConfig::serialize() 名前付きパイプに関する処理の解析
None
PoCの実装 # 悪用条件 ü SMB(445/tcp)への通信が可能 ü いずれかのユーザとして認証が可能 Active Directory (or
Microsoft Entra ID) # 影響 暗号化されたパスワードの読み込み + 復号によってTightVNCに接続可能
PoCの実装
PoCの実装
PoCの実装
PoCの実装
PoCの実装
PoCの実装
None
TightVNC側の対策
TightVNC側の対策
None
CVEの発行 開発者と連絡が途絶えてしまって、CVEを発行してもらえなかった場合 (JPCERT様からご教授いただきました🙇) - Report/Request for Non-CNAs https://www.cve.org/ReportRequest/ReportRequestForNonCNAs
CVEの発行 - Submit a CVE Request https://cveform.mitre.org/
None
タイムライン 2024/04/20: 脆弱性報告 2024/04/26: 開発者側による脆弱性報告の確認 2024/05/28: TightVNC 2.8.84のリリース 2024/05/28: CVE発行の調整開始
2024/07/12: MITREにCVEの発行申請