Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions...

48
Introduction to Security Chuan-kai Yang

Transcript of Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions...

Page 1: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Introduction to Security

Chuan-kai Yang

Page 2: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography

Page 3: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Trojan Horse A malicious program that masquerades as one

thing, but circumvents your security in secret Example: game, screen saver, instant

messenger or MP3 player When you run a such a program, that program

has access to anything you do, i.e. read/write your files, create network connections, send emails, attempt to break into other machines, and run any arbitrary commands.

Page 4: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Trojan Horse Delivery Friends Usenet posts/ Webs Email attachments Security fixes Security tests

Page 5: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Virus Viruses are similar to Trojan horse in

that they do something to or on your machine that you don’t want them to, without your knowledge or permission

A Trojan horse is simply a stand-alone program that cannot propagate itself

Neither viruses nor Trojan horses can infect outside machines

Page 6: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Virus ABC Type

TSR (Terminate and Stay Resident) Files

Infected media Boot record, FAT, Partition table Files

Ways to get infected Booting with floppy disk and

executing infected programs/applets

Page 7: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Virus Syndromes Nothing wrong (dormant) Undesired effects (demos) Slowing down Wasting system resources

(memory, directories and files) Damaging of file systems Damaging of hardware

Page 8: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Worm A worm is a program that can

infect both the local machine and remote machines

It usually spreads itself from machine to machine over a network by attacking or using other network programs or by using file-sharing capability of computer

Page 9: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

A Hybrid Form Melissa virus is in fact a hybrid of all

three: Trojan, virus and worm. First it pretended to be an email (as a

Trojan) Then it infected your local work

processing files (as a virus) And it used an security hole in Outlook to

propagate itself too all the people in your address book (as a worm)

Page 10: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Attacks Hacking and cracking Physical attack Password cracking Booting, executables and applets OS and software holes/backdoors Buffer overflow/overrun Packet sniffing/eavesdropping Cookies DOS and DDOS

Page 11: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Hackers versus Crackers Malicious or not The spirit of open

standards/documentations

Page 12: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Physical Attacks Impersonation Console rebooting

Page 13: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Password Cracking There are tools for cracking

Malicious Forgetting password

Encrypted password files Good or bad passwords? Password lifetime

Page 14: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Booting / Running Programs

Booting with affected floppies/CDRoms

Running unknown programs/applets

Page 15: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

OS/Software Breaches Finger/FTP/mail… Software backdoors (hotkeys,

commands) Faking interfaces

Why does NT boot up with “CTL-ALT-DEL”?

Page 16: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Buffer Overrun Using address out of array bounds Making function calls but the

arguments are out of bounds

Page 17: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Packet Sniffing/Eavesdropping

Copy and relaying Interception

Stealing important information (e.g. passwords)

Faking / impersonation

Page 18: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Cookies For personalization and

customization Risks

Page 19: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

DOS and DDOS Denial of Service

Paralyze a system by reserving too many resources

Spoofing Prevention: global cooperation

Distributed Denial of Service More difficult to analyze/trace the

attackers

Page 20: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Preventions Always be suspicious Hardware protection Run executables with certification Booting option selection Passwords protection Software/OS updating/patching Firewall/packet filter

Page 21: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Fire Wall A firewall disrupts free communication

between trusted and un-trusted networks, attempting to manage information flow and restrict dangerous free access.

Page 22: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Example of Firewall Rules Allow internal users to access

external www servers, but not allow external users to access our intranet server

This means the firewall needs to know two things: The application being connected to The direction of the conversation

Page 23: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Applications of Firewall Packet filter Proxy server

Page 24: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Cryptography Basic concepts Public/secret keys Digital signature Conventional cryptography Certification authority

Page 25: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Cryptography ABC Cryptography is the science of secret writing.

A cipher is a secret method of writing, where by plaintext (cleartext) is transformed into a ciphertext.

The process of transforming plaintext into ciphertext is called encipherment or encryption.

The reverse process of transforming ciphertext into plaintext is called decipherment or decryption.

Encryption and decryption are controlled by cryptographic keys.

Page 26: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Secrete Writing

Encryption

Decryption

Plaintext Ciphertext Key

Page 27: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Attacks against Ciphers Cryptanalysis is the science and study of method

s of breaking ciphers. A cipher is breakable if it is possible to determin

e the plaintext or key from the ciphertext, or to determine the key from plaintext-ciphertext pairs.

Attacks Ciphertext-only attack Known-plaintext attack Chosen-plaintext attack

Page 28: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Cryptographic Systems A cryptographic system has five componen

ts: A plaintext message space, M A ciphertext message space, C A key space, K A familiy of enciphering transformations

Ek:MC A family of deciphering transformations

Dk:CM

Page 29: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Cryptographic Systems (cont.)

Cryptosystem requirements: Efficient enciphering/deciphering Systems must be easy to use The security of the system depends only

on the keys, not the secrecy of E or D

M Ek C Dk M

plaintext plaintextciphertext

Dk(Ek(M))=M ,for a key k

Page 30: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Secure Cipher Unconditionally secure

