Penetration Testing: Using ReconFTW - Part 2
- Continuing from part 1: exploiting the results of the scan in "recon" mode.
- Reading the ReconFTW output and explaining the main files.
- Tips for prioritizing and correcting identified vulnerabilities.
- Cybersecurity is everyone's responsibility; know your level and seek support.
Introduction
This article continues from the previous one, introducing penetration testing using the reconFTW tool.
The previous publication served as an introduction and described the installation of reconftw and its associated dependencies via a Rocky Linux 9 instance running on WSL.
We ended by launching a scan in "recon" mode, which is reconnaissance mode, the intermediate testing level.
Now it's time to process the results and provide some explanations about the reconftw output.
reconftw Output
When you perform a penetration test with reconftw, you can either provide it with a list of target domains or, as in my case, a specific domain.
Each scanned domain will result in a folder within the reconftw installation directory.
If you followed my tutorial, it will be located at /cyber/reconftw/Recon.

Click the image to enlarge.
Within this folder, you will find other subfolders, specific to each type of analysis performed by the tools executed by reconftw.
The number of folders will depend on the options enabled in the configuration file (see previous article) and the scan command executed.
For example, in my previous article, I ended with the following command:
reconftw.sh -d myprivatelab.tech -r –ai
Which allows me to obtain the list of the following directories:

Click the image to enlarge.
Log analysis and error correction
Note the existence of a hidden folder .log, which, as its name suggests, contains the scan log.

Click the image to enlarge.
One of the first things to do is to open this log file to identify any potential problems encountered during the scan.

Click the image to enlarge.
You shouldn't have too many error messages, but it is sometimes possible to encounter issues related to a misconfiguration of the tool launched by reconftw.
The important thing is to ensure that most of the scans were successfully completed.
For example, we can see here that the file user_agents.txt was not found, and the binary exiftool was not found.

Click the image to enlarge.
For exiftool, it is sufficient to enable the EPEL repository
sudo dnf install epel-release

Click the image to enlarge.
And install the perl-Image-ExifTool package:
sudo dnf install perl-Image-ExifTool

Click the image to enlarge.
For the "user_agents.txt" file, it's a bit more complex.
This file is present in the directory of the metagoofil tool.

Click the image to enlarge.
It is an OSINT (Open Source Intelligence) utility designed to extract metadata from documents publicly accessible on the Internet.
The problem seems to be located in the script metagoofil.py, which is available in the same directory as the txt file (for reference, by default reconftw deploys all third-party tools in ~/Tools).
As you can see in the scan log, the error is on line 128. I'm not going to do something very elegant, but to save time, I will hardcode the path where the file is located.

Click the image to enlarge.
This is not ideal, but it will allow me to restart my scan.
By default, Reconftw does not rerun tests that have already produced output. If you want to force a complete scan from scratch, then you need to delete the folder containing your results.

Click the image to enlarge.
And we start again! Except this time, I will run a scan with an attack, which is a complete scan via the -a option.
reconftw.sh -d myprivatelab.tech -a –-ai
For reference, this is the most intrusive type of scan! Perform it with caution and only against assets for which you are responsible or that you are authorized to analyze.

Click the image to enlarge.
Disclaimer regarding the use of AI
The complete scan, including attack attempts, naturally takes longer.
In my case, I had to wait more than 5 hours to obtain the final results.

Click the image to enlarge.
As with the previous scan, the conclusions are located in the /Recon subdirectory of the reconftw installation directory.

Click the image to enlarge.
For the rest of the article, I have extracted the two folders associated with my scans on my workstation. One of the advantages of using WSL is that you can directly transfer elements from your Linux file system to your Windows file system to simplify file manipulations.
I renamed my first scan -r to identify the results from reconnaissance mode, and -a for the complete scan.

Click the image to enlarge.
When comparing the two folders, it is clear that -a has an additional folder and appears larger than the -r folder.

