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
93
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
400
Other Decks in Technology
See All in Technology
ServiceNow Knowledge 24の歩き方 EYストラテジー・アンド・コンサルティング
manarobot
0
180
チームでロジカルシンキングに改めて向き合っている話 〜学習環境と実践⽅法〜
sansantech
PRO
2
1.5k
サーバー間 GraphQL と webmock-graphql の話 / server-to-server graphql and webmock-graphql
qsona
2
180
開発生産性向上サービスを作るFindyが自分たちで開発生産性を爆上げした組織づくりの歩み / Findy's path to boosting its own development productivity 2024-04-17
ma3tk
3
610
開発パフォーマンスを最大化するための開発体制
ham0215
2
180
アクセシビリティを考慮したUI/CSSフレームワーク・ライブラリ選定
yajihum
2
1k
4年前、あるじゃん老害エンジニアLT合戦に登壇、米国西海岸コンピュータ歴史博物館体験記の続編
toshi_atsumi
0
220
Reducing Cross-Zone Egress at Spotify with Custom gRPC Load Balancing Recap
koh_naga
0
190
推しは推せるときに推せ! プロダクトにフィードバックしていこう
nakasho
0
280
元インフラエンジニアに成る / Human Resources to Human Relations
bobtani
4
890
Kernel MemoryでAzure OpenAI Serviceとお手軽データソース連携
mitsuzono
1
180
ChatworkのSRE部って実は 半分くらいPlatform Engineering部かもしれない
saramune
0
150
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
30
6k
The Cost Of JavaScript in 2023
addyosmani
16
3.8k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
14
1.5k
The Mythical Team-Month
searls
216
42k
Stop Working from a Prison Cell
hatefulcrawdad
266
19k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
14
1.5k
Debugging Ruby Performance
tmm1
70
11k
Testing 201, or: Great Expectations
jmmastey
28
6.3k
Building a Modern Day E-commerce SEO Strategy
aleyda
17
6.4k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
2
3.4k
Design by the Numbers
sachag
274
18k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
17
1.4k
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