Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS-3013 Operating Systems Hugh C. Lauer

Similar presentations


Presentation on theme: "CS-3013 Operating Systems Hugh C. Lauer"— Presentation transcript:

1 CS-3013 Operating Systems Hugh C. Lauer
Miscellaneous Topics CS-3013 Operating Systems Hugh C. Lauer (Slides include materials from Slides include materials from Modern Operating Systems, 3rd ed., by Andrew Tanenbaum and from Operating System Concepts, 7th ed., by Silbershatz, Galvin, & Gagne) CS-3013, C-Term 2012 Miscellaneous Topics

2 Potpourri Tidbits about protection and security The first virus
Android is based on Linux, but Android is not Linux CS-3013, C-Term 2012 Miscellaneous Topics

3 Protection Mechanisms built into operating systems, networks, and other environments to prevent erroneous or malicious programs from doing stuff that they shouldn’t do accessing information they shouldn’t access causing harm, inconvenience, etc. CS-3013, C-Term 2012 Miscellaneous Topics

4 Security Policies, guidelines, rules about who can access what information or take what actions E.g., who is allowed to see/know your grades health records salary CS-3013, C-Term 2012 Miscellaneous Topics

5 Linux File Protection Bits
We are already familiar with rwx bits of Linux/Unix file protection User (i.e., owner), group, other CS-3013, C-Term 2012 Miscellaneous Topics

6 Windows File Protection
A bit more complex Different users and groups can be assigned different privileges. Need a unifying model CS-3013, C-Term 2012 Miscellaneous Topics

7 File Protections File systems are designed so that processes cannot bypass the protect mechanisms Lots of testing and verification to establish this Years (and years) of experience CS-3013, C-Term 2012 Miscellaneous Topics

8 Discussion What other things does an operating system protect against? How? Isolation of processes and VMs System calls Devices CS-3013, C-Term 2012 Miscellaneous Topics

9 Protection and Security
Chapter 9 in Tanenbaum CS-4401, Software Security Engineering CS-44xx, Network Security Proposed for next year M.Sc. Specialization in Security CS-3013, C-Term 2012 Miscellaneous Topics

10 Questions? Comments? CS-3013, C-Term 2012 Miscellaneous Topics

11 The First Computer Virus
Reading assignment:– Ken Thompson, “Reflections on Trusting Trust,” Communications of ACM, vol.27, #8, August 1984, pp (pdf) Three steps Program that prints a copy of itself Training a compiler to understand a constant Embedding a Trojan Horse without a trace CS-3013, C-Term 2012 Miscellaneous Topics

12 Step 1 – Program to print copy of itself
How do we do this? First, store character array representing text of program Body of program Print declaration of character array Loop through array, printing each character Print entry array as a string Result: general method for program to reproduce itself to any destination! CS-3013, C-Term 2012 Miscellaneous Topics

13 Step 2 – Teaching constant values to compiler
/* reading string constants */ if (s[i++] == '\\') if (s[i] == 'n') insert ('\n'); elseif (s[i] == 'v') insert ('\v'); elseif … Question: How does compiler know what integer values to insert for '\n', '\v', etc.? CS-3013, C-Term 2012 Miscellaneous Topics

14 Step 2 (continued) Answer: In the first compiler ever written, insert the actual character code i.e., 11 (decimal) for ‘\v’, etc. /* reading string constants */ if (s[i++] == '\\') if (s[i] == 'n') insert ('\n'); elseif (s[i] == 'v') insert (11); elseif … Next: Use the first compiler to compile itself! CS-3013, C-Term 2012 Miscellaneous Topics

15 Step 2 (continued) Result: a new compiler that “knows” how to interpret the sequence “\v”, “\n”, etc, And all compilers derived from this one, forever after! Finally: replace the value “11” in the source code of the compiler with ‘\v’ and compile itself again Note: no trace of values of special characters in … The C Programming Language book source code of C compiler I.e., special character values are self-reproducing CS-3013, C-Term 2012 Miscellaneous Topics

16 Step 3 – Inserting a Trojan Horse
In compiler source, add the text if (match(sourceString, pattern) insert the Trojan Horse code where “pattern” is the login code (for example) In compiler source, add additional text if (match(sourceString2, pattern2) insert the self-reproducing code where “pattern2” is a part of the compiler itself Use this compiler to recompile itself, then remove source CS-3013, C-Term 2012 Miscellaneous Topics

17 Step 3 – Concluded Result: an infected compiler that will
Insert a Trojan Horse in the login code of any Unix system Propagate itself to all future compilers Leave no trace of Trojan Horse in its source code Like a biological virus: A small bundle of code that uses the compiler’s own reproductive mechanism to propagate itself CS-3013, C-Term 2012 Miscellaneous Topics

18 Questions? CS-3013, C-Term 2012 Miscellaneous Topics

19 Android & Linux Android is based on Linux, but Android is not Linux
Cannot run a Linux application on Android Cannot run an Android app on Linux Kernels have a lot of code in common Libraries have almost nothing in common CS-3013, C-Term 2012 Miscellaneous Topics

20 Differences Fundamental operation Hardware platform
Mobile and connected vs. stationary Hardware platform Devices and interfaces Security requirements CS-3013, C-Term 2012 Miscellaneous Topics

21 Fundamentally Different Security Requirements
Linux:– Protect the system from errant processes Keep separate processes out of each others’ way Android:– Protect user’s information from rogue apps Manage access to/from network CS-3013, C-Term 2012 Miscellaneous Topics

22 Android Every app is a separate “user” to kernel
App’s files readable/writeable only by the app-user Communication among apps via controlled channels CS-3013, C-Term 2012 Miscellaneous Topics

23 Android (continued) Every app runs in own virtual machine
Dalvik VM:– programmable only in Java Permissions to access other resources from (human) user At installation time System can stop an app at any time to recover memory CS-3013, C-Term 2012 Miscellaneous Topics

24 Summary Less flexibility in development environment on iOS/Android
iOS and Android require tighter memory management/more controlled access to devices Mobile app development targeted for a more specific and known set of devices Application distribution has tighter regulation on iOS and Android CS-3013, C-Term 2012 Miscellaneous Topics

25 Discussion CS-3013, C-Term 2012 Miscellaneous Topics


Download ppt "CS-3013 Operating Systems Hugh C. Lauer"

Similar presentations


Ads by Google