Click the image to enlarge.
This makes sense because the -a scan executes all the tests of the penetration test.
Therefore, I will rely on the complete scan to try to define and explain the different output files from the penetration test.
This is where AI provides an interesting benefit. Even without mentioning the final report proposed by the LLM model executed by Ollama, as presented in the first article, ChatGPT-like models can be very helpful in interpreting the results of the penetration test.
Be careful, I am not saying that AI is sufficient on its own to offer a complete penetration testing service. Nothing replaces an expert in the field and a thorough human analysis of the results.
Experience plays a huge role in correctly interpreting the output of reconftw. However, AI allows for an initial macro approach, to clear the ground and offer initial assistance to someone who is just starting out... like me.
Therefore, I will rely on AI (and I have no shame in saying so) to summarize the results of my scan.
But again, I want to caution against using AI for this purpose. When I say that I am going to use AI for my penetration test, it does not mean that I am simply going to copy and paste the content of the reconftw output into any prompt.
Some information contained in the results of a penetration test can be confidential and highly risky... do not send all of this to a public AI where you have no control over data storage.
AI should be used wisely, without providing too much sensitive information, and you should know how to guide your expectations for the responses.
It is important to analyze the feedback and ensure that the AI output is understandable and makes sense to you. If this is not the case, do not hesitate to rephrase your request, ask for further explanations, and especially return to the old method of good old Google searches and exploring specialized forums/articles.
In my case, I mainly want to obtain an explanation of each output file and establish a risk logic. I would like to be able to assess the value of the data found in each file for an attacker, and to know the level of risk incurred by my infrastructure when trying to obtain this data.
Reconftw can also be used to select a specific test or series of tests. It would be interesting to implement a penetration test, with varying frequency and comprehensiveness, depending on the risks being identified and the acceptable impact on the architecture during the test.
We could consider scheduling non-intrusive tests at regular intervals during periods of activity. However, certain more significant and relevant tests in terms of discovered risks should be performed occasionally outside of production hours to minimize the potential impact of a crash caused by an overly aggressive scan.
Now that all disclaimers have been made, let's get to the point.
Logic for structuring the output
It is important to understand that ReconFTW executes the various tools available to it in a specific order.
Overall, there is first a collection phase, then an analysis phase, and finally an attempt at attack based on what was discovered during the previous phases.
Each step results in a directory that reflects the type of information that can be found within it.
| 📁 Folder | 🎯 Main objective | 📊 Type of data contained | 🔧 Main tools used |
|---|---|---|---|
| fuzzing | Discover hidden files, directories or endpoints | Valid paths (/admin, /api…), HTTP codes, response sizes | ffuf, feroxbuster, wordlists (SecLists, custom) |
| hosts | Identify active IPs and hosts | DNS resolutions, IP addresses, banners, open ports, ASN | nmap, masscan, dnsx, massdns, shuffledns |
| js | Extract and analyze JavaScript files | URLs, API endpoints, API keys, tokens, sensitive variables | getJS, subjs, LinkFinder, SecretFinder |
| nuclei_output | Scan for vulnerabilities using predefined templates | Vulnerabilities (CVEs, misconfigurations), server information, SSL | nuclei (CVE templates, exposures, configuration checks) |
| osint | Collect public information (Open Source Intelligence) | Emails, social networks, GitHub/Pastebin leaks | theHarvester, github-subdomains, scraping engines |
| subdomains | Enumerate subdomains | Lists of raw and resolved subdomains, sorted by domain | assetfinder, amass, subfinder, dnsx, chaos-client |
| vulns | Store detailed vulnerability results | Technical reports, Proof of Concept (PoC), screenshots | nuclei (targeted scan), httpx, manual tests (XSS, SQLi…) |
| web | Map web services | Accessible URLs, detected technologies, screenshots | httpx, aquatone/gowitness, whatweb/wappalyzer |
The subdomains and hosts folders serve as the basis for the following steps.
Web and fuzzing are useful for application mapping.
nuclei_output and vulns are the results that can be used to create a final report.
osint can be combined with JS results to find internal access points.
Here is a diagram that summarizes the logic used by reconftw, showing the purpose of each directory. The color coding indicates the impact of the penetration test on the scanned infrastructure. The more red there is, the more the tests performed to obtain the results contained in the directories can put a load on the targeted servers.

