Start with what you want to know
A successful penetration test starts long before the tester connects to the network. The first step is to define what the organization wants to learn from the test. For example, what is exposed to the internet and what can be reached through it, what would happen if an employee’s computer were infected, or whether the customer portal protects each customer’s information from other customers. Sometimes there is also an external requirement to answer: from a large customer, from an insurance company or from the data security regulations.
The goal determines the type of test: external, internal, application, cloud or a combination. It also determines what counts as a useful result. A test meant to check whether endpoint and server protection (EDR) and monitoring detect suspicious activity looks different from a test meant to find as many vulnerabilities as possible in the website.
Written authorization
A penetration test is done only with written authorization (an authorization letter) from an authorized person in the organization, usually the CEO, the business owner or someone explicitly authorized to do so. Without such authorization, exactly the same actions are unlawful intrusion into computer material under the Computers Law. The authorization protects both sides: the organization knows exactly what it approved, and the tester knows exactly what is permitted.
The authorization specifies who performs the test, on which systems, on which dates and under which rules, and it refers to the scope document and the rules of engagement. A change in scope during the test, for example adding a system discovered along the way, also requires additional written approval.
A point that is often missed: the organization can only authorize testing of what is under its control. A website hosted with a provider, a cloud server, a SaaS system or a network shared with other tenants in the building may require approval from or advance notice to the third party, according to the agreement with it. Large cloud providers publish policies for security testing, and it is worth reading them before putting a system in scope.
Defining the scope
The scope determines exactly what is tested. The more precise it is, the more focused the test and the clearer the results. Defining the scope usually includes:
- Assets in scope: IP addresses, domains, websites, network segments, applications and cloud accounts, in an explicit list.
- Assets out of scope: systems that must not be touched, such as a sensitive production system, medical equipment or a supplier’s system that has not been approved.
- The starting point: from outside, from inside the network, or with a regular user account in the system.
- The level of information the tester receives: black box, grey box or white box.
- Special tests: whether social engineering, testing of the wireless network or testing of physical access to the office are included.
To define a good scope, you need to know what the organization has. An up-to-date map of information assets (asset management), with a list of servers, systems, addresses and domains, saves misunderstandings and prevents a situation where an important system is left out of the test simply because nobody remembered it. Quite often the mapping itself reveals systems that are no longer in use and are still open to the internet.
Rules of engagement
The rules of engagement determine how the test is actually carried out. This is a working document that both sides sign before starting, and it usually includes:
- Time windows (testing windows): when testing is allowed, and which systems are tested only outside business hours.
- Prohibited actions: for example load that could take down a service (denial of service), changing or deleting data, or exploiting a vulnerability in a critical system without additional approval.
- Contacts: who is available on the organization’s side and on the tester’s side, including outside working hours.
- Emergency stop (stop condition): when and how the test is stopped immediately, for example if a system starts to slow down or if there is a sign of a real attacker on the network.
- Immediate reporting: a severe vulnerability is reported immediately to the contact person, without waiting for the report, so it can be dealt with.
- Monitoring and alerts (SIEM / SOC): whether the monitoring team and the EDR know about the test, or whether detection capability is being tested too. In both cases there needs to be a way to identify that the activity belongs to the tester.
Personal information and confidentiality
During a test, the tester may come across sensitive information: customer details, employee files and financial documents. The agreement should include a confidentiality undertaking (NDA) and set a principle of data minimization: the tester documents only what is needed to prove a finding, and does not copy personal information beyond that.
The report itself is also a sensitive document. It describes exactly where the organization is weak, so you decide in advance how it is delivered, who receives it, where it is stored and what happens to the collected materials at the end of the test. Under the Privacy Protection Law and Amendment 13, the organization remains responsible for the personal information in its databases even when an outside party accesses it, and the data security regulations require that external suppliers’ access to the database be set out in an agreement.
Technical preparations before you start
- A current, tested backup: a professional test is careful not to cause damage, but old or sensitive systems can react unexpectedly. A backup that has been tested by restoring from it is the safety net.
- Test accounts: in a grey box test, dedicated user accounts at different permission levels, which are closed at the end of the test.
- Access: a network port or a secure remote connection for an internal test, and a record of the tester’s source addresses so their activity can be identified.
- Informing the right people: whoever manages the infrastructure, the monitoring and the website needs to know, according to what the rules of engagement set. Not every employee needs to know, especially if social engineering is being tested.
- Documentation: a network diagram and a list of systems help the tester focus on what matters.
- Change freeze: avoid major infrastructure changes during the test, so the results reflect a stable and clear state.
After the test: report, remediation and retest
It is worth preparing for the stage that comes after, too. Schedule a meeting in advance to present the report, with an executive summary for management and detailed findings for the technical team, rated by CVSS and by the context in the organization. Build a remediation plan with an owner for each finding, and schedule a retest to make sure the findings were actually closed.
Keep all the documents together: the authorization, the scope, the rules of engagement, the report, the remediation plan and the retest results. This is the documentation that shows the organization tested itself and acted on the findings, and it is what is requested in audits, in customers’ security questionnaires and in an inquiry by the Privacy Protection Authority after an incident.
A partner who tests and fixes
Preparing well for a test requires knowing the organization: which systems exist, what is sensitive, what might break and who needs to know. After the test, most of the findings involve the infrastructure: servers, Active Directory, the firewall, permissions and websites. When testing and fixing are handled by parties that do not coordinate with each other, preparation is more cumbersome and remediation gets postponed.
An IT company that understands information security and regulation can accompany the whole process. Together with the organization it defines the scope and rules of engagement, performs the test according to a recognized methodology such as PTES, NIST SP 800-115 or OWASP WSTG, fixes the findings in the infrastructure it manages and performs a retest. It documents all of this according to the requirements of the Privacy Protection Law, Amendment 13 and the National Cyber Directorate guidance, so the documentation is ready before anyone asks for it.
Summary: a preparation checklist
- We defined what we want to learn from the test.
- There is written authorization from an authorized person, and approval from third parties where required.
- The scope specifies what is in and what is out, and relies on an up-to-date asset inventory (asset management).
- The rules of engagement are signed: time windows, prohibited actions, contacts and an emergency stop.
- Confidentiality, handling of personal information and secure delivery of the report have been arranged.
- There is a tested backup, test accounts, and whoever needs to know has been informed.
- Owners for remediation and a date for the retest have been set.