SlideShare uma empresa Scribd logo
1 de 25
Baixar para ler offline
ANTO JOSEPH
@whoami
• Security	Engineer	@	Intel
• Past	Speaker	/	Trainer	@	Brucon,	HITB	Amsterdam,	NullCon,	GroundZero ,	c0c0n	…
• Will	be	Speaking	@	Defcon	,	Blackhat
• Mobile	Security	/	IOT		Enthusiast
• Intrested	in	Machine	Learning	/	Neural	Networks	
• When	not	hacking	,	you	can	find	me	filling	visa	applictions	:|
DYNAMIC	INSTRUMENTATION
• Using	Xposed Modules	
• Using	adbi
• Other	tools	using	Library	Injection	Techniques	,	LD_PRELOAD
• Xposed Framework	being	the	most	famous	with	larger	user	/	developer	base
What	Is	Hooking	?
How	it’s	done	currently	?
• Xposed Framework	
• Xposed modules	are	indented	to	make		long	lasting	changes	to		devices
• Install	Xposed Installer	,	which	installs	the	xposed –bridge
• Replaces	app_process with	a	modified	 version	which	loads	the	bridge	which	enables	the	hooking	 func
• Write	app	using	java	(	android	studio		)	using	the	deps		and	install	it	on	the	device
• To	activate	the	module	,	reboot	
• If	you	need	to	change	something	 ,	reboot
DEMO	– XPOSED
What	Do	We	Want	In	Our	Solution	?
• Should	be	Fast
• Should	Be	Simple
• Should	be	Easy	to	Learn
• Should	Just	Work	!
DIFF-DROID
DIFF-DROID
• Based	on	Frida
• Supports	 Hooking	Native	and	Java	Methods
• Web	UI	,	with	editable	scripts	to	hook	Android	Methods
• Re-usable	Modules	which	can	be	combined	as	well
• Instant	changes	in	hooking	 scripts
• No	Restarts	at	allJ
DEMO
RUNNING	DROID-FF
• Start	redis server
• Start	 gunicorn diff-gui:app --worker-class	gevent --bind	127.0.0.1:80
• Start	android	emulator	(	Android	4.4.4)
• Push	frida-server	to	/data/local/tmp
• Exec	frida-server
• Browse	to	http://127.0.0.1
How	Does	It	Work
• Frida	:
• The	core	of	the	app	is	handled	by	frida.
• Takes	care	of	hooking	native	and	java	code
• Written	by	Ole	Andre	Vadla	Ravnas
• Supports		Win/	Unix	/Android/IOS	platforms
INTERNALS
• Frida-server	injects	a	native	library	into	the	process	using	the	ptrace api .	This	is	the	only	support	
injection	mechanism	for	now	.		
• Loads	the	hook	code	and		replaces	/	logs	the	fuction/arguments	 accordingly
• Send	method	is	used	to	send	data	from	JVM	to	python	side
• Java.perfrom is	used	to	hook	Dalvik Code
• Interceptor.attach	is	used	to	hook	Native	Code
• Most	exceptions	are	handled	gracefully	with	a	detailed	stacktrace
CONT ..
• Zero	Modification	to	the	device
• Just	push	frida-server	binary	to	the	device	and	exec	(	requires	root	)
• Communicates	to	the	system	component	over	adb
• Updates	from	the	instrumentation	script	is	pushed	to	the	web	using	Server	side	push	for	real-time	
updates
• Using	redis-server	as	message	que
How	Do	We	Write	A	Hook	?
Look	Up	The	Api
WRITING	A	NEW	HOOK	- DALVIK
Java.perform(function	()	{												
var	TM	=	Java.use("android.os.Debug");												
TM.isDebuggerConnected.implementation	=	function	()	{																
return	false;											 };							 });
WRITING	A	NEW	HOOK	– NATIVE	STYLE
Interceptor.attach	(Module.findExportByName	(	"libc.so",	”open"),	{				
onEnter:	function	(args)	{								
send	(Memory.readUtf8String	(args	[1]));												}
});
SOURCE	CODE	:
• https://github.com/antojoseph/diff-gui
FUTURE
• Adding	 more	modules	(	Contributions	 are	welcome	)
• Support	 IOS
• Supporting	 Frida	in	ART	(	its	almost	on	its	way	)
FEW	WORDS	FROM	OLE	ANDRÉ VADLA RAVNÅS
• Future	of	Frida	is	the	Community	!
• We	have	an	active	irc @	freenode #frida
• Frida	Mailing	List
• Happy	to	have	community	contributions	in	terms	of	Code	/	
Documentation	/	Apps	based	on	Frida
RESOURCES
• https://rotlogix.com/2015/09/13/defeating-ssl-pinning-in-coin-for-android/
• https://cedricvb.be/post/seccon-2015-reverse-engineering-android-apk-2-400-writeup/
• http://blog.csdn.net/autohacker/article/details/50503261
• http://blog.mdsec.co.uk/2015/04/instrumenting-android-applications-with.html
MERCI
• Question	?