Click the image to enlarge.
We will now go through each folder in order, following the diagram.
Analysis by folder
subdomains

Click the image to enlarge.
| 📁 File | 📝 Description | 📊 Value for the attacker / analyst | ⚠️ Risk during collection |
|---|---|---|---|
| cloud_assets.txt | List of cloud resources related to the target (AWS, Azure, GCP…) | 📈 High, allows targeting storage, VMs or external cloud services | 🟢 Low, search based on patterns, not very intrusive |
| cloudhunter_open_bucket.txt | Public cloud buckets detected | 📈 Very high, direct access to sensitive data is possible | 🟢 Low, detection via simple HTTP GET requests |
| subdomains.txt | Raw list of subdomains found | 📈 High, basis for subsequent scans, external mapping | 🟢 Low, mostly passive collection |
| subdomains_dnsregs.json | Subdomains enriched with ASN, DNS, country, IP information | 📈 High, helps identify providers, potential entry points | 🟢 Low, passive enrichment from APIs or WHOIS |
| subdomains_ips.txt | Mapping of subdomains to IPs | 📈 Medium to high, useful for targeting the network and active services | 🟢 Low, extraction from DNS resolution |
| zonetransfert.txt | Result of a DNS zone transfer (AXFR). | 🚀 Critical, complete leakage of DNS configuration, including internal servers | 🔴 High, active request that may be detected, or even logged as an intrusion attempt |
In my case, there were no alerts at this level. My DNS zone is properly protected from transfer so that no attacker can take control of my domain.
osint

Click the image to enlarge.
| 📁 File | 📝 Description | 🔧 Origin / Probable tools | 📊 Value for the attacker / analyst | ⚠️ Risk during collection |
|---|---|---|---|---|
| 3rdparts_misconfigurations.txt | List of third-party services related to the domain (CDN, SaaS, integrations) with potentially weak or incorrect configurations. | Search in DNS, HTTP headers, simple tests (nuclei, dnsx, OSINT toolkits). | 📈 High, can lead to a compromise via a misconfigured external service. | 🟢 Low, passive analysis. |
| azure_tenant_domains.txt | List of domains/tenant IDs from Azure Active Directory related to the target. | o365enum, aadinternals, passive metadata search for Microsoft services. | 📈 Very high, allows targeted attacks on the M365/Azure environment. | 🟢 Low, passive interrogation of Microsoft endpoints. |
| domain_info_general.txt | WHOIS summary, DNS information, ASN details, and technologies used by the root domain. | whoisxmlapi, dnsx, amass, general OSINT tools. | 📈 Medium, provides context and hosting provider information. | 🟢 Low, completely passive. |
| dorks.txt | List of pre-formatted Google Dork queries for searching for sensitive public information. | Generated from the domain (site:, intitle:, filetype:). | 📈 High, allows finding exposed files, credentials, and configurations. | 🟢 Low, search queries on search engines. |
| emails.txt | Email addresses associated with the domain. | theHarvester, scraping of search engines, public databases. | 📈 Very high, a basis for phishing and password spraying attacks. | 🟢 Low, passive collection. |
| postman_leaks.txt | Public Postman collections or environments related to the domain. | Postman API, GitHub/GitLab search. | 📈 Critical, often contains tokens/API keys. | 🟢 Low, passive search. |
| scopify.txt | List of domains/subdomains validated as "in scope" for the testing program. | Generated by ReconFTW based on filtering criteria. | 📈 Medium, useful for scoping scans and avoiding out-of-scope targets. | 🟢 Low, internal processing. |
Regarding OSINT, no alerts were detected regarding a data leak that could be related to my domain.
It is crucial to emphasize that the quality of data collection will depend on the number of sources that Reconftw can exploit in this section. This includes services presented in the first part, such as Shodan.
Not all websites that allow querying for data from the dark web are necessarily free to use. In my case, I only used a few publicly accessible repositories, but with limited API usage levels.
This is an important factor to consider in your penetration testing campaigns. Specialized companies with real experts often have a much more relevant and comprehensive repository than what can be found initially.
This can justify sometimes significant billing, because not everything is accessible simply via an API; sometimes you need to spend hours and hours searching the dark web to identify anything that could relate to a data leak associated with a company, or a potential threat related to the planning of an attack.
hosts

