Android attacks

B
Blueinfy SolutionsWeb Security Products, Consulting & Training Company
© Blueinfy Solutions
Android Attacks
© Blueinfy Solutions
Insecure Data Storage
• Storing sensitive information on device – a
major threat
• Phone can be hacked or stolen
• Imagine site access, username, passwords,
tokens etc. get harvested
• Malware used to attack local system and fetch
information out.
• What are the options?
© Blueinfy Solutions
Insecure calls
• Storage can be accessed by third party
• If device is rooted then access to sensitive
information
• Poor permission can allow cross access
• One app accessing information of other
• Information not encrypted
© Blueinfy Solutions
Bird eye view
© Blueinfy Solutions
Storage calls
• Shared Preferences
– Store private primitive data in key-value pairs.
• Internal Storage
– Store private data on the device memory.
• External Storage
– Store public data on the shared external storage.
• SQLite Databases
– Store structured data in a private database.
• Network Connection
– Store data on the web with your own network server.
© Blueinfy Solutions
Accessing with adb
# cd bank.One
cd bank.One
# ls
ls
cache
databases
files
lib
# cd files
cd files
# ls
ls
PublicKey
remember
settings
temp_file
# cat remember
cat remember
jack
jack123#
Got user/pass in clear text
© Blueinfy Solutions
Weak Server Side Controls
• Backend Application Security
• Protocols
• OWASP Top 10 for AppSec
© Blueinfy Solutions
Analyzing HTTP traffic
• Security assessment needs sound knowledge
of HTTP analysis
• Tools and mind needed to analyze the traffic
• What to look for? – methods, cookie,
querysting etc.
• All part of HTTP – Response analysis is equally
important.
© Blueinfy Solutions
JSON
• JSON (JavaScript Object Notation) - a
lightweight data-interchange format
• Based on JavaScript Programming Language
(Standard ECMA-262)
• Completely language independent
• C-family of languages, including C, C++, C#,
Java, JavaScript, Perl, Python, and many
others.
• Interchangeable is the Key.
© Blueinfy Solutions
JSON
– object
• {}
{ members }
– members
• pair
pair , members
– pair
• string : value
– array
• []
[ elements ]
• elements
• value
value ,
elements
• value
• string
number
object
array
true
false
null
© Blueinfy Solutions
JSON
• Example
{ "firstName": "John", "lastName": "Smith",
"address": { "streetAddress": "21 2nd Street",
"city": "New York", "state": "NY", "postalCode":
10021 }, "phoneNumbers": [ "212 732-1234", "646
123-4567" ] }
© Blueinfy Solutions
JSON call
• Calling JSON services
© Blueinfy Solutions
JSON fetch
• Fetch attribute
© Blueinfy Solutions
Insufficient Transport Layer Protection
• Poor or no Encryption during transit
• Poor certification validations
• Man in the middle opening
• Traffic over HTTP
• Token passing
• Device ID over poor channel
© Blueinfy Solutions
Session with token only
© Blueinfy Solutions
Client Side Injection
• Native or Web apps
– Using poor libs
– Abusing APIs
• Popular injections – XSS, SQLi, XPATH etc.
• Payment and SMS
• Mixed usage
– Using webview
© Blueinfy Solutions
SQLite
© Blueinfy Solutions
What is SQLite?
• SQLite is an in-process library that implements a self-
contained, serverless, zero-configuration, transactional SQL
database engine.
• It is the database which is zero configured , that means like
other database you do not need to configure it in your
system.
• At the end, it is a comma separated file (CSV file)
© Blueinfy Solutions
SQLite Commands
• The standard SQLite commands to interact with relational
databases are similar as SQL.
• They are CREATE, SELECT, INSERT, UPDATE, DELETE, and
DROP.
• Data Manipulation Language
Command Description
INSERT Creates a record
UPDATE Modifies records
DELETE Deletes records
© Blueinfy Solutions
Cont.
• Data Query Language:
• Data Definition Language:
Command Description
SELECT Retrieves certain records from one or
more tables
Command Description
CREATE Creates a new table, a view of a table,
or other object in database
ALTER Modifies an existing database object,
such as a table.
DROP Deletes an entire table, a view of a
table or other object in the database.
© Blueinfy Solutions
SQLite – Create Database
• The following command will create a new database or will
open the database if it has been created.
• sqlite3 [database name].db
© Blueinfy Solutions
Retrieving Master Table
• This command will retrieve the master table.
• For example:-
variable=* FROM SQLITE_MASTER; --
© Blueinfy Solutions
SQLite Version
• This command retrieves the version number
of the db.
© Blueinfy Solutions
SQLite – Create Table
• For example:- create table [newtablename](id int, name text);
• By using .tables on the command shell the newly created
designation table is shown.
© Blueinfy Solutions
SQLite – Drop Table
• drop table users;--
© Blueinfy Solutions
SQLite – Insert Query
• INSERT INTO TABLE_NAME (column1, column2,
column3,...Ncolumn) VALUES (value1, value2,
value3,...Nvalue);
© Blueinfy Solutions
Extending/Appending queries
• By altering the select query the injected DELETE query
removes all records from the company table.
© Blueinfy Solutions
SQLite – OR 1=1
• ‘* from [tablename] where id=1 OR 1=1;’
© Blueinfy Solutions
Adding User
• insert into users values(15,’user15’)
© Blueinfy Solutions
Side Channel Data Leakage
• Platform issues – sandboxing or disable
controls
– Cache
– Logs, Keystrokes, screenshots etc.
– Temp files
• 3rd
Party libs (AD networks and analytics)
© Blueinfy Solutions
Unauthorized Dialing/SMS
© Blueinfy Solutions
Unauthorized Dialing/SMS
• Social Engineering using Mobile Devices
• Attacker plays with user’s mind
• User installs application
• Application sends premium rate SMS or a
premium rate phone call to unknown number
• Used by Malware/Trojans
© Blueinfy Solutions
GGTracker
• June 2010
• Another Application which sends
International SMS
• One SMS Costs – 40 USD (NOK 200)
• Application Sends Premium SMS to US
numbers
© Blueinfy Solutions
UI Impersonation
© Blueinfy Solutions
UI Impersonation
• Attack has been there since long
• On a mobile stack, known as UI
impersonation
• Other names are Phishing Attack, ClickJacking
• Attacker plays with user’s mind and try to
impersonate as other user or other
application
© Blueinfy Solutions
UI Impersonation
• Victim looses credit card information or
authentication credentials or secret
• One application can create local PUSH
notification as it is created from apple store
• Classic example is - Netflix Application in
AppStore
• Flow in review process of AppStore – Anyone
can name anything to their application
© Blueinfy Solutions
NetFlix
• Oct -2011
• Steals users “netflix” account information
• Application shows error message to user
“Compatibility issues with the user’s
hardware” when user enters username and
password and uninstalls itself
• More than 10000 users lost their details in a
week
© Blueinfy Solutions
Activity Monitoring
© Blueinfy Solutions
Activity Monitoring
• Sending a blind carbon copy of each email to
attacker
• Listening all phone calls
• Email contact list, pictures to attacker
• Read all emails stored on the device
• Usual intension of Spyware/Trojans
© Blueinfy Solutions
Activity Monitoring
• Attacker can monitor –
– Audio Files
– Video
– Pictures
– Location
– Contact List
– Call/Browser/SMS History
– Data files
© Blueinfy Solutions
Android.Pjapps
• Early 2010
• Steal/Change users information
• PjApps Application –
• Send and monitor incoming SMS messages
• Read/write to the user's browsing history and
bookmarks
• Install packages and Open Sockets
• Write to external storage
• Read the phone's state
© Blueinfy Solutions
System Modification
© Blueinfy Solutions
System Modification
• Application will attempt to modify system
configuration to hide itself (Historically this is
known as ROOTKIT)
• Configuration changes makes certain attack
possible i.e. –
– Modifying device proxy to get user’s activity
monitoring
– Configure BCC email sending to attacker
© Blueinfy Solutions
Information in Common Services
© Blueinfy Solutions
Information in Common Services
• KeyBoard, Clipboard are shared amongst all
the applications.
• Information stored in clipboard can be
accessed by all the application
• Sensitive information should not be allowed
to copy/paste in the application
© Blueinfy Solutions
Logical Issues
© Blueinfy Solutions
Logical Issues
• Authentication flags and privilege escalations
at application layer
• Critical parameter manipulation and access to
unauthorized information/content
• Business constraint exploitation
• Identity or profile extraction
• Denial of Services (DoS) with business logic
© Blueinfy Solutions
In Memory Analysis
© Blueinfy Solutions
In memory analysis
• Using in built command in ADB named
“dumpsys”
• Command to get memory dump –
# Dumpsys meminfo
• Can be run only by “su” (Rooting a device is
mandatory)
© Blueinfy Solutions
Uncovering vulnerability from
Manifest File
© Blueinfy Solutions
Quick Recap of Manifest tags
• Manifest
• Application
• Activity
• Activity-alias
• Receiver
• Service
• Uses-permission
© Blueinfy Solutions
Decompiling Android Applications
© Blueinfy Solutions
Decompiling android application
• Using Apktool -
http://code.google.com/p/android-apktool/
• Using Dex2Jar -
http://code.google.com/p/dex2jar/
• Using aapt (Bundled with Android SDK)
© Blueinfy Solutions
Use Apktool to convert the XML to readable format
Android manifest file:
APK Tool
© Blueinfy Solutions
Use dex2jar to convert classes.dex file in the extracted folder to .class files
Use JAD to convert the class files into JAVA files
Dex2Jar and JAD
© Blueinfy Solutions
Debuggable flag in Android
• One of the key attribute in android manifest
file
• Under “application” section
• Describes debugging in enabled
• If “Debuggable”attribute is set o true, the
application will try to connect to a local unix
socket “@jdwp-control”
• Using JDWP, It is possible to gain full access to
the Java process and execute arbitrary code
in the context of the debugable application
© Blueinfy Solutions
CheckDebuggable Script
• Checks in APK whether debuggable is enabled
• Script can be found at –
http://www.espheresecurity.com/resourcest
ools.html
• Paper can be found at -
http://www.espheresecurity.com/CheckDebu
ggable.pdf
© Blueinfy Solutions
Conclusion
1 of 58

Recommended

iOS Application Security Testing by
iOS Application Security TestingiOS Application Security Testing
iOS Application Security TestingBlueinfy Solutions
1.9K views65 slides
Mobile Application Scan and Testing by
Mobile Application Scan and TestingMobile Application Scan and Testing
Mobile Application Scan and TestingBlueinfy Solutions
1.3K views65 slides
Automation In Android & iOS Application Review by
Automation In Android & iOS 	Application Review�Automation In Android & iOS 	Application Review�
Automation In Android & iOS Application ReviewBlueinfy Solutions
1.5K views49 slides
Android secure coding by
Android secure codingAndroid secure coding
Android secure codingBlueinfy Solutions
1.3K views20 slides
Mobile code mining for discovery and exploits nullcongoa2013 by
Mobile code mining for discovery and exploits nullcongoa2013Mobile code mining for discovery and exploits nullcongoa2013
Mobile code mining for discovery and exploits nullcongoa2013Blueinfy Solutions
1K views80 slides
Applciation footprinting, discovery and enumeration by
Applciation footprinting, discovery and enumerationApplciation footprinting, discovery and enumeration
Applciation footprinting, discovery and enumerationBlueinfy Solutions
2.4K views48 slides

More Related Content

What's hot

CNIT 128: 6: Mobile services and mobile Web (part 1: Beginning Through OAuth) by
CNIT 128: 6: Mobile services and mobile Web (part 1: Beginning Through OAuth)CNIT 128: 6: Mobile services and mobile Web (part 1: Beginning Through OAuth)
CNIT 128: 6: Mobile services and mobile Web (part 1: Beginning Through OAuth)Sam Bowne
421 views56 slides
XSS and CSRF with HTML5 by
XSS and CSRF with HTML5XSS and CSRF with HTML5
XSS and CSRF with HTML5Shreeraj Shah
45K views73 slides
Pentesting web applications by
Pentesting web applicationsPentesting web applications
Pentesting web applicationsSatish b
12.4K views94 slides
Core defense mechanisms against security attacks on web applications by
Core defense mechanisms against security attacks on web applicationsCore defense mechanisms against security attacks on web applications
Core defense mechanisms against security attacks on web applicationsKaran Nagrecha
1.3K views50 slides
Mobile Application Security – Effective methodology, efficient testing! by
Mobile Application Security – Effective methodology, efficient testing!Mobile Application Security – Effective methodology, efficient testing!
Mobile Application Security – Effective methodology, efficient testing!espheresecurity
2.7K views64 slides
Ch 1: Web Application (In)security & Ch 2: Core Defense Mechanisms by
Ch 1: Web Application (In)security & Ch 2: Core Defense MechanismsCh 1: Web Application (In)security & Ch 2: Core Defense Mechanisms
Ch 1: Web Application (In)security & Ch 2: Core Defense MechanismsSam Bowne
4K views59 slides

What's hot(20)

CNIT 128: 6: Mobile services and mobile Web (part 1: Beginning Through OAuth) by Sam Bowne
CNIT 128: 6: Mobile services and mobile Web (part 1: Beginning Through OAuth)CNIT 128: 6: Mobile services and mobile Web (part 1: Beginning Through OAuth)
CNIT 128: 6: Mobile services and mobile Web (part 1: Beginning Through OAuth)
Sam Bowne421 views
Pentesting web applications by Satish b
Pentesting web applicationsPentesting web applications
Pentesting web applications
Satish b12.4K views
Core defense mechanisms against security attacks on web applications by Karan Nagrecha
Core defense mechanisms against security attacks on web applicationsCore defense mechanisms against security attacks on web applications
Core defense mechanisms against security attacks on web applications
Karan Nagrecha1.3K views
Mobile Application Security – Effective methodology, efficient testing! by espheresecurity
Mobile Application Security – Effective methodology, efficient testing!Mobile Application Security – Effective methodology, efficient testing!
Mobile Application Security – Effective methodology, efficient testing!
espheresecurity2.7K views
Ch 1: Web Application (In)security & Ch 2: Core Defense Mechanisms by Sam Bowne
Ch 1: Web Application (In)security & Ch 2: Core Defense MechanismsCh 1: Web Application (In)security & Ch 2: Core Defense Mechanisms
Ch 1: Web Application (In)security & Ch 2: Core Defense Mechanisms
Sam Bowne4K views
HTML5 Top 10 Threats - Silent Attacks and Stealth Exploits by Shreeraj Shah
HTML5 Top 10 Threats - Silent Attacks and Stealth ExploitsHTML5 Top 10 Threats - Silent Attacks and Stealth Exploits
HTML5 Top 10 Threats - Silent Attacks and Stealth Exploits
Shreeraj Shah17.9K views
CNIT 128 Ch 6: Mobile services and mobile Web (part 2: SAML to end) by Sam Bowne
CNIT 128 Ch 6: Mobile services and mobile Web (part 2: SAML to end)CNIT 128 Ch 6: Mobile services and mobile Web (part 2: SAML to end)
CNIT 128 Ch 6: Mobile services and mobile Web (part 2: SAML to end)
Sam Bowne742 views
Using & Abusing APIs: An Examination of the API Attack Surface by CA API Management
Using & Abusing APIs: An Examination of the API Attack SurfaceUsing & Abusing APIs: An Examination of the API Attack Surface
Using & Abusing APIs: An Examination of the API Attack Surface
CA API Management2.7K views
Ch 1: Web Application (In)security & Ch 2: Core Defense Mechanisms by Sam Bowne
Ch 1: Web Application (In)security & Ch 2: Core Defense Mechanisms Ch 1: Web Application (In)security & Ch 2: Core Defense Mechanisms
Ch 1: Web Application (In)security & Ch 2: Core Defense Mechanisms
Sam Bowne568 views
CNIT 129S: 13: Attacking Users: Other Techniques (Part 2 of 2) by Sam Bowne
CNIT 129S: 13: Attacking Users: Other Techniques (Part 2 of 2)CNIT 129S: 13: Attacking Users: Other Techniques (Part 2 of 2)
CNIT 129S: 13: Attacking Users: Other Techniques (Part 2 of 2)
Sam Bowne825 views
Mobile application security – effective methodology, efficient testing! hem... by owaspindia
Mobile application security – effective methodology, efficient testing!   hem...Mobile application security – effective methodology, efficient testing!   hem...
Mobile application security – effective methodology, efficient testing! hem...
owaspindia2.4K views
CNIT 129S: Ch 3: Web Application Technologies by Sam Bowne
CNIT 129S: Ch 3: Web Application TechnologiesCNIT 129S: Ch 3: Web Application Technologies
CNIT 129S: Ch 3: Web Application Technologies
Sam Bowne1.2K views
CNIT 128: 9: Mobile payments by Sam Bowne
CNIT 128: 9: Mobile paymentsCNIT 128: 9: Mobile payments
CNIT 128: 9: Mobile payments
Sam Bowne499 views
CNIT 129S: Securing Web Applications Ch 1-2 by Sam Bowne
CNIT 129S: Securing Web Applications Ch 1-2CNIT 129S: Securing Web Applications Ch 1-2
CNIT 129S: Securing Web Applications Ch 1-2
Sam Bowne2.1K views
[Infosecworld 08 Orlando] New Defenses for .NET Web Apps: IHttpModule in Prac... by Shreeraj Shah
[Infosecworld 08 Orlando] New Defenses for .NET Web Apps: IHttpModule in Prac...[Infosecworld 08 Orlando] New Defenses for .NET Web Apps: IHttpModule in Prac...
[Infosecworld 08 Orlando] New Defenses for .NET Web Apps: IHttpModule in Prac...
Shreeraj Shah5.7K views
Next Generation Web Attacks – HTML 5, DOM(L3) and XHR(L2) by Shreeraj Shah
Next Generation Web Attacks – HTML 5, DOM(L3) and XHR(L2)Next Generation Web Attacks – HTML 5, DOM(L3) and XHR(L2)
Next Generation Web Attacks – HTML 5, DOM(L3) and XHR(L2)
Shreeraj Shah9K views
CNIT 129S: Ch 4: Mapping the Application by Sam Bowne
CNIT 129S: Ch 4: Mapping the ApplicationCNIT 129S: Ch 4: Mapping the Application
CNIT 129S: Ch 4: Mapping the Application
Sam Bowne1.7K views

Viewers also liked

Brief History of the Soviet Jewry Movement by
Brief History of the Soviet Jewry MovementBrief History of the Soviet Jewry Movement
Brief History of the Soviet Jewry Movementphilipspiegel
1.1K views25 slides
Karen White – Becoming a more powerful observer by
Karen White – Becoming a more powerful observerKaren White – Becoming a more powerful observer
Karen White – Becoming a more powerful observerSACAP
480 views7 slides
new resume by
new resumenew resume
new resumeOMPRAKASH JOSHI
229 views3 slides
Control Dynamics by
Control DynamicsControl Dynamics
Control DynamicsSteven Casey
313 views5 slides
Casa-1000 project by
Casa-1000 projectCasa-1000 project
Casa-1000 projectZumra Cheema
846 views20 slides
resume by
resumeresume
resumeShihao Jin
342 views1 slide

Viewers also liked(8)

Brief History of the Soviet Jewry Movement by philipspiegel
Brief History of the Soviet Jewry MovementBrief History of the Soviet Jewry Movement
Brief History of the Soviet Jewry Movement
philipspiegel1.1K views
Karen White – Becoming a more powerful observer by SACAP
Karen White – Becoming a more powerful observerKaren White – Becoming a more powerful observer
Karen White – Becoming a more powerful observer
SACAP480 views
LeasePlan UK Lease Accounting Standard by Rebecca Whittaker
LeasePlan UK Lease Accounting Standard LeasePlan UK Lease Accounting Standard
LeasePlan UK Lease Accounting Standard
Rebecca Whittaker521 views

Similar to Android attacks

Red Team Apocalypse (RVAsec Edition) by
Red Team Apocalypse (RVAsec Edition)Red Team Apocalypse (RVAsec Edition)
Red Team Apocalypse (RVAsec Edition)Beau Bullock
3.7K views44 slides
Red Team Apocalypse by
Red Team ApocalypseRed Team Apocalypse
Red Team ApocalypseBeau Bullock
6K views40 slides
What Does a Full Featured Security Strategy Look Like? by
What Does a Full Featured Security Strategy Look Like?What Does a Full Featured Security Strategy Look Like?
What Does a Full Featured Security Strategy Look Like?Precisely
33 views39 slides
Thick Application Penetration Testing - A Crash Course by
Thick Application Penetration Testing - A Crash CourseThick Application Penetration Testing - A Crash Course
Thick Application Penetration Testing - A Crash CourseNetSPI
4.7K views39 slides
Implementing security for your library | PLAN Tech Day Conference by
Implementing security for  your library | PLAN Tech Day ConferenceImplementing security for  your library | PLAN Tech Day Conference
Implementing security for your library | PLAN Tech Day ConferenceBrian Pichman
161 views78 slides
Expand Your Control of Access to IBM i Systems and Data by
Expand Your Control of Access to IBM i Systems and DataExpand Your Control of Access to IBM i Systems and Data
Expand Your Control of Access to IBM i Systems and DataPrecisely
132 views50 slides

Similar to Android attacks(20)

Red Team Apocalypse (RVAsec Edition) by Beau Bullock
Red Team Apocalypse (RVAsec Edition)Red Team Apocalypse (RVAsec Edition)
Red Team Apocalypse (RVAsec Edition)
Beau Bullock3.7K views
What Does a Full Featured Security Strategy Look Like? by Precisely
What Does a Full Featured Security Strategy Look Like?What Does a Full Featured Security Strategy Look Like?
What Does a Full Featured Security Strategy Look Like?
Precisely33 views
Thick Application Penetration Testing - A Crash Course by NetSPI
Thick Application Penetration Testing - A Crash CourseThick Application Penetration Testing - A Crash Course
Thick Application Penetration Testing - A Crash Course
NetSPI4.7K views
Implementing security for your library | PLAN Tech Day Conference by Brian Pichman
Implementing security for  your library | PLAN Tech Day ConferenceImplementing security for  your library | PLAN Tech Day Conference
Implementing security for your library | PLAN Tech Day Conference
Brian Pichman161 views
Expand Your Control of Access to IBM i Systems and Data by Precisely
Expand Your Control of Access to IBM i Systems and DataExpand Your Control of Access to IBM i Systems and Data
Expand Your Control of Access to IBM i Systems and Data
Precisely132 views
Controlling Access to IBM i Systems and Data by Precisely
Controlling Access to IBM i Systems and DataControlling Access to IBM i Systems and Data
Controlling Access to IBM i Systems and Data
Precisely915 views
It security the condensed version by Brian Pichman
It security  the condensed version It security  the condensed version
It security the condensed version
Brian Pichman376 views
iOS application (in)security by iphonepentest
iOS application (in)securityiOS application (in)security
iOS application (in)security
iphonepentest9.1K views
Oracle database threats - LAOUC Webinar by Osama Mustafa
Oracle database threats - LAOUC WebinarOracle database threats - LAOUC Webinar
Oracle database threats - LAOUC Webinar
Osama Mustafa3.8K views
Pentesting Mobile Applications (Prashant Verma) by ClubHack
Pentesting Mobile Applications (Prashant Verma)Pentesting Mobile Applications (Prashant Verma)
Pentesting Mobile Applications (Prashant Verma)
ClubHack3.4K views
Hacker Halted 2014 - Reverse Engineering the Android OS by EC-Council
Hacker Halted 2014 - Reverse Engineering the Android OSHacker Halted 2014 - Reverse Engineering the Android OS
Hacker Halted 2014 - Reverse Engineering the Android OS
EC-Council2.7K views
Breaking Secure Mobile Applications - Hack In The Box 2014 KL by iphonepentest
Breaking Secure Mobile Applications - Hack In The Box 2014 KLBreaking Secure Mobile Applications - Hack In The Box 2014 KL
Breaking Secure Mobile Applications - Hack In The Box 2014 KL
iphonepentest2K views
Thick Application Penetration Testing: Crash Course by Scott Sutherland
Thick Application Penetration Testing: Crash CourseThick Application Penetration Testing: Crash Course
Thick Application Penetration Testing: Crash Course
Scott Sutherland16.7K views
AWS Summit 2013 | India - Extend your Datacenter in the Cloud and achieve Hig... by Amazon Web Services
AWS Summit 2013 | India - Extend your Datacenter in the Cloud and achieve Hig...AWS Summit 2013 | India - Extend your Datacenter in the Cloud and achieve Hig...
AWS Summit 2013 | India - Extend your Datacenter in the Cloud and achieve Hig...
Amazon Web Services1.1K views
Thick Client Penetration Testing.pdf by SouvikRoy114738
Thick Client Penetration Testing.pdfThick Client Penetration Testing.pdf
Thick Client Penetration Testing.pdf
SouvikRoy114738495 views
Hacking Samsung's Tizen: The OS of Everything - Hack In the Box 2015 by Ajin Abraham
Hacking Samsung's Tizen: The OS of Everything - Hack In the Box 2015Hacking Samsung's Tizen: The OS of Everything - Hack In the Box 2015
Hacking Samsung's Tizen: The OS of Everything - Hack In the Box 2015
Ajin Abraham8K views

More from Blueinfy Solutions

Html5 on mobile by
Html5 on mobileHtml5 on mobile
Html5 on mobileBlueinfy Solutions
1K views50 slides
Source Code Analysis with SAST by
Source Code Analysis with SASTSource Code Analysis with SAST
Source Code Analysis with SASTBlueinfy Solutions
2.8K views69 slides
HTML5 hacking by
HTML5 hackingHTML5 hacking
HTML5 hackingBlueinfy Solutions
3.1K views84 slides
CSRF, ClickJacking & Open Redirect by
CSRF, ClickJacking & Open RedirectCSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open RedirectBlueinfy Solutions
5.5K views44 slides
XSS - Attacks & Defense by
XSS - Attacks & DefenseXSS - Attacks & Defense
XSS - Attacks & DefenseBlueinfy Solutions
4K views50 slides
Defending against Injections by
Defending against InjectionsDefending against Injections
Defending against InjectionsBlueinfy Solutions
2.3K views33 slides

Recently uploaded

Quality Engineer: A Day in the Life by
Quality Engineer: A Day in the LifeQuality Engineer: A Day in the Life
Quality Engineer: A Day in the LifeJohn Valentino
10 views18 slides
Ports-and-Adapters Architecture for Embedded HMI by
Ports-and-Adapters Architecture for Embedded HMIPorts-and-Adapters Architecture for Embedded HMI
Ports-and-Adapters Architecture for Embedded HMIBurkhard Stubert
35 views19 slides
Agile 101 by
Agile 101Agile 101
Agile 101John Valentino
13 views20 slides
aATP - New Correlation Confirmation Feature.pptx by
aATP - New Correlation Confirmation Feature.pptxaATP - New Correlation Confirmation Feature.pptx
aATP - New Correlation Confirmation Feature.pptxEsatEsenek1
222 views6 slides
Page Object Model by
Page Object ModelPage Object Model
Page Object Modelartembondar5
7 views5 slides
Top-5-production-devconMunich-2023-v2.pptx by
Top-5-production-devconMunich-2023-v2.pptxTop-5-production-devconMunich-2023-v2.pptx
Top-5-production-devconMunich-2023-v2.pptxTier1 app
9 views42 slides

Recently uploaded(20)

Quality Engineer: A Day in the Life by John Valentino
Quality Engineer: A Day in the LifeQuality Engineer: A Day in the Life
Quality Engineer: A Day in the Life
John Valentino10 views
Ports-and-Adapters Architecture for Embedded HMI by Burkhard Stubert
Ports-and-Adapters Architecture for Embedded HMIPorts-and-Adapters Architecture for Embedded HMI
Ports-and-Adapters Architecture for Embedded HMI
Burkhard Stubert35 views
aATP - New Correlation Confirmation Feature.pptx by EsatEsenek1
aATP - New Correlation Confirmation Feature.pptxaATP - New Correlation Confirmation Feature.pptx
aATP - New Correlation Confirmation Feature.pptx
EsatEsenek1222 views
Top-5-production-devconMunich-2023-v2.pptx by Tier1 app
Top-5-production-devconMunich-2023-v2.pptxTop-5-production-devconMunich-2023-v2.pptx
Top-5-production-devconMunich-2023-v2.pptx
Tier1 app9 views
FOSSLight Community Day 2023-11-30 by Shane Coughlan
FOSSLight Community Day 2023-11-30FOSSLight Community Day 2023-11-30
FOSSLight Community Day 2023-11-30
Shane Coughlan8 views
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile... by Stefan Wolpers
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...
Stefan Wolpers44 views
Advanced API Mocking Techniques Using Wiremock by Dimpy Adhikary
Advanced API Mocking Techniques Using WiremockAdvanced API Mocking Techniques Using Wiremock
Advanced API Mocking Techniques Using Wiremock
Dimpy Adhikary5 views
Streamlining Your Business Operations with Enterprise Application Integration... by Flexsin
Streamlining Your Business Operations with Enterprise Application Integration...Streamlining Your Business Operations with Enterprise Application Integration...
Streamlining Your Business Operations with Enterprise Application Integration...
Flexsin 5 views
Understanding HTML terminology by artembondar5
Understanding HTML terminologyUnderstanding HTML terminology
Understanding HTML terminology
artembondar58 views
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P... by NimaTorabi2
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...
NimaTorabi217 views
Dapr Unleashed: Accelerating Microservice Development by Miroslav Janeski
Dapr Unleashed: Accelerating Microservice DevelopmentDapr Unleashed: Accelerating Microservice Development
Dapr Unleashed: Accelerating Microservice Development
Miroslav Janeski16 views
Top-5-production-devconMunich-2023.pptx by Tier1 app
Top-5-production-devconMunich-2023.pptxTop-5-production-devconMunich-2023.pptx
Top-5-production-devconMunich-2023.pptx
Tier1 app10 views

Android attacks

  • 2. © Blueinfy Solutions Insecure Data Storage • Storing sensitive information on device – a major threat • Phone can be hacked or stolen • Imagine site access, username, passwords, tokens etc. get harvested • Malware used to attack local system and fetch information out. • What are the options?
  • 3. © Blueinfy Solutions Insecure calls • Storage can be accessed by third party • If device is rooted then access to sensitive information • Poor permission can allow cross access • One app accessing information of other • Information not encrypted
  • 5. © Blueinfy Solutions Storage calls • Shared Preferences – Store private primitive data in key-value pairs. • Internal Storage – Store private data on the device memory. • External Storage – Store public data on the shared external storage. • SQLite Databases – Store structured data in a private database. • Network Connection – Store data on the web with your own network server.
  • 6. © Blueinfy Solutions Accessing with adb # cd bank.One cd bank.One # ls ls cache databases files lib # cd files cd files # ls ls PublicKey remember settings temp_file # cat remember cat remember jack jack123# Got user/pass in clear text
  • 7. © Blueinfy Solutions Weak Server Side Controls • Backend Application Security • Protocols • OWASP Top 10 for AppSec
  • 8. © Blueinfy Solutions Analyzing HTTP traffic • Security assessment needs sound knowledge of HTTP analysis • Tools and mind needed to analyze the traffic • What to look for? – methods, cookie, querysting etc. • All part of HTTP – Response analysis is equally important.
  • 9. © Blueinfy Solutions JSON • JSON (JavaScript Object Notation) - a lightweight data-interchange format • Based on JavaScript Programming Language (Standard ECMA-262) • Completely language independent • C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. • Interchangeable is the Key.
  • 10. © Blueinfy Solutions JSON – object • {} { members } – members • pair pair , members – pair • string : value – array • [] [ elements ] • elements • value value , elements • value • string number object array true false null
  • 11. © Blueinfy Solutions JSON • Example { "firstName": "John", "lastName": "Smith", "address": { "streetAddress": "21 2nd Street", "city": "New York", "state": "NY", "postalCode": 10021 }, "phoneNumbers": [ "212 732-1234", "646 123-4567" ] }
  • 12. © Blueinfy Solutions JSON call • Calling JSON services
  • 13. © Blueinfy Solutions JSON fetch • Fetch attribute
  • 14. © Blueinfy Solutions Insufficient Transport Layer Protection • Poor or no Encryption during transit • Poor certification validations • Man in the middle opening • Traffic over HTTP • Token passing • Device ID over poor channel
  • 15. © Blueinfy Solutions Session with token only
  • 16. © Blueinfy Solutions Client Side Injection • Native or Web apps – Using poor libs – Abusing APIs • Popular injections – XSS, SQLi, XPATH etc. • Payment and SMS • Mixed usage – Using webview
  • 18. © Blueinfy Solutions What is SQLite? • SQLite is an in-process library that implements a self- contained, serverless, zero-configuration, transactional SQL database engine. • It is the database which is zero configured , that means like other database you do not need to configure it in your system. • At the end, it is a comma separated file (CSV file)
  • 19. © Blueinfy Solutions SQLite Commands • The standard SQLite commands to interact with relational databases are similar as SQL. • They are CREATE, SELECT, INSERT, UPDATE, DELETE, and DROP. • Data Manipulation Language Command Description INSERT Creates a record UPDATE Modifies records DELETE Deletes records
  • 20. © Blueinfy Solutions Cont. • Data Query Language: • Data Definition Language: Command Description SELECT Retrieves certain records from one or more tables Command Description CREATE Creates a new table, a view of a table, or other object in database ALTER Modifies an existing database object, such as a table. DROP Deletes an entire table, a view of a table or other object in the database.
  • 21. © Blueinfy Solutions SQLite – Create Database • The following command will create a new database or will open the database if it has been created. • sqlite3 [database name].db
  • 22. © Blueinfy Solutions Retrieving Master Table • This command will retrieve the master table. • For example:- variable=* FROM SQLITE_MASTER; --
  • 23. © Blueinfy Solutions SQLite Version • This command retrieves the version number of the db.
  • 24. © Blueinfy Solutions SQLite – Create Table • For example:- create table [newtablename](id int, name text); • By using .tables on the command shell the newly created designation table is shown.
  • 25. © Blueinfy Solutions SQLite – Drop Table • drop table users;--
  • 26. © Blueinfy Solutions SQLite – Insert Query • INSERT INTO TABLE_NAME (column1, column2, column3,...Ncolumn) VALUES (value1, value2, value3,...Nvalue);
  • 27. © Blueinfy Solutions Extending/Appending queries • By altering the select query the injected DELETE query removes all records from the company table.
  • 28. © Blueinfy Solutions SQLite – OR 1=1 • ‘* from [tablename] where id=1 OR 1=1;’
  • 29. © Blueinfy Solutions Adding User • insert into users values(15,’user15’)
  • 30. © Blueinfy Solutions Side Channel Data Leakage • Platform issues – sandboxing or disable controls – Cache – Logs, Keystrokes, screenshots etc. – Temp files • 3rd Party libs (AD networks and analytics)
  • 32. © Blueinfy Solutions Unauthorized Dialing/SMS • Social Engineering using Mobile Devices • Attacker plays with user’s mind • User installs application • Application sends premium rate SMS or a premium rate phone call to unknown number • Used by Malware/Trojans
  • 33. © Blueinfy Solutions GGTracker • June 2010 • Another Application which sends International SMS • One SMS Costs – 40 USD (NOK 200) • Application Sends Premium SMS to US numbers
  • 34. © Blueinfy Solutions UI Impersonation
  • 35. © Blueinfy Solutions UI Impersonation • Attack has been there since long • On a mobile stack, known as UI impersonation • Other names are Phishing Attack, ClickJacking • Attacker plays with user’s mind and try to impersonate as other user or other application
  • 36. © Blueinfy Solutions UI Impersonation • Victim looses credit card information or authentication credentials or secret • One application can create local PUSH notification as it is created from apple store • Classic example is - Netflix Application in AppStore • Flow in review process of AppStore – Anyone can name anything to their application
  • 37. © Blueinfy Solutions NetFlix • Oct -2011 • Steals users “netflix” account information • Application shows error message to user “Compatibility issues with the user’s hardware” when user enters username and password and uninstalls itself • More than 10000 users lost their details in a week
  • 39. © Blueinfy Solutions Activity Monitoring • Sending a blind carbon copy of each email to attacker • Listening all phone calls • Email contact list, pictures to attacker • Read all emails stored on the device • Usual intension of Spyware/Trojans
  • 40. © Blueinfy Solutions Activity Monitoring • Attacker can monitor – – Audio Files – Video – Pictures – Location – Contact List – Call/Browser/SMS History – Data files
  • 41. © Blueinfy Solutions Android.Pjapps • Early 2010 • Steal/Change users information • PjApps Application – • Send and monitor incoming SMS messages • Read/write to the user's browsing history and bookmarks • Install packages and Open Sockets • Write to external storage • Read the phone's state
  • 43. © Blueinfy Solutions System Modification • Application will attempt to modify system configuration to hide itself (Historically this is known as ROOTKIT) • Configuration changes makes certain attack possible i.e. – – Modifying device proxy to get user’s activity monitoring – Configure BCC email sending to attacker
  • 44. © Blueinfy Solutions Information in Common Services
  • 45. © Blueinfy Solutions Information in Common Services • KeyBoard, Clipboard are shared amongst all the applications. • Information stored in clipboard can be accessed by all the application • Sensitive information should not be allowed to copy/paste in the application
  • 47. © Blueinfy Solutions Logical Issues • Authentication flags and privilege escalations at application layer • Critical parameter manipulation and access to unauthorized information/content • Business constraint exploitation • Identity or profile extraction • Denial of Services (DoS) with business logic
  • 48. © Blueinfy Solutions In Memory Analysis
  • 49. © Blueinfy Solutions In memory analysis • Using in built command in ADB named “dumpsys” • Command to get memory dump – # Dumpsys meminfo • Can be run only by “su” (Rooting a device is mandatory)
  • 50. © Blueinfy Solutions Uncovering vulnerability from Manifest File
  • 51. © Blueinfy Solutions Quick Recap of Manifest tags • Manifest • Application • Activity • Activity-alias • Receiver • Service • Uses-permission
  • 52. © Blueinfy Solutions Decompiling Android Applications
  • 53. © Blueinfy Solutions Decompiling android application • Using Apktool - http://code.google.com/p/android-apktool/ • Using Dex2Jar - http://code.google.com/p/dex2jar/ • Using aapt (Bundled with Android SDK)
  • 54. © Blueinfy Solutions Use Apktool to convert the XML to readable format Android manifest file: APK Tool
  • 55. © Blueinfy Solutions Use dex2jar to convert classes.dex file in the extracted folder to .class files Use JAD to convert the class files into JAVA files Dex2Jar and JAD
  • 56. © Blueinfy Solutions Debuggable flag in Android • One of the key attribute in android manifest file • Under “application” section • Describes debugging in enabled • If “Debuggable”attribute is set o true, the application will try to connect to a local unix socket “@jdwp-control” • Using JDWP, It is possible to gain full access to the Java process and execute arbitrary code in the context of the debugable application
  • 57. © Blueinfy Solutions CheckDebuggable Script • Checks in APK whether debuggable is enabled • Script can be found at – http://www.espheresecurity.com/resourcest ools.html • Paper can be found at - http://www.espheresecurity.com/CheckDebu ggable.pdf