Mais conteúdo relacionado

Mais procurados

Yow connected developing secure i os applications
Yow connected   developing secure i os applicationsYow connected   developing secure i os applications
Yow connected developing secure i os applicationsmgianarakis
 
Dark Side of iOS [SmartDevCon 2013]
Dark Side of iOS [SmartDevCon 2013]Dark Side of iOS [SmartDevCon 2013]
Dark Side of iOS [SmartDevCon 2013]Kuba Břečka
 
Ruxmon April 2014 - Introduction to iOS Penetration Testing
Ruxmon April 2014 - Introduction to iOS Penetration TestingRuxmon April 2014 - Introduction to iOS Penetration Testing
Ruxmon April 2014 - Introduction to iOS Penetration Testingeightbit
 
iOS Application Penetation Test
iOS Application Penetation TestiOS Application Penetation Test
iOS Application Penetation TestJongWon Kim
 
CrikeyCon 2015 - iOS Runtime Hacking Crash Course
CrikeyCon 2015 - iOS Runtime Hacking Crash CourseCrikeyCon 2015 - iOS Runtime Hacking Crash Course
CrikeyCon 2015 - iOS Runtime Hacking Crash Courseeightbit
 
iOS Application Security
iOS Application SecurityiOS Application Security
iOS Application SecurityEgor Tolstoy
 
Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Ca...
Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Ca...Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Ca...
Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Ca...eightbit
 
iOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersiOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersRyanISI
 
Basics of Linux
Basics of LinuxBasics of Linux
Basics of LinuxNayan Seth
 
Ubuntu tutorial slides
Ubuntu tutorial slidesUbuntu tutorial slides
Ubuntu tutorial slidesTrung Nguyen
 
OWASP Melbourne - Introduction to iOS Application Penetration Testing
OWASP Melbourne - Introduction to iOS Application Penetration TestingOWASP Melbourne - Introduction to iOS Application Penetration Testing
OWASP Melbourne - Introduction to iOS Application Penetration Testingeightbit
 
Pentesting iOS Apps - Runtime Analysis and Manipulation
Pentesting iOS Apps - Runtime Analysis and ManipulationPentesting iOS Apps - Runtime Analysis and Manipulation
Pentesting iOS Apps - Runtime Analysis and ManipulationAndreas Kurtz
 
Hacking and securing ios applications
Hacking and securing ios applicationsHacking and securing ios applications
Hacking and securing ios applicationsSatish b
 
Pentesting iPhone applications
Pentesting iPhone applicationsPentesting iPhone applications
Pentesting iPhone applicationsSatish b
 
I Want More Ninja – iOS Security Testing
I Want More Ninja – iOS Security TestingI Want More Ninja – iOS Security Testing
I Want More Ninja – iOS Security TestingJason Haddix
 
TCUK 2013 - Martin Block - Creating narrated videos for user assistance
TCUK 2013 - Martin Block - Creating narrated videos for user assistanceTCUK 2013 - Martin Block - Creating narrated videos for user assistance
TCUK 2013 - Martin Block - Creating narrated videos for user assistanceTCUK Conference
 

Mais procurados (20)

Yow connected developing secure i os applications
Yow connected   developing secure i os applicationsYow connected   developing secure i os applications
Yow connected developing secure i os applications
 
Dark Side of iOS [SmartDevCon 2013]
Dark Side of iOS [SmartDevCon 2013]Dark Side of iOS [SmartDevCon 2013]
Dark Side of iOS [SmartDevCon 2013]
 
Ruxmon April 2014 - Introduction to iOS Penetration Testing
Ruxmon April 2014 - Introduction to iOS Penetration TestingRuxmon April 2014 - Introduction to iOS Penetration Testing
Ruxmon April 2014 - Introduction to iOS Penetration Testing
 
iOS Application Penetation Test
iOS Application Penetation TestiOS Application Penetation Test
iOS Application Penetation Test
 
