SlideShare a Scribd company logo
1 of 59
Download to read offline
BinProxy
A New Paradigm for Binary Analysis
Dongjoo Ha (NSHC) Hyunwoo Choi (KAIST)
Sunyoung Sim (AhnLab) Joobong Cho (RaonWhitehat)
Jisun Kim (AhnLab) Gyeongik Jang (NSHC)
Objective
We have to defeat the enemies
and save the earth!!
Our contributions
●  Introduce a new concept of analysis
framework to use easily
o  perform analysis of normal application by using web
proxy
●  Introduce methodologies for implementing
our concept
o  pros and cons of the methodologies
●  Demonstrate use cases
Define Keyword
●  Web Application
o  consist of usually script languages
o  operate based on web server/client
●  Normal Application
o  executable binary except for web applicaton
o  PE, ELF, etc.
●  Web Proxy
o  a tool for web application analysis
o  Burp suite, paros, fiddler, etc.
What’s wrong?
Background
Existing methodologies/tools
for application analysis
Web Application analysis
●  easy to use and operate using a web proxy (burp, paros,
fiddler, etc.)
●  monitor and modify the contents without difficulty
Existing methodologies/tools
(cont’d)
Normal Application(excutables) analysis
●  much harder and complex than web application(GDB, IDA,
Ollydbg, windbg, etc.)
●  In secure channel, how can we check the contents?
Challenges for application
analysis
We cannot
save the earth
using our resources
Lack of time and manpower
How to solve a problem?
Need a EASY tool
So what??
BinProxy : A New Paradigm for Binary
Analysis
Let’s get started with Demo!
Key Features
We do not need gdb and ollydbg
to analyze applications any more.
Key Features (cont’d)
2. modify return value
1. original return value
3. Click Forward Button
Should we use the difficult tools for simple analysis?
You can monitor and control the normal applications
with your favorite web proxy
Key Features (cont’d)
We do not want to use difficult IDA tool
to analyze applications any more.
Key Features (cont’d)
You can know what functions are existed in target apps and
what functions can be monitored.
Overall Achitecture
Components
●  Target application
o  smart phone apps, excutable program based on Windows, OSX and etc.
●  Web Proxy
o  A user-friendly proxy to be used for analysis (ex. burp,
paros, ..)
●  BinProxy Client
o  is Operated in the target application is installed
o  communication module : communicate with BinProxy server
o  hooking module : modify the flow of functions.
●  BinProxy Server
o  is Operated in the web proxy is installed
o  communication module : communicate with BinProxy client and web
proxy
What You Need
Need things to make BinProxy
Intercept function call &
Forward it to a Web proxy
Main techniques for implementation
how to control function calls by using web proxy
Convert Functions
Function monitoring and
Function Controlling
Main techniques for implementation (cont’d)
API / User-defined function
Hooking
Function monitoring and
Function Controlling
Main techniques for implementation (cont’d)
Dynamic function Hooking
No need a pre-compiled hooking code
Dynamic target function selection
Function monitoring and
Function Controlling
Main techniques for implementation (cont’d)
Return value,
primitive / refernce
type arguments
Target function selection
Main techniques for implementation (cont’d)
Extraction API lists
Target function selection
(cont’d)
Main techniques for implementation (cont’d)
Extracting user-defined fuctions
and Finding out Args and Types
Target function selection
(cont’d)
Main techniques for implementation (cont’d)
Monitoring function calls and statistics
-> Selecting target functions easily
How to make?
the way of building BinProxy
How to interwork with a web
proxy - BinProxy Client
* hooked_func send before_call message to BinProxy Server through
communication module.
* before_call message = function name + the value of arguments
* After sending a before_call message, the hooked_func will be blocked until
getting response from BinProxy Server.
How to interwork with a web
proxy - BinProxy Server
BinProxy Server convert a before_call message into
HTTP request format for delivering the message to
Web Proxy.
POST http://127.0.0.1:53388/function_name
Host: target_app_name
User-Agent: BinProxy
01_414141
How to interwork with a web
proxy - Web Proxy
How to interwork with a web
proxy - BinProxy Client
execute an original function
After sending an after_call message,
hooked_func will be blocked until getting response from BinProxy Server.
How to interwork with a web
proxy - BinProxy Server
BinProxy Server convert a after_call message into
HTTP response format for delivering the message to
Web Proxy.
HTTP/1.1 200 OK
Date: Mon, 04 Aug 2014 17:22:59 GMT
Server: BinProxy
Content-Length: 1
Connection: close
Content-Type: application/return
0
How to interwork with a web
proxy - Web Proxy
How to interwork with a web
proxy - BinProxy Client
return the value
How to make?
Ways of build android client & PoC
Key Requirements
Function
What
 
 How
 
 
