40
Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Embed Size (px)

Citation preview

Page 1: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Lecture 8:Files and Viruses

Tonga Institute of Higher EducationIT 141: Information Systems

Page 2: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Files

A file – the name we give to a single grouping of data that can be saved on any media (example, CD-ROM, hard disk, floppy disk)

A file is a way to indicate where bits for one file end and another start on media

Page 3: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Filenames

Because there are many files, there is a need for naming them.

There are special rules to follow to correctly name files.

These rules change based on what operating system you use.

Page 4: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

File name rules

Follow these rules to have a happy and successful computer life 1. Don’t put space in files (use “_”

called the underscore) 2. Don’t use the following characters

(* : ; / \ | ] [ { } + = $ ) 3. Sometimes if you use an uppercase

letter it will make a difference. Be careful

Page 5: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

File name extensions

File name extensions are the part of the filename that comes after the regular name. It identifies what kind of file it is. Example. Paint.exe (it is a program (Executable)) Example. MyLetter.doc (it is a word document)

The extension will tell what kind of format the file is. Maybe it's a word document, excel spreadsheet, or a movie file

Page 6: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

File Size and File Date

A file will save other information besides the name.

File size – how big the file is. How many bytes it contains. For example, a 1KB file 1KB equals 1 kilobyte (1000 bytes = 8000

bits). Very small. A file might be much bigger:

Example 60 MB (60 Million bytes) File Date – when the file was created. Helpful if

you are looking for something you just created

Page 7: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Directories

When computers were first made, scientists thought it would be easy for users if files were stored in folders (also known as directories), just like a real filing system

Directories allow us to organize files The first directory is called the “root”

directory. On Windows this is “C:\” On Linux it is just “/”

Page 8: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

File Management

A file management programs allows you to organize data on your computer so that is it easier to use and find

You can “manage” files using utility programs like windows explorer or sometimes application software will allow you to manage files

These “file managers” let you copy, rename, delete and move files

Page 9: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

File Management

For example, suppose you write a letter As you type the document is held in the

memory (RAM), because the processor is using the document

When you want to save, you click on “Save” or “Save as”

Now you specify the name and location of the file.

You have essentially managed the file

Page 10: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Save and Save as

If you have never saved your file before, and your file needs a name, you will use Save As.

If you have already saved once, just use Save.

Page 11: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

File Management Metaphors

A metaphor is a way to describe something by using a different idea.

File management uses the metaphor of a filing cabinet. Directories are like drawers for saving documents.

Another metaphor is the “tree structure” where the branches represent directories, the root folder are the roots and the files are the leaves.

Page 12: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Tree structure

Page 13: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Windows Explorer

Windows Explorer is the most common file management tool.

It allows users to view directories, find and organize files.

It is divided into two “window” panes. The pane on the left shows devices,

hard disks, and folders The pane on the right will show icons for

files

Page 14: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Windows Explorer

Page 15: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

What can I do in Explorer

In Explorer, you're able to copy, rename, delete, and move

You can work with more than one file by pressing the Ctrl button and then clicking on the files you want to select

You can select many by holding the shift key while clicking on different items

You can move between panes with the tab key

Page 16: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

How is data stored?

Explorer and file management utilities allow you to see the “logical storage model.”

The logical storage model is the view of the file system that makes it easy for users to understand and manage

The real way data is stored on storage media is called the “physical storage model”

Page 17: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Physical Storage Model

To save data, you must first format the storage media (ex. Floppy disk, CD, DVD).

That means you must get it ready for data to be saved on it

Formatting will organize the media into “tracks” which can then be divided into “sectors.”

These sectors each have an address where data can then be saved on it

Page 18: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Sectors

Page 19: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

File Systems

How does the computer know where data is saved on a hard disk?

It uses a “file system” that keeps track of what data is saved in what sector.

The name for the new Microsoft Windows file system is NTFS – New Technology File System

Page 20: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

File Systems

To make transferring data from the hard disk easier, computers will group sectors into clusters or blocks.

A file system’s job is to maintain a list of clusters and to know what is empty and what is full

This data is stored in a special file called the “file allocation table.”

If the “file allocation table” file becomes broken then your computer will not know where anything is saved and your hard drive will not be very useful

Page 21: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

File Allocation Table

When you save a file, the operating system looks at the file allocation table to see what cluster is free.

Then it will update the allocation table to indicate that the file is saved in that cluster

If the file is too big to fit in one cluster, it will use more clusters that are next to it

Page 22: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

File Allocation

When you open a file, The OS looks up the filename in the File

Allocation Table It finds the correct cluster and sector on

the hard drive Then it moves the read-write head on

the hard disk to that spot. The read-write head will read that data The data is sent back to the RAM for

the OS to use

Page 23: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

What happens when you delete?

If you want to delete a file, you might think that it is erased from the hard disk

Instead the file allocation table is updated to say that cluster is now empty and can be used for new data