Click the image to enlarge.
| 📁 File | 📝 Description | 🔧 Origin / Probable tools | 📊 Value for the attacker / analyst | ⚠️ Risk during collection |
|---|---|---|---|---|
| ipinfo.txt | Enriched information about the IPs found: ASN, country, provider, service type. | ipinfo.io, whois, asnmap. | 📈 Medium, helps to identify who hosts the IP and which network it belongs to. | 🟢 Low, querying a public API. |
| ips.txt | Raw list of discovered IP addresses (subdomain resolution or network discovery). | dnsx, massdns, Nmap extraction. | 📈 High, basis for active scans and OSINT correlation. | 🟢 Low, passive collection from DNS or pre-scan. |
| portscan_active.gnmap | Raw Nmap results in a "grepable" format after an active scan. | nmap (TCP/UDP scan) | 📈 Very high, shows open ports and active services. | 🔴 High, active scan, detectable, may trigger SOC alerts. |
| portscan_active.nmap | Nmap results in a human-readable format after an active scan. | nmap | 📈 Very high, same as .gnmap but more detailed. | 🔴 High, same as .gnmap. |
| portscan_active.xml | Nmap results in XML format for automated parsing. | nmap | 📈 Very high, format for automated exploitation tools. | 🔴 High, same as .gnmap. |
| portscan_passive.txt | List of ports/services obtained without a direct scan (OSINT sources, public scans). | Shodan, Censys, public scan databases. | 📈 Medium to high, gives an idea of the services exposed without network noise. | 🟢 Low, passive. |
| portscan_shodan.txt | Shodan results for the IPs found (banners, services, versions). | Shodan API. | 📈 Very high, detailed banners, known vulnerabilities. | 🟢 Low, querying a public API. |
At this level, nothing special: I have open ports related to the exposure of certain services that I host. However, the scan did not highlight any listening ports that I was unaware of.
nuclei_output

Click the image to enlarge.
| 📁 File | 📝 Description | 🔧 Origin / Probable tools | 📊 Value for the attacker / analyst | ⚠️ Risk during collection |
|---|---|---|---|---|
| info.txt | Results from Nuclei templates with Info severity in a human-readable text format. Often includes technical information (HTTP headers, SSL certificates, software versions). | nuclei with info templates | 📈 Medium, useful for technical profiling, but not directly exploitable. | 🟢 Low to medium, most Info templates are passive, but some make active HTTP requests. |
| info_json.txt | Same content as info.txt but in JSON format for automated parsing. | nuclei | 📈 Medium, identical to .txt but can be used in an automated pipeline. | 🟢 Low to medium, same. |
| low.txt | Vulnerabilities with Low severity in a human-readable text format. Examples: exposed information, minor misconfiguration. | nuclei with low templates | 📈 Medium to high, sometimes leads to more serious attacks. | 🟠 Medium, some low templates are active (targeted test requests). |
| low_json.txt | Same as low.txt but in JSON for automatic parsing. | nuclei | 📈 Medium to high, identical to .txt. | 🟠 Medium - same as above. |
This is good news for me, as no severity level higher than 'low' was discovered. I mainly have issues related to certain encryption methods allowed for accessing my site. I will probably need to review my Traefik configuration to improve this. I will remove support for all obsolete algorithms.

Click the image to enlarge.
Note that other directories may be present if more serious severities (medium, high) were detected.
vulns