To
 Extract
 ???
 
How
 to
 Hook
 ???
 
Key Requirements
- What  How To extract ..
We can use for hooking in Android :
•  Cydia substrate for Android
•  Introspy-Android (GUI Interface + Cydia Substrate )
•  AndHook(Android Hooking Framework)
•  ADBI(Android Dynamic Binary Instrumentation Toolkit)
•  [Paper] Hooking on Android -2014 CodeEngn Conference
….
Key Requirements
- What  How To extract ..
ADBI
(Android Binary Instrumentation Toolkit)
Intercept/Use DVM Methods
on Dalvik VM Library
(libdvm.so)
Dynamic Dalvik Instrumentation Framework for Android (old)
- Collin Mulliner, SummerCon 2013.
https://github.com/crmulliner/adbi (current)
Binproxy Client modules for Android
TARGET (App.)
HOOKY
(shared library)
Binproxy Server
(Users)
COMMUNICATOR
(user interaction)
INJECTOR
HOOKY
(shared library)
COMM.
(user interaction)
●  INJECTOR
: Inject the HOOKER(.so) into Target App.(running
process)
●  HOOKER
: Hook the java/Android standard API for analysis.
: loaded as the shared library(so) developed using JNI
●  COMMUNICATOR
: Interactive interface for communication with user
: Send/receive values for Hooking, Monitoring,
Modifying
Binproxy Client modules … (cont’d)
How to implement Android Client
Implemented using JNI(Java Native Interface)
 
-  Get the method Information loaded
-  Define/Prototype new function(native) for target
function(method)
-  Call Original Method from new function.
-  Monitor/Modify a argument/return value
DVM
Original
method
New(JNI)
Find
 Class/Method
 
(dvmFindXXXX)
 1
 Replace
 the

More Related Content

Viewers also liked

Dynamic Binary Analysis and Obfuscated Codes
Dynamic Binary Analysis and Obfuscated Codes Dynamic Binary Analysis and Obfuscated Codes
Dynamic Binary Analysis and Obfuscated Codes Jonathan Salwan
 
The Postmodern Binary Analysis
The Postmodern Binary AnalysisThe Postmodern Binary Analysis
The Postmodern Binary AnalysisOnur Alanbel
 
Finding The Weak Link in Windows Binaries
Finding The Weak Link in Windows BinariesFinding The Weak Link in Windows Binaries
Finding The Weak Link in Windows BinariesOllie Whitehouse
 
An Introduction to the Binary Analysis Tool
An Introduction to the Binary Analysis ToolAn Introduction to the Binary Analysis Tool
An Introduction to the Binary Analysis ToolShane Coughlan
 
[CB16] Be a Binary Rockstar: An Introduction to Program Analysis with Binary ...
[CB16] Be a Binary Rockstar: An Introduction to Program Analysis with Binary ...[CB16] Be a Binary Rockstar: An Introduction to Program Analysis with Binary ...
[CB16] Be a Binary Rockstar: An Introduction to Program Analysis with Binary ...CODE BLUE
 
Using Static Binary Analysis To Find Vulnerabilities And Backdoors in Firmware
Using Static Binary Analysis To Find Vulnerabilities And Backdoors in FirmwareUsing Static Binary Analysis To Find Vulnerabilities And Backdoors in Firmware
Using Static Binary Analysis To Find Vulnerabilities And Backdoors in FirmwareLastline, Inc.
 