CrikeyCon 2015 - iOS Runtime Hacking Crash Course
CrikeyCon 2015 - iOS Runtime Hacking Crash CourseCrikeyCon 2015 - iOS Runtime Hacking Crash Course
CrikeyCon 2015 - iOS Runtime Hacking Crash Course
 
iOS Application Security
iOS Application SecurityiOS Application Security
iOS Application Security
 
iOS Application Penetration Testing
iOS Application Penetration TestingiOS Application Penetration Testing
iOS Application Penetration Testing
 
Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Ca...
Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Ca...Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Ca...
Online Retailer's Conference 2013 - Hacking Mobile Applications - Industry Ca...
 
iOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersiOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for Beginners
 
Basics of Linux
Basics of LinuxBasics of Linux
Basics of Linux
 
Ubuntu tutorial slides
Ubuntu tutorial slidesUbuntu tutorial slides
Ubuntu tutorial slides
 
OWASP Melbourne - Introduction to iOS Application Penetration Testing
OWASP Melbourne - Introduction to iOS Application Penetration TestingOWASP Melbourne - Introduction to iOS Application Penetration Testing
OWASP Melbourne - Introduction to iOS Application Penetration Testing
 
Pentesting iOS Apps - Runtime Analysis and Manipulation
Pentesting iOS Apps - Runtime Analysis and ManipulationPentesting iOS Apps - Runtime Analysis and Manipulation
Pentesting iOS Apps - Runtime Analysis and Manipulation
 
Hacking and securing ios applications
Hacking and securing ios applicationsHacking and securing ios applications
Hacking and securing ios applications
 
Pentesting iOS Apps
Pentesting iOS AppsPentesting iOS Apps
Pentesting iOS Apps
 
Pentesting iPhone applications
Pentesting iPhone applicationsPentesting iPhone applications
Pentesting iPhone applications
 
I Want More Ninja – iOS Security Testing
I Want More Ninja – iOS Security TestingI Want More Ninja – iOS Security Testing
I Want More Ninja – iOS Security Testing
 
Fuchsia
FuchsiaFuchsia
Fuchsia
 
Linux Basics
Linux BasicsLinux Basics
Linux Basics
 
TCUK 2013 - Martin Block - Creating narrated videos for user assistance
TCUK 2013 - Martin Block - Creating narrated videos for user assistanceTCUK 2013 - Martin Block - Creating narrated videos for user assistance
TCUK 2013 - Martin Block - Creating narrated videos for user assistance
 

Semelhante a DIFFDroid_Anto_Joseph_HIP_2016

Smart Platform Infrastructure with AWS
Smart Platform Infrastructure with AWSSmart Platform Infrastructure with AWS
Smart Platform Infrastructure with AWSJames Huston
 
Creating Havoc using Human Interface Device
Creating Havoc using Human Interface DeviceCreating Havoc using Human Interface Device
Creating Havoc using Human Interface DevicePositive Hack Days
 
Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)danielputerman
 
Machine learning in cybersecutiry
Machine learning in cybersecutiryMachine learning in cybersecutiry
Machine learning in cybersecutiryVishwas N
 
Panther Sniffer for DQMH®.pptx
Panther Sniffer for DQMH®.pptxPanther Sniffer for DQMH®.pptx
Panther Sniffer for DQMH®.pptxEnriqueNo2
 
What we talk about when we talk about DevOps
What we talk about when we talk about DevOpsWhat we talk about when we talk about DevOps
What we talk about when we talk about DevOpsRicard Clau
 
IoT is Something to Figure Out
IoT is Something to Figure OutIoT is Something to Figure Out
IoT is Something to Figure OutPeter Hoddie
 
IoX - tech-intro-for-paris-hackathon
IoX - tech-intro-for-paris-hackathonIoX - tech-intro-for-paris-hackathon
IoX - tech-intro-for-paris-hackathonCisco DevNet
 
Building world-class security response and secure development processes
Building world-class security response and secure development processesBuilding world-class security response and secure development processes
Building world-class security response and secure development processesDavid Jorm
 
Openslava 2017 - Real appdev in the cloud on your laptop in minutes
Openslava 2017 - Real appdev in the cloud on your laptop in minutesOpenslava 2017 - Real appdev in the cloud on your laptop in minutes
Openslava 2017 - Real appdev in the cloud on your laptop in minutesEric D. Schabell
 
Boulder JS meet up presentation for April 16
Boulder JS meet up presentation for April 16Boulder JS meet up presentation for April 16
Boulder JS meet up presentation for April 16Matthew Schrepel
 
