Chapter 6 1. Considering the following algorithm fragment, determine what type o
ID: 3914575 • Letter: C
Question
Chapter 6 1. Considering the following algorithm fragment, determine what type of malicious software is it a. legitimate code if date is February 29; delete files on disk legitimate code b. uname read username); pwd -read passwordO if uname and pwd are valid if uname is "youaretheman'; else return Deny Login return Allow_Login; return Allow Login 2. Like a computer virus, a quine is a computer program that copies itself. But unlike a virus, a quine outputs a copy of its source code when it is run, rather than its object code. Given an example of a quine in Java, CIC++, or other high-level programming language.Explanation / Answer
1. A. It is a logic bomb. Logic bomb is a code which has two parts:
i) payload- action to be performed that has the connotation of having a malicious effect.
ii) trigger- a Boolean condition that is evaluated and controls when the payload is executed.
In the given example above the payload that delete all files in disk using the particular date as trigger.
B. It is a back door. It is a mechanism that bypasses the normal security check.
In the example given, it bypasses the actual authentication process.
2. Example for Quine program in C: The below program outputs the same source code. Hence it is a Quine program
main.c:
int main(){char programCode[]="int main(){char programCode[]=%c%s%c;printf(programCode,34,programCode,34);return 0;}";printf(programCode,34,programCode,34);return 0;}
Output:
int main(){char programCode[]="int main(){char programCode[]=%c%s%c;printf(programCode,34,programCode,34);return 0;}";printf(programCode,34,programCode,34);return 0;}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.