A cipher is unconditionally secure if no matter how much ciphertext is intercepted, there is not enough information in the ciphertext to determine the plaintext uniquely.

Computationally secure A cipher is computationally infeasible to b

reak.

Page 31: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Secrecy Requirement It should be computationally infeasible t

o systematically determine the deciphering transformation Dk from intercepted C, even if corresponding M is known.

It should be computationally infeasible to systematically determine M from intercepted C.

Ek C Dk MM

Mdisallowed

Page 32: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Authentication Requirement

It should be computationally infeasible to systematically determine the enciphering transformation Ek given C, even if corresponding M is known.

It should be computationally infeasible to systematically find C’ such that Dk(C’) is a valid plaintext in M.

Ek C Dk MM

Mdisallowed

protected

Page 33: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Key-distribution cryptosystem

• Encrypting & decrypting are closely tied together.

• The sender and the receiver must agree on the use of a common key before any message transmission takes place.

• A safe communication channel must

exist between sender and receiver

Message Source

PEncryption

CDecryption

PReceiver

Secure key transmission

Page 34: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Public-key Cryptosystem

In a public key cryptosystem, each participant is assigned a pair of inverse keys E and D.

Different functions are used for enciphering and deciphering, one of the two keys can be made public, provided that it is impossible to generate one key from the other.

E can be made public, but D is kept secret. The normal key transmission between senders and

receivers can be replaced by an open directory of enciphering keys, containing the keys E for all participants.

Message Source

PEncryption

CDecryption

PReceiver

Key source 1Ek

Key source 2Dk

Page 35: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Using Public-Key Cryptosystem to Transfer

Messages Secretly When a person A wishes to send a message to

a person B, the receiver’s enciphering key EB is used to generate the ciphertext EB(m). Since the key EB is freely available, anyone can then encipher a message destined for B. However, only the receivers B with access to the decipher key DB can regenerate the original text by performing the inverse transform DB(EB(m)).

Page 36: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Digital Signature Security Integrity Authentication Non-repudiation

Page 37: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Using Public-key Systems to Implement Digital

Signatures

1. A signs m by computing c=DA(m)2. B validates A’s signature by checking E

A(c) =m3. A dispute can be judged by checking wh

ether EA(c) restores M in the same ways as B.

Requirements: Dk(Ek(m))=Ek(Dk(m))=m

Page 38: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Secrecy and Authenticity in A Public-Key System

EA(DB(C))=EA(DB(EB(DA(M))))

=EA(DA(M))

=M

DA(m)=S EB(S)=C DB(C)=S EA(S)=mm m

Transformations applied by sender

Transformations applied by receiver

Page 39: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Conventional Cryptosystems

Using substitution transform and permutation transform Substitution Ciphers Running Key Ciphers Transposition Ciphers

(Permutation ciphers)

Page 40: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Substitution Ciphers Replace bits, characters, or blocks

of characters with substitutes. Example: Caesar cipher

which shift each letter in the English forward by K positions (shifts past Z cycle back to A)

A simple substitution cipher is easy to solve by performing a frequency analysis.

Page 41: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Running Key Ciphers

The security of a substitution cipher generally increases with the key length. In a running key cipher, the key length is equal to the plaintext message.(not using a fixed key alphabet) E.g. use the text in a book as the key sequence.

The cipher may be breakable by Friedman’s method based on the observation that both plaintext and key letters are high frequency ones in natural language.

Page 42: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Permutation Ciphers Rearrange bits or characters in the data.

What is the key? Attacks: frequency analysis of characters.

INFORMATION TECHNIQUES FOR IPR

I R I T N E R N O M T O E H I U S O I R F A N C Q F P

IRITNERNOMTOEHIUSOIRFANCQFP

Page 43: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

CA (Certification Authority) A certification authority is a trusted

organization that will "sign" and verify a digital certificate, and thus vouch for the certificate owner's identity-allowing for trusted, secure e-Commerce between (known and unknown) parties.

Page 44: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Steganography Example Digital watermarking Data hiding concepts Hiding data in an image

Page 45: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Steganography Example 連天烽火漫無邊 楚河漢界戰國天 戰事綿延滿人間 瑜亮情節非等閑 是該英雄出頭時 也怨老天未眷顧 豬羊變色任我顛 是非總有清曉年

加霜覆雪麻煩牽 一木生子帶頭尖 上無宮闕難成仙 共謀天下劃兩邊 阿蒙今已非比昔 三分藍袍破家門 扁擔欲撐半邊天 隻手遮天禍人間

Page 46: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Digital Watermarking What is it? What is it for?

Copyright Ownership

What properties does it need? Not visible Secure Robustness

Page 47: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Data Hiding It is different from cryptography Could be used together with

cryptography Typical implementation

hiding in the details Cover media

Text, image, sound…

Page 48: Introduction to Security Chuan-kai Yang. Outline Trojan horse, virus and worm Attacks & preventions Cryptography Steganography.

Hiding Data in an Image The resulting images after inserting

noise into the least significant bits

Original 1 bit 2 bits 3 bits

4 bits 5 bits 6 bits 7 bits