Click the image to enlarge.
| 📁 File | 📝 Description | 🔧 Origin / Probable tools | 📊 Value for the attacker / analyst | ⚠️ Risk during collection |
|---|---|---|---|---|
| brokenLinks.txt | List of URLs on the target site pointing to non-existent resources (404 error, expired domain). | broken-link-checker, linkfinder, crawling modules (httpx, gospider). | 📈 Medium - can lead to subdomain takeover if the domain has expired, or to exploitation via JS injection if an external link is compromised. | 🟢 Low - passive/simple HTTP check. |
| testssl.txt | Complete report from testssl.sh on detected hosts: TLS/SSL versions, supported ciphers, SSL vulnerabilities (Heartbleed, POODLE, etc.). | testssl.sh | 📈 High - allows you to determine if an HTTPS service uses obsolete or vulnerable protocols/ciphers. | 🟠 Medium - active TCP/443 scan that can be detected, but with very low network load. |
Besides confirming the non-compliance with certain best practices regarding SSL encryption, I haven't found anything alarming.

Click the image to enlarge.
It should be noted that the content of this folder may vary from one target to another. Other files may appear if other vulnerabilities are found.
webs

Click the image to enlarge.
| 📁 File | 📝 Description | 🔧 Origin / Probable tools | 📊 Value for the attacker / analyst | ⚠️ Risk during collection |
|---|---|---|---|---|
| dict_keys.txt | List of keys extracted from web data (e.g., API keys found in JS, GET/POST parameters). | gau, waybackurls, paramspider, regex extraction. | 📈 High - allows you to target sensitive parameters or API identifiers. | 🟢 Low - passive extraction. |
| dict_values.txt | List of values associated with the found keys (tokens, resource names). | Same tools as above. | 📈 Medium to high - may contain secrets or internal references. | 🟢 Low - passive extraction. |
| dict_words.txt | List of keywords extracted from web content, usable for targeted fuzzing. | cewl, gau, HTML parsing. | 📈 Medium - improves personalized wordlists. | 🟢 Low - passive extraction. |
| password_dict.txt | List of words found that could be used as passwords (internal names, projects, people). | cewl, parsing internal/public pages. | 📈 Very high - can be directly used for credential stuffing or brute-force attacks. | 🟢 Low - passive extraction. |
| robots_wordlist.txt | Words or paths from detected robots.txt files. | httpx, parsing robots.txt. | 📈 Medium - reveals paths intentionally hidden from the public. | 🟢 Low, simple HTTP request. |
| url_extract.txt | Extracted URLs (raw, all extensions). | gau, hakrawler, waybackurls. | 📈 Very high, provides a complete attack surface. | 🟢 Low, passive collection. |
| url_extract_nodupes.txt | Same as above but with duplicates removed. | Same. | 📈 Very high, refined version for direct exploitation. | 🟢 Low, same. |
| urls_by_ext.txt | URLs grouped by extension (.php.asp.js, etc.). | gf, custom sorting. | 📈 High, allows targeting specific languages for targeted attacks. | 🟢 Low, passive. |
| web_full_info.txt | Detailed report on web hosts: page titles, HTTP status, detected technologies, SSL information, and potential screenshots. | httpx, whatweb, wappalyzer, gowitness. | 📈 Very high, complete application profiling. | 🟠 Medium, some active detections (multiple HTTP requests). |
| web_full_info_plain.txt | Plain text version of the above report, without formatting. | Same. | 📈 Very high, same utility as the formatted .txt file. | 🟠 Medium - same as above. |
| webs.txt | List of detected web services (unique URLs). | httpx, httprobe. | 📈 Very high, basis for fuzzing, vulnerability scanning. | 🟢 Low, light activity (HEAD/GET). |
| webs_all.txt | Complete list including duplicates, all detected web services. | Same. | 📈 Very high, raw version before filtering. | 🟢 Low, same. |
This directory contains many files, but they are mostly keywords used to attempt to penetrate my site. I don't see anything visible here.
fuzzing

