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
Making full use of Bus Pirate
Search
kitok
January 07, 2018
How-to & DIY
1
690
Making full use of Bus Pirate
#iotsecjp
kitok
January 07, 2018
Tweet
Share
More Decks by kitok
See All by kitok
Starting radio hacking with SDR
kitok
2
250
The reversing man
kitok
1
88
Other Decks in How-to & DIY
See All in How-to & DIY
ミニ四駆ベースのAIカー TatamiRacerの製作
covao
1
270
JAWS-UG Community Upadate - JAWS-UG 熊本
awsjcpm
2
160
在宅フルリモートワークを可能にするスキルと知識n連発! / how to more effective remoteworking
masaru_b_cl
3
1.2k
JAWS-UGについて JAWS-UG TOHOKU [青森] 弘前開催
awsjcpm
0
230
こんなにあるの? 最近のIPAトレンドを ざっくりまとめてみた
watany
4
1k
安全に失敗するための手遊び-未定義動作を引き出そう-
zilmina
0
650
3ヶ月でできる! 探査機自作ゼミ教材自作入門
sksat
6
3k
「AITRIOS」でトカゲの活動量を可視化
hoshinoresearch
0
400
雑にコミュニティを続けてもいいと思っている/Feel free to continue the community
camel_404
0
230
テストも、国際化も! 小中高生クリエータ支援プログラム『未踏ジュニア』を支える技術
yasulab
PRO
1
210
【技術カンファレンス運営の裏側】Iwaken Lab 技術好き学生の近況報告 & ことみんさんに技術カンファレンス運営の裏側を聞いちゃう会
kotomin_m
5
1.7k
MustをWillに変える技術 〜アイドル・郁田はるきが"すべき"の壁を超えるまで〜
subroh0508
0
690
Featured
See All Featured
The Language of Interfaces
destraynor
161
25k
Rails Girls Zürich Keynote
gr2m
95
14k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
31
2.2k
Done Done
chrislema
185
16k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
520
GitHub's CSS Performance
jonrohan
1032
460k
Why Our Code Smells
bkeepers
PRO
339
57k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
Transcript
この冬、BusPirateを 使い倒す きとけー(kitok)
[email protected]
⾃⼰紹介 • きとけー、きとけい、⽊藤 圭亮(kitokay, kitok) • キュアカイシャイン2年⽬(新プリキュア出た) • キャンプ2009卒、2012〜15チューター •
2016年からキャンプ講師 • ハードウェアリバースエンジニアリングを講義 • 2017年はBusPirateを使ってリバースする講義 • 温泉が好きです(温泉⾏きたい not ⾜湯)
今⽇の発表 • ほとんどデモなので、失敗したらごめんなさい
「この冬、Bus Pirateを使い倒す」 • Bus Pirateとは • Open Source Hardware and
Software Project • ハードウェア解析⽤の治具(?) • Mainlineはv3.6 • 千⽯電商、Switch Science • 4000円前後 • Switch Scienceのほうが少し安い
Bus Pirateで出来ること • 1-wire • I2C • SPI • JTAG
• Asynchronous serial(UART) • MIDI • PC Keyboard(PS/2) • HD447800 LCD • 2- and 3-wire libraries with bitwise pin control • Scriptable binary bitbang, 1-wire, I2C, SPI and UART 公式サイトより引⽤ 今⽇はここをデモ
Bus Pirateの概要図 PC USB-UART (FT232RL) BusPirate本体 (PIC24FJ64) MOSI/MISO Vcc, AUXなど
基本的にSerial経由で操作 • PyserialでPython Scriptable • 基本なpythonフレームワークは公開されてる • https://github.com/BusPirate • 基本的なやりかたも公開されてる
• http://dangerousprototypes.com/docs/Bus_Pirate_Scripting_in _Python • 例えば… • SPIのROMをdumpするとか • 1-wireでセンサデータを取得するとか • I2Cのデバイスの通信を取得するとか
とりあえず順番にデモ • UART • 1-wire • I2C • SPI •
JTAG • おまけ
UART • UARTモード • テストとして、出⼒したものを⼊⼒する • キーボード⼊⼒したものがターミナルに表⽰
モード切り替え • Hi-Z(⾼インピーダンスモード)→UARTモード • 初期はHi-Z mode、モード切り替えて使⽤ • Baud rate, stop
bitなどを設定 • オープンドレインでOutputの電圧を変更可能 • または3.3VのOutput • Inputはmax 5.5V • Transparent Bridgeにする
BusPirateの概要図 PC USB-UART (FT232RL) BusPirate本体 (PIC24FJ64) UART RX/TX PCからSerialが透過的に⾒える
1-wire • 1-wireの温度センサー • センサ系が多い(安価なデバイス) • DS18B20(秋⽉で変える1-wire温度センサIC)
I2C • I2CのROM dumpのデモ • I2Cで通信をするデバイスも多い • 例:Wiiのヌンチャク、SNESミニのコントローラ
こんな感じで接続 • Microchip 24LC64
SPI • SPIのEEPROMのdump • SPIは組込みのROMに使われることが多い • 例:ルーターのFlashROM(ファーム格納)
こんな感じで接続
ドキュメントの⽇本語化 • Bus Pirateチュートリアルを⽇本語化してます • ご協⼒いただける⼈は
[email protected]
まで • たぶん今⽉中にどっかでアナウンスします
• 他のリバエンツールも探ってます • 主にSDRツール(HackRF, YardStickとか) • IoTSecなんだから、無線もやらないとね! • 有⽤Toolsのドキュメント⽇本語化を進めたい
Bus Pirateをつかって • いろんな機器を分解して遊ぼう! • でも法的なところは守ろう • 知的財産権とか、著作権とか • リバースするのは違法ではないが、リバースして同
様の製品を作るのは違法 • 機器によっては、ファームウェアリバースは違法 • Let’s hacking with Bus Pirate!