Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

Testing for buffer-overflow in a system can be done manually and has two possible ways.(a) True(b) FalseI have been asked this question in exam.I would like to ask this question from Buffer Overflow in section Cyber Security of Cyber Security

Answer»

The correct answer is (a) True

To elaborate: TESTING for buffer-overflow in a system can be done manually, and has two POSSIBLE ways. One WAY is to look into the code and check whether the boundary check has been PROPERLY INCORPORATED or not. The other way is to make the executable build of the product, feed the application with a huge amount of data and check for abnormal behaviour.

2.

How many primary ways are there for detecting buffer-overflow?(a) 6(b) 3(c) 2(d) 5I have been asked this question in semester exam.Query is from Buffer Overflow in division Cyber Security of Cyber Security

Answer»

The correct CHOICE is (c) 2

Easy explanation: There are TWO ways to detect buffer-overflow in an application. One way is to look into the code and check WHETHER the boundary check has been properly incorporated or not. The other way is to make the executable build of the PRODUCT, feed the application with a huge amount of data and check for abnormal BEHAVIOUR.

3.

Variables that gets created dynamically when a function (such as malloc()) is called is created in the form of _______ data-structure.(a) array(b) queue(c) stack(d) heapThis question was posed to me during an internship interview.My enquiry is from Buffer Overflow in section Cyber Security of Cyber Security

Answer»

Correct choice is (d) heap

To EXPLAIN I would say: Variables that gets created dynamically when a function (such as malloc()) is called is created in the form of heap data-structure. In heap-based OVERFLOW, the buffer is PLACED on the lower PART of the heap, overwriting all dynamically generated variables.

4.

Malicious code can be pushed into the _________ during ______________ attack.(a) stack, buffer-overflow(b) queue, buffer-overflow(c) memory-card, buffer-overflow(d) external drive, buffer-overflowThe question was posed to me by my school teacher while I was bunking the class.The query is from Buffer Overflow topic in section Cyber Security of Cyber Security

Answer»

Right answer is (a) stack, buffer-overflow

The BEST EXPLANATION: Malicious CODE can be pushed into the stack during the buffer-overflow ATTACK. The overflow can be used to OVERWRITE the return pointer so that the control-flow switches to the malicious code.

5.

In an application that uses stack, the memory for data is allocated ____________(a) logical(b) dynamically(c) statically(d) at the end of the programThis question was posed to me in my homework.Question is taken from Buffer Overflow topic in portion Cyber Security of Cyber Security

Answer»

Right option is (c) statically

The best I can EXPLAIN: In APPLICATION that USES heap, memory utilized by the application is allocated at the BEGINNING of the function CALL and the memory get released at the end of a program. Accessing of values in the stack is very fast.

6.

In an application that uses heap, the memory for data is allocated ____________(a) logical(b) dynamically(c) statically(d) at the beginning of the programThe question was posed to me in semester exam.I want to ask this question from Buffer Overflow in division Cyber Security of Cyber Security

Answer»

Right option is (b) dynamically

For explanation: In an APPLICATION that USES the HEAP, memory UTILIZED by the application is ALLOCATED dynamically at runtime. Access to such memories is comparatively slower than memories that use the stack.

7.

With the lack of boundary check, the program ends abnormally and leads to ___________ error.(a) logical(b) segmentation(c) compile-time(d) syntaxI had been asked this question in my homework.Origin of the question is Buffer Overflow in section Cyber Security of Cyber Security

Answer»

The correct option is (b) segmentation

Explanation: In buffer-overflow, with the lack of boundary CHECK, the PROGRAM ends ABNORMALLY and leads to segmentation error or BUS error. SOMETIMES the application on which the attack was done get stuck or hang and suddenly the app closes.

8.

_____________ buffer overflows, which are more common among attackers.(a) Memory-based(b) Queue-based(c) Stack-based(d) Heap-basedThe question was posed to me in an internship interview.I want to ask this question from Buffer Overflow in division Cyber Security of Cyber Security

Answer»

Correct choice is (C) Stack-based

For EXPLANATION: In the CASE of stack-based buffer overflows, which is very common among the TWO types of buffer-overflow; it exploits APPLICATIONS by flooding the stack: memory-space where users externally input the data.

9.

Among the two types ____________buffer-overflow is complex to execute and the least common attack that may take place.(a) memory-based(b) queue-based(c) stack-based(d) heap-basedThis question was addressed to me during a job interview.The doubt is from Buffer Overflow in section Cyber Security of Cyber Security

Answer»

Right option is (d) heap-based

Easy EXPLANATION: Among the two types of buffer-overflow, heap-based buffer-overflow attacks are hard to EXECUTE and the least common of the 2 types. It attacks the application by FLOODING the space of memory that is reserved for a PROGRAM.

10.

Buffer-overflow attack can take place if a machine can execute a code that resides in the data/stack segment.(a) True(b) FalseI have been asked this question in final exam.Question is taken from Buffer Overflow in section Cyber Security of Cyber Security

Answer» RIGHT answer is (a) True

Easy EXPLANATION: Buffer-overflow attack can TAKE PLACE either the programmer LACK boundary testing or if a machine can execute a code that resides in the data/stack segment.
11.

Old operating systems like _______ and NT-based systems have buffer-overflow attack a common vulnerability.(a) Windows 7(b) Chrome(c) IOS12(d) UNIXI got this question during a job interview.I want to ask this question from Buffer Overflow in section Cyber Security of Cyber Security

