ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 398 - PT0-002 discussion

Report
Export

During a security assessment, a penetration tester decides to write the following Python script: import requests

x= ['OPTIONS', 'TRACE', 'TEST'l

for y in x;

z - requests.request(y, 'http://server.net')

print(y, z.status_code, z.reason)

Which of the following is the penetration tester trying to accomplish? (Select two).

A.
Web server denial of service
Answers
A.
Web server denial of service
B.
HTTP methods availability
Answers
B.
HTTP methods availability
C.
'Web application firewall detection
Answers
C.
'Web application firewall detection
D.
'Web server fingerprinting
Answers
D.
'Web server fingerprinting
E.
Web server error handling
Answers
E.
Web server error handling
F.
Web server banner grabbing
Answers
F.
Web server banner grabbing
Suggested answer: B, D

Explanation:

The Python script mentioned in the question is designed to send HTTP requests using different methods ('OPTIONS', 'TRACE', 'TEST') to a specified URL ('http://server.net') and print out the method used along with the status code and reason for each response. The key objectives of this script are:

HTTP Methods Availability (B): By cycling through different HTTP methods, the script checks which methods are supported by the web server. This can reveal potential vulnerabilities, as certain methods like 'TRACE' can be exploited in certain situations (e.g., Cross Site Tracing (XST) attacks).

Web Server Fingerprinting (D): The response to different HTTP methods can provide clues about the web server's software and configuration, contributing to server fingerprinting. This information can be used to tailor further attacks or understand the security posture of the server.

This script is not designed for causing a denial of service, detecting web application firewalls, examining error handling, or performing banner grabbing directly, which excludes options A, C, E, and F.

asked 02/10/2024
Mohamed Abdul Haq Mohamed Akram
45 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first