Enabling technologyvirtualisationproject
Enabling technologyvirtualisationprojectEnabling technologyvirtualisationproject
Enabling technologyvirtualisationprojectJisc
 
Creating mLearning With Your Existing Toolkit
Creating mLearning With Your Existing ToolkitCreating mLearning With Your Existing Toolkit
Creating mLearning With Your Existing ToolkitChad Udell
 
BlockShow Asia 2017 - iExec - Dr. Haiwu He's presentation
BlockShow Asia 2017 - iExec - Dr. Haiwu He's presentationBlockShow Asia 2017 - iExec - Dr. Haiwu He's presentation
BlockShow Asia 2017 - iExec - Dr. Haiwu He's presentationJulien Béranger
 
Choosing the right Technologies for your next unicorn.
Choosing the right Technologies for your next unicorn.Choosing the right Technologies for your next unicorn.
Choosing the right Technologies for your next unicorn.Gladson DSouza
 
Introduction to the intermediate Python - v1.1
Introduction to the intermediate Python - v1.1Introduction to the intermediate Python - v1.1
Introduction to the intermediate Python - v1.1Andrei KUCHARAVY
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions newJoe Jacob
 

Semelhante a DIFFDroid_Anto_Joseph_HIP_2016 (20)

Smart Platform Infrastructure with AWS
Smart Platform Infrastructure with AWSSmart Platform Infrastructure with AWS
Smart Platform Infrastructure with AWS
 
Creating Havoc using Human Interface Device
Creating Havoc using Human Interface DeviceCreating Havoc using Human Interface Device
Creating Havoc using Human Interface Device
 
Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)
 
Pulumi - IaC tool
Pulumi - IaC toolPulumi - IaC tool
Pulumi - IaC tool
 
Machine learning in cybersecutiry
Machine learning in cybersecutiryMachine learning in cybersecutiry
Machine learning in cybersecutiry
 
Panther Sniffer for DQMH®.pptx
Panther Sniffer for DQMH®.pptxPanther Sniffer for DQMH®.pptx
Panther Sniffer for DQMH®.pptx
 
What we talk about when we talk about DevOps
What we talk about when we talk about DevOpsWhat we talk about when we talk about DevOps
What we talk about when we talk about DevOps
 
OpenVINO introduction
OpenVINO introductionOpenVINO introduction
OpenVINO introduction
 
IoT is Something to Figure Out
IoT is Something to Figure OutIoT is Something to Figure Out
IoT is Something to Figure Out
 
IoX - tech-intro-for-paris-hackathon
IoX - tech-intro-for-paris-hackathonIoX - tech-intro-for-paris-hackathon
IoX - tech-intro-for-paris-hackathon
 
Stackato v5
Stackato v5Stackato v5
Stackato v5
 
Building world-class security response and secure development processes
Building world-class security response and secure development processesBuilding world-class security response and secure development processes
Building world-class security response and secure development processes
 
Openslava 2017 - Real appdev in the cloud on your laptop in minutes
Openslava 2017 - Real appdev in the cloud on your laptop in minutesOpenslava 2017 - Real appdev in the cloud on your laptop in minutes
Openslava 2017 - Real appdev in the cloud on your laptop in minutes
 
Boulder JS meet up presentation for April 16
Boulder JS meet up presentation for April 16Boulder JS meet up presentation for April 16
Boulder JS meet up presentation for April 16
 
Enabling technologyvirtualisationproject
Enabling technologyvirtualisationprojectEnabling technologyvirtualisationproject
Enabling technologyvirtualisationproject
 
Creating mLearning With Your Existing Toolkit
Creating mLearning With Your Existing ToolkitCreating mLearning With Your Existing Toolkit
Creating mLearning With Your Existing Toolkit
 
BlockShow Asia 2017 - iExec - Dr. Haiwu He's presentation
BlockShow Asia 2017 - iExec - Dr. Haiwu He's presentationBlockShow Asia 2017 - iExec - Dr. Haiwu He's presentation
BlockShow Asia 2017 - iExec - Dr. Haiwu He's presentation
 
Choosing the right Technologies for your next unicorn.
Choosing the right Technologies for your next unicorn.Choosing the right Technologies for your next unicorn.
Choosing the right Technologies for your next unicorn.
 
Introduction to the intermediate Python - v1.1
Introduction to the intermediate Python - v1.1Introduction to the intermediate Python - v1.1
Introduction to the intermediate Python - v1.1
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions new
 

DIFFDroid_Anto_Joseph_HIP_2016