{"id":58,"date":"2017-03-22T19:34:28","date_gmt":"2017-03-22T19:34:28","guid":{"rendered":"http:\/\/bocchinfuso.net\/?p=58"},"modified":"2017-04-06T18:20:27","modified_gmt":"2017-04-06T18:20:27","slug":"fit-mgt5114-wk3-discussion-1-post","status":"publish","type":"post","link":"https:\/\/bocchinfuso.net\/index.php\/2017\/03\/22\/fit-mgt5114-wk3-discussion-1-post\/","title":{"rendered":"FIT MGT5114 \u2013 Wk3 Discussion 1 Post"},"content":{"rendered":"<p><strong>Question:<\/strong><\/p>\n<p>The traditional protection levels used by operating systems to protect files are read, write, and execute. What are some other possible levels that a user may wish to apply to files, folders, code, etc.? Justify your answers with examples.<\/p>\n<p><strong>Response:<\/strong><\/p>\n<p>File and folder permissions are governed slightly differently based on operating system type, but the constructs are the same. On <a href=\"https:\/\/en.wikipedia.org\/wiki\/Unix\">Unix<\/a> and other <a href=\"https:\/\/en.wikipedia.org\/wiki\/POSIX\">POSIX<\/a>-compliant systems (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Linux\">Linux<\/a>, Android, MacOS, Windows <a href=\"https:\/\/en.wikipedia.org\/wiki\/NTFS\">NTFS<\/a>, etc&#8230;) file and folder permissions are managed using a user, group, others (or world) model.<\/p>\n<p>For example:<br \/>\nfoo.bar sticky bit | owner | group | world<br \/>\nfoo.bar &#8211; | rwx | r-x | r-x (-rwxr-xr-x)<\/p>\n<p>Files and folders can have permissions quickly set for Owner, Group and World by using the numeric value for the permission mask.<br \/>\nr (read) = 4<br \/>\nw (write) = 2<br \/>\nx (execute) = 1<\/p>\n<p>To assign the file &#8220;foo.bar&#8221; the permission mask of:<br \/>\nowner = rwx<br \/>\ngroup = r-x<br \/>\nothers = r-x<br \/>\nThe command would be &#8220;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Chmod\">chmod<\/a> 755 foo.bar&#8221;<\/p>\n<p>Unix based systems leverage three additional permission <a href=\"https:\/\/docs.oracle.com\/cd\/E19683-01\/806-4078\/secfiles-69\/index.html\">sticky bit, setuid and setgid<\/a>.<br \/>\nWhen the setuid permission is set the user executing the file assumes the permissions of the file owner.<br \/>\nWhen the setgid permission is set the user executing the file is granted the permissions based on the group associated with the file.<br \/>\nWhen the sticky bit is set a file or directory can only be deleted by the file owner, directory owner or root.<\/p>\n<p>These special permissions are set in the following fashion:<br \/>\nsticky bit = 1000<br \/>\nsetgid = 2000<br \/>\nsetuid = 4000<\/p>\n<p>Same idea as setting file permissions to set the sticky bit on foo.bar with full permissions the command would be &#8220;chmod 1777 foo.bar. To setgid and setuid with rwx permissions for the owner and no read only permissions for the group and others the command would be &#8220;chmod 6744 foo.bar&#8221;.<\/p>\n<p>Windows based systems follow a similar file and folder permissions construct at least on systems using the POSIX-compliant NTFS file system (most modern Windows OSes). Older Microsoft Operating Systems like <a href=\"https:\/\/en.wikipedia.org\/wiki\/File_Allocation_Table\">MS-DOS (FAT16 file system) and Windows 95 (FAT32 file system)<\/a> use file attributes (Read-Only or Read-Write) rather than a full permission systems.<\/p>\n<p>Permission inheritance is an important concept, the setgid and setuid are use to facilitate inheritance, the application is slightly different on Windows Operating Systems, but the premise is the same.<\/p>\n<p>Source code can be protected in various ways outside of just file permissions. One option is to compile the code making it executable but not readable. Compiled languages like C++ compile into <a href=\"https:\/\/en.wikipedia.org\/wiki\/Machine_code\">machine code<\/a>; these compiled binaries are not easily <a href=\"https:\/\/en.wikipedia.org\/wiki\/Decompiler\">decompiled<\/a>, another option is to use a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Bytecode\">bytecode<\/a> compiler often used with interpreted languages like Python, Perl, Ruby, etc&#8230; Machine code needs to be compiled for specific architectures, for example, x86, x64 and ARM would require three separate binaries while bytecode compiled binaries would work across architectures. The downside with bytecode compiled binaries is that most of the source code is contained in the compiled binary making it far easier to decompile.<\/p>\n<p>Daemons and like <a href=\"https:\/\/linux.die.net\/man\/8\/auditd\">auditd<\/a> provide the ability to maintain detailed audit trails on file access. Systems like <a href=\"https:\/\/www.varonis.com\/\">Varonis<\/a> provide the ability to audit and verify permissions to ensure that the proper permissions are assigned to files and folders.<\/p>\n<p>Outside of file and folder permissions, there are application level permissions such as <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/ms191291.aspx\">RDBMS permissions<\/a> which determine how a user can interact with the RDBMS and the data it houses. Object store permissions like <a href=\"https:\/\/brandonwamboldt.ca\/understanding-s3-permissions-1662\/\">AWS S3<\/a> offer an authorization model which is similar to filesystem permissions, and these permissions are typically managed via API using standard authentication methods like <a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/an-introduction-to-oauth-2\">OAuth2<\/a> and <a href=\"https:\/\/en.wikipedia.org\/wiki\/Security_Assertion_Markup_Language\">SAML<\/a> token based authentication. <a href=\"https:\/\/en.wikipedia.org\/wiki\/Network_Access_Control\">NAC or Network Access Control<\/a> is a system which controls network access and manages security posture. Revision Contol Systems like <a href=\"https:\/\/wincent.com\/wiki\/Git_repository_access_control\">Git<\/a> use Access Controls to protect source code, in the case of Git these ACLs are very similar to UNIX-based ACLs. Many systems today which leverage <a href=\"https:\/\/en.wikipedia.org\/wiki\/Representational_state_transfer\">REST<\/a> and <a href=\"https:\/\/en.wikipedia.org\/wiki\/SOAP\">SOAP<\/a> APIs to access date use <a href=\"https:\/\/scotch.io\/tutorials\/the-ins-and-outs-of-token-based-authentication\">tokens<\/a> and keys to authenticate users and grant rights. I just finished working on some code today (<a href=\"https:\/\/gist.github.com\/rbocchinfuso\/36f8c58eb93c4932ec4d31b6818b82e8\">https:\/\/gist.github.com\/rbocchinfuso\/36f8c58eb93c4932ec4d31b6818b82e8<\/a>) for a project which uses the <a href=\"https:\/\/smartsheet-platform.github.io\/api-docs\">Smartsheet API<\/a> and token based authentication so that cells can be updated using a command from <a href=\"https:\/\/slack.com\/\">Slack<\/a>. This code authenticates using a token contained in an unpublished config.inc.php file and allows fields in a Smartsheet to be toggled using a command similar to &#8220;ssUpdate rowID,columnID,state&#8221;. Token based authentication, in this case, can provide VIEWER, EDITOR, EDITOR_SHARE, ADMIN and OWNER (<a href=\"https:\/\/smartsheet-platform.github.io\/api-docs\/#authentication\">https:\/\/smartsheet-platform.github.io\/api-docs\/#authentication<\/a>) privileges while being stateless and without requiring user and password authentication.<\/p>\n<p><strong>References<\/strong><\/p>\n<p>Pfleeger, C. P., Pfleeger, S. L., &amp; Margulies, J. (2015). Security in computing (5th ed.). Upper Saddle River: Prentice Hall.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Question: The traditional protection levels used by operating systems to protect files are read, write, and execute. What are some other possible levels that a user may wish to apply to files, folders, code, etc.? Justify your answers with examples. Response: File and folder permissions are governed slightly differently based on operating system type, but [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":37,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4,2],"tags":[],"_links":{"self":[{"href":"https:\/\/bocchinfuso.net\/index.php\/wp-json\/wp\/v2\/posts\/58"}],"collection":[{"href":"https:\/\/bocchinfuso.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bocchinfuso.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bocchinfuso.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bocchinfuso.net\/index.php\/wp-json\/wp\/v2\/comments?post=58"}],"version-history":[{"count":2,"href":"https:\/\/bocchinfuso.net\/index.php\/wp-json\/wp\/v2\/posts\/58\/revisions"}],"predecessor-version":[{"id":60,"href":"https:\/\/bocchinfuso.net\/index.php\/wp-json\/wp\/v2\/posts\/58\/revisions\/60"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bocchinfuso.net\/index.php\/wp-json\/wp\/v2\/media\/37"}],"wp:attachment":[{"href":"https:\/\/bocchinfuso.net\/index.php\/wp-json\/wp\/v2\/media?parent=58"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bocchinfuso.net\/index.php\/wp-json\/wp\/v2\/categories?post=58"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bocchinfuso.net\/index.php\/wp-json\/wp\/v2\/tags?post=58"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}