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
Radeco Pseudo C Code Generation
Search
kriw
September 08, 2018
Technology
1
97
Radeco Pseudo C Code Generation
The slide of r2con2018
kriw
September 08, 2018
Tweet
Share
More Decks by kriw
See All by kriw
セキュリティキャンプ2017全国大会 集中コースZ5
kriw
1
430
Other Decks in Technology
See All in Technology
What is DRE? - Road to SRE NEXT@広島
chanyou0311
3
630
開発生産性をむしろ向上させる セキュリティパートナーの作り方 / Dev Productivity Con 2024
flatt_security
0
390
データベース研修 DB基礎【MIXI 24新卒技術研修】
mixi_engineers
PRO
0
220
「我々はどこに向かっているのか」を問い続けるための仕組みづくり / Establishing a System for Continuous Inquiry about where we are
daitasu
0
170
成長期に歩みを止めないための創業期の開発文化形成
mayah
6
420
AOAI Dev Day - Opening Session
yoshidashingo
2
470
年間一億円削減した時系列データベースのアーキテクチャ改善~不確実性の高いプロジェクトへの挑戦~
lycorptech_jp
PRO
3
2.9k
頼られるのが大好きな 皆さんへ - 支援相手との期待の合わせ方、突き放し方 -/For_people_who_like_to_be_relied_on
naitosatoshi
1
290
[NIKKEI Tech Talk]Bias for Action!! 実践から学ぶための仕組とコミュニティ / Community for Practice and Learning
kanamasa
0
280
セキュリティ研修 Day1【MIXI 24新卒技術研修】
mixi_engineers
PRO
0
160
目標設定は好きですか? アジャイルとともに目標と向き合い続ける方法 / Do you like target Management?
kakehashi
10
3k
DevIO2024_レガシー運用からの脱却 -クラウド活用の実践事例とベストプラクティス-
jun2882
0
210
Featured
See All Featured
The Language of Interfaces
destraynor
151
23k
A Modern Web Designer's Workflow
chriscoyier
689
190k
Become a Pro
speakerdeck
PRO
15
4.8k
Mobile First: as difficult as doing things right
swwweet
219
8.8k
The Invisible Customer
myddelton
117
13k
A Tale of Four Properties
chriscoyier
155
22k
How STYLIGHT went responsive
nonsquared
93
5k
Typedesign – Prime Four
hannesfritz
37
2.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
39
47k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
78
15k
We Have a Design System, Now What?
morganepeng
46
7k
The Mythical Team-Month
searls
217
43k
Transcript
Radeco Pseudo C Code Generation GSoC’2018
Radeco Pseudo C Code Generation I have done - writing
pseudo C Code generator - writing r2 integration
Demo
Decompilers
Projects - radeco-lib - https://github.com/radareorg/radeco-lib - Core library for binary
analysis, decompilation - radeco - https://github.com/radareorg/radeco - User interface
Design (radare2 to radeco) Input (ESIL)
Design (radeco-lib) radeco has 3 stages - Loading Binary (ESIL)
- Analyses - deadcode elimination, ... - Decompilation - heuristics - control flow structuring
Works Before GSoC After GSoC
Works Before GSoC After GSoC
IR Assembly-like intermidiate representation - Generated from ESIL - SSA
form Example IR
C-like CFG - CFG with C expressions
IR to C-like CFG - CFG is copied from the
one of IR No for/if/while - Expressions are recovered by expr tree %34 = (%30 | %31) & 0xffffffff %33 = %30 | %31 %34 = %33 & 0xffffffff
C-like CFG to Pseudo C code - Recover C code
from CFG (with GOTOs) - Only recover assignments with memory reference - Recovered: mov [ebp - 0x1c], 0x10 - Ignored: mov eax, 0x10
Challenges - Required knowledge of program/binary analysis - Sharing tasks
with HMPerson1 - Few information about decompiler
TODOs Milestone for Radeco-0.1 - Bug fixes - API stabilization
(radeco-lib) - Documentation - etc
Commits
Thank you