Read a sample: 1. The Rules of a Safe Practice Lab
Before you install a virtual machine or run a network command, imagine a simple situation. You are learning at home and see a device on your network with a name you do not recognize. You are curious about what it does, and a tutorial suggests scanning it for open ports.
That curiosity is useful. Acting on it would be a different matter. The device might belong to someone else in the household, or it might be equipment supplied and managed by a service provider. Seeing it on your network does not establish that you have permission to test it. Even a seemingly modest check sends traffic to a system and may have effects you did not anticipate.
This book gives your curiosity a defined place to work: a small practice environment that you build, control, and document. The aim is not to make you hesitant about learning. It is to make safe decisions part of the skill you are learning.
In this chapter, you will define four boundaries: authorization, scope, containment, and stop-work conditions. You will turn those boundaries into a short written lab agreement before touching any tools. The agreement will guide the work in later chapters, from building the environment to writing a report.
Ethical hacking is not defined solely by the tool, the command, or the learner’s intention. It depends on whether the activity is authorized and stays within the agreed boundaries. A port scan against your designated practice target can be a useful exercise. The same type of scan against a system you are not authorized to test is outside this book’s practice model.
Authorization is permission from someone with the authority to grant it. For this book’s exercises, the simplest arrangement is a target virtual machine that you create and control on a computer you are permitted to use. If the host computer belongs to an employer, school, family member, or anyone else, your ability to use it does not automatically include permission to install virtualization software or conduct network exercises. Get clear permission first, or use a host and environment you control.
Permission should cover more than the existence of a lab. It should address the activity you intend to perform. Agreement to create a virtual machine is not necessarily agreement to scan every device visible from it. Likewise, permission to inspect a service does not imply permission to interrupt it, attempt passwords, exploit a vulnerability, or collect other people’s information.
For this book, keep the planned activity narrow: build an isolated environment, configure a target you control, perform limited reconnaissance and service enumeration against that target, and document the results. Later chapters will introduce particular checks only after the environment and its boundaries have been established.
A written agreement is valuable even when you are both the learner and the owner of the lab. It forces you to decide what you intend to do before an unexpected result or an interesting tutorial tempts you to expand the exercise. It also gives you a reference to consult when you return to the lab after a break.
Scope describes what the authorization covers. A useful scope identifies:
- The systems that may be tested.
- The environment in which testing may occur.
- The kinds of activity permitted.
- The period during which permission applies.
- The systems and actions that are excluded.
- The conditions that require work to stop.
For a beginner’s lab, the target is not “anything on my network.” It is one specifically identified practice virtual machine. The learner workstation is the machine from which you conduct the exercise; it is not a second target unless you explicitly choose and authorize it as one. The physical host, home router, other household devices, public websites, and systems belonging to other people remain outside the target scope.
You will eventually record the target’s actual lab address and check it against your inventory before sending traffic. An address by itself is not a durable identity, however. Addresses can change or be reused. A target should also have a recognizable virtual-machine name, a documented role, and a known network configuration. If those details conflict, pause rather than guessing which system an address represents.
Scope also limits methods. This book’s planned exercises focus on identifying the designated target, observing reachable ports, and examining basic service responses. They do not require password guessing, exploitation, persistence, denial-of-service activity, or testing systems found by accident. If an exercise or outside resource suggests an action that your agreement does not permit, the agreement wins. You can revise it later if you have the authority and a sound reason, but do not revise it casually in the middle of an uncertain situation.
A time boundary is useful for the same reason. You might authorize the lab for a particular learning period and review the agreement whenever you rebuild the environment or resume after a substantial break. The point is not to make the paperwork elaborate. It is to make permission current and specific enough to guide your next action.
A written promise to target only one machine is important, but it is not a network control. Containment means arranging the environment so that practice traffic is restricted to the intended lab as much as reasonably possible, then checking that arrangement before testing.
The environment in this book will use two virtual machines: a learner workstation and a practice target. A virtual…