312-50V13 · Question #360
#!/usr/bin/python import socket buffer=[""A""] counter=50 while len(buffer)<=100: buffer.append (""A""*counter) counter=counter+50 commands= [""HELP"",""STATS ."",""RTIME ."",""LTIME. "",""SRUN…
The correct answer is B. Buffer Overflow. The provided Python code repeatedly sends increasingly large strings to a network service, a characteristic technique used to exploit or discover buffer overflow vulnerabilities.
Question
Options
- ADenial-of-service (DOS)
- BBuffer Overflow
- CBruteforce
- DEncryption
How the community answered
(38 responses)- A5% (2)
- B74% (28)
- C13% (5)
- D8% (3)
Why each option
The provided Python code repeatedly sends increasingly large strings to a network service, a characteristic technique used to exploit or discover buffer overflow vulnerabilities.
While a buffer overflow can lead to a denial-of-service, the primary intent of sending overflowing data to observe program behavior or crash it is to exploit a buffer overflow, not just to deny service in the general sense of a DoS attack.
The script attempts to write data exceeding the expected buffer size by appending increasingly larger strings ('A'*50, 'A'*100, etc.) to commands before sending them to a socket, which is a classic method to test for buffer overflow conditions in a target application.
Bruteforce attacks involve systematically trying many passwords or keys; this script focuses on sending oversized data, not iterating through possible credentials.
Encryption involves transforming data to secure it; the script sends raw, easily readable 'A' characters, indicating no attempt at encryption.
Concept tested: Buffer overflow exploitation techniques
Source: https://learn.microsoft.com/en-us/windows/win32/secbp/buffer-overruns
Topics
Community Discussion
No community discussion yet for this question.