QA Interview Hub · Knowledge base · Quizzes · Українська

Penetration Testing › Pentest basics

Authorization, scope and rules of engagement: testing legally

A legal test starts with written authorisation from the system owner, a clearly defined scope and rules of engagement. The scope sets domains, IPs, applications, roles and time windows, and the rules set allowed techniques, an emergency contact and how a critical finding is reported. On finding real data or a host out of scope, stop, copy nothing and notify the contact person.

A curious colleague finds a SQL injection on the company website and "just checks what happens". Without permission this can be a criminal offence, even with good intentions. So documents come first.

What must exist before the first request:

  • Written authorization from the system owner (for the cloud and third-party services, with their rules taken into account);
  • Scope — which domains, IPs, applications, roles and time windows may be tested, and what is out of scope (third-party SaaS, the payment gateway, production data of other parties);
  • Rules of engagement — allowed techniques (DoS, social engineering, changing data), an emergency contact, how a critical finding is reported;
  • environment: where possible, staging with test data is tested.

What to do on meeting real data. Suppose an injection in production showed a table with personal data. The right move: stop, do not copy or change the data, record minimal evidence (for example the row count or a masked value) and immediately tell the contact person. Dumping "the whole table as proof" is a mistake.

A host outside the scope. Found a neighbouring service that also looks vulnerable? Do not touch it, inform the customer and agree on extending the scope in writing. "It belongs to the same client" is not permission.

Common mistakes: a verbal agreement; assuming public reachability allows testing; running an aggressive scan in production at peak time; keeping found data longer than needed.

Short interview answer: "I do not start without written authorization, scope and rules of engagement; if I leave the scope or see real data, I stop and notify the contact person".

More articles in this chapter