🔥 The world of cybersecurity only exists if there is documentation about it.
The world of cybersecurity is extremely formal, filled with regulations, certifications, audits, etc. For this reason, it makes a lot of sense for ethical hackers to develop strong documentation skills. A formal record of all activities, findings, strategies, etc., must be maintained. The report not only documents the results of the test but also provides a framework for continuous improvement, informed decision-making, and regulatory compliance. It is an essential part of the security process.
Documentation of Results: A report documents all findings from the test, including detected vulnerabilities, the methodology used, and technical details. This is crucial for maintaining a clear record of the system's current security status.
Prioritizing Remediation: The report helps prioritize corrective actions based on the criticality of the vulnerabilities found. Without a report, it might be difficult for the security team to decide which issues to address first.
Regulatory Compliance: Many industry regulations and standards (such as PCI-DSS, HIPAA, or ISO 27001) require regular penetration testing and the submission of reports as part of compliance requirements. A formal report is evidence that the test has been conducted.
Communication with Management: A well-structured report allows executives and other stakeholders to understand the risks the organization faces and the necessary actions to mitigate them. This is important for justifying cybersecurity investments and making informed decisions.
Continuous Improvement: The penetration test report can serve as a reference for future tests. It allows the organization to track progress in improving the system's security over time.
Legal Defense: In the event of a security breach or incident, having a detailed penetration test report can serve as evidence that proactive measures were taken to secure the systems, which may be relevant in legal proceedings.
The following is not a table of contents, which we will discuss later, but it's important to start by highlighting the topics you should cover in the report:
👉 Precise and complete documentation is essential to ensure the effectiveness and integrity of penetration tests, as well as to provide clients with the necessary information to improve their security posture.
This is a very common question among professionals who are starting to work in pentesting and although there are templates that can be easily found on the Internet and some tools generate them automatically, as professionals we must follow certain rules when preparing the documents to be delivered to customers after finishing the work.
Reporting is one of the most important issues in any audit and should clearly and concisely reflect the findings and conclusions you have reached. Any report should normally include at least the following.
The cover page of the document is usually generic and includes, among other things, information about the company, the date on which the document is delivered, and basic details.
In the table of contents, it is common to include links or shortcuts to make it easy to move through the different sections of the document. Example:
SCOPE..........................................................................................................................................................4
REVIEW SHEET..........................................................................................................................................5
OBJECTIVES AND WORK METHODOLOGY......................................................................................................6
General Description of Tests by Pentesting Phase................................................................................7
Operation......................................................................................................................................................9
Overall risk rating.........................................................................................................................10
HIGH LEVEL - Absence of Anti-CSRF tokens....................................................................................11
CONSEQUENCES........................................................................................................................................12
SOLUTION..................................................................................................................................................13
EVIDENCE AND REFERENCES........................................................................................................................14
HIGH LEVEL - Content Security Policy (CSP) Header Not SeT.......................................................................15
CONSEQUENCES........................................................................................................................................16
SOLUTION..................................................................................................................................................17
EVIDENCE AND REFERENCES........................................................................................................................18
HIGH LEVEL - Missing Anti-clickjacking Header.............................................................................................19
CONSEQUENCES........................................................................................................................................20
SOLUTION..................................................................................................................................................21
EVIDENCE AND REFERENCES........................................................................................................................22
MEDIUM LEVEL - Application Error Disclosure.................................................................................................23
CONSEQUENCES........................................................................................................................................24
SOLUTION..................................................................................................................................................25
EVIDENCE AND REFERENCES........................................................................................................................26
MEDIUM LEVEL - Cookie No HttpOnly Flag......................................................................................................27
CONSEQUENCES........................................................................................................................................28
SOLUTION..................................................................................................................................................29
EVIDENCE AND REFERENCES........................................................................................................................30
MEDIUM LEVEL - Cookie Without Secure Flag.................................................................................................31
CONSEQUENCES........................................................................................................................................32
SOLUTION................................................................................................................................................33
EVIDENCE AND REFERENCES........................................................................................................................34
MEDIUM LEVEL - Cookie Without Secure Flag.................................................................................................35
CONSEQUENCES........................................................................................................................................36
SOLUTION..................................................................................................................................................37
EVIDENCE AND REFERENCES........................................................................................................................38
MEDIUM LEVEL - Permissions Policy Header Not Set.......................................................................................39
CONSEQUENCES........................................................................................................................................40
SOLUTION..................................................................................................................................................41
EVIDENCE AND REFERENCES........................................................................................................................42
MEDIUM LEVEL - SSL/TLS uses weak hashing and encryption algorithms................................................................43
CONSEQUENCES........................................................................................................................................44
SOLUTION..................................................................................................................................................44
EVIDENCE AND REFERENCES........................................................................................................................46
MEDIUM LEVEL - Strict-Transport-Security Header Not Set.............................................................................47
CONSEQUENCES........................................................................................................................................48
SOLUTION..................................................................................................................................................49
EVIDENCE AND REFERENCES........................................................................................................................50
MEDIUM LEVEL - X-Content-Type-Options Header Missing.............................................................................51
CONSEQUENCES........................................................................................................................................52
SOLUTION..................................................................................................................................................53
EVIDENCE AND REFERENCES........................................................................................................................54
LEVEL Info - General Information.................................................................................................................55
LEVEL Info - Reverse IP Lookup..............................................................................................................58
LEVEL Info - IP Analysis..............................................................................................................................59
LEVEL Info - Domain Analysis...............................................................................................................61
LEVEL Info - Port Analysis....................................................................................................................62
LEVEL Info - SSL Analysis.................................................................................................................................67
LEVEL Info - Services Analysis...................................................................................................................70
The version control must include at a minimum, a description of the changes introduced at each modification of the document with a date and author. Example:
The scope of the present work consisted of assessing the security risk and its degree of exposure through intrusion techniques. Security tools, vulnerability analyzers, and information gathering methodologies were used in the same way as they would be used by attackers.
The tasks carried out included active reconnaissance of systems to assess their potential risks. Finally, an analysis and intrusion attempt was performed on the active systems to find potential vulnerabilities that could affect them. The objectives carried out for the Pentest are the selection of the domain, systems, services, and applications on the following IP addresses and domains:
1200.190.180.170: webdelcliente.com
The client contracted Router ID to conduct an external audit against its websites and applications to provide a practical demonstration of the effectiveness of its systems and security methodology, as well as to provide an estimate of its susceptibility to exploitation, integrity, exposure, or loss of data.
The test was conducted by Router ID's Information Security Penetration Testing Method. Router ID's Information Security Analyst (ISA) conducted the audit in coordination with the client's Information Technology (IT) staff members to ensure secure, orderly, and complete testing within the approved scope.
Consider the great importance of fixing these security breaches that allow a great risk of compliance violation and potentially subject to fines and loss of business reputation.
This Report contains confidential information and should not be sent via e-mail, fax, or any other electronic means unless specifically approved by the Company's security policies. All electronic or hard copies of this document should be stored in a secure location.
This document details the security assessment referred to as External Pentesting. The objective of this work was to identify vulnerabilities within the scope agreed between the parties and the risks they may cause to the company's business.
It is your responsibility to implement the recommendations that will be made, to increase security in the domains (application development, infrastructure support), as well as managing the organization's level of risk exposure and compliance with regulatory issues.
If you do not have qualified personnel for this task we can carry it out. Ask about our security and hardening remediation service.
The specific objectives are:
Advanced SQL Injection
IP Analysis
Metadata Analysis
Port Analysis
Services Analysis
Web Services Analysis
Domain Analysis
SSL Analysis
Apache not supported
Application Error Disclosure
Robots and sitemap file
Backup files
Host Header Attack
Absence of CAPTCHA
Absence of Anti-CSRF tokens
Authentication
Autocomplete
Reverse IP Lookup
Outdated client components
Checking anti-CSRF tokens
Test network/infrastructure configuration
CORS / Cross-Origin Resource Sharing Misconfiguration
Relative Path Mix-up
HTTPS Content Available via HTTP
Content Security Policy (CSP) Header Not SeT
Clear Text Password
Cookie No HttpOnly Flag
Cross Site Scripting
Cross-Domain JavaScript Source File Inclusion
Role Definition
Downloading Documents without a Valid Session
Cross Domain / HTTP Access Control De-configuration
Firewall detection and strength
Information Disclosure - Insecure PHP Directives
DISCLOSURE OF INFORMATION - Handling of inappropriate errors
DISCLOSURE OF INFORMATION - by ''X-Powered-By''
DISCLOSURE OF INFORMATION - Debugging Error Messages
Timestamp Disclosure - Unix
Proxy disclosure
IIS and .NET Version Disclosure
User input or login
Default authorization scheme
Session management scheme
Information leakage
HSTS Missing From HTTPS Server (RFC 6797)
HTTP TRACE Methods Allowed
General Information
NoSQL Injection - MongoDB
Remote Operating System Command Injection
XSLT Injection
Directory Listing
Site Maps
Missing Anti-clickjacking Header
Path Traversal
Permissions Policy Header Not Set
PHP Multiple Vulnerabilities
Weak or not enforced User Policy
Private IP Disclosure
Uncontrolled redirects
Information Gathering Search Engine Acknowledgement
Skipping 403
Secure Pages Include Mixed Content
Server-side template injection
SQL Injection
SSL/TLS, SSLv2 and SSLv3 detection
Strict-Transport-Security Header Not Set
SUB RESOURCE INTEGRITY ATTRIBUTE MISSING
Unauthenticated Blind SSRF via DNS Rebinding
Unrestricted file uploading
Exposed session variables
Outdated WordPress Themes and Plugins
X-Content-Type-Options Header Missing
The exploitation phase consists of carrying out all those actions that may compromise the audited system, the users or the information it handles. Mainly it is checked that attacks such as the following cannot be carried out:
👉 These types of attacks are performed by adapting the development of each attack, techniques in use, and the latest available technologies.
If a vulnerability is found that allows other actions to be performed on the audited system or in its environment, additional checks will be carried out in order to verify the criticality of this vulnerability. Depending on the possibilities that a specific vulnerability allows, the following post-exploitation actions will be attempted:
📖 The possibility of chaining several vulnerabilities to gain higher level access or to evade security controls will also be scenarios assessed when performing the risk analysis. We use several methodologies, but we will focus on OWASP TOP 10 - 2021.
A worldwide non-profit organization dedicated to improving the security of applications and software in general.
Having considered the potential outcomes and risk levels assessed for each documented testing activity, Hackware considers the overall risk exposure concerning attempts by malicious actors to breach and control resources within its information environment to be HIGH (as determined using the CVSSv3 Risk Rating CVSSv3 Score).
https://www.incibe-cert.es/blog/cvss3-0
The table below provides a key to the risk naming and colors used throughout this report to provide a clear and concise risk scoring system.
It should be noted that quantification of the overall business risk posed by any of the issues identified in the tests is beyond our scope. This means that some risks may be considered high from a technical point of view, but, as a result of other controls unknown to us, may or may not be critical from a business point of view.
Risk Rating | CVSSv3 Score | Description |
---|---|---|
CRITICAL | 9.0 - 10 | A critical vulnerability has been discovered. It needs to be resolved as soon as possible. |
HIGH | 7.0 - 8.9 | A high vulnerability has been discovered. This requires a short-term resolution. |
MEDIUM | 4.0 - 6.9 | A medium vulnerability has been discovered and needs to be resolved during the maintenance process. |
LOW | 0.1 - 3.9 | A low vulnerability has been discovered. This should be addressed as part of routine maintenance tasks. |
INFO | 0 | A discovery has been made and is reported for information. This should be addressed to comply with leading practices. |
In the introduction and context of the document, details about the audit to be performed, and its scope are described, something that should also be reflected in the agreement signed with the client. This part of the document is intended to inform the reader about the tests that have been performed without going into too much detail, as an executive summary.
Another important detail that must be taken into account in any report is the section corresponding to the methodologies used, which in any case will depend on the audit to be performed. It is highly advisable to implement methodologies that have already been refined and are well-accepted by the industry. For example, some interesting methodologies are listed below, although they apply depending on the type of audit performed:
The actual content of the document should include the tests that have been performed, explaining each of the stages of the audit, tools, and techniques used, as well as the results of each one. This is a section where it is important to include the details most clearly and concisely, avoiding redundancies and overly long blocks of code or log outputs to favor the readability of the document. If it is necessary to include such elements, it would be advisable to address them in separate annexes so that the reader can review them separately. At this point, probably the most important thing is that the information should be of value. In other words, there is no point in including each of the proofs of concept that have been executed if they have not produced the expected results. Only information that is relevant and of interest to the purpose of the audit should be included. There is no point in spending 2 or 3 pages of the report explaining that an Apache exploit has been launched (for example) if the exploit did not work because the service is probably not vulnerable. Include only information that adds value.
Finally, in the recommendations section, it is useful to include some points to take into account to improve the security of the audited system, although you can also highlight those configurations and/or good practices that are being carried out so that the client continues to make use of them and encourage their maintenance. If vulnerabilities are found, it is very important to include countermeasures or recommendations that are useful to mitigate them or protection mechanisms that help to solve the detected problems. Be careful, the fact of including these countermeasures is not binding and does not mean that you are the one who is going to implement them. You have been hired to execute an audit and detect problems, implementing the solutions is something to be assessed by the client.
Different types of reports can be created depending on the client's needs, which have to be reflected in the agreement. The audit to be performed may focus on one of the following scenarios:
Depending on each case it is necessary to take into account additional factors that should be reflected in the document, for example when a client requests a mixed approach and one part of the audit will be external and another part internal.
With all of the above clear, the first thing to keep in mind is that not all clients are the same and in some cases, it is necessary to develop 2 or more reports reflecting the tasks performed. It is important to adapt and understand the target audience. That is to say, if the person who is going to read the report is a technical person, he/she will be interested if it is oriented to describe the vulnerabilities, defects, and recommendations provided by the document. In this case, it will be reviewed by a person who has at least some basic knowledge and will understand what you are saying, but if, for example, the same document is read by a manager, area manager, or non-technical personnel, it is most likely that he/she will understand little or nothing. Imagine for a moment that a financial expert (to give an example) gives you a technical report of a financial audit, do you think you will have enough criteria to say if what you have been sent is “right” or “wrong”? you will probably skip reading it and send it to someone who is an expert on the subject. Depending on the scope and what has been discussed with the customer you will probably have to produce one report for technical staff and another for decision makers, in each case the language you use and the message you convey must be clear enough for the target reader.
⚠️ Templates do Not Make a Good Report, use them to learn but don't copy paste.
You can use templates available on the Internet or those that may be available in the company where you work, of course, it is perfectly valid but it is still a basis that helps you save time in defining a design and “layout” sections. You can (and should) adapt the template to the audit you are performing, it is not something static that you must follow to the letter. If you need to add, remove, or move sections you do it and that's it. Do not let the template you use become a problem, it has been created precisely so that you can do the job faster.
Here is a list of some reports we found over the internet