Exam PT0-002 All QuestionsBrowse all questions from this exam
Question 267

HOTSPOT

-

A penetration tester is performing reconnaissance for a web application assessment. Upon investigation, the tester reviews the robots.txt file for items of interest.

INSTRUCTIONS

-

Select the tool the penetration tester should use for further investigation.

Select the two entries in the robots.txt file that the penetration tester should recommend for removal.

If at any time you would like to bring back the initial state of the simulation, please click the Reset All button.

    Correct Answer:

Discussion
TiredOfTests

For the tool selection: Given that this is a web application assessment and we are investigating the robots.txt file, WPScan would be the most suitable tool to use for further investigation, assuming the web application is based on WordPress. WPScan is specifically designed to scan WordPress websites for vulnerabilities. For the entries in the robots.txt file that should be recommended for removal: Allow: /admin - This entry allows web crawlers to access the admin directory, which could expose sensitive information. Allow: /wp-login.php - Allowing access to the WordPress login page through robots.txt could attract unwanted attention from attackers. Both of these entries expose sensitive areas of the web application to potential attackers and should be removed.

SimonR2

The tool selection will be WPScan, however I think the given answer is wrong for the pages to disallow for robot.txt. For Wordpress, it should be: "/wp-admin" and "/wp-login.php" - there is no "/admin" wordpress directory as default unless an administrator created it. If you google the default Wordpress admin directories or ask Chatgpt you'll find the answer to be similar to this: By default, the WordPress admin login page is located at http://yoursite.com/wp-admin or http://yoursite.com/wp-login.php. Replace "yoursite.com" with your actual domain.

LiveLaughToasterBath

The WordPress root directory contains the following files and folders: wp-admin wp-content wp-includes .htaccess index.php license.txt readme.html wp-activate.php wp-blog-header.php wp-comments-post.php wp-config-sample.php wp-cron.php wp-links-opml.php wp-load.php wp-login.php wp-mail.php wp-settings.php wp-signup.php wp-trackback.php xmlrpc.php wp-feed.php

Cyber_Soter

In a robots.txt file, the "Allow" directive is used to explicitly allow access to specific URLs for web crawlers. However, if you want to restrict access to certain sensitive or administrative URLs, you would typically use the "Disallow" directive instead of "Allow." Therefore, in this scenario, you would want to remove: Allow: /admin Allow: /wp-admin Removing these directives would prevent web crawlers from accessing URLs related to administrative sections of the website ("/admin" and "/wp-admin"), which can help improve security by restricting unauthorized access to sensitive areas. Allow:/wp-login.php This directive allows access to the "/wp-login.php" URL, which is typically the login page for WordPress sites. If you're aiming to restrict access to administrative areas, it's generally advisable to allow access to the login page so that legitimate users can authenticate and access the site's admin interface. Therefore, you would not remove this directive

Etc_Shadow28000

WPSscan This is because there are entries such as /wp-admin and /wp-login.php which are specific to WordPress sites. WPScan is specifically designed to find vulnerabilities in WordPress installations. Entries to Recommend for Removal The two entries in the robots.txt file that the penetration tester should recommend for removal are: 1. User-agent: * (Entry 1) - Allowing all user agents could expose too much information to any crawler, including malicious ones. 2. Allow: /wp-admin (Entry 16) - This entry could expose administrative directories, which is sensitive information that should not be disclosed. Therefore, the selections are: • Tool: WPScan • Entries to recommend for removal: • User-agent: * • Allow: /wp-admin