There are programs that allow users to recover deleted items, because they are not really deleted

To really delete a file, you must have a “file shredder” program, that will write random data where the old file was in the hard disk

Page 24: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Fragmentation

If you have used your computer for awhile, your hard disk might become “fragmented”

Fragmentation means that big files that need more than one cluster are not stored next to each other.

The big files are in different clusters on the hard disk and it will take longer to open those files because the read-write head will have to travel a lot to get the whole file

Page 25: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Computer Viruses

Computer viruses cause big problems for people and businesses. A lot of time is wasted trying to fix these problems

In 1986 the first virus appeared. Now there are 50,000 or more viruses and 10 to 15 new ones appear every day

A virus is any software which damages your computer in anyway

Page 26: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Viruses

A computer virus is a set of program instructions that attaches itself to a file, reproduces and spreads to other files.

It can damage, delete or corrupt files and operating systems

Viruses spread between computers because people spread them through floppy disks and email attachments

Page 27: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Viruses

Viruses will often attach to executable programs and wait to be run

They may often “lurk” or hide for weeks or months before actually doing anything to your computer

Page 28: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Different kinds of viruses

File virus – attaches to a program and will infect the computer when that program is run

Boot Sector – Infects your computer as soon as it is turned on. It lives in the memory where the computer saves the data it needs to start the computer (the BIOS)

Macro virus – a set of instructions that is run by a program. Microsoft word allows you to write macros to do some tasks. A bad macro can destroy data or cause harm. That is a called a macro virus

Page 29: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Trojan Horses

A Trojan Horse is a piece of software which appears to perform a certain action but in fact performs another

A Trojan horse might pretend to show pictures, but really steal your password.

They are not called viruses, because they do not replicate or copy themselves

The term is derived from the classical story of the Trojan Horse.

Page 30: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Worms and DoS

A worm is a virus that is designed to spread from one computer to another computer over a network (unlike a virus which just spreads to files)

DoS stands for Denial of Service attack. It is a program that tries to make computer networks really slow by sending useless data. It can make websites or servers unavailable for people who want to use them

Sometimes DoS attacks are organized and come from many computers at the same time. These are called Distributed Denial of Service attacks

Page 31: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Malware: Spyware and Adware

Malware is a word used to describe many categories of "bad" software

This bad software is usually installed onto a computer without the user knowing about it.

The software installed will then do something that may not be legal

For example, Spyware is software that monitors what the user does, like websites that are visited, time spent on the Internet, passwords that are entered and then reports the data to a company

Adware is software that will display advertisements on computers all the time and even get new ads from the Internet

Most Windows computers that are connected to the Internet suffer from Malware

Page 32: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

How are viruses spread?

Usually on CDs, floppy disks, from websites, downloads or email attachments.

If you download something from a website, you should make sure that it is from a good source.

If you get an email attachment and the file extension on the attachment is .exe it is probably a virus

Page 33: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

How viruses are spread

If you get an email attachment, it cannot spread to the computer if you do not open it.

DO NOT OPEN IT Sometimes a file will only be a Word

document, but a virus can still be inside, because it will be a macro virus.

Don’t open files from people you don’t know

Page 34: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

What are the symptoms of a virus?

Computer displays strange messages There are strange visual and audio

effects Computer works very slowly Your computer reboots suddenly Your computer sends email by itself Your network or Internet access is very

slow Sometimes there will be no symptoms

Page 35: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Antivirus software

Anti-virus software protects your computer from viruses.

It works by examining all the files and programs on a computers. If any of the files match a list of already known viruses, the anti-virus tries to remove it.

To match a file, it looks for the "virus signature" within the file.

If it cannot get rid of the file, it will try to isolate it at least.

Page 36: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Anti-virus Software

Because anti-virus software can only detect viruses it knows about, it must always be updated

You should always be using anti-virus software because viruses can come from many sources and it is better to be prepared.

The anti-virus will automatically scan your computer whenever changes are made to make sure that no viruses have entered your computer

Page 37: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

More types of viruses

It is hard for anti-virus programs to detect all viruses because there are so many, and some of them are very smart

Multi-partite viruses – will infect different targets (like files and boot sector)

Polymorphic – they change so that their virus signature changes

Stealth viruses – they hide when the anti-virus program checks for viruses

Retro virus – these viruses attack the anti-virus program itself!!

Page 38: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Data Backup

It is often important to save your data in two places, in case one place goes bad.

Maybe your hard disk will break, your file system will break or your CD-ROM will get scratched

If you have important data, save it in another place, because you never know what will happen

Page 39: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Data Backups

You can make a backup of your entire computer (called full backup), but often it’s not worth it.

You can always re-install the operating system and get the applications you had before

The things you cannot replace are documents and files that you create. Those should be saved.

Page 40: Lecture 8: Files and Viruses Tonga Institute of Higher Education IT 141: Information Systems

Summary

File Management Data Storage Viruses Data backups