Viewers also liked (7)

Stu w22 a
Stu w22 aStu w22 a
Stu w22 a
 
Dynamic Binary Analysis and Obfuscated Codes
Dynamic Binary Analysis and Obfuscated Codes Dynamic Binary Analysis and Obfuscated Codes
Dynamic Binary Analysis and Obfuscated Codes
 
The Postmodern Binary Analysis
The Postmodern Binary AnalysisThe Postmodern Binary Analysis
The Postmodern Binary Analysis
 
Finding The Weak Link in Windows Binaries
Finding The Weak Link in Windows BinariesFinding The Weak Link in Windows Binaries
Finding The Weak Link in Windows Binaries
 
An Introduction to the Binary Analysis Tool
An Introduction to the Binary Analysis ToolAn Introduction to the Binary Analysis Tool
An Introduction to the Binary Analysis Tool
 
[CB16] Be a Binary Rockstar: An Introduction to Program Analysis with Binary ...
[CB16] Be a Binary Rockstar: An Introduction to Program Analysis with Binary ...[CB16] Be a Binary Rockstar: An Introduction to Program Analysis with Binary ...
[CB16] Be a Binary Rockstar: An Introduction to Program Analysis with Binary ...
 
Using Static Binary Analysis To Find Vulnerabilities And Backdoors in Firmware
Using Static Binary Analysis To Find Vulnerabilities And Backdoors in FirmwareUsing Static Binary Analysis To Find Vulnerabilities And Backdoors in Firmware
Using Static Binary Analysis To Find Vulnerabilities And Backdoors in Firmware
 

Similar to BinProxy: New Paradigm of Binary Analysis With Your Favorite Web Proxy

Testing with Codeception
Testing with CodeceptionTesting with Codeception
Testing with CodeceptionJeremy Coates
 
Hybrid Apps in a Snap
Hybrid Apps in a SnapHybrid Apps in a Snap
Hybrid Apps in a SnapPaulina Gallo
 
How to Create a Service in Choreo
How to Create a Service in ChoreoHow to Create a Service in Choreo
How to Create a Service in ChoreoWSO2
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakayaMbakaya Kwatukha
 
Developing Rich Internet Applications with Perl and JavaScript
Developing Rich Internet Applications with Perl and JavaScriptDeveloping Rich Internet Applications with Perl and JavaScript
Developing Rich Internet Applications with Perl and JavaScriptnohuhu
 
Modern Web Applications Utilizing HTML5 APIs
Modern Web Applications Utilizing HTML5 APIsModern Web Applications Utilizing HTML5 APIs
Modern Web Applications Utilizing HTML5 APIsIdo Green
 
When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?Niklas Heidloff
 
RedisConf17 - Dynomite - Making Non-distributed Databases Distributed
RedisConf17 - Dynomite - Making Non-distributed Databases DistributedRedisConf17 - Dynomite - Making Non-distributed Databases Distributed
RedisConf17 - Dynomite - Making Non-distributed Databases DistributedRedis Labs
 
Griffon for the Enterprise
Griffon for the EnterpriseGriffon for the Enterprise
Griffon for the EnterpriseJames Williams
 
Why we built 35kb React Native alternative ?
Why we built 35kb React Native alternative ?Why we built 35kb React Native alternative ?
Why we built 35kb React Native alternative ?Sahebjot Singh
 
Neha Arora_Resume
Neha Arora_ResumeNeha Arora_Resume
Neha Arora_ResumeNeha Arora
 
How to build Simple yet powerful API.pptx
How to build Simple yet powerful API.pptxHow to build Simple yet powerful API.pptx
How to build Simple yet powerful API.pptxChanna Ly
 
Utilizing HTML5 APIs
Utilizing HTML5 APIsUtilizing HTML5 APIs
Utilizing HTML5 APIsIdo Green
 
WebSDK - Switching between service providers
WebSDK - Switching between service providersWebSDK - Switching between service providers
WebSDK - Switching between service providersHotstar
 
