SN-719 at Amrita
Android Security
1 Discretionary Access Control (DAC)
- "Trusted Computer System Evaluation Criteria" TCSEC, US DoD Standard 5200.28-STD.
- My opinion: "Discretionary", "Mandatory" both misleading
- Generally speaking: The security model of the old (1980s) Unix
- Concepts
- Entities: Users, Files, Processes, …
- Ownership
- Permissions: read, write, execute, …
- Granting of permissions
- Android inherits from Linux all of DAC.
2 Authentication
- Machines
- Users
- Services/Servers
3 User Authentication Approaches
- What You Know
- What You Have
- What You Are
3.1 What You Know
- Passwords on a Linux System
- Cracking the Passwords
- Current consensus: Given enough time, any password can be cracked.
- Prevention of Password Cracking
4 Set User ID (suid)
- Privilege Acqusition Mechanism
- Invoke a program (file) that has suid set.
- Expected to be invoked by non-root users.
- suid can be set to non-root owner.
- The created process runs with the privileges of the owner, not the
invoker
4.1 suid root
- An attacker arrives with non-root privileges.
- Exploits an suid-root process to spawn a root owned shell.
- The classsic "buffer overflow attack" injects the shellcode onto
the stack.
5 Capabilities
see slides in the Refs
6 Android UID setup
- Android does not have /etc/passwd,
/etc/shadow, and /etc/group files. The file named
android-filesystem-config.h in the AOSP source tree has the
equivalent code.
- E.g.,
#define AID_ROOT 0 /* traditional unix root user */
#define AID_GPS 1021 /* GPS daemon */
% adb shell
The rest of what is shown below is within AVD pmNX5a.
root@generic:/ # ls -l /acct/uid
shows "uid" directories
root@generic:/ # more /data/system/packages.list
shows how the
application name is tied up with uid/gid.
- Ex:
com.android.keyguard 10007 0 /data/data/com.android.keyguard platform 1028,1015,1035,3002,3001
7 References
- Prabhaker Mateti, Password Cracking, 2013. Skip the Lab experiment.
Required Reading.
- https://en.wikipedia.org/wiki/Discretionary_access_control Required Reading.
- P. A. Loscocco, S. D. Smalley, P. A. Muckelbauer, R. C. Taylor,
S. J. Turner, and J. F. Farrell. "The Inevitability of Failure: The
Flawed Assumption of Security in Modern Computing Environments." In
Proceedings of the 21st National Information Systems Security
Conference, pp. 303–14, Oct. 1998. A classic paper. Recommended
Reading
- http://faculty.cs.nku.edu/~waldenj/classes/2014/spring/cit380/lectures/AccessControl.pdf
Slides. Required Reading.
- Karim Yaghmour, ./android-security-yaghmour-2014.pdf Android Security, From the
Ground Up, ELCE 2014. Required Reading.
- Secuirty features in Ubuntu https://wiki.ubuntu.com/Security/Features