Rutalia has changed a great deal in six months. The network is segmented, the traffic is encrypted, there are firewalls and detection probes, the 140 machines are hardened, there is an EDR with out-of-hours response, MiRutalia has fixed fifteen findings and the AWS account has gone from ten points in red to two. On paper, the organisation is in a radically different position.
And now comes the question none of the previous lessons has answered: does it work?
Laura does not know. She knows the rules are written and the scripts show green. She does not know whether require_ownership() is in all forty MiRutalia views or in thirty-nine. She does not know whether, among the 151 machines the inventory found over and above the list, there is one left with a forgotten service. She does not know whether the IDOR fix would survive an hour of genuine attempts. There is an enormous difference between having applied a control and knowing that the control works, and the only honest way to cross it is to actively look for your own flaws before somebody else does.
This lesson is about how that is done: what each kind of test answers, what legal framework separates it from a criminal offence, how it becomes a continuous process instead of an annual exam, how you prioritise what is found when the list has two hundred entries, how you read a pentest report without stopping at the executive summary, and where to practise everything learned in this course without committing an offence.
A warning that governs the whole lesson. Everything that follows is explained from the point of view of somebody who defends and somebody who commissions or manages a security test. Testing a system that is not yours, without the owner's written authorisation, is a criminal offence in Spain, even if you cause no damage, even if you only look, and even if your intention is to warn them. Section 3 develops this with the specific articles. Practise only in your own environment or in the labs of section 26.
- What testing your own security is for
Three reasons, in order of real importance:
- To check that the controls work. A firewall rule nobody has tested is a hypothesis. A
require_ownership()nobody has tried to bypass is an intention. - To find what you did not know existed. Every control in this course was designed on top of an inventory. What is not in the inventory is not protected, and the test is what brings it to light.
- To turn risk into something concrete and actionable. "We have a risk of a data leak" does not move a budget. "An external consultant downloaded the portfolio of 400 customers in forty minutes, with no credentials, and here is the screenshot" does.
And a fourth reason, less noble but real: many customers and insurers demand it. A logistics company working for large accounts will eventually receive a security questionnaire asking for the date of its last penetration test.
What a test does not do, and it is worth saying so before commissioning one:
- It does not prove that a system is secure. It proves that, within a window of time, with a specific scope and specific people, these things were found. An absence of findings is not proof of security.
- It does not replace continuous work. An annual pentest on an infrastructure that changes every week is a snapshot of one day.
- It fixes nothing. The value lies in the subsequent remediation, and that is where most of the money invested is lost.
- The six types of test and what each one answers
The names are used interchangeably in the market, and they are not the same thing. This is the table worth taking to a sales meeting:
| Type | The question it answers | How it is done | Typical duration | Indicative cost | For Rutalia |
|---|---|---|---|---|---|
| Vulnerability scanning | Which known weaknesses do I have? | Automated tools + false positive review | 2-5 days, repeatable | €1,500-4,000 or in-house | Priority 1: continuous |
| Penetration test (pentest) | Can somebody really get in, and how far do they get? | Manual, with controlled exploitation | 5-15 days | €6,000-20,000 | Priority 2: annual |
| Red team exercise | Would we detect and respond to a real attack? | Adversary simulation, stealthy, with a specific objective | 4-12 weeks | €30,000-100,000 | Not yet |
| Configuration review | Is this properly configured against good practice? | Comparison against baselines, with access | 1-3 days per area | €1,000-3,000 | Priority 1: cheap and effective |
| Code review | Are there flaws in the code we wrote? | Reading the code + static analysis tools | Variable | Depends on volume | Yes, for MiRutalia |
| Compliance audit | Do I comply with standard X? | Documentary evidence and interviews | Variable | Variable | See 06-05 |
Three clarifications that avoid expensive misunderstandings:
- A vulnerability scan is not a pentest. If a provider hands you the raw output of an automated tool and calls it a "penetration test", they are selling you €300 as €8,000. The value of a pentest lies in the manual work: chaining minor flaws, finding broken business logic, bypassing controls. No tool finds an IDOR, because no tool knows which shipments
cliente412should see. - A red team exercise does not test the systems: it tests the security team. The objective is to measure detection and response. Commissioning one when there is no detection capability yet is throwing money away: the result is known in advance.
- A compliance audit does not measure security, it measures conformity with a framework. You can be perfectly compliant and vulnerable. It is covered in 06-05.
- The legal framework in Spain: when this is a criminal offence
This is the part of the lesson nobody can skip. In Spain, accessing somebody else's computer system without authorisation is a criminal offence, regardless of whether damage is caused or of the intention.
Article 197 bis of the Spanish Criminal Code — unlawful access to computer systems:
"Whoever, by any means or procedure, circumventing the security measures established to prevent it, and without being duly authorised, accesses or enables another person to access the whole or a part of an information system, or remains within it against the will of whoever has the lawful right to exclude them, shall be punished with a prison sentence of six months to two years."
The elements worth underlining:
| Element | Practical consequence |
|---|---|
| "by any means or procedure" | The technique does not matter |
| "circumventing the security measures" | It is enough to get past any control, however weak |
| "without being duly authorised" | Authorisation is the only thing that separates the work from the offence |
| "or remains within it" | Staying inside after realising the mistake is also an offence |
| It requires neither damage nor financial gain | "I was only looking" is not a defence |
The same article also punishes the interception of non-public data transmissions.
Article 197 ter — misuse of devices: it punishes producing, acquiring, importing or supplying programs or passwords designed to commit the above offences. Here a clarification that worries many professionals is in order: the rule requires that it be "without being duly authorised" and with the purpose of committing those offences. Possessing and using security tools in legitimate professional practice, in your own or authorised environments, does not fall within the offence. What turns the tool into an offence is the use, not the tool.
Article 264 and the following — computer damage:
- 264: deleting, damaging, altering, suppressing or making inaccessible somebody else's data or programs, without authorisation and with a serious outcome. Six months to three years in prison.
- 264 bis: seriously obstructing or interrupting the functioning of somebody else's computer system. An unauthorised denial of service test fits here.
- 264 ter: supplying the means to commit the above.
Aggravating circumstances considerably increase the penalties: acting within the framework of a criminal organisation, causing especially serious damage, affecting critical infrastructure, or using a third party's identity. It is worth remembering that a logistics and transport company can form part of the supply chain of essential services.
And three consequences that get forgotten and that usually hurt more than the main penalty:
- Civil liability: compensation for the damage caused, including the loss of service.
- Corporate liability: if the consultant acts on behalf of a company, the legal person can be criminally liable.
- Data protection: if the test accesses personal data without cover, there is also a GDPR infringement, with its own sanctions regime.
The operational conclusion, with no nuance: without the system owner's written authorisation, you do not touch it. Not even an nmap. Not "a quick check". Not a customer's system where you happen to have spotted a flaw. And if the flaw is discovered by accident, the right thing to do is to stop, not explore further, and report it through a formal channel (section 25).
- The agreement: what it must contain before you start
The document that turns an intrusion into a professional service. It is usually called an authorisation letter or rules of engagement, and it must be signed by whoever has the authority to authorise it — at Rutalia, Andrés Vidal as managing director, not Laura.
| Section | What it must say | Why |
|---|---|---|
| Parties | Who commissions, who executes, named individuals | The authorisation is personal |
| Express authorisation | An explicit sentence stating that access to the listed systems is authorised | It is the element that excludes article 197 bis |
| Scope included | IPs, domains, applications, accounts, one by one | "The whole infrastructure" is an invitation to disaster |
| Scope excluded | What is NOT to be touched: srv-erp01, the IoT probes, third-party systems |
What can break or is not yours |
| Time windows | Permitted dates and time slots | It avoids affecting operations |
| Prohibited techniques | Denial of service, social engineering, physical access, destructive brute force | Each one must be authorised separately |
| Processing of personal data | What may be seen, what is not extracted, how it is anonymised | A GDPR requirement |
| Confidentiality | A confidentiality agreement, including the report | The report is the map of your weaknesses |
| Custody and destruction | Where the evidence is kept, encrypted, and when it is destroyed | With a destruction certificate |
| Professional indemnity insurance | The provider's cover and its amount | In case something breaks |
| Emergency contact | Name and mobile number, 24 h, for both parties | For the three-in-the-morning call |
| Stop rule | Conditions that require everything to be halted | The most important clause |
| Handling of critical findings | Immediate communication, without waiting for the report | A critical vulnerability does not wait three weeks |
| Deliverables and deadlines | Report, presentation meeting, re-verification | What exactly is being bought |
Two clauses deserve elaboration, because they are the ones that prevent real incidents.
The stop rule. It must list the conditions that require the test to be halted immediately:
The provider will stop all activity and contact Laura Mendez by telephone (+34 6XX XXX XXX) and Andres Vidal within a maximum of 15 minutes if: a) It detects signs of a PRIOR compromise unrelated to the test. b) It obtains access to special categories of personal data or to financial data not covered by the scope. c) Any system in scope shows a degradation of service attributable to the test. d) It inadvertently accesses a system outside the scope. e) It discovers a critical vulnerability trivially exploitable from the internet.
Condition a is the most often forgotten and the most important. If the team finds that somebody was already inside before they arrived, that stops being a pentest and becomes an incident, with its chain of custody and the procedure of 05-02. Carrying on testing would destroy evidence.
The internal notification. You have to decide in advance who knows the test is being carried out:
| Mode | Who knows | What is measured | Risk |
|---|---|---|---|
| Announced | The whole IT team | The systems | None |
| Semi-announced | Only Laura and Andrés | Systems + some detection | Medium |
| Unannounced (red team) | Only senior management | Detection and response | High |
For Rutalia's first pentest, the recommendation is announced: the objective is to find flaws, not to surprise anybody. And an operational precaution: if nobody is told, there is a real risk that Diego will see the EDR alerts, trigger the incident procedure and spend Saturday night containing an attack the company is paying for. It has happened at many companies.
- GDPR and what to do with the real data you find
A penetration test on systems containing personal data is, legally, processing of personal data. The concrete consequences:
| Obligation | How it is met at Rutalia |
|---|---|
| A data processing agreement with the provider | A specific clause in the pentest contract |
| Minimisation | The team demonstrates the access, it does not extract the data |
| A proof of concept without mass dumps | A screenshot of 2-3 partially redacted records, never the whole table |
| Pseudonymisation in the report | customer C0114 -> "customer A"; no real names |
| Encrypted custody of the evidence | With access control and logging |
| Certified destruction when the project closes | A maximum of 30 days after acceptance |
| A record of the processing activity | In the article 30 record |
| Avoiding the production environment where possible | A test environment with anonymised data |
The golden rule for the testing team: demonstrate the access, do not exercise it. To prove an SQL injection, a screenshot showing the engine version and the number of rows in the clientes table is enough. There is no need — and it is not lawful — to download all 400 records.
And the awkward question that has to be settled beforehand: if the test turns up data about an employee or a customer that reveals something (a payslip, a personal email, a health detail), what is done? The answer that must be written into the agreement: the access route is documented, not the content, it is reported to the contact person and any copy is destroyed.
- Systems hosted by third parties: the additional permission
Rutalia has systems in AWS and in Microsoft 365. Authorising a test on them has an important nuance: Rutalia is responsible for its data and its configuration, but the infrastructure is not its own.
| What is tested | Is Rutalia's authorisation enough? |
|---|---|
MiRutalia on srv-web01 (own data centre) |
Yes |
| The AWS account's configuration (a review with read-only credentials) | Yes: it is your own configuration |
| Your own application deployed on a cloud instance | Generally yes, within the provider's testing policy |
| Denial of service against any hosted resource | No: it requires the provider's express permission |
| Tests against the provider's own services | No: forbidden |
| Microsoft 365, Google Workspace and other SaaS | No without following the provider's rules of engagement |
One of your suppliers (the ERP vendor, 198.51.100.77) |
No: their written authorisation is required |
The large providers publish a testing policy that allows you to test your own resources without prior permission for certain kinds of test, and expressly forbids others — essentially anything that could affect other customers: denial of service, traffic flooding, tests against shared services. It has to be read before every test, because it changes.
And the case most often forgotten: if Rutalia commissions a pentest that includes testing the integration with the ERP vendor, that vendor's authorisation is required. Testing the mTLS endpoint at 198.51.100.77 without their permission is exactly the same article 197 bis offence, even though they are a contracted supplier. This kind of joint testing is negotiated in the contract, and it forms part of the supply chain management of 06-04.
- Methodologies and reference frameworks
Working to a methodology is what distinguishes a professional service from an improvised poke around, and what makes it possible to compare two proposals.
| Framework | What it is | When to use it |
|---|---|---|
| PTES (Penetration Testing Execution Standard) | A seven-phase standard, from pre-engagement to the report | A general framework for a complete pentest |
| OSSTMM | A security testing methodology with a measurable, metrics-based approach | When you want repeatability and comparability |
| OWASP WSTG (Web Security Testing Guide) | A web testing guide, case by case, with identifiers | The reference for MiRutalia |
| OWASP MASTG | The equivalent for mobile applications | For the tablets' delivery note app |
| NIST SP 800-115 | A technical guide to security assessment and testing | An institutional framework, useful for the ENS |
| MITRE ATT&CK | A knowledge base of tactics and techniques | For designing and measuring red team exercises |
| CCN-STIC guidelines (800 series) | The Spanish framework, aligned with the ENS | The public sector and its suppliers |
A very useful question when asking for a quote: "which methodology do you follow, and will you give me the list of checks performed?" A serious provider answers without hesitation. If the answer is vague, the service probably consists of running a tool and typesetting its output.
And for MiRutalia, a concrete recommendation: require the report to reference the WSTG identifiers of the tests carried out. That way you know not only what was found, but what was looked for and not found, which is equally valuable information.
- The phases of a penetration test
flowchart LR
A["1. Planning<br/>scope, permissions,<br/>rules"] --> B["2. Reconnaissance<br/>passive and active"]
B --> C["3. Analysis<br/>enumeration and<br/>detection"]
C --> D["4. Controlled<br/>exploitation"]
D --> E["5. Post-exploitation<br/>real scope<br/>of the compromise"]
E --> F["6. Report<br/>and presentation"]
F --> G["7. Re-verification<br/>after remediation"]
E -.->|"new targets"| C
| Phase | What is done | Deliverable |
|---|---|---|
| 1. Planning | Scope, authorisation, windows, contacts, stop rules | A signed document |
| 2. Reconnaissance | Passive: public information, DNS, certificates, leaks, LinkedIn. Active: contact with the systems | A map of the exposed surface |
| 3. Analysis | Enumeration of services and versions, identification of weaknesses, manual validation | A list of candidates |
| 4. Exploitation | Confirming that the vulnerability is real and exploitable, under control and without damage | Proofs of concept |
| 5. Post-exploitation | How far you get: lateral movement, escalation, access to data | The real scope of the impact |
| 6. Report | Writing up, assessment, recommendations, presentation | Report + meeting |
| 7. Re-verification | Checking that the fixes work | A closing report |
Two comments on the phases that are most underestimated:
- Passive reconnaissance is surprisingly productive and touches no system at all. The TLS certificates published in the transparency logs reveal forgotten subdomains; public repositories reveal secrets; the metadata of documents published on the website reveals usernames and software versions; and credential leaks from other services reveal passwords that employees have reused. For Rutalia, passive reconnaissance would very probably find the former IT manager's email address tied to the AWS root account.
- Phase 7 is the one almost nobody commissions and the only one that demonstrates value. A report with twelve findings that nobody verifies is a document. Twelve findings verified as fixed are a real improvement. It has to be negotiated within the initial price, because afterwards it is always a separate quote.
- Black box, grey box and white box
According to the information handed to the testing team:
| Mode | What is provided | It simulates | Useful time | Coverage |
|---|---|---|---|---|
| Black box | Nothing, or just the company name | An external attacker with no information | Consumed by reconnaissance | Low |
| Grey box | User credentials, basic documentation, a detailed scope | An attacker who has already got in, or a malicious customer/employee | Balanced | High |
| White box | Everything: source code, architecture, administrator credentials | An exhaustive review | Maximum use of the time | Maximum |
Black box has an obvious commercial appeal — "let's see whether they get in" — and it is, almost always, the worst investment. The reason: you pay by the hour, and a significant part of it is spent finding out things the company could have supplied in an email. On top of that, a real attacker has months; a pentest has ten days. The comparison is misleading.
For MiRutalia, the right answer is grey box, with one specific caveat: you have to provide credentials for at least two different customers. Without two accounts it is impossible to test horizontal access control, which is precisely hypothesis H4. It is the most common scoping mistake in web application testing.
- Types by perspective and the recommendation for Rutalia
| Perspective | What it assesses | Needed at Rutalia? | Cost |
|---|---|---|---|
| External | What is reachable from the internet: 203.0.113.10, .20, .30, email, DNS |
Yes, a priority | €4,000-7,000 |
| Web application | MiRutalia and its API | Yes, a priority | €5,000-9,000 |
| Internal | What somebody already inside the network achieves | Yes: it validates the segmentation of 03-04 | €4,000-8,000 |
| Wireless | Wifi, EAP-TLS, guest networks | After the evil twin incident, yes | €1,500-3,000 |
| Social engineering | Simulated phishing, phone calls | Yes, but as training (08-03) | €1,500-4,000 |
| Physical | Access to the premises, warehouses, data centre | Later on | €3,000-6,000 |
| Mobile | The tablets' delivery note app | When one is developed in-house | Variable |
The realistic plan for Rutalia, with a budget of €12,000 for the first year:
| When | What | Cost | Why in that order |
|---|---|---|---|
| Month 1 | Internal vulnerability scan, with a free tool | €0 | It finds the obvious things before you pay for them |
| Month 2 | A configuration review of the cloud | €0 (the checklist from 04-04) | It is already done |
| Month 3 | External pentest + web application (grey box) | €8,000 | What is exposed to the internet and asset A001 |
| Month 5 | Re-verification of the fixed findings | Included | It demonstrates the value |
| Month 7 | A simulated phishing campaign with training | €2,000 | The vector of the canonical scenario |
| Month 10 | An internal pentest validating the segmentation | Next financial year | Once the VLANs are consolidated |
The logic: you do not pay a consultant to find what a free tool finds on its own. First you clean up the obvious; then you commission the manual work no tool can do.
- Vulnerability management as a continuous process
Here is what Rutalia really lacks. An annual pentest is an exam; vulnerability management is the course.
flowchart LR
A["1. Discovery<br/>what do I have?"] --> B["2. Assessment<br/>what is broken?"]
B --> C["3. Prioritisation<br/>what comes first?"]
C --> D["4. Remediation<br/>or mitigation"]
D --> E["5. Verification<br/>is it really resolved?"]
E --> F["6. Measurement<br/>are we improving?"]
F --> A
C -.->|"cannot be<br/>fixed"| X["Documented<br/>exception"]
X --> F
| Phase | Frequency at Rutalia | Tool | Owner |
|---|---|---|---|
| Discovery | Weekly | nmap -sn against the ranges + cloud inventory |
Automated |
| Assessment | Weekly without credentials, monthly with credentials | Greenbone/OpenVAS | Diego |
| Prioritisation | Weekly | CVSS + KEV + EPSS + exposure | Laura |
| Remediation | According to the deadlines in section 18 | The patch management of 04-01 | Diego / Marta |
| Verification | After every fix | A targeted rescan | Diego |
| Measurement | Monthly | A dashboard | Laura |
The difference between having this and not having it is the difference between finding out about a critical vulnerability the following Tuesday or the day somebody exploits it.
- Discovery: you cannot protect what you do not know exists
The figure that governs everything else: the sweep of 5 October 2026 found 412 live hosts against 261 inventoried. One hundred and fifty-one machines that nobody patches, nobody hardens and nobody watches.
Continuous, automated discovery:
#!/usr/bin/env bash
# descubrir_cambios.sh - Rutalia. Detects new or vanished hosts.
# Run weekly from sec-sensor01 (10.10.10.20). Read-only.
RANGES="10.10.10.0/24 10.10.20.0/24 10.10.30.0/24 10.10.40.0/24 \
10.10.50.0/24 10.10.60.0/24 10.10.70.0/24 10.10.80.0/24 10.10.90.0/24"
DIR=/var/lib/rutalia/inventario
TODAY=$(date +%F)
mkdir -p "$DIR"
# Discovery sweep: no port scanning, minimum impact
nmap -sn -n --min-rate 200 -oG - $RANGES 2>/dev/null \
| awk '/Up$/{print $2}' | sort -V > "$DIR/hosts-$TODAY.txt"
PREVIOUS=$(ls -1 "$DIR"/hosts-*.txt | grep -v "$TODAY" | tail -1)
if [ -n "$PREVIOUS" ]; then
echo "=== Changes against $(basename "$PREVIOUS") ==="
echo "--- NEW (investigate: who put it there and why?) ---"
comm -13 "$PREVIOUS" "$DIR/hosts-$TODAY.txt"
echo "--- VANISHED (switched off, retired or compromised?) ---"
comm -23 "$PREVIOUS" "$DIR/hosts-$TODAY.txt"
fi
# Comparison against the official inventory
echo "--- NOT INVENTORIED ---"
comm -23 "$DIR/hosts-$TODAY.txt" <(sort -V "$DIR/inventario_oficial.txt")Points of the script worth understanding:
nmap -sndoes not scan ports: it only determines which hosts respond. It is fast and has minimal impact, suitable for running during working hours.-navoids reverse DNS resolution, which multiplies the time and pollutes the DNS logs.-oG -produces the output in grepable format to standard output.sort -Vsorts IP addresses correctly (10.10.1.9before10.10.1.10), which a normalsortdoes not.comm -13andcomm -23compare the two sorted files and return, respectively, the lines only in the second (new) and only in the first (vanished). It is the simplest and most reliable way to detect changes.- The third comparison, against the official inventory, is the one that answers the question of the 151 machines.
And the essential complement: the same exercise facing outwards. What the internet sees of Rutalia:
# The declared external surface
nmap -Pn -sV --top-ports 1000 203.0.113.10 203.0.113.20 203.0.113.30
# Forgotten subdomains: the TLS certificates issued are public.
# Certificate transparency logs reveal subdomains
# nobody remembers creating.This last point surprises a lot of people: every TLS certificate issued is published in public, auditable logs. Consulting them is free, lawful and touches no system. It is the first action of any attacker and it should be the first action of any defender.
- Authenticated versus unauthenticated scanning
| Unauthenticated | Authenticated | |
|---|---|---|
| What it sees | What the service exposes from outside | The system's real state on the inside |
| How it decides | The version advertised in banners, behaviour | Installed packages, configuration, permissions |
| False positives | Many | Few |
| False negatives | Enormous numbers | Few |
| Coverage | Only what is exposed on the network | All the installed software |
| Risk | Lower | It requires credentials, which have to be protected |
| It simulates | An external attacker | An auditor with access |
The practical difference is enormous and worth illustrating. An unauthenticated scan of srv-web01 sees Server: nginx and perhaps its version, and reports the known vulnerabilities of that version — many of which Debian has already patched without changing the version number, which generates false positives in bulk. An authenticated scan goes in, runs the equivalent of dpkg -l, compares against Debian's security database and answers with certainty. It also sees the 400 Python libraries, the packages that listen on no port at all, and the configuration.
The recommendation is clear: authenticated scanning whenever possible, complemented by an unauthenticated one from outside to see the exposed surface.
The precautions with the scanner's credentials, which are a first-order target:
| Precaution | Detail |
|---|---|
| A dedicated account | svc-scanner, not anybody's personal one |
| Read-only | On Linux, sudo scoped to query commands; on Windows, read permissions on WMI and the registry |
| A restricted source | Only from the scanner's IP |
| Credentials in the scanner's manager | Never in a text file |
| Rotation | Quarterly |
| Logging and alerting | Their use outside the scanning window is a critical alert |
| Disabled between scans | If the tool allows it |
That last row and the one before it close off a real risk: compromised scanning credentials give an attacker a complete, up-to-date inventory of every vulnerability in the organisation. It is the perfect map.
- The tools and what each one is for
| Tool | Type | Licence | What it is for at Rutalia |
|---|---|---|---|
| nmap | Discovery and enumeration | Free | Inventory, services, versions; NSE scripts for specific checks |
| Greenbone / OpenVAS | Vulnerability scanning | Free | The main scanner: authenticated, scheduled, with reports |
| Nessus | Vulnerability scanning | Commercial (limited free edition) | An alternative, widely used in audits |
| OWASP ZAP | Dynamic web scanning | Free | MiRutalia: crawling, passive and active scanning |
| Nuclei | Template-based scanner | Free | Fast, specific checks, integrable into CI |
| testssl.sh | TLS auditing | Free | Verifying the configuration of 03-02 |
| Lynis | Local hardening audit | Free | It complements the script of 04-01 |
| Burp Suite | Web testing proxy | Commercial (free community edition) | Manual testing of MiRutalia |
| Metasploit | Exploitation | Free / commercial | Validating exploitability; only in the lab or with authorisation |
A reminder. These tools are legitimate and in everyday professional use. What determines legality is what they are pointed at. All the examples that follow are run against Rutalia's own lab or its test environment, with written authorisation.
- An authenticated scan of Rutalia and how to read it
Configuring the authenticated scan of srv-web01 with Greenbone:
# A dedicated, read-only account on the target
sudo useradd -m -s /bin/bash svc-scanner
sudo mkdir -p /home/svc-scanner/.ssh
sudo tee /home/svc-scanner/.ssh/authorized_keys > /dev/null <<'EOF'
from="10.10.10.25",no-agent-forwarding,no-port-forwarding,no-pty ssh-ed25519 AAAA... scanner@sec-scan01
EOF
sudo chown -R svc-scanner: /home/svc-scanner/.ssh
sudo chmod 700 /home/svc-scanner/.ssh
sudo chmod 600 /home/svc-scanner/.ssh/authorized_keys
# sudo scoped to QUERY commands
sudo tee /etc/sudoers.d/50-scanner > /dev/null <<'EOF'
Cmnd_Alias READONLY = /usr/bin/dpkg -l, /usr/bin/dpkg-query *, \
/bin/cat /etc/os-release, /usr/bin/apt-get -s upgrade
svc-scanner ALL=(root) NOPASSWD: READONLY
EOFA commentary on the decisions, which reuse everything from 04-01:
from="10.10.10.25"inauthorized_keys: the key only works from the scanner's IP. If it is stolen, it is useless anywhere else.no-agent-forwarding,no-port-forwarding,no-pty: no agent forwarding, no tunnels and no interactive terminal. The account can run commands and nothing else.sudoscoped to query commands, and hereNOPASSWDis acceptable because they are read commands and the scanner cannot type a password. Note thatdpkg -lis pinned with its argument: an unrestricteddpkgwould allow packages to be installed.
An extract from the resulting report:
Target: srv-web01 (10.10.30.10) - Debian 12.5 - Authenticated scan: YES Date: 2027-09-06 02:00 - 02:41 SEVERITY CVSS FINDING COMPONENT --------- ---- --------------------------------------------- ---------------- High 9.8 Remote execution in a compression library libxyz 1.4.2-1 High 8.8 Local escalation through a race condition kernel 6.1.0-18 Medium 6.5 TLS: legacy cipher accepted on the port nginx (:443) Medium 5.3 Version disclosure in HTTP headers nginx Medium 5.0 Session cookie without the Secure attribute MiRutalia Low 3.7 SSH: old key exchange algorithm sshd Info 0.0 TLS certificate expires in 27 days mirutalia.example Summary: 2 High, 3 Medium, 1 Low, 1 Informational. Packages with a pending security update: 7
How this report is read, which is what distinguishes a professional from somebody who forwards the PDF:
- "Authenticated scan: YES" is the first thing to look at. If it said NO, half the findings would be assumptions based on advertised versions.
- The two High findings are not the same. The CVSS 9.8 in the compression library is remote execution; the 8.8 is local escalation, which requires the attacker to already be on the machine. On a DMZ server running an exposed application, the first is urgent and the second is important. The score alone does not say so: you have to read the vector.
- The TLS row and the version disclosure row are real findings but of low impact; in many reports they take up more space than the important ones and divert attention. They are fixed because they are free, not because they are urgent.
- "Session cookie without the Secure attribute" is interesting for another reason: it is a finding that was already fixed in 04-03. If it appears, either the fix was not deployed, or there is a route that creates another cookie. It is exactly the kind of regression these scans detect.
- "TLS certificate expires in 27 days" is marked as informational, but it is the finding with the highest probability of causing a real outage of the whole portal. It is the same warning generated by the
vigilar_certificados.pyof 02-05. A scanner scores for security, not for availability.
The general conclusion about automated reports: they have to be read with judgement, not sorted by score and worked through from the top. Section 17 develops how to prioritise properly.
- Testing MiRutalia in the test environment
Everything in this section is run against mirutalia-pruebas.rutalia.example, the copy of the application with anonymised data deployed on an isolated machine. Never against production, and never with real data.
ZAP in automated mode, integrable into the deployment process:
docker run --rm -v "$(pwd)/reports:/zap/wrk:rw" \
ghcr.io/zaproxy/zaproxy:stable \
zap-full-scan.py \
-t https://mirutalia-pruebas.rutalia.example \
-r zap-report.html \
-J zap-report.json \
-z "-config replacer.full_list(0).description=auth \
-config replacer.full_list(0).enabled=true \
-config replacer.full_list(0).matchtype=REQ_HEADER \
-config replacer.full_list(0).matchstr=Cookie \
-config replacer.full_list(0).replacement=mirutalia_sid=TEST_SESSION"zap-full-scan.pydoes a full crawl plus an active scan. There is alsozap-baseline.py, which only does a passive scan — it sends nothing hostile — and is the one to integrate into every deployment, because it is fast and cannot break anything.- The
replacerblock injects a valid session cookie into every request. Without this, ZAP only tests the public part of the application, which in MiRutalia is the login screen. It is the most common mistake when scanning authenticated applications: the report comes back almost empty and everybody breathes easy.
Nuclei for specific, fast checks:
nuclei -u https://mirutalia-pruebas.rutalia.example \
-t http/exposures/ -t http/misconfiguration/ -t ssl/ \
-severity medium,high,critical \
-rate-limit 20 \
-o nuclei-report.txt- The
exposurestemplates look for what section 19 of 04-03 covered:/.git/,.env, backup files, exposed admin panels. -rate-limit 20limits it to 20 requests per second. Without it, Nuclei can take down a small application, and that would be an unauthorised denial of service test.
The output:
[git-config] [http] [medium] https://mirutalia-pruebas.rutalia.example/.git/config [missing-csp] [http] [low] https://mirutalia-pruebas.rutalia.example [deprecated-tls] [ssl] [medium] mirutalia-pruebas.rutalia.example:443
The first finding is serious: an accessible /.git/config allows the whole repository to be downloaded, including the entire history — and with it, the config.py secrets that in 04-03 we discovered are still in the old commits. A single line of this report reopens a critical finding that was thought closed.
What none of these tools will find, and why the manual work is needed:
| Vulnerability | Why they do not find it |
|---|---|
IDOR (cliente412 -> shipments of 087) |
The tool does not know whose each shipment is |
| Privilege escalation between roles | It does not know the permission model |
| Broken business logic (a discount applied twice) | It does not know how the business should work |
| Chains of minor flaws that together are critical | It evaluates findings in isolation |
| Contextual information leaks | It does not know what is sensitive at Rutalia |
- Prioritisation: why CVSS is not enough
CVSS (Common Vulnerability Scoring System) scores the technical severity of a vulnerability from 0 to 10, from a vector describing how it is exploited and what impact it has.
Decoded:
| Component | Value | Meaning |
|---|---|---|
AV:N |
Attack Vector: Network | Exploitable over the network |
AC:L |
Attack Complexity: Low | With no special conditions |
PR:N |
Privileges Required: None | No credentials |
UI:N |
User Interaction: None | Without anybody clicking |
S:U |
Scope: Unchanged | It does not jump to another component |
C:H/I:H/A:H |
High impact on all three | Confidentiality, integrity and availability |
Reading the vector is more useful than reading the number. Two 9.8 vulnerabilities can be radically different: one with AV:N/PR:N is exploitable from the internet by anybody; another with AV:L/PR:H requires the attacker to already be a local administrator, and in practice is a far smaller problem.
Why CVSS is not enough, with three concrete reasons:
- It does not say whether it is being exploited. Most published vulnerabilities are never exploited. A small percentage accounts for almost every real attack.
- It does not know your context. A CVSS 9.8 in a service you have disabled is not a risk. A 6.5 in the internet-facing portal with the customer portfolio behind it is.
- It is inflated by design. A very high proportion of CVEs are classed as High or Critical. If everything is critical, nothing is.
The two complements that solve this:
| Source | What it adds | Cost |
|---|---|---|
| CISA's KEV (Known Exploited Vulnerabilities) | A catalogue of vulnerabilities with confirmed real-world exploitation | Free |
| EPSS (Exploit Prediction Scoring System) | The estimated probability that a vulnerability will be exploited in the next 30 days | Free |
| INCIBE and CCN-CERT advisories | Spanish and sector-specific context | Free |
| Your own exposure | Internet-facing? With critical data behind it? Compensated? | You supply it |
Rutalia's prioritisation formula:
PRIORITY = Technical severity (CVSS)
x Probability of exploitation (KEV = maximum, or EPSS)
x Real exposure (internet > internal > isolated)
x Criticality of the asset (A001, A003, A005 > the rest)
/ Existing compensating controlsApplied to four real findings from the scan:
| Finding | CVSS | In KEV? | EPSS | Exposure | Asset | Final priority |
|---|---|---|---|---|---|---|
Remote execution in libxyz |
9.8 | No | 0.08 | DMZ, exposed service | A001 | 1st |
| Local escalation in the kernel | 8.8 | No | 0.01 | Requires prior access | A001 | 3rd |
| Vulnerability in the email client | 8.1 | Yes | 0.74 | The user opens email | 140 workstations | 2nd (emergency) |
| Legacy TLS cipher | 6.5 | No | 0.00 | Internet | A001 | 4th |
And the correction of intuition this exercise produces: the CVSS 8.1 is patched before the 8.8, because it is in the KEV catalogue with a 74% probability of exploitation, while the other requires prior access and nobody is using it. Ordering by CVSS would have given 9.8 -> 8.8 -> 8.1 -> 6.5, which is the wrong order.
- Remediation deadline agreements
The deadlines must be written down, approved by senior management and internally enforceable. They extend the patching table of 04-01 to any finding, wherever it comes from:
| Criticality | Definition | Internet-facing | Internal | Workstations | Test environment |
|---|---|---|---|---|---|
| CRITICAL | CVSS ≥ 9.0, or in KEV, or exploitable without credentials with impact on A001/A003/A005 | 48 h | 7 days | 7 days | 30 days |
| HIGH | CVSS 7.0-8.9 | 7 days | 15 days | 15 days | 45 days |
| MEDIUM | CVSS 4.0-6.9 | 30 days | 45 days | 45 days | 90 days |
| LOW | CVSS < 4.0 | 90 days | Quarterly cycle | Quarterly cycle | Best effort |
With four clauses that head off the usual arguments:
- Emergency clause: in the face of active exploitation against the logistics sector, the deadline drops to 24 hours or a temporary mitigation is applied (disconnect, a rule on
fw-zgz01, a signature onsec-sensor01, a WAF rule). - The clock starts at discovery, not at the report presentation meeting. Critical findings are communicated immediately, as the agreement in section 4 requires.
- Mitigating is not fixing. A WAF rule that blocks exploitation stops the emergency clock, but the finding stays open until it is fixed at source.
- Missing a deadline without an approved exception escalates to senior management automatically. Without this clause, the deadlines are a suggestion.
- Verifying the fix
A finding is not closed because somebody says they have fixed it. It is closed because it has been checked.
| Type of finding | How it is verified |
|---|---|
| An unpatched package | A targeted authenticated rescan of that machine |
| A misconfiguration | A direct check (sshd -T, curl -I, aws s3api ...) |
| An application vulnerability | Reproducing the original attack and confirming that it fails |
| An architectural flaw | A design review and a test of the flow |
| A vulnerability in a third party | Written confirmation from the provider + your own check |
And the practice that makes verification last: every fixed finding generates an automated regression test, as we established in 04-03. Without it, the fix survives until the next refactoring.
# Targeted verification after fixing: ONLY what was fixed is checked
nmap -p 443 --script ssl-enum-ciphers 203.0.113.20 | grep -i "TLSv1.0\|TLSv1.1\|RC4\|3DES"
# No output = fixed
curl -sI https://mirutalia.example/ | grep -i "content-security-policy"
# Output = fixed
- Exceptions and formally accepted risk
There will always be findings that cannot be fixed within the deadline: the vendor has not released a patch, the fix breaks a critical process, the cost is disproportionate. The professional response is not to ignore them or hide them: it is to document them as exceptions with an owner and a date.
An exception must contain, without exception:
EXCEPTION EXC-2027-014
Finding: HAL-2027-031 - Legacy TLS cipher accepted on the
ERP vendor's supplier portal (198.51.100.77)
Criticality: MEDIUM (CVSS 6.5)
Deadline missed: 30 days (due 2027-10-06)
Reason: The endpoint is controlled by the ERP vendor. Their
platform does not support TLS 1.2 exclusively until
version 8.4, expected in the second quarter of 2028.
Residual risk: Theoretical interception of the channel with the vendor.
It requires a man-in-the-middle position on the network and
non-trivial cryptographic attack capability.
Mitigation: - Channel restricted to mTLS (03-02), with our own certificates
- Source limited to 198.51.100.77 on fw-zgz01
- Traffic monitored by sec-sensor01
- No personal data on the channel beyond identifiers
Owner: Laura Mendez
Approved by: Andres Vidal (senior management)
Date: 2027-10-08
Review: 2028-04-08, or sooner if the vendor releases 8.4
or if known exploitation appearsThree non-negotiable properties of an exception:
- It has an expiry date. An exception with no date is a permanent decision taken by accident.
- It is approved by whoever carries the risk, that is, senior management, not the technician who requests it.
- It lives in a register, not in an email. The formal risk acceptance procedure is developed in 08-02.
- Process metrics
What is not measured does not improve, and what is measured badly gets worse. The useful metrics of a vulnerability management programme:
| Metric | What it measures | Target at Rutalia |
|---|---|---|
| Scan coverage | % of inventoried assets scanned in the last 30 days | > 95% |
| Mean time to remediate (MTTR) by criticality | The real speed of the process | Critical < 48 h |
| Open critical vulnerabilities past their deadline | Overdue security debt | 0 |
| Mean age of the open findings | Whether debt is accumulating | < 30 days |
| Reopening rate | Fixes that did not work | < 5% |
| Active exceptions and their age | Accumulated accepted risk | All reviewed on time |
| New findings per scan | Whether the systems are improving or you are just finding more | A downward trend |
And the misleading metrics, which are worth rejecting when somebody proposes them:
| Misleading metric | Why it is no use |
|---|---|
| "Total number of vulnerabilities" | It goes down if you scan less. It rewards not looking |
| "% of vulnerabilities fixed" | You improve it by ignoring the hard ones and closing the trivial ones |
| "Vulnerabilities found by the pentest" | A bad pentest finds few |
| "The tool's score" | It depends on the catalogue, not on your security |
The development of the security dashboard, and how to present it to senior management, is the subject of 08-04.
- How to read a pentest report
A professional report has five parts, and each one has a different reader:
| Part | For whom | What it contains | How long |
|---|---|---|---|
| Executive summary | Senior management | What was done, what the real risk is, what to do, in business language | 1-2 pages |
| Scope and methodology | Everybody | What was tested, what was not, when, with what method | 1-2 pages |
| Summary of findings | The technical owner | A table with criticality, status and effort | 1 page |
| Technical detail | Whoever fixes it | Per finding: description, evidence, reproduction, impact, fix | The bulk |
| Appendices | Whoever verifies it | Tool output, a list of the tests performed | Variable |
How to read the executive summary without being taken in:
- If it says "47 vulnerabilities were identified, 12 of them critical" and does not say what could be done with them, it is a typeset tool report. A useful executive summary says: "an external attacker with no credentials was able to reach the data of all 400 customers in four hours, through the chain X -> Y -> Z".
- Look for the sentence about the scope not covered. An honest report says what there was no time to test.
- Be wary of reports with no low or informational findings at all: it suggests that a tool was simply run.
How to read the technical detail: every finding must let you reproduce it yourself. If you cannot, you will not be able to verify the fix.
The questions to ask at the presentation meeting:
- Which finding worries you most, personally, and why?
- If you had a week and we could only fix three things, which ones?
- What did you find that you were not expecting?
- What did you not manage to do, and which control stopped you? (This is the question nobody asks and the one that gives the most information about what does work.)
- What would you have done with another week?
- Did we detect any of what you did?
Question 6 is especially valuable for Rutalia, which has just deployed Suricata and an EDR. If the testing team ran a complete sweep of the network and no alert fired, that is a finding in itself, even though it does not appear in the report.
- The MiRutalia report: six findings and their plan
A fictitious report of the grey box test on MiRutalia, carried out from 8 to 19 November 2027 by an external provider, with authorisation signed by Andrés Vidal.
Executive summary (extract):
During the test, unauthorised access was obtained to data belonging to customers other than the assigned one, as well as to service credentials with administrative capability over the production database. Starting solely from a legitimate customer account, the team was able to reach, in 3 hours and 40 minutes, information belonging to 38 other customers and, by chaining two additional findings, credentials that would allow full access to the customer database (asset A005). The organisation shows a substantial improvement on the situation described in the earlier documentation: no SQL injection vulnerabilities were identified and access control is implemented on most resources, which indicates effective and recent remediation work.
Findings:
| Id | Finding | Criticality | CVSS | WSTG |
|---|---|---|---|---|
| H-01 | IDOR in /api/v1/albaranes/<id>: access to other customers' delivery notes |
CRITICAL | 8.6 | WSTG-ATHZ-04 |
| H-02 | Historical secrets recoverable from the repository exposed at /.git/ |
CRITICAL | 9.1 | WSTG-CONF-05 |
| H-03 | PostgreSQL user with excessive permissions in the test environment | HIGH | 7.5 | WSTG-CONF-01 |
| H-04 | No MFA on the portal's administrative access | HIGH | 7.3 | WSTG-ATHN-01 |
| H-05 | Legacy TLS cipher accepted at the ERP vendor's endpoint | MEDIUM | 6.5 | WSTG-CRYP-01 |
| H-06 | User enumeration in the password recovery flow | MEDIUM | 5.3 | WSTG-IDNT-04 |
Detail of the most important finding:
H-01 - IDOR in the API delivery note endpoint CRITICAL - CVSS 8.6
--------------------------------------------------------------------------------
DESCRIPTION
The endpoint GET /api/v1/albaranes/<id> does not check ownership of the resource.
The fix applied in the web interface (the require_ownership function) was not
replicated on the equivalent API route.
EVIDENCE (data pseudonymised in line with the agreement)
Account used: test customer "A" (id 412)
GET /api/v1/albaranes/8801 HTTP/1.1 -> 200 OK (own, correct)
Authorization: Bearer rtl_live_****
GET /api/v1/albaranes/8802 HTTP/1.1 -> 200 OK (SOMEBODY ELSE'S)
Authorization: Bearer rtl_live_****
Response (fragment, fields redacted):
{ "id": 8802, "cliente": "CUSTOMER-B", "cif": "B99******",
"direccion_entrega": "C/ ******", "firmante": "M****** G******",
"fichero": "albaran_8802.pdf" }
Walking identifiers 8801-8900 gave access to 38 delivery notes belonging to
17 different customers. The associated PDF files were not downloaded.
IMPACT
Access to commercial and personal data of customers by any authenticated
customer. It affects all 400 customers. It matches the threat hypothesis
H4 documented by the organisation.
REPRODUCTION
1. Authenticate as a customer and obtain an API token.
2. Request any delivery note identifier other than your own.
3. Observe that the response is 200 with somebody else's data.
RECOMMENDED FIX
Apply require_ownership(note.cliente_id, "delivery_note:view_all") on the API
route, as in the web view. Add the global before_request check that denies any
route with no declared permission. Replace the sequential identifiers with
opaque references.
TEAM OBSERVATION
The equivalent web route IS correctly protected. This suggests that the fix was
applied view by view rather than through a cross-cutting control, and that
there may be other API routes left uncovered.The team observation is the most valuable part of the finding and the thing that distinguishes a good report: it does not limit itself to reporting the flaw, it points out the pattern that produced it. The real fix is not adding a line to one route: it is applying the global control of 04-03 and auditing the forty routes.
The remediation plan, which is the deliverable Rutalia produces from the report:
| Id | Action | Owner | Deadline | Verification | Status |
|---|---|---|---|---|---|
| H-01 | require_ownership on the API routes + the global check + an audit of the 40 routes + opaque references |
Marta Ruiz | 2027-11-21 (48 h) | Reproduce the attack + a regression test | In progress |
| H-02 | Block /.git/ in nginx; remove the repository from the server; rotate SECRET_KEY, AES_KEY and DB_PASSWORD again; rewrite the history or archive the repository |
Marta + Diego | 2027-11-21 (48 h) | curl to /.git/config -> 404; a search for secrets in the history |
In progress |
| H-03 | Apply the least-privilege mirutalia_app user in the test environment; anonymise the environment's data |
Diego Salas | 2027-11-28 (7 d) | \du in PostgreSQL + an attempted DROP |
Pending |
| H-04 | Mandatory MFA for the portal's administrative accounts (phase 3 of the plan in 02-03) | Laura Méndez | 2027-11-28 (7 d) | An access attempt without a second factor | Pending |
| H-05 | Ask the ERP vendor for TLS 1.2 exclusively | Laura Méndez | 2027-12-19 (30 d) | testssl.sh against the endpoint |
Exception EXC-2027-014 |
| H-06 | A uniform message in password recovery and levelling of the response time | Marta Ruiz | 2027-12-19 (30 d) | Compare responses and times with an existing and a non-existent account | Pending |
Note that H-02 has a higher CVSS than H-01 but was listed second in the report: the testing team orders by its own criteria and Rutalia works on them in parallel, because both are critical with a 48-hour deadline. And that H-05 ends up as the documented exception of section 20, because the endpoint is not under Rutalia's control.
- A vulnerability record template
The record with which Rutalia registers every finding, whether it comes from the scanner, the pentest, an employee or a third party:
# HAL-YYYY-NNN - <short, descriptive title>
## Identification
- **Date of detection**:
- **Source**: automated scan / pentest / external report / internal
- **Detected by**:
- **Affected system or component**:
- **Associated asset**: A001 / A002 / ... (with its RTO/RPO)
- **Environment**: production / test / development
## Assessment
- **Criticality**: CRITICAL / HIGH / MEDIUM / LOW
- **CVSS and vector**:
- **In the KEV catalogue?**: yes / no
- **EPSS**:
- **Exposure**: internet / internal / isolated
- **Justification of the final criticality**: <- if it differs from CVSS, explain here
## Technical description
- **What happens**:
- **Root cause**:
- **Reproduction steps**:
- **Evidence**: (pseudonymised; never real data)
## Impact
- **Confidentiality / Integrity / Availability**:
- **Scope**: number of systems, users or records
- **Related threat hypothesis**: H1 / H2 / H3 / H4 / H5
- **Realistic exploitation scenario**:
## Remediation
- **Proposed solution**:
- **Temporary mitigation** (if applicable):
- **Owner**:
- **Committed deadline**: (per the table in section 18)
- **Estimated effort**:
- **Dependencies**:
## Tracking
- **Status**: open / in progress / fixed / verified / exception / false positive
- **Date fixed**:
- **Verification method**:
- **Verified by and when**:
- **Regression test created**: yes / no / N/A
- **Exception reference**:Two fields that make the difference compared with the usual templates:
- "Justification of the final criticality": it forces you to reason in writing when the assigned criticality differs from the CVSS. It is where professional judgement lives.
- "Regression test created": it turns every fix into a permanent one.
- Vulnerability disclosure and
security.txt
security.txtOne day somebody — a curious customer, a researcher, a student — will find a flaw in MiRutalia. What happens next depends entirely on whether Rutalia has prepared the way.
With no contact channel: the person does not know who to warn, writes to [email protected], nobody answers, and the matter ends up published on a social network or, worse, sold.
With a contact channel: it reaches [email protected], receipt is acknowledged within 48 hours, it is fixed and they are thanked publicly.
The security.txt file, a simple standard published at a well-known path:
# https://mirutalia.example/.well-known/security.txt Contact: mailto:[email protected] Contact: https://mirutalia.example/seguridad Expires: 2028-12-31T23:59:59.000Z Encryption: https://mirutalia.example/.well-known/pgp-key.txt Preferred-Languages: es, ca, en Canonical: https://mirutalia.example/.well-known/security.txt Policy: https://mirutalia.example/politica-divulgacion Acknowledgments: https://mirutalia.example/agradecimientos
| Field | What it is for |
|---|---|
Contact |
Mandatory. Where to write |
Expires |
Mandatory. It prevents abandoned files with contacts that no longer exist |
Encryption |
A public key for sending the report encrypted |
Policy |
The rules of the game |
Acknowledgments |
Public recognition for whoever reports: the cheapest incentive there is |
And the disclosure policy, which is what really matters because it gives legal certainty to whoever reports:
VULNERABILITY DISCLOSURE POLICY - Rutalia Logistica S.L.
We are grateful for security reports and we undertake to:
- Acknowledge receipt within a maximum of 48 working hours.
- Report on the status within 10 working days.
- Take no legal action against anybody acting in good faith
and respecting this policy.
- Publicly acknowledge your contribution, if you wish.
It IS PERMITTED to:
- Test the systems listed in the scope.
- Access only the minimum data necessary to demonstrate the
vulnerability, and stop at that point.
It is NOT permitted to:
- Access, copy, modify or retain third-party data.
- Denial of service or service degradation tests.
- Social engineering against our staff or our customers.
- Physical attacks on our premises.
- Disclose the vulnerability before we have fixed it or before
90 days from the report, whichever comes first.
Scope: mirutalia.example - api.mirutalia.example - www.rutalia.example
Out of scope: third-party systems, suppliers and our customers'
infrastructure.
We do NOT currently offer a financial reward.
Contact: [email protected]An honest warning about that penultimate line: the no-legal-action clause is a statement of the company's intentions, not a repeal of the Criminal Code. It offers practical protection and is recognised good practice, but it does not remove the offence under article 197 bis. Whoever reports must stick strictly to the published scope and conditions.
And the difference from a bug bounty programme: coordinated disclosure is a receiving channel, it is free and every company should have one. A bug bounty is a paid service that actively attracts researchers. Rutalia needs the first; the second would be premature while there are known findings still unfixed, because you would be paying to discover what you already know.
- A legal, free lab in which to practise
Everything learned in this course needs practice, and practising against other people's systems is a criminal offence. The good news is that a complete ecosystem of environments designed expressly for you to break already exists.
| Environment | What it is | What you practise |
|---|---|---|
| OWASP Juice Shop | A modern, deliberately vulnerable web application | The whole OWASP Top 10 of 04-03, with progressive challenges |
| DVWA | The classic vulnerable web application, with difficulty levels | SQL injection, XSS, CSRF, file upload |
| WebGoat | An OWASP tutorial application | Vulnerabilities explained through guided lessons |
| Metasploitable | A virtual machine full of vulnerable services | Scanning, enumeration, service exploitation |
| VulnHub | A catalogue of downloadable vulnerable virtual machines | A complete pentest locally |
| Online challenge platforms | Labs with target machines | Guided practice inside their platform |
| Your own lab | A VM with Debian, nginx, PostgreSQL and a copy of MiRutalia | The most useful: your own technology |
Setting up the lab in five minutes:
# An isolated network, WITH NO internet egress and NO access to the corporate network
docker network create --internal lab-seguridad
# Juice Shop: the most complete vulnerable application for practising 04-03
docker run -d --name juiceshop --network lab-seguridad -p 127.0.0.1:3000:3000 \
bkimminich/juice-shop
# DVWA
docker run -d --name dvwa --network lab-seguridad -p 127.0.0.1:8080:80 \
vulnerables/web-dvwaThe details that make the lab safe:
--internal: the Docker network has no internet egress. A deliberately vulnerable application must not be able to reach anything, or be reached.-p 127.0.0.1:3000:3000: the port is published only on the loopback interface. Without the127.0.0.1, Docker would publish it on every interface, and you would end up exposing an application designed to be vulnerable to your corporate network — or to the internet. It is a real and frequent mistake.- Never on a domain-joined machine. The lab goes on a dedicated machine or on a VM with host-only networking.
The five rules of the lab, which sum up the ethics of the whole lesson:
- Only against what is yours or against environments built for it. Never against a third party's system, however obvious the flaw looks and however good your intentions.
- Isolated. No internet egress and no contact with the corporate network.
- Ephemeral. It is destroyed when you finish. A forgotten vulnerable machine on the network is exactly the kind of resource that turns up in the inventory of 151 machines.
- Documented. Write down what you test and what you learn: it is what turns practice into competence.
- With the lesson brought home. Every vulnerability you exploit in the lab, look for afterwards in your own systems. That is the point of the exercise.
And a parting recommendation, now that you are closing the module: set up a copy of MiRutalia with the vulnerable code of 04-03, exploit the SQL injection and the IDOR yourself, apply the fixes and check that they no longer work. It is the fastest way to move everything in this module from knowing it to understanding it.
Common Mistakes and Tips
Mistake 1: testing without written authorisation. It is a criminal offence, with no nuance, even if the system belongs to a customer, even if you only look and even if you tell them afterwards. Tip: if there is no document signed by somebody who can authorise it, nothing is touched. And if you discover something by accident, stop and report it.
Mistake 2: confusing a scan with a pentest. A typeset tool report is not a penetration test. Tip: demand a methodology, a list of the checks performed and findings that require human reasoning, such as access control.
Mistake 3: commissioning black box because it seems more realistic. You pay for hours consumed finding out what you could have sent in an email. Tip: grey box, and for web applications, credentials for two different users.
Mistake 4: scanning without authentication and believing the system is clean. The false negatives of an unauthenticated scan are enormous. Tip: authenticated scanning with a dedicated read-only account restricted by source IP.
Mistake 5: prioritising by CVSS. Ordering by score systematically gives the wrong order. Tip: combine CVSS with the KEV catalogue, EPSS, the real exposure and the criticality of the asset.
Mistake 6: not commissioning the re-verification. Without it, you do not know whether the fixes work and you lose half the value of the report. Tip: negotiate the re-verification within the initial price.
Mistake 7: accepting metrics that reward not looking. "Total vulnerabilities" goes down if you scan less. Tip: measure coverage, time to remediate and overdue criticals.
Mistake 8: leaving the vulnerable lab reachable from the network. Publishing a container without binding it to the loopback exposes an application designed to be exploited to your corporate network. Tip: an internal network, the port on 127.0.0.1 and destruction when you finish.
Tip 9: always ask what they did NOT manage to do. It is the question that reveals which controls work, and it never appears in the report.
Tip 10: publish your security.txt this week. It takes fifteen minutes and it stops a finding ending up on a social network because nobody knew who to tell.
Tip 11: test what you have just fixed. Immediate verification after each fix finds the incomplete ones — like the IDOR fix applied on the web and not on the API — while they are still cheap to repair.
Tip 12: the value of a pentest comes after the pentest. The report is not the product: the product is the organisation you are left with when the findings are closed, verified and covered by regression tests.
Exercises
Exercise 1: reviewing a testing agreement
A provider sends Rutalia this authorisation proposal to sign:
SECURITY TESTING AUTHORISATION Rutalia Logistica S.L. authorises CiberTest S.L. to carry out security testing on its infrastructure during the month of March 2028. The testing will include vulnerability scanning and exploitation of the vulnerabilities found. The provider will deliver a report at the end. Signed: Diego Salas, systems administrator.
a) List everything that is missing or wrong, ordered by severity. b) Is there any problem with who signs it? Reason your answer. c) Write out the three clauses you consider most urgent to add. d) During the test, the team accidentally accesses one of the ERP vendor's systems through the mTLS connection. What should happen under a well-drafted agreement, and what liability is there if it was not?
Exercise 2: prioritising real findings
Rutalia's monthly scan of 4 February 2028 returns these findings:
| Id | Finding | System | CVSS | KEV | EPSS | Exposure |
|---|---|---|---|---|---|---|
| A | Remote execution in the print service | fs01 (VLAN 20) |
9.8 | No | 0.02 | Internal |
| B | Vulnerability in the workstations' browser | 140 workstations (VLAN 40) | 8.8 | Yes | 0.89 | The user browses |
| C | Local escalation in the kernel | srv-db01 (VLAN 20) |
7.8 | No | 0.01 | Requires access |
| D | Information disclosure in nginx | srv-web01 (DMZ) |
5.3 | No | 0.15 | Internet |
| E | Vulnerability in the IoT probes' firmware | VLAN 60 | 9.1 | No | 0.04 | No internet |
| F | Default credentials on 19 printers | VLAN 40 | 7.5 | No | — | Internal |
a) Order the six by real remediation priority, justifying each position. b) Assign each one its deadline according to the table in section 18. c) Finding E has no vendor patch. Write the complete exception. d) Finding F has no CVE and no EPSS. How do you assess it, and why does it deserve attention despite not appearing in any catalogue? e) The director asks why B (8.8) is fixed before A (9.8). Explain it in three sentences, without jargon.
Exercise 3: designing the year's testing programme
Andrés Vidal approves €14,000 for security testing in 2028. The context: MiRutalia has fifteen fixed findings awaiting verification; the VLAN segmentation was completed in January; the EDR has been running for six months; and no external test has ever been carried out.
a) Design the year's calendar with what is commissioned, when and why in that order. It must fit the budget. b) What would you do before commissioning anything, and why? c) Justify why you do not recommend a red team exercise this year. d) Define three objective criteria for selecting the provider and three questions you would ask them at the report presentation meeting. e) How would you measure, on 31 December 2028, whether the €14,000 was well invested?
Solutions
Solution 1
a) The deficiencies, from most to least serious:
| # | Deficiency | Why it is serious |
|---|---|---|
| 1 | There is no defined scope | "Its infrastructure" potentially includes the unsupported srv-erp01, the IoT probes, the ERP vendor's systems and even personal devices connected to the network. An open scope is an invitation to an incident |
| 2 | There are no exclusions | srv-erp01 cannot take aggressive testing: it is an unsupported system that holds up operations. Nor can the IoT probes (A006, RTO 30 min) |
| 3 | It is signed by somebody who cannot authorise it | See part b) |
| 4 | There are no prohibited techniques | "Exploitation" on its own permits denial of service, social engineering and destructive brute force. Each one must be authorised separately |
| 5 | There is no time window | "During March" means they can test on the busiest operational day, or at 09:00 on a Monday |
| 6 | There is no stop rule and no emergency contact | If something goes down or they find a prior compromise, there is no procedure and nobody to call |
| 7 | There is no personal data processing clause | The test will access the data of 400 customers and 180 employees. The processing agreement is missing: a GDPR breach by both parties |
| 8 | There is no confidentiality and no evidence custody | The report is the map of Rutalia's weaknesses; the evidence contains real data |
| 9 | There is no handling of critical findings | A critical vulnerability could wait three weeks until the report is delivered |
| 10 | There is no professional indemnity insurance | If the test takes MiRutalia down (€1,500/hour of outage), who is liable? |
| 11 | There is no evidence destruction and no deadline for it | The customers' data would stay with the provider indefinitely |
| 12 | The deliverable is not defined | A tool report or manual analysis? Does it include re-verification? |
| 13 | No specific individuals are identified | The authorisation is personal: who exactly may have access? |
| 14 | There is no methodology | There is no way to compare or verify what was tested |
b) Yes, there is a serious problem with the signature. Diego Salas is a systems administrator: he administers the systems, he is not their owner and he has no power to represent the company.
The consequences:
- Legally, the authorisation could be regarded as granted by somebody without the capacity to do so, which seriously weakens the defence against article 197 bis. The element "duly authorised" requires the authorisation to come from somebody who can give it.
- Organisationally, it is a decision with an impact on operations, on continuity and on the processing of personal data: it belongs to senior management, not to a technician.
- Personally, it exposes Diego: if something goes wrong, he has authorised a third party to access company systems without the authority to do so.
The person who must sign is Andrés Vidal, the managing director, as the holder of the power of representation. Laura Méndez signs as the technical lead for coordination, and Diego as the operational contact. Three different roles, and only one of them authorises.
c) The three most urgent clauses:
CLAUSE 1 - SCOPE
Testing is authorised EXCLUSIVELY on the following assets:
- 203.0.113.20 (the MiRutalia portal) and mirutalia.example, api.mirutalia.example
- 203.0.113.10 (the corporate public IP) and www.rutalia.example
- Internal network 10.10.40.0/24 (VLAN OFFICE) from a provided network point
The following are EXPRESSLY EXCLUDED:
- srv-erp01 (10.10.20.40) and any system belonging to the ERP vendor
(198.51.100.77), as it has no vendor support and is not our own
infrastructure.
- VLAN 60 (IoT probes, 10.10.60.0/24) and VLAN 50 (warehouses), because of
their operational criticality.
- Any customer or third-party system.
Authorised window: working days from 20:00 to 06:00, 2 to 20 March 2028.
Any extension of the scope requires a written addendum signed by Andres Vidal.
CLAUSE 2 - PROHIBITED TECHNIQUES
The following are prohibited without express, additional written authorisation:
a) Denial of service or performance degradation testing.
b) Social engineering against employees, customers or suppliers.
c) Physical access to premises.
d) Brute force that causes real user accounts to be locked out.
e) Modification, deletion or encryption of data.
f) Mass data extraction: access will be demonstrated using a maximum
of 3 records with pseudonymised data.
CLAUSE 3 - STOP RULE AND COMMUNICATION OF CRITICALS
The provider will stop all activity and contact Laura Mendez (+34 6XX XXX XXX)
and Andres Vidal (+34 6XX XXX XXX) BY TELEPHONE within a maximum of
15 minutes if:
a) It detects signs of a prior compromise unrelated to the test.
b) A degradation of service attributable to the test occurs.
c) It inadvertently accesses a system outside the scope.
d) It obtains access to special categories of data or to financial data.
Any finding of CRITICAL severity will be communicated within a maximum of
4 hours of its discovery, without waiting for the final report.
Rutalia may suspend the test at any time, with no penalty.d) With a well-drafted agreement, condition c) of the stop rule is triggered: the team stops activity immediately, explores no further, calls within 15 minutes, documents exactly what was reached and when, and retains no information obtained from that system. Rutalia informs the ERP vendor, and they jointly decide whether it makes sense to extend the scope with the vendor's express authorisation or simply to close the matter with it documented.
Without that agreement, the situation is bad for everybody:
- The testing team has accessed a third party's system without authorisation. That is article 197 bis, even if it was accidental and even though they had Rutalia's authorisation: Rutalia cannot authorise access to systems that are not its own.
- Rutalia has a contractual and potentially criminal problem. It has enabled, even if only through negligence in defining the scope, a third party's access to its supplier's systems. Article 197 bis also punishes whoever "enables another person to access".
- It is a security incident for the ERP vendor, who may legitimately treat it as one, cut the mTLS link and demand explanations.
- And there is an uncomfortable underlying reading: the fact that the testing team could reach the vendor through the mTLS channel demonstrates that hypothesis H5 is exploitable in the opposite direction. It is, paradoxically, a valuable finding, but obtained in a way nobody can use.
The moral: the agreement is not bureaucracy, it is what turns this situation into a fifteen-minute piece of admin instead of a legal problem between three companies.
Solution 2
a) The real order of priority:
1st - B (the browser on the 140 workstations). It does not have the highest CVSS, but it is the only one in the KEV catalogue — confirmed real-world exploitation — and with an EPSS of 0.89: almost nine chances in ten of being exploited within 30 days. It affects 140 machines, the vector is the user browsing (nothing more is required) and it matches exactly the entry route of the canonical scenario. Real exploitation + an enormous surface + a passive vector.
2nd - D (information disclosure in nginx). A CVSS of only 5.3, but it is the only finding reachable from the internet, on the server hosting asset A001 with the customer portfolio behind it. Information disclosure is not serious in itself, but it makes exploiting anything else easier and it is the first rung of a chain. On top of that, fixing it takes minutes: server_tokens off. Almost zero cost and it removes the only unresolved point of contact with the internet.
3rd - F (default credentials on 19 printers). It has no CVE and no EPSS, which is why most automated processes ignore it. See part d): it is a finding with trivial exploitation — you just have to know the factory password — it affects 19 devices and on an office network it gives access to scanned documents, to the LDAP address book and, on many models, to the credentials of the domain account configured for scan-to-folder.
4th - A (remote execution in fs01's print service). CVSS 9.8, which is alarming, but: internal exposure (VLAN 20, only reachable from the authorised VLANs after the segmentation of 03-04), an EPSS of 0.02 and it is not in KEV. It is still a priority — fs01 hosts \\fs01\comun — and it must be fixed within the deadline, but the segmentation has turned a 9.8 into something you can plan. It is the proof that the work of module 3 was worth something.
5th - C (local escalation on srv-db01). CVSS 7.8, EPSS 0.01, and it requires the attacker to already have access to the machine. It is an aggravating factor of a compromise, not an entry route. Important because srv-db01 hosts A005, but not urgent.
6th - E (the IoT probes' firmware). CVSS 9.1, the second highest on the list, and yet it comes last: VLAN 60 has no internet egress and no access to any other VLAN except the collector on its specific port. The real exposure is minimal. It is the textbook case of a vulnerability whose score does not reflect its risk.
The summary of the exercise: ordering by CVSS would have given A -> E -> B -> C -> F -> D. The correct order is practically the reverse at both ends.
b) Deadlines according to section 18:
| Id | Applicable criticality | Deadline |
|---|---|---|
| B | CRITICAL (in KEV) - workstations | 7 days; with the emergency clause on an EPSS of 0.89, 48 h |
| D | MEDIUM (5.3) - internet-facing | 30 days, but fixed this week: it costs one line |
| F | HIGH (7.5) - internal | 15 days |
| A | CRITICAL (9.8) - internal | 7 days |
| C | HIGH (7.8) - internal | 15 days |
| E | CRITICAL (9.1) - internal and isolated | 7 days -> no patch: an exception |
c) The exception for E:
EXCEPTION EXC-2028-003
Finding: HAL-2028-019 - Vulnerability in the firmware of the
14 IoT temperature probes
Asset: A006 (RTO 30 min / RPO 5 min)
Criticality: CRITICAL (CVSS 9.1) - Not in KEV - EPSS 0.04
Deadline missed: 7 days (due 2028-02-11)
Reason: The vendor has not released a fix and has not
committed to a date. The devices do not support
firmware updates by the customer. Replacing the 14
units means EUR 8,400 that is not budgeted and a
10-week delivery time.
Residual risk: Code execution on the probes by an attacker with access
to VLAN 60. Impact: loss of temperature monitoring in
the cold chain and a possible foothold for lateral
movement.
Compensating mitigation:
- VLAN 60 isolated: no internet egress and no access to
any other VLAN except the collector (10.10.20.x) on
its specific port (03-04).
- Client isolation enabled on Rutalia-IoT (03-05):
the probes cannot talk to each other.
- VLAN 60 traffic monitored by sec-sensor01.
- Temperature logging duplicated in the ERP as an
operational backup control.
- Monthly check of the vendor's advisories.
Owner: Laura Mendez
Approved by: Andres Vidal (senior management)
Date: 2028-02-12
Review: 2028-05-12 (90 days), or immediately if the vendor
releases a fix or if known exploitation appears.
Exit plan: Replacement with a supported model included in the
2029 budget; bring forward if the risk changes.d) F has no CVE because it is not a software flaw: it is a configuration flaw, and vulnerability catalogues only record product defects. That makes it invisible to automated prioritisation, and precisely for that reason it is more dangerous than it looks.
How it is assessed, in the absence of a vendor CVSS, by building the vector by hand:
- Exploitation complexity: minimal. The default passwords for each model are published in the vendor's manual, available on the internet. No tool and no knowledge are required.
- Privileges required: none, beyond being on the network.
- User interaction: none.
- Real impact at Rutalia, which is what decides it:
- Access to the scanned documents stored on the printer's disk (contracts, payslips, signed delivery notes, identity documents).
- Access to the address book, which is usually integrated with LDAP.
- The credentials of the domain account configured for scan-to-folder, which many models store recoverably and which often has write permission on
\\fs01\comun. - A persistent foothold in VLAN 40: a device nobody patches, nobody watches and nobody ever reinstalls.
- The possibility of sending email impersonating the organisation through the scan-to-email function.
A reasoned assessment: HIGH (equivalent to CVSS ~7.5), and with a decisive additional argument: the fix is free and takes an afternoon. A finding with trivial exploitation, high impact and a free fix must rise up the list even with no CVE.
And a strategic note: these 19 printers are a perfect example of why the discovery of section 12 matters. They are on the network, they have an IP address, they run a web server and they appear in no "systems" inventory.
e) The explanation for the director, in three sentences with no jargon:
"Flaw A is more serious in theory, but it is on an internal server that can only be reached from inside the network, and there is no evidence that anybody in the world is taking advantage of it. Flaw B is slightly less serious on paper, but it is being used right now in real attacks, it affects all 140 of the company's computers, and all it takes is for somebody to visit a web page for it to get in. We fix first what somebody is using today against companies like ours, and afterwards what would only be dangerous if they had already got in."
Solution 3
a) The year's calendar with €14,000:
| Month | Action | Cost | Justification |
|---|---|---|---|
| Jan-Feb | Preparatory in-house work (part b) | €0 | Do not pay to find the obvious |
| March | External pentest + web application (grey box), with re-verification included | €8,500 | What is internet-facing and asset A001, which is where hypothesis H4 lives |
| April-May | Remediation of the findings | €0 (in-house) | This is where the real value is |
| June | Re-verification | Included in March | It demonstrates the return and closes the cycle |
| July | A simulated phishing campaign + training | €2,000 | The vector of the canonical scenario; it is training as much as a test |
| September | An internal pentest validating the segmentation | €3,000 | With the VLANs consolidated since January, it measures whether they hold |
| November | Our own internal scan + a cloud review | €0 | It closes the year with our own data |
| December | Annual report and 2029 planning | €0 | The basis of the next budget |
| Reserve | €500 | For the unforeseen | |
| Total | €14,000 |
b) Before commissioning anything, six weeks of free, in-house work:
- Complete the verification of MiRutalia's fifteen findings. It would be absurd to pay €8,500 for a consultant to discover the same flaws we already know about and believe we have fixed. On top of that, our own verification will probably find incomplete fixes, like the IDOR one applied on the web and not on the API.
- Run a complete authenticated scan with Greenbone across the 152 systems and fix everything High and Critical. Every trivial finding that appears in the paid report is wasted money.
- Close out the cloud checklist of 04-04: the ten points in red.
- Update the inventory: resolve the 151 uninventoried machines. Without an inventory, the scope of the test is badly defined.
- Publish
security.txtand the disclosure policy. - Prepare MiRutalia's test environment with anonymised data and the two customer accounts the team will need.
The general criterion: you pay for the work only an experienced person can do, not for what a free tool finds on its own.
c) Why not a red team exercise this year, with four arguments:
- It measures detection and response, and Rutalia has only just built them. The EDR has been running for six months and Suricata barely longer. The result is predictable: they would find gaps we already know exist. Paying €40,000 to confirm what is already in the plan is not an investment.
- Budget-wise it is impossible: the range starts at €30,000, more than double the entire annual budget.
- The right order is different. First you fix the known vulnerabilities; then you check there are no others; and only then does it make sense to ask whether you would detect a stealthy adversary. A red team against an organisation with open critical findings walks in through the front door and proves nothing we did not already know.
- There is a much cheaper and almost equally informative alternative: ask the March pentest team not to announce when they start the scanning phase, and check whether Suricata and the EDR generate alerts and whether anybody triages them. It is question 6 of section 22, it costs nothing and it gives a first measure of the detection capability.
When it would make sense: in 2029 or 2030, once there is a year of stable EDR operation, a mature vulnerability management process with metrics, and the team (or the MDR) has demonstrated triage and response capability.
d) Three objective selection criteria:
- A declared, verifiable methodology: that they state which framework they follow (PTES, OWASP WSTG) and that they deliver the list of checks performed, not just the findings. It lets you know what was looked for and not found.
- The named CVs of the assigned team and an anonymised sample report. You are hiring people, not a logo. The sample report reveals in five minutes whether the work is manual or a typeset tool: look for business logic and access control findings, which no tool produces.
- Re-verification included in the price, and evidenced professional indemnity insurance with its amount. Both things separate a professional provider from one who improvises.
Additional useful criteria: references from customers of a similar size, the team's certifications, and a willingness to sign the agreement from exercise 1 without haggling over the scope and stop clauses.
Three questions at the presentation meeting:
- "What did you not manage to do, and which control stopped you?" It is the question that measures what does work, and it never appears in the report. If the answer is "the segmentation stopped me reaching the server VLAN from the office", the work of module 3 has just been validated.
- "If you had a week and we could only fix three things, which ones and in what order?" It forces genuine prioritisation, beyond the report's criticality table, and it makes use of the professional judgement you have paid for.
- "Did we detect any of what you did? At what point should we have seen it?" It measures detection capability without paying for a red team, and it produces concrete rules for Suricata and the EDR.
e) How to measure the return on 31 December 2028. What does not work: the number of vulnerabilities found. A pentest that finds many may indicate an insecure organisation or an inflated report; one that finds few may indicate good prior work or a weak provider.
What does measure the return:
| Metric | Target | Why it measures value |
|---|---|---|
| Critical and high findings closed and verified | 100% | The only thing that genuinely reduces risk |
| Mean time to remediate criticals | < 48 h | It measures the organisation's ability to react |
| Findings reopened at re-verification | < 10% | It measures whether the fixes were real |
| Pentest findings the internal scan had already detected | The more the better | If the consultant only finds what we already knew, the internal process works and next year you can commission something more ambitious |
| Logic or access control findings (not automatable) | > 3 | Proof that you bought manual work and not a scan |
| Click rate and, above all, report rate in the phishing exercise | Clicks < 10%, reports > 40% | The second matters more: it measures whether people speak up |
| Alerts generated by the pentest's activity | > 0, and rising between March and September | It measures detection capability |
| Open exceptions and their age | All with an owner, a date and a review on schedule | It measures whether residual risk is governed |
And the qualitative metric Laura will take to the January 2029 committee, which is the one that really convinces:
"In March, an external team reached the data of 17 other customers in under four hours starting from a normal account. In September, after the fixes, the same team could not get out of the office network or reach any data that did not belong to their account, and our probes detected their activity within the first twenty minutes."
That is not a metric: it is a demonstration. And it is exactly the kind of sentence that secures next year's budget.
Conclusion
You have closed the circle. You know that applying a control and knowing that it works are different things, and that the only honest way to cross that distance is to actively look for your own flaws before somebody else does.
You can distinguish the six types of test and what each one answers: that a vulnerability scan is not a pentest, that the value of a pentest lies in the manual work no tool can do — because no tool knows which shipments cliente412 should see —, that a red team exercise measures the security team and not the systems, and that a compliance audit measures conformity, not security.
You know the Spanish legal framework with its specific articles: 197 bis, where authorisation is literally the only thing that separates professional work from a criminal offence, with no need for damage or financial gain; 197 ter, where what turns a tool into an offence is the use and not the tool; and 264 and the following, where an unauthorised denial of service test fits. You know how to draft the agreement that makes the work lawful — scope included and excluded, windows, prohibited techniques, personal data, confidentiality, custody and destruction, insurance, emergency contact, the stop rule and the communication of criticals —, who can sign it and why it cannot be the systems administrator. And you know that Rutalia cannot authorise testing on systems that are not its own: neither the cloud ones beyond its own configuration, nor the ERP vendor's.
You have mastered the methodologies and the seven phases, with the two most underestimated: a passive reconnaissance that touches no system and finds forgotten subdomains in the certificate logs, and a re-verification that almost nobody commissions and that is the only thing that demonstrates value. You know why black box is almost always the worst investment and why a web application test needs credentials for two different customers.
You have vulnerability management as a continuous process, which is what Rutalia really lacked: weekly discovery that detects what is new and what has vanished and answers the question of the 151 machines; authenticated scanning, with a read-only account restricted by source IP, because the false negatives of an unauthenticated scan are enormous; and a prioritisation that combines CVSS with the KEV catalogue, EPSS, the real exposure and the criticality of the asset, because ordering by score systematically gives the wrong order. You know how to read a CVSS vector and understand that two nines can be completely different things.
You know how to read a scan report with judgement — checking first whether it was authenticated, distinguishing a remote execution from a local escalation, and spotting the regression of a finding you thought was fixed —, and you know how to read a pentest report without stopping at the executive summary, with the six questions for the presentation meeting, including the one nobody asks: what they did not manage to do and which control stopped them.
You have written, enforceable remediation deadlines, with an emergency clause and with the clock starting at discovery; a verification that reproduces the original attack instead of believing the email from whoever fixed it; documented exceptions with residual risk, compensating mitigation, an owner, senior management approval and a review date; and metrics that measure coverage, time to remediate and overdue criticals, rejecting the ones that reward not looking.
You have seen a real report with six findings on MiRutalia, turned into a plan with owners, deadlines and a verification method, where the most valuable part was not the flaw but the observation of the pattern: a fix applied view by view instead of through a cross-cutting control always leaves a route uncovered. You have a vulnerability record template with the two fields that make the difference, a security.txt and a disclosure policy that stop a finding ending up on a social network, and a legal, free lab with its five rules, where you can exploit MiRutalia's vulnerable code yourself and check that the fixes work.
With this, Module 4 closes. You started with a segmented network but with machines that gave the game away on the first move, and you end with the endpoints genuinely protected: operating systems hardened against a written baseline, with local administrator removed and macros blocked (04-01); endpoints with a real defence against modern malware, where you know how to read a process tree and translate it into ATT&CK techniques (04-02); a web application with its fifteen findings fixed and hypothesis H4 finally taken apart (04-03); a cloud where the bucket is no longer public, the access key can read nothing and the audit log covers every region (04-04); and, here, the ability to check that all of the above really works, again and again, instead of assuming it.
In four modules, Rutalia has gone from a flat network with a free antivirus to an organisation with architecture, controls, visibility and a process for improving. The path is protected, the endpoints are protected, the application is closed, the cloud is under control and there is a way of knowing when something breaks.
And even so, one day the phone will ring on a Sunday morning.
Because that is the one certainty in this profession: no defence is perfect. The patch that arrived late, the exception nobody reviewed, the supplier who was compromised, the employee who typed their password into a convincing page at seven on a Friday evening, the vulnerability nobody knew about when the last pentest was done. Everything built so far reduces the likelihood and limits the damage; none of it reduces the likelihood to zero. The work of the previous four modules is not about preventing an incident from happening: it is about making sure that, when it does, it is a bad day rather than the end of the company.
Module 5 is about that day. You will start with Planning and Preparation, because everything that decides the outcome of an incident is prepared before it happens: who is in charge when the phone rings, who gets called, what is said and what is not, where the phone numbers are if the network is encrypted, and which decisions cannot be taken for the first time at three in the morning. Then will come the detection and analysis that turn an alert into a confirmed fact, the containment and recovery that bring operations back, the lessons learned that stop the same incident happening twice, and the backups and business continuity that are, in the end, the only thing separating a crisis from a catastrophe.
You already know how to defend, and now you know how to check whether your defence holds. It is time to learn how to respond when it does not.