Answer»

Right option is (d) UNIX

Explanation: Old operating SYSTEMS LIKE UNIX and NT-based systems have buffer-overflow attack a COMMON VULNERABILITY. This is because they were developed in old programming languages.

12.

Why apps developed in languages like C, C++ is prone to Buffer-overflow?(a) No string boundary checks in predefined functions(b) No storage check in the external memory(c) No processing power check(d) No database checkI have been asked this question in an interview for internship.The above asked question is from Buffer Overflow in portion Cyber Security of Cyber Security

Answer»

Correct choice is (a) No string boundary checks in predefined functions

For explanation I would SAY: The strcat(), STRCPY(), sprintf(), gets() etc when CALLED in C and C++ can be exploited because these functions don’t check whether the stack is large enough for storing the data fetched from some other variable HOLDING larger data.

13.

Applications developed by programming languages like ____ and______ have this common buffer-overflow error.(a) C, Ruby(b) Python, Ruby(c) C, C++(d) Tcl, C#I got this question during an online exam.I'm obligated to ask this question of Buffer Overflow topic in portion Cyber Security of Cyber Security

Answer»

Right choice is (c) C, C++

Easy explanation: Applications DEVELOPED by programming LANGUAGES like C and C++ have this common buffer-overflow error. The strcat(), STRCPY(), sprintf(), GETS() etc when called in C and C++ can be exploited because these functions don’t check whether the stack is large enough for storing the DATA.

14.

Buffer-overflow may remain as a bug in apps if __________ are not done fully.(a) boundary hacks(b) memory checks(c) boundary checks(d) buffer checksThis question was posed to me in exam.Query is from Buffer Overflow in chapter Cyber Security of Cyber Security

Answer»

The correct choice is (c) BOUNDARY checks

Best explanation: Buffer-overflow MAY remain as a BUG in APPS if boundary checks are not done fully by developers or are skipped by the QA (Quality Assurance) testers of the software development team.

15.

Buffer-overflow is also known as ______________(a) buffer-overrun(b) buffer-leak(c) memory leakage(d) data overflowI got this question by my college professor while I was bunking the class.I want to ask this question from Buffer Overflow topic in portion Cyber Security of Cyber Security

Answer»

Right choice is (a) buffer-overrun

The BEST I can explain: Buffer-overflow, also known as buffer-overrun is a WIDESPREAD APPLICATION’s coding mistake made by app developers which could be exploited by an ATTACKER for gaining access or malfunctioning your SYSTEM.

16.

______________ is a widespread app’s coding mistake made by developers which could be exploited by an attacker for gaining access or malfunctioning your system.(a) Memory leakage(b) Buffer-overrun(c) Less processing power(d) Inefficient programmingI got this question in an online interview.This is a very interesting question from Buffer Overflow in chapter Cyber Security of Cyber Security

Answer»

Right OPTION is (b) Buffer-overrun

For explanation I would SAY: Buffer-overflow, ALSO known as buffer-overrun is a widespread application’s coding MISTAKE made by developers which could be exploited by an attacker for gaining access or malfunctioning your system.

17.

Let suppose a search box of an application can take at most 200 words, and you’ve inserted more than that and pressed the search button; the system crashes. Usually this is because of limited __________(a) buffer(b) external storage(c) processing power(d) local storageI have been asked this question during an online exam.I'd like to ask this question from Buffer Overflow topic in chapter Cyber Security of Cyber Security

Answer» CORRECT option is (a) buffer

The best I can explain: In a scenario, where to suppose a search box of an application can take at most 200 words, and you’ve inserted more than that and pressed the search BUTTON; the system crashes. USUALLY, this is because of the LIMITED buffer.
18.

How many types of buffer-overflow attack are there?(a) 4(b) 2(c) 5(d) 3The question was posed to me in my homework.The origin of the question is Buffer Overflow topic in chapter Cyber Security of Cyber Security

Answer» CORRECT choice is (b) 2

The EXPLANATION is: There are two different types of buffer-overflow attack. These are stack-based and heap-based buffer overflow. In both the cases, this type of exploit takes advantage of an APPLICATION that WAITS for USER’s input.
19.

In a _____________ attack, the extra data that holds some specific instructions in the memory for actions is projected by a cyber-criminal or penetration tester to crack the system.(a) Phishing(b) MiTM(c) Buffer-overflow(d) ClickjackingThis question was posed to me in my homework.This interesting question is from Buffer Overflow in division Cyber Security of Cyber Security

Answer»

Correct ANSWER is (c) Buffer-overflow

For explanation I would say: In a buffer-overflow ATTACK, the extra data that holds some SPECIFIC instructions in the memory for ACTIONS is PROJECTED by a cyber-criminal or penetration tester to crack the system.

20.

A __________ is a sequential segment of the memory location that is allocated for containing some data such as a character string or an array of integers.(a) stack(b) queue(c) external storage(d) bufferI got this question in examination.The question is from Buffer Overflow topic in chapter Cyber Security of Cyber Security

Answer»

Right choice is (d) BUFFER

To EXPLAIN: A buffer is a sequential SEGMENT of the memory LOCATION that is allocated for containing some data such as a character string or an array of integers. The buffer can handle data only if limited data is inserted.