Click the image to enlarge.
| 📁 File | 📝 Description | 🔧 Origin / Probable tools | 📊 Value for the attacker / analyst | ⚠️ Risk during collection |
|---|---|---|---|---|
| fuzzing_full.txt | Complete results of brute-force attempts on paths and files across all identified web targets. Contains: found paths, HTTP codes, response sizes. | ffuf, feroxbuster, wordlists (SecLists, custom lists). | 📈 Very high, can reveal admin interfaces, backups, hidden APIs. | 🔴 High, sending a large number of HTTP requests, detectable, may overload the server or trigger a WAF. |
| k8s.myprivatelab.tech.txt | Results of fuzzing targeted at this specific subdomain. | ffuf / feroxbuster with limited scope. | 📈 Very high, searching for entry points specific to this Kubernetes host. | 🔴 High, same as fuzzing_full.txt but load limited to one host. |
| myprivatelab.tech.txt | Results of fuzzing targeted at the root domain. | Same. | 📈 Very high, potential discovery of sensitive directories on the main site. | 🔴 High, same. |
| www.myprivatelab.tech.txt | Results of fuzzing targeted at the www subdomain. | Same. | 📈 Very high, detection of hidden elements from the public site. | 🔴 High, same. |
Same level. Nothing detected for my domain.
js

Click the image to enlarge.
| 📁 File | 📝 Description | 🔧 Origin / Probable tools | 📊 Value for the attacker / analyst | ⚠️ Risk during collection |
|---|---|---|---|---|
| js_livelinks.txt | List of active URLs extracted from JavaScript files detected on target sites. | getJS, subjs, parsing HTML, LinkFinder. | 📈 Very high, often contains API endpoints, internal URLs, and backend services. | 🟢 Low, passive extraction after retrieving public JavaScript files. |
| js_secrets.txt | API keys, tokens, credentials, or sensitive information detected in JavaScript files. | SecretFinder, custom regex, LinkFinder. | 🚀 Critical, can provide direct access to APIs, databases, or cloud services. | 🟢 Low, passive (local analysis of retrieved JavaScript files). |
| url_extract_js.txt | Complete set of URLs extracted from JavaScript files (including inactive or duplicate ones). | Same. | 📈 High, useful for enriching the attack surface and identifying services. | 🟢 Low, same. |
Here too, we are relatively safe. This is the advantage of having a website that is not based on a CMS and without a database. The fact that it remains simple limits the risk of vulnerabilities.
Integrated analysis via AI
There is still the automatic reporting feature offered at the end of the scan by reconftw to be addressed.
There are several ways to express this, including terms such as "executive," "brief," or "bug hunter." This depends on the target audience.Contrary to what I explain in my first article, I ultimately chose a different LLM, namely qwen2.5, instead of foundation-sec-abliterated. The latter provided completely unusable reports.
I have therefore reconfigured reconftw with qwen2.5 in the reconftw.cfg file.

Click the image to enlarge.
But even with this LLM, I found the output to be unhelpful and unreliable.
You obtain a Markdown file, which you can convert to HTML using an extension in Visual Studio Code.

Click the image to enlarge.
The resulting file is very generic and ultimately not very informative.

Click the image to enlarge.
This may be due to the use of a model that is too limited in terms of parameters, but my GPU cannot offer more. I also think that, given the few risky elements reported by the penetration test, related to the simple scan of my website, which ultimately exposes only a few assets, the AI lacks data to provide a relevant report.
Conclusion
This concludes this introduction to penetration testing. I have learned a lot while writing the two associated articles. Cybersecurity is a key issue for companies and extremely interesting to follow. But it is also a very specific field of expertise requiring advanced technical skills and a minimum of experience.
Nevertheless, the explosion of AI combined with the availability of powerful tools such as reconftw can allow you to take your first steps in penetration testing.
By staying informed about best practices and using AI appropriately, it is possible to assess the security of your system to determine the level of associated cybersecurity risk.
This is certainly not enough, but it's a good start and a solid approach to initiating a continuous improvement cycle focused on cybersecurity.
Nothing can replace genuine expertise and professional penetration testing campaigns that include significant effort and a much longer duration than simple automated scans.
However, cybersecurity remains everyone's responsibility, and each individual can contribute to reducing their company's exposure to this problem. Experimenting and learning are good ideas for reducing your cyber risk; it is important to recognize your level of expertise and not hesitate to supplement your own efforts with external assistance from specialized companies.
For me, this introduction has made me want to learn more and go further in this area to better integrate cybersecurity into my projects... I'm not going to lose my passion anytime soon 😊.