PT0-002 · Question #185
A penetration tester ran a simple Python-based scanner. The following is a snippet of the code: Which of the following BEST describes why this script triggered a probable port scan alert in the…
The correct answer is B. *range(1, 1025) on line 1 populated the portList list in numerical order. Port randomization is widely used in port scanners. By default, Nmap randomizes the scanned port order (except that certain commonly accessible ports are moved near the beginning for efficiency reasons) https://nmap.org/book/man-port-specification.html
Question
A penetration tester ran a simple Python-based scanner. The following is a snippet of the code:
Which of the following BEST describes why this script triggered a probable port scan alert in the organization's IDS?
Exhibit
Options
- Asock.settimeout(20) on line 7 caused each next socket to be created every 20 milliseconds.
- B*range(1, 1025) on line 1 populated the portList list in numerical order.
- CLine 6 uses socket.SOCK_STREAM instead of socket.SOCK_DGRAM
- DThe remoteSvr variable has neither been type-hinted nor initialized.
How the community answered
(66 responses)- A3% (2)
- B88% (58)
- C2% (1)
- D8% (5)
Explanation
Port randomization is widely used in port scanners. By default, Nmap randomizes the scanned port order (except that certain commonly accessible ports are moved near the beginning for efficiency reasons) https://nmap.org/book/man-port-specification.html
Topics
Community Discussion
No community discussion yet for this question.
