nerdexam
GIAC

GCIH · Question #10

John works as a professional Ethical Hacker. He has been assigned a project to test the security server. The output of the scanning test is as follows: C:\whisker.pl -h target_IP_address = Host…

The correct answer is A. This vulnerability helps in a cross site scripting attack. C. The countermeasure to 'printenv' vulnerability is to remove the CGI script. D. With the help of 'printenv' vulnerability, an attacker can input specially crafted links and/or. The CGI printenv script vulnerability enables cross-site scripting and crafted-link injection attacks; the correct remediation is to remove the script from the server.

Web Application Attacks & Post-Exploitation

Question

John works as a professional Ethical Hacker. He has been assigned a project to test the security server. The output of the scanning test is as follows:

C:\whisker.pl -h target_IP_address = Host: target_IP_address = Server: Apache/1.3.12 (Win32) ApacheJServ/1.1 mod_ssl/2.6.4 OpenSSL/0.9.5a mod_perl/1.22 + 200 OK: HEAD /cgi-bin/printenv John recognizes /cgi-bin/printenv vulnerability ('Printenv' vulnerability) in the We_are_secure server. Which of the following statements about 'Printenv' vulnerability are true? Each correct answer represents a complete solution. Choose all that apply.

Options

  • AThis vulnerability helps in a cross site scripting attack.
  • B'Printenv' vulnerability maintains a log file of user activities on the Website, which may be
  • CThe countermeasure to 'printenv' vulnerability is to remove the CGI script.
  • DWith the help of 'printenv' vulnerability, an attacker can input specially crafted links and/or

How the community answered

(26 responses)
  • A
    85% (22)
  • B
    15% (4)

Why each option

The CGI printenv script vulnerability enables cross-site scripting and crafted-link injection attacks; the correct remediation is to remove the script from the server.

AThis vulnerability helps in a cross site scripting attack.Correct

The printenv CGI script reflects user-supplied input such as query string parameters directly in its output without sanitization, making it exploitable for cross-site scripting (XSS) attacks against users who follow malicious links.

B'Printenv' vulnerability maintains a log file of user activities on the Website, which may be

The printenv script does not maintain a log file of user activities; its sole function is to print the current CGI environment variables to the browser response, not to record or log user sessions.

CThe countermeasure to 'printenv' vulnerability is to remove the CGI script.Correct

Because the printenv script serves no legitimate production purpose and introduces direct security risk, the standard countermeasure is to delete or remove it from the web server's cgi-bin directory entirely.

DWith the help of 'printenv' vulnerability, an attacker can input specially crafted links and/orCorrect

An attacker can craft specially constructed URLs containing malicious scripts or HTML that are echoed back by the printenv script, facilitating XSS and injection-based attacks targeting unsuspecting users of the application.

Concept tested: CGI printenv vulnerability and XSS exploitation

Source: https://owasp.org/www-community/attacks/Cross_Site_Scripting_(XSS)

Topics

#CGI vulnerabilities#printenv#cross-site scripting#web server enumeration

Community Discussion

No community discussion yet for this question.

Full GCIH Practice