Ethical Hacking Automation

Automate Recon and scanning process with Vidoc. All security teams in one place

Wgetrc Configuration File Exposure

By kannthu

Medium
Vidoc logoVidoc Module
#devops#exposure
Description

What is the "Wgetrc Configuration File Exposure?"

The "Wgetrc Configuration File Exposure" module is designed to detect a misconfiguration vulnerability related to the Wgetrc configuration file. Wgetrc is a configuration file used by the Wget software, which is a command-line tool for retrieving files from the web. This module focuses on identifying instances where the Wgetrc file is exposed, potentially leading to unauthorized access or information disclosure.

This module has a medium severity level, indicating that while it may not pose an immediate threat, it should still be addressed to prevent potential security risks.

Author: DhiyaneshDK

Impact

If the Wgetrc configuration file is exposed, it can potentially allow attackers to gain unauthorized access to sensitive information or execute arbitrary commands on the affected system. This can lead to further compromise of the system and potential data breaches.

How does the module work?

The module works by sending HTTP requests to specific paths, such as "/wgetrc" and "/.wgetrc", and then applying matching conditions to identify instances of the exposed Wgetrc file. The matching conditions include checking for specific words like "/etc/wgetrc" and "wget.info" within the response, as well as verifying the presence of the "application/octet-stream" header and a successful HTTP status code (200).

By analyzing the responses and matching conditions, the module can determine if the Wgetrc configuration file is exposed and report it as a vulnerability.

Example HTTP request:

GET /wgetrc HTTP/1.1
Host: example.com

Matching conditions:

- Check if the response contains "/etc/wgetrc" and "wget.info" - Check if the "application/octet-stream" header is present - Check if the HTTP status code is 200

If all the matching conditions are met, the module will report the vulnerability.

Module preview

Concurrent Requests (1)
1. HTTP Request template
GET/wgetrc/.wgetrc
Matching conditions
word: /etc/wgetrc, wget.infoand
word: application/octet-streamand
status: 200
Passive global matcher
No matching conditions.
On match action
Report vulnerability