Skip to main content
Cyber Security 9 min read By Adv. Or Elyashiv

Penetration Testing Needs a Solid Legal Agreement First

Before you bring in an ethical hacker to attack your systems, you need to understand what the law requires and which contract clauses actually protect your company.

קראו בעברית

When a Penetration Test Becomes a Criminal Offense

A security manager at a technology company hires an independent penetration tester to assess a new system. Eager to demonstrate skill, the tester exceeds the scope agreed upon verbally and reaches a sensitive production system that was never meant to be tested at all. The question that immediately arises isn't just technical but legal: was this action authorized in the first place, and who bears responsibility if damage results.

The Israeli Computers Law, 5755-1995, provides that accessing a computer without authorization, or exceeding the authorization granted, constitutes a criminal offense - even when there is no intent to cause harm and even when the person acting is a professional penetration tester operating in good faith. In practical terms, this means that conducting a penetration test requires explicit, written authorization that precisely defines which systems may be tested, using which methods, and within what time constraints.

General management approval to conduct a "security test" is not sufficient. The authorization must include concrete detail on the IP ranges, servers, applications, and environments where testing is permitted, so that even if a dispute arises later, it is clear exactly what was authorized and what was not.


The Authorization Document: Scope, Timing, and Rules of Engagement

The primary tool for legal protection before a penetration test begins is a detailed authorization document, sometimes called a letter of authorization or Rules of Engagement. This document, signed by an authorized company representative, is effectively the source of legality for every action the tester performs.

A proper authorization document should include, among other things:

The more detailed the document, the lower the risk of a legal dispute between the parties over exactly what was agreed - and what exceeded the boundaries of the authorization.


Key Contract Terms with Your Penetration Testing Vendor

Beyond the authorization document itself, the engagement with a penetration testing vendor should be anchored in a commercial agreement that governs the full scope of the legal relationship between the parties.

Clauses worth confirming are in the agreement

It's worth remembering that the penetration testing vendor gains access to the most sensitive information a company has - the map of its own vulnerabilities. A loosely drafted agreement on this point can turn the tester itself into a risk factor.


Many technology companies run their systems on cloud infrastructure from providers such as AWS, Azure, or Google Cloud, or rely on external SaaS services. In these cases, the company's own authorization for a penetration test is not enough.

Major cloud providers set out, in their terms of use, prerequisites for conducting penetration tests on infrastructure hosted with them - typically a duty of advance notice or the need to obtain explicit approval through the provider's management portal. Running a test without meeting these requirements may be treated as a breach of the provider's terms of use, even if the company only tested its own system, and could even result in temporary suspension of service.

In multi-tenant environments, particular care is needed to ensure that testing does not affect other customers sharing the same infrastructure. It is advisable to check in advance which official channels the provider uses for approval, and to document that approval as part of the project's legal record.


Personal Data Exposed During Testing

Penetration tests are, by nature, designed to expose weaknesses - and the result is often actual access to databases containing customers' personal data, such as a successful SQL injection attack. This exposure triggers obligations under the Privacy Protection Law, 5741-1981, as amended by Amendment 13.

The agreement with the testing vendor should include a clear limitation: to the extent personal data is exposed during testing, actual exposure should be minimized (for example, demonstrating that a vulnerability exists rather than extracting large volumes of records), any data collected as evidence must be secured, and it must be deleted once the process concludes and findings are confirmed.

If the test itself reveals a vulnerability indicating an existing or potential security incident, the company's internal reporting procedures should be triggered in accordance with the security incident notification obligations under the law as amended. It is advisable to include in the agreement a requirement that the vendor immediately report to the company any unintentional exposure of personal data, so the company can meet the relevant timeframes for assessing its notification duty.


A penetration test report is an especially sensitive document - it details every weak point in the company's defenses, and in a sense functions as an attack manual if it falls into the wrong hands. Beyond that, in the event of future litigation, such as a lawsuit following a cyber incident, there is a risk the report could be sought in discovery.

A common way to reduce this risk is to commission the penetration test through the company's legal counsel, so the work is performed for the purpose of legal advice rather than as a purely technical project. Structuring the engagement this way may strengthen a claim of attorney-client privilege or work product privilege, depending on the specific circumstances and how the engagement is managed.

In addition, the agreement should establish a restricted distribution list for the report, secure storage, a defined retention period, deletion once the business need has passed, and an obligation on the vendor to avoid retaining copies after the engagement ends.


What to Verify Before Signing the Agreement

A penetration test is an essential tool in any information security toolkit, but it is also an activity that carries inherent legal risk if it isn't managed properly. Before launching a project, it is worth confirming several key points.

Companies operating in regulated industries, such as financial services, are sometimes also subject to specific regulatory obligations to conduct periodic testing - it is advisable to review the relevant requirements with the specific regulator, as these requirements change and are updated from time to time.

Ultimately, a successful penetration test is not just one that identifies technical weaknesses, but one managed within a clear legal and contractual framework - one that protects the company from legal exposure while allowing it to make the most of the findings without creating additional risk.


The information contained in this article is general in nature and does not constitute legal advice. For advice tailored to the specific circumstances of your company, we invite you to contact our firm.

Adv. Or Elyashiv
Written by

Adv. Or Elyashiv

Founder of Or Elyashiv Law Firm. Practice areas: technology law, privacy protection, intellectual property, and commercial law. Advising tech companies, startups, and international investors. A graduate of the Tel Aviv University training program for data protection officers (DPO), held in cooperation with the Israeli Privacy Protection Authority.

Cyber Security

A Ransomware Attack Demands Immediate Legal Action

A ransomware attack forces companies to confront complex legal dilemmas within hours: reporting duties, ransom payment considerations, and crisis management toward customers and regulators. Here is the legal framework every company should understand.

Read full article
View All Articles

Planning a Penetration Test for Your Company?

Our team advises technology companies on drafting penetration testing agreements, authorization documents, and findings-handling policies. We are glad to help build a contractual framework that protects your company before testing begins.