Browserify + Angular
Browserify + AngularBrowserify + Angular
Browserify + AngularBen Drucker
 
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCBuild Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCTim Burks
 
AMC Networks Experiments Faster on the Server Side
AMC Networks Experiments Faster on the Server SideAMC Networks Experiments Faster on the Server Side
AMC Networks Experiments Faster on the Server SideOptimizely
 
Simple Web Services with PHP
Simple Web Services with PHPSimple Web Services with PHP
Simple Web Services with PHPJohn Paul Ada
 

Similar to BinProxy: New Paradigm of Binary Analysis With Your Favorite Web Proxy (20)

Netflix conductor
Netflix conductorNetflix conductor
Netflix conductor
 
Testing with Codeception
Testing with CodeceptionTesting with Codeception
Testing with Codeception
 
Hybrid Apps in a Snap
Hybrid Apps in a SnapHybrid Apps in a Snap
Hybrid Apps in a Snap
 
How to Create a Service in Choreo
How to Create a Service in ChoreoHow to Create a Service in Choreo
How to Create a Service in Choreo
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakaya
 
Dynomite @ RedisConf 2017
Dynomite @ RedisConf 2017Dynomite @ RedisConf 2017
Dynomite @ RedisConf 2017
 
Developing Rich Internet Applications with Perl and JavaScript
Developing Rich Internet Applications with Perl and JavaScriptDeveloping Rich Internet Applications with Perl and JavaScript
Developing Rich Internet Applications with Perl and JavaScript
 
Modern Web Applications Utilizing HTML5 APIs
Modern Web Applications Utilizing HTML5 APIsModern Web Applications Utilizing HTML5 APIs
Modern Web Applications Utilizing HTML5 APIs
 
When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?
 
RedisConf17 - Dynomite - Making Non-distributed Databases Distributed
RedisConf17 - Dynomite - Making Non-distributed Databases DistributedRedisConf17 - Dynomite - Making Non-distributed Databases Distributed
RedisConf17 - Dynomite - Making Non-distributed Databases Distributed
 
Griffon for the Enterprise
Griffon for the EnterpriseGriffon for the Enterprise
Griffon for the Enterprise
 
Why we built 35kb React Native alternative ?
Why we built 35kb React Native alternative ?Why we built 35kb React Native alternative ?
Why we built 35kb React Native alternative ?
 
Neha Arora_Resume
Neha Arora_ResumeNeha Arora_Resume
Neha Arora_Resume
 
How to build Simple yet powerful API.pptx
How to build Simple yet powerful API.pptxHow to build Simple yet powerful API.pptx
How to build Simple yet powerful API.pptx
 
Utilizing HTML5 APIs
Utilizing HTML5 APIsUtilizing HTML5 APIs
Utilizing HTML5 APIs
 
WebSDK - Switching between service providers
WebSDK - Switching between service providersWebSDK - Switching between service providers
WebSDK - Switching between service providers
 
Browserify + Angular
Browserify + AngularBrowserify + Angular
Browserify + Angular
 
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCBuild Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPC
 
AMC Networks Experiments Faster on the Server Side
AMC Networks Experiments Faster on the Server SideAMC Networks Experiments Faster on the Server Side
AMC Networks Experiments Faster on the Server Side
 
Simple Web Services with PHP
Simple Web Services with PHPSimple Web Services with PHP
Simple Web Services with PHP
 

Recently uploaded

complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 

Recently uploaded (20)

complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 

BinProxy: New Paradigm of Binary Analysis With Your Favorite Web Proxy

  • 1. BinProxy A New Paradigm for Binary Analysis Dongjoo Ha (NSHC) Hyunwoo Choi (KAIST) Sunyoung Sim (AhnLab) Joobong Cho (RaonWhitehat) Jisun Kim (AhnLab) Gyeongik Jang (NSHC)
  • 2. Objective We have to defeat the enemies and save the earth!!
  • 3. Our contributions ●  Introduce a new concept of analysis framework to use easily o  perform analysis of normal application by using web proxy ●  Introduce methodologies for implementing our concept o  pros and cons of the methodologies ●  Demonstrate use cases
  • 4. Define Keyword ●  Web Application o  consist of usually script languages o  operate based on web server/client ●  Normal Application o  executable binary except for web applicaton o  PE, ELF, etc. ●  Web Proxy o  a tool for web application analysis o  Burp suite, paros, fiddler, etc.
  • 6. Existing methodologies/tools for application analysis Web Application analysis ●  easy to use and operate using a web proxy (burp, paros, fiddler, etc.) ●  monitor and modify the contents without difficulty
  • 7. Existing methodologies/tools (cont’d) Normal Application(excutables) analysis ●  much harder and complex than web application(GDB, IDA, Ollydbg, windbg, etc.) ●  In secure channel, how can we check the contents?
  • 8. Challenges for application analysis We cannot save the earth using our resources Lack of time and manpower
  • 9. How to solve a problem? Need a EASY tool
  • 10. So what?? BinProxy : A New Paradigm for Binary Analysis
  • 11. Let’s get started with Demo!
  • 12. Key Features We do not need gdb and ollydbg to analyze applications any more.
  • 13. Key Features (cont’d) 2. modify return value 1. original return value 3. Click Forward Button Should we use the difficult tools for simple analysis? You can monitor and control the normal applications with your favorite web proxy
  • 14. Key Features (cont’d) We do not want to use difficult IDA tool to analyze applications any more.
  • 15. Key Features (cont’d) You can know what functions are existed in target apps and what functions can be monitored.
  • 17. Components ●  Target application o  smart phone apps, excutable program based on Windows, OSX and etc. ●  Web Proxy o  A user-friendly proxy to be used for analysis (ex. burp, paros, ..) ●  BinProxy Client o  is Operated in the target application is installed o  communication module : communicate with BinProxy server o  hooking module : modify the flow of functions. ●  BinProxy Server o  is Operated in the web proxy is installed o  communication module : communicate with BinProxy client and web proxy
  • 18. What You Need Need things to make BinProxy
  • 19. Intercept function call & Forward it to a Web proxy Main techniques for implementation how to control function calls by using web proxy Convert Functions
  • 20. Function monitoring and Function Controlling Main techniques for implementation (cont’d) API / User-defined function Hooking
  • 21. Function monitoring and Function Controlling Main techniques for implementation (cont’d) Dynamic function Hooking No need a pre-compiled hooking code Dynamic target function selection
  • 22. Function monitoring and Function Controlling Main techniques for implementation (cont’d) Return value, primitive / refernce type arguments
  • 23. Target function selection Main techniques for implementation (cont’d) Extraction API lists
  • 24. Target function selection (cont’d) Main techniques for implementation (cont’d) Extracting user-defined fuctions and Finding out Args and Types
  • 25. Target function selection (cont’d) Main techniques for implementation (cont’d) Monitoring function calls and statistics -> Selecting target functions easily
  • 26. How to make? the way of building BinProxy
  • 27. How to interwork with a web proxy - BinProxy Client * hooked_func send before_call message to BinProxy Server through communication module. * before_call message = function name + the value of arguments * After sending a before_call message, the hooked_func will be blocked until getting response from BinProxy Server.
  • 28. How to interwork with a web proxy - BinProxy Server BinProxy Server convert a before_call message into HTTP request format for delivering the message to Web Proxy. POST http://127.0.0.1:53388/function_name Host: target_app_name User-Agent: BinProxy 01_414141
  • 29. How to interwork with a web proxy - Web Proxy
  • 30. How to interwork with a web proxy - BinProxy Client execute an original function After sending an after_call message, hooked_func will be blocked until getting response from BinProxy Server.
  • 31. How to interwork with a web proxy - BinProxy Server BinProxy Server convert a after_call message into HTTP response format for delivering the message to Web Proxy. HTTP/1.1 200 OK Date: Mon, 04 Aug 2014 17:22:59 GMT Server: BinProxy Content-Length: 1 Connection: close Content-Type: application/return 0
  • 32. How to interwork with a web proxy - Web Proxy
  • 33. How to interwork with a web proxy - BinProxy Client return the value
  • 34. How to make? Ways of build android client & PoC
  • 36.  
  • 37.  How
  • 38.  
  • 39.   To
  • 41.  ???
  • 43.  to
  • 45.  ???
  • 46.  
  • 47. Key Requirements - What How To extract ..
  • 48. We can use for hooking in Android : •  Cydia substrate for Android •  Introspy-Android (GUI Interface + Cydia Substrate ) •  AndHook(Android Hooking Framework) •  ADBI(Android Dynamic Binary Instrumentation Toolkit) •  [Paper] Hooking on Android -2014 CodeEngn Conference …. Key Requirements - What How To extract ..
  • 49. ADBI (Android Binary Instrumentation Toolkit) Intercept/Use DVM Methods on Dalvik VM Library (libdvm.so) Dynamic Dalvik Instrumentation Framework for Android (old) - Collin Mulliner, SummerCon 2013. https://github.com/crmulliner/adbi (current)
  • 50. Binproxy Client modules for Android TARGET (App.) HOOKY (shared library) Binproxy Server (Users) COMMUNICATOR (user interaction) INJECTOR HOOKY (shared library) COMM. (user interaction)
  • 51. ●  INJECTOR : Inject the HOOKER(.so) into Target App.(running process) ●  HOOKER : Hook the java/Android standard API for analysis. : loaded as the shared library(so) developed using JNI ●  COMMUNICATOR : Interactive interface for communication with user : Send/receive values for Hooking, Monitoring, Modifying Binproxy Client modules … (cont’d)
  • 52. How to implement Android Client Implemented using JNI(Java Native Interface)
  • 53.   -  Get the method Information loaded -  Define/Prototype new function(native) for target function(method) -  Call Original Method from new function. -  Monitor/Modify a argument/return value
  • 57.  1
  • 59.  the
  • 62.  
  • 63.  
  • 65.  a
  • 66.  new
  • 70.   3
  • 72.  new
  • 76.  the
  • 79.  
  • 81.  new
  • 85.   4 How to implement … (Cont’d) Monitor/Modify
  • 86. How to implement .. (Cont’d) Call return type Method!
  • 87. DEMO - PoC for Android App DEMO
  • 88.
  • 89.
  • 90. How to make? Ways of build iOS client PoC
  • 91. Key Requirements - How To hook .. ●  We can use for hooking in iOS: a.  Cydia Substrate for iOS b.  fishhook c.  Mach-O-Hook
  • 92. How to implement iOS client ●  Use a CydiaSubstrate a.  Why CydiaSubstrate? - verified stability ●  Most of Apps in Cydia are use a CydiaSubstrate! ●  Component of CydiaSubstrate a.  MobileHooker b.  MobileLoader c.  Safe Mode
  • 93. Key Requirements - What How extract... ●  Mach-O File Format
  • 94. Key Requirements - What How extract... ●  API LC_SYMTAB Symbol Table String Table
  • 95. Key Requirements - What How extract... ●  Objective-C and User Function Address LC_FUNCTION_STARTS Function Starts
  • 96. How to implement iOS client ●  Target API and method selection a.  Extracting Objective C classes methods b.  Extracting API lists c.  Finding out user-defined function’s args and types ●  Monitoring an entire method and API by using hooking (Logging?) (Logging?)
  • 97. DEMO - PoC for iOS App DEMO
  • 98.
  • 100. Implementation Methods ●  How to obtain a target application’s function list and detail informations of the function ●  How to utilize database information to distinct functions
  • 101. Additional Functions ●  arbitrary function execution ●  arbitrary code execution ●  memory scan and patch ●  function control based on script languages ●  disassemble and decompilation And… ●  Performance Improvement ●  Additional OS Support
  • 102. 谢谢 Any Other Questions or Comments? email : binproxy@0-day.me