Recommended
PDF
0章 Linuxカーネルを読む前に最低限知っておくべきこと
PDF
PDF
PDF
import dpkt したよ #ssmjp 2014/02/28
PDF
Hadoop book-2nd-ch3-update
PDF
Infinite Debian - Platform for mass-producing system every second
PDF
PDF
PPTX
コンテナのネットワークインターフェース その実装手法とその応用について
PDF
PDF
Hokkaido.cap#2 一般的なプロトコルのパケットを覗いてみよう
PDF
PDF
PPTX
x86-64/Linuxに独自メモリ空間を勝手増設
PDF
Hokkaido.cap#1 Wiresharkの使い方(基礎編)
ODP
tcpdumpとtcpreplayとtcprewriteと他。
PDF
SpectreとMeltdown:最近のCPUの深い話
PDF
本当にわかる Spectre と Meltdown
PDF
PDF
PDF
PDF
PDF
PDF
DPDKを用いたネットワークスタック,高性能通信基盤開発
PDF
PDF
PDF
Scapy presentation Remake(訂正)
PDF
PDF
PDF
James Windows10 elevator action final-jp
More Related Content
PDF
0章 Linuxカーネルを読む前に最低限知っておくべきこと
PDF
PDF
PDF
import dpkt したよ #ssmjp 2014/02/28
PDF
Hadoop book-2nd-ch3-update
PDF
Infinite Debian - Platform for mass-producing system every second
PDF
PDF
What's hot
PPTX
コンテナのネットワークインターフェース その実装手法とその応用について
PDF
PDF
Hokkaido.cap#2 一般的なプロトコルのパケットを覗いてみよう
PDF
PDF
PPTX
x86-64/Linuxに独自メモリ空間を勝手増設
PDF
Hokkaido.cap#1 Wiresharkの使い方(基礎編)
ODP
tcpdumpとtcpreplayとtcprewriteと他。
PDF
SpectreとMeltdown:最近のCPUの深い話
PDF
本当にわかる Spectre と Meltdown
PDF
PDF
PDF
PDF
PDF
PDF
DPDKを用いたネットワークスタック,高性能通信基盤開発
PDF
PDF
PDF
Scapy presentation Remake(訂正)
PDF
Viewers also liked
PDF
PDF
James Windows10 elevator action final-jp
PDF
Nishimura finding vulnerabilities-in-firefox-for-i-os-(nishimunea)
PDF
Akila srinivasan microsoft-bug_bounty-(publish)
PDF
Maxim Bullet Proof Hosting Services pac_sec_jp
PDF
Filippo, plain simple reality of entropy ja
PDF
Hyperchem bad barcode final_ja
PDF
Guang gong escalate privilege by vulnerabilities in android system services ...
PDF
Villegas first pacsec_2016
PDF
Martin UPnP - pacsec -final-ja
PDF
Kochetova+osipv atm how_to_make_the_fraud__final
PDF
Kavya racharla ndh-naropanth_fin
PDF
Qinghao vulnerabilities mining technology of cloud and virtualization platfo...
PDF
PDF
Mickey pac sec2016_final_ja
PDF
Adam blue toot pacsec-2015-jp
PDF
kyoungju_kwak_the_new_wave_of_cyber_terror
PDF
PDF
Andersson hacking ds_mx_with_sdr_pac_sec_2016_english
PDF
Andersson hacking ds_mx_with_sdr_pac_sec_2016_japanese
Similar to Richard high performance fuzzing ja
PDF
PDF
Step-Oriented Programming による任意コード実行の可能性 by 坂井 弘亮
PDF
C16 45分でわかるPostgreSQLの仕組み by 山田努
PDF
リバースエンジニアリングのための新しいトレース手法 - PacSec 2010
PDF
PDF
PDF
2015年度先端GPGPUシミュレーション工学特論 第6回 プログラムの性能評価指針(Flop/Byte,計算律速,メモリ律速)
PPT
Transactional Information Systems入門
PDF
Code Reading at Security and Programming camp 2011
PPTX
Scis2015 ruo ando_2015-01-20-01
PDF
Step-Oriented Programming による任意コード実行の可能性
PDF
PDF
perfを使ったpostgre sqlの解析(後編)
PDF
プロファイラGuiを用いたコード分析 20160610
PDF
PPTX
PPTX
PDF
PDF
20151112 kutech lecture_ishizaki_public
PDF
More from PacSecJP
PDF
Rouault imbert view_alpc_rpc_pacsec_jp
PDF
Rouault imbert alpc_rpc_pacsec
PDF
Ryder robertson pac-sec skeleton 2017_jp
PDF
Shusei tomonaga pac_sec_20171026_jp
PDF
PDF
Yunusov babin 7sins-pres_atm_v4(2)_jp
PDF
Yunusov babin 7 sins pres atm v2
PDF
PDF
PDF
Shusei tomonaga pac_sec_20171026
PDF
Lucas apa pacsec_slides_jp-final
PDF
Ryder robertson security-considerations_in_the_supply_chain_2017.11.02
PDF
PDF
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final-j
PDF
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
PDF
Marc schoenefeld grandma‘s old handbag_draft2_ja
PDF
Kavya racharla ndh-naropanth_fin_jp-final
PDF
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
PDF
PDF
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final
Richard high performance fuzzing ja 1. 2. はじめに
自己紹介
→Richard Johnson / @richinseattle
→Research Manager, Vulnerability Development
→Cisco, Talos Security Intelligence and Research Group
アジェンダ
→なぜパフォーマンスが重要か
→ターゲットと入力の選定
→エンジンのデザイン
→ホストの設定
3. 4. 5. 6. Microsoft SDL 検証ガイドライン
ファジングはSDL検証において必須要件
「Win32/64/Mac: 最適化されたテンプレートのセット
を使う必要があります。テンプレートの最適化は最小
のテンプレートによるパーサのコードカバレッジの最
大数の総量に基づいています。最適化されたテンプ
レートはファジングの有効性を倍増させることが研究
で示されています。SDLバグバーでは、最後のバグが見
つかり修正されてから、最小の50万の反復、少なくと
も 25 万 の 反 復 の フ ァ ジ ン グ が 見 ら れ ま す 。 」
https://msdn.microsoft.com/en-us/library/windows/desktop/cc307418.asp
7. 8. 過去のパフォーマンス統計
Microsoft Windows Vista 2006
→3.5億の反復、250以上のファイルパーサー
l~ パーサーあたり140万の反復(平均)
→300超の問題が修正 (1バグあたり 116万のテスト)
Microsoft Office 2010
→8億の反復、400のファイルパーサー
→1800のバグが修正 (1バグあたり44444のテスト)
•http://blogs.technet.com/b/office2010/archive/2010/05/11/how-the-sdl-helped-improve-security-in-office-
2010.aspx
チャーリー・ミラー 2010
→700万の反復、4パーサー
•~ パーサーあたり180万の反復 (平均)
→320 - 470 のクラッシュ (1バグあたり14893 - 21875のテスト)
9. 10. 11. ターゲットの選定
64-bit 対 32-bit アプリケーション (x86 アーキテクチャ)
→64-bitバイナリは32-bitよりサイズが肥大
→64-bitランタイムのメモリ使用量は32ビットより多い
→64-bit OSはVMのためにより多くのメモリとディスクを消費
→いくつかのソフトウェアは32-bitバイナリのみ
→いくつかのファザーとデバッガは32-bitのみをサポート
→64-bit CPUは性能向上のためにより多くのレジスタを持つ
•最適化はコンパイラに依存
12. ターゲットの選定
64-bitプログラムは高速か?
→x64上では? 小さいながらも変化がある
•Chrome – 無視できる程度
–http://www.7tutorials.com/google-chrome-64-bit-it-better-32-bit-version
•Photoshop – イエス?
–8-12% (無関係なディスクI/Oの最適化に関するトーク)
–https://helpx.adobe.com/photoshop/kb/64-bit-os-benefits-limitations.html
→SPARC上では? ノー
•True story, but who cares
–http://www.osnews.com/story/5768/Are_64-bit_Binaries_Really_Slower_than_32-bit_Binaries_/page3/
13. 14. 15. 16. 入力の選定
CMU 変形
→Optimizing Seed Selection for Fuzzing – USENIX 2014
•https://www.usenix.org/system/files/conference/usenixsecurity14/sec14-paper-rebert.pdf
→最小セットは期待ほど役に立たない
→重みなしの最小セットが勝ち
→結論: 最小セットは壊れていなければ良好
•Peach minset toolはアルゴリズムの最小セットではない
•Peach minsetはランダム選定と同等に機能する
もう少しカバレッジトレーサーの性能について解説…
17. 18. 19. 20. 入力の生成
もっとも重要なのはミューテータの選定
→AFL
Deterministic bitflip
1, 2, 4, 8, 16, 32 bits
Deterministic addition/subtraction
Values { 1 – 35 } for each byte, short, word, dword
Little endian and big endian
Deterministic 'interesting' constant values
27 boundary values
Dictionary keywords
Havoc
Random bitflips, arithmetic, block move/copy, truncate
Splice
Merge two previously generated inputs
21. 入力の生成
最も重要なのはミューテータの選定
→Radamsa
ab: enhance silly issues in ASCII string data handling
bd: drop a byte
bf: flip one bit
bi: insert a random byte
br: repeat a byte
bp: permute some bytes
bei: increment a byte by one
bed: decrement a byte by one
ber: swap a byte with a random one
sr: repeat a sequence of bytes
sd: delete a sequence of bytes
ld: delete a line
22. 入力の生成
最も重要なのはミューテータの選定
→Radamsa
lds: delete many lines
lr2: duplicate a line
li: copy a line closeby
lr: repeat a line
ls: swap two lines
lp: swap order of lines
lis: insert a line from elsewhere
lrs: replace a line with one from elsewhere
td: delete a node
tr2: duplicate a node
ts1: swap one node with another one
ts2: swap two nodes pairwise
23. 入力の生成
最も重要なのはミューテータの選定
→Radamsa
tr: repeat a path of the parse tree
uw: try to make a code point too wide
ui: insert funny unicode
num: try to modify a textual number
xp: try to parse XML and mutate it
ft: jump to a similar position in block
fn: likely clone data between similar positions
fo: fuse previously seen data elsewhere
Mutation patterns (-p)
od: Mutate once
nd: Mutate possibly many times
bu: Make several mutations closeby once
24. 25. 26. ターゲットの実行
Windows黒魔術のSUA posix fork() の余談
→ZwCreateProcess (NULL, …) – Windows 2000
•セクション、スレッド、CSRSS、User32その他がない
→RtlCloneUserProcess – Windows Vista
•限定的な範囲で動作
•アプリケーションはWin32 APIを使えない
→RtlCreateProcessReflection - Windows 7
•速やかなフルメモリダンプ生成のために設計
•スレッドに復元できない
Windows 10 fork...
27. ターゲットの実行
fork、ふざけてるの??
linux
10000 fork()
0.763s → 13106 exec/sec
10000 fork/exec(/bin/false)
2.761s → 3621 exec/sec
10000 fork/exec(/bin/false) w/ taskset
2.073s → 4823 exec/sec
cygwin
10000 fork()
29.954s → 333 exec/sec
10000 fork/exec(/bin/false)
63.898s → 156 exec/sec
RtlCloneUserProcess (older hardware)
10000 fork()
17.457s → 574 exec/sec
ZwCreateUserProcess
...
28. 29. 30. ターゲットの実行のトレース
フックするエンジンの選定は重要
→Pin / DynamoRIO は遅い
•** ブロックカバレッジでは5から10倍は遅くなる
•フォークサーバのほうが利点がある
TurboTrace:
1. LD_PRELOADされたライブラリから自身をfork.
2. フォークされた子をptrace.
3. _startでbreak on
4. fork()の繰り返しを行うことになる実際の関数をインジェクト.
5. callを経由.
6. _startを修正し実行を継続.
31. 32. ターゲット実行のトレース
フックするエンジンの選定は重要
→TurboTraceパフォーマンス, 100回の繰り返し
•20 – 50% スピードが向上
First test (without pintool, just instrumentation):
Pin without pintool on test_png : 55.03 seconds
Turbotrace without pintool on test_png : 37.24 seconds
Second test (bblocks pintool):
Pin bblocks pintool on test_png : 72.62 seconds
Turbotrace bblocks pintool on test_png : 51.07 seconds
Second test (calltrace pintool):
Pin calltrace pintool on test_png : 106.19 seconds
Turbotrace calltrace pintool on test_png : 85.24 seconds
33. 34. 35. 36. 37. 38. 39. 40. 41. ストレージ: HDD
ソリッドステイトUSBドライブのキャッシュ利用
→利点は低レンテンシー、広帯域ではない
→Windows ReadyBoost (デフォルトで利用可能)
•フラッシュでのランダムアクセスはHDDの10倍高速
•http://www.7tutorials.com/files/img/readyboost_performance/readyboost_performance14.png
•まだキャッシュ用にデバイスを使っておらず、新しいデバイ
スが256MBから32GBのサイズで、4KBのランダム読込みで
2.5MB/s以上の転送速度、512KBのランダム書込みで1.75MB/s
以上の転送速度のとき
–https://technet.microsoft.com/en-us/magazine/2007.03.vistakernel.aspx
→Linux >3.10 bache / zfs l2arc
•12.2K ランダム io/sec -> 18.5K/sec with bcache, 50% の増加
–http://bcache.evilpiepirate.org/
42. 43. 44. 45. 46. メモリー
32-bit メモリーの限界
→Linux – PAEカーネルへの組み込み
→Windows
•OSのエディションによる制限
•ドライバの互換性が犠牲にされた根拠
–http://blogs.technet.com/b/markrussinovich/archive/2008/07/21/3092070.aspx
•カーネルパッチが必須
–http://www.geoffchappell.com/notes/windows/license/memory.htm
–http://news.saferbytes.it/analisi/2012/08/x86-4gb-memory-limit-from-a-technical-perspective/
–http://news.saferbytes.it/analisi/2013/02/saferbytes-x86-memory-bootkit-new-updated-build-is-out/
47. 48. Cisco Talos VulnDev Team
→Richard Johnson
•rjohnson@sourcefire.com
•@richinseattle
→Marcin Noga
→Yves Younan
→Piotr Bania
→Aleksandar Nikolic
→Ali Rizvi-Santiago
Thank You!