SE420 Software Quality Assurance Encryption Backgrounder September 5, 2014 Sam Siewert
Encryption - Substitution Re-map Alphabet, 1-to-1 and On-to (function) A B C D E F G H I J K L M N O P Q R S T U V W X Y Z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ssiewert@ssiewert-virtualbox:~/a320/crypto$./a.out A B C D E F G H I J K L M N O P Q R S T U V W X Y Z N A S I J K C M Q R F B D G H E L O P W T Z Y V U X TRANSLATE THIS! WONGPBNWJ WMQP! BETA>INTRODUCTION TO COMPUTERS QGWOHITSWQHG WH SHDETWJOP INTRODUCTION TO COMPUTERS BETA>abcdefghijklmnopqrstuvwxyz NASIJKCMQRFBDGHELOPWTZYVUX ABCDEFGHIJKLMNOPQRSTUVWXYZ BETA>exit JVQW EXIT Sam Siewert 2
Encryption - Transposition Permute Text Block (e.g. up to 10 characters at a time) 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 ssiewert@ssiewert-virtualbox:~/a320/crypto$./a.out 0123456789ABCD 6275134908ABCD TRAN>introduction to computers utcdnroiitc o ntopomuters introduction to computers TRAN>abcdefghijklmnopqrstuvwxyz gchfbdejaiqmrplnotksuvwxyz abcdefghijklmnopqrstuvwxyz TRAN>exit exit exit Sam Siewert 3
Encryption - Automation Substitution with transposition Enigma Code, U571 ssiewert@ssiewert-virtualbox:~/a320/crypto$./crypt A B C D E F G H I J K L M N O P Q R S T U V W X Y Z N A S I J K C M Q R F B D G H E L O P W T Z Y V U X TRANSLATE THIS! WONGPBNWJ WMQP! NNWBOGP WJWMQP! CRYPT>abcdefghijklmnopqrstuvwxyz NASIJKCMQRFBDGHELOPWTZYVUX CSMKAIJRNQLDOEBGHWFPTZYVUX CRYPT>introduction to computers QGWOHITSWQHG WH SHDETWJOP TWSIGOHQQWS H GWHEHDTWJOP CRYPT>exit JVQW JVQW Sam Siewert 4
Encryption Keys Symmetric Keys Can I encrypt and decrypt with the same key? struct charmap submap[alphabet] = { {'A','N'}, {'B','A'}, {'C','S'}, {'D','I'}, {'E','J'}, {'F','K'}, {'G','C'}, {'H','M'}, {'I','Q'}, {'J','R'}, {'K','F'}, {'L','B'}, {'M','D'}, {'N','G'}, {'O','H'}, {'P','E'}, {'Q','L'}, {'R','O'}, {'S','P'}, {'T','W'}, {'U','T'}, {'V','Z'}, {'W','Y'}, {'X','V'}, {'Y','U'}, {'Z','X'} }; With the substitution Key, Yes // 0 1 2 3 4 5 6 7 8 9 int transmap[block_size]= {6, 2, 7, 5, 1, 3, 4, 9, 0, 8}; int detransmap[block_size]={8, 4, 1, 5, 6, 3, 0, 2, 9, 7}; With the transposition Key, Yes This is a Symmetric Key System Sam Siewert 5
Better Key Management? One Time Stack of Keys Exchanged in Private by Sender and Receiver in Advance Agree to Use Different Symmetric Keys Based on Day of Year or some Universal Coordination Cycle Through 365 Different Keys Attacker Can Still Capture Stack of Keys Better Approach is a Public-Private Key System Public Key Shared Public Key Used to Encrypt Only (Digital Signature) Private Key Used to Decrypt Only (Authentication, Plaintext Recovery) Key Exchange Protocol and Key Rings http://en.wikipedia.org/wiki/public-key_encryption Sam Siewert 6
Authorization and Access Control By Session Login By File (permissions) By Directory Host to Network (Known host Ethernet address, WWID) By Execution Privilege Level (root or user) sudo Authorized Users, Computers, and Applications Require Authentication Proving you are who you claim you are Producing a pass phrase, an answer to a challenge question Key or smartcard Providing biometric scan Sam Siewert 7
Cryptanalysis Attacks on Security Capture Encrypted Data ( Man in the middle ) Capture Encryption code, key, or mechanism Capture Decryption code, key, or mechanism Analyze Examples to Deduce the Substitution and Transposition Cypher Code mappings Inverse Function Defense Very Large Cryptographic Hashing Functions 128-bit, 256-bit or larger random number generators Frequent Key Updates Sam Siewert 8
Denial of Service Rather than Gaining Unauthorized Access, Deny Other Authorized Users Access Bug System with 1000 s or Millions of Invalid Requests Per Second Flood Network with Bad Protocol or Packets Cause Routing Loops, Crash Services Remotely on Purpose Reason for Maximum Login Attempts Withdraw Prompt for Password to A Particular Network Client or Terminal Invalidate a Username Reason for Network Authentication of Clients Block All Traffic for a Specific IP or Ethernet Address Secure Physical Network Switches and Gateway Machines Sam Siewert 9
Malware Software Designed to Harm a Client or Exploit a Known Bug Trojan Horse Present Free Software, an E-mail Application, Plug-In, or other Method to Deliver an Application with Bad Intent User Agrees to Download without Authentication of Source or Verification of Code Data Digest (Unique Signature for Tested and Authentic Code) Beware of Free Software from Unknown Sources Virus Application Code that Installs Itself on a Computer in Key Operating System and Shared Data Locations Boot Code Commonly Used File system Code Transfer Malware via Shared Files, Networks, Disks (e.g. USB stick) Exploit Find Buffer Overflow on Widely Used Operating System or Networking Service to Exploit Buffer Overflow Provides Doorway to Modify Code Perfect Exploit in Private Lab, Release as Trojan Horse or Virus Rootkit Gain Access and Install Monitoring Software or Create Second Administrator Prviliege Password and Account Sam Siewert 10
Phishing Write A Program that Asks for a Password Run this on a Public Computing System Spoofing a Wellknown and Trusted Server Collect Login Credentials from Users (Produce Error Messages) Fake E-mail Requesting Credentials Fake Service or Business Front Impersonation of a Web Service (Re-direction of Traffic) E-mail Indicating your Are Over E-mail Quota Limits, Credit has Been Frozen, Etc. Followed by Request for Credentials Sam Siewert 11
Newer Threats Character Defamation Impersonation of Web Presence to Defame a User Identity Theft Creation of Accounts Using False Credentials Cyber Attacks and Cyber Warfare Malware Designed to Harm or Deny Service to Physical Systems Using Process Control (Water, Power, Traffic Management, etc.) Financial Sector Attacks Discrediting a Company, Service Disruption of Exchanges and Banking Discrediting Governments, Spoofing, Replay Attacks Sam Siewert 12
Best General Defenses Encryption Used for Authentication, Data Exchange (e.g Secure Sockets), and to Sign and Verify All Updates and Upgrades Public Services, Ports, and Terminals Should be Limited Only Necessary Services SSH, SFTP No Plaintext Services FTP, Telnet Routine Monitoring and Logging Review all Connection Attempts and Login Attempts Review Logs for Services that Crash and Restart Installations, Updates, Upgrades Signed Drivers Modifications to Boot Code or CMOS/UEFI (Firmware) Security Patches and Updates from Trusted Sources Sam Siewert 13
Inside Threats Insiders with Physical Access to Machines and Networking Equipment Log all Entry / Exit to/from Data center and labs Cross-checks and Need-to-Know Limited Distributions of Sensitive Data No Password Sharing, Guest or Anonymous Accounts Delete Access and Accounts for Severed Relationships VPN Virtual Private Network Remote Access (Encrypted and Tunnels for Data from Authenticated Client to Host over SSL) Limit Data Removal on Media File Permission and ACL (Access Control List) Maintenance Sam Siewert 14
Extreme Protection Private Network Limited Physical Access (Vault) Strong Encryption, Multi-method Authentication (Smartcard, Pass phrase, and Fingerprint) Compartmentalization - Limit Knowledge of Why Work is Being Done (Hide Global Purpose) Require Multiple Independent User Authentication Combined Key or Pass Phrase Access that Requires Two Logins Quotas on Bandwidth, Storage, Download, Session Time Sam Siewert 15
Encryption Substitution Take Away Transposition cypher blocks Mathematical Basis (mapping functions, random number generation, large hashing functions) Secure Systems Authorization Authentication and Access Control Denial of Service Trojan Horses, Malware, Exploits Sam Siewert 16