Back to homeDigital Culture · High School Year 3 · Physics-Math · Change subject
Start for free
Prep 3 Tech · Digital Culture
Computer systems · Emerging technologies

Cybersecurity and Distributed Databases

Before you start, make sure you know: Scams and attacks on people (High School Year 1 (semesters 1 and 2))
Before you start, make sure you know: Viruses and malicious programs (High School Year 1 (semesters 1 and 2))

Ximena gets a text message: "Your package is being held at customs. Pay a $\$38$ release fee here." She was just expecting an order and is about to tap the link. What warning signs should she notice? And what would happen to her data if the scam works? On this page you will see how people and systems are attacked, and how to defend yourself with several layers. At the end, as an extension, you will see what new problems appear when a platform spreads its data across many computers, and how a control system is analyzed.

Common threats

Any system with valuable data (your bank account, your high school's grading system, the online store of a neighborhood business) is a target. These are the threats you will see most often.

Phishing process: a fake urgent email arrives, the person clicks the link and hands over their credentials, and the account is compromised. “urgent” email impersonates the bank click on the link stolen credentials account compromised

Of the five threats in the definition, the ones that mainly attack the human factor are social engineering and phishing, its most common form, because they need someone to fall for the trick. Ransomware also often gets in this way, but its damage is technical.

Practice★☆☆Not started
Define each of these common threats in one sentence: phishing, ransomware, denial-of-service (DoS) attack, and data breach. State which one primarily targets the human…

Define each of these common threats in one sentence: phishing, ransomware, denial-of-service (DoS) attack, and data breach. State which one primarily targets the human factor.

Solve
Practice★★☆Not started
You receive an email that appears to be from your bank: it urgently asks you to 'verify your account' via a link. Detail at least four red flags that would betray a…

You receive an email that appears to be from your bank: it urgently asks you to 'verify your account' via a link. Detail at least four red flags that would betray a phishing attempt (sender, actual link, urgency, spelling errors, attachments) and what you should do step by step.

Solve

Social engineering: texts, calls, and pretexts

Phishing has cousins depending on the channel it uses:

Attack Channel Typical pretexts in Mexico
Phishing Email "Verify your account," fake invoice, prize
Smishing SMS or messaging "Package held," "unexpected deposit in your account," fine
Vishing Voice call "This is the bank, we detected suspicious charges," "urgent tech support"

All of them use the same recipe: urgency + authority + fear or a prize. That is why the same rule neutralizes them: never act from the link or phone number they give you; hang up and contact the institution yourself through its official channel (the number on your card or on its website). A real bank never asks for your PIN, your security code, or a verification code over the phone.

Practice★★☆Not started
Compare phishing (email), smishing (SMS), and vishing (voice call): what channel each one uses, what typical pretext they employ (held parcel, unexpected payment, urgent…

Compare phishing (email), smishing (SMS), and vishing (voice call): what channel each one uses, what typical pretext they employ (held parcel, unexpected payment, urgent technical support), and what common behavioural rule neutralises all three.

Solve
Practice★★☆Not started
A 'maintenance technician' calls reception saying they need the management Wi-Fi password to repair the printer. Explain what pretexting (social engineering) is, what…

A 'maintenance technician' calls reception saying they need the management Wi-Fi password to repair the printer. Explain what pretexting (social engineering) is, what red flags betray the call, and what verification protocol should be in place (never share credentials over the phone, verify identity through an official channel).

Solve

Ransomware: the attack chain

Ransomware doesn't come out of nowhere: it follows a chain of links. If you cut one, the attack stops.

Chain of a ransomware attack with four links: entry, execution, encryption, and ransom note, and below it the measure that cuts each one. 1. Entry 2. Execution 3. Encryption 4. Ransom training,email filter antivirus,patches segmented network,minimum permissions backupoffline
  1. Entry: an email with an attachment or an exposed remote access point with a weak password. Cut: phishing training, email filter, close remote access or protect it with two-factor authentication.

  2. Execution: someone opens the file and the program runs. Cut: updated antivirus or EDR, a patched system, not using administrator accounts day to day.

  3. Encryption: the program encrypts local and network files. Cut: segment the network and give minimum permissions so the damage doesn't spread.

  4. Ransom note: demands a payment, often in cryptocurrency. Cut: an offline backup lets you restore without paying.

Practice★★☆Not started
Describe the typical chain of a ransomware attack: initial access (email with attachment or exposed remote access), execution and file encryption, ransom note. Identify…

Describe the typical chain of a ransomware attack: initial access (email with attachment or exposed remote access), execution and file encryption, ransom note. Identify at which links the chain can be broken and with what specific measure at each one.

Solve

Passwords and authentication factors

A password is stronger the longer and more unpredictable it is. A phrase like "my-dog-eats-tacos-al-pastor" is harder to guess than "P@ssw0rd1" and easier to remember. But nobody can remember a different long password for every service. That is what a password manager is for.

Its risk is that it concentrates everything in the master password. This is mitigated by making it a long, unique phrase, turning on two-factor authentication in the manager itself, and keeping an offline recovery copy.

Authentication factors

Factor Examples
Something you know Password, PIN
Something you have Phone with an authenticator app, card, physical key
Something you are Fingerprint, face

Two-factor authentication (2FA) combines factors of different types. A password and a PIN are both "something you know": whoever steals them with a single trick has both, so it is not real two-factor authentication.

The SMS code is the weakest second factor because of SIM swapping: a criminal convinces the phone company to move your number to another chip and receives your codes. Even so, it is much better than nothing. If you can, prefer an authenticator app or a physical key.

Practice★☆☆Not started
Explain what a password manager does and why it allows using a long, distinct password for each service. What risk does it concentrate (the master password) and how is…

Explain what a password manager does and why it allows using a long, distinct password for each service. What risk does it concentrate (the master password) and how is it mitigated?

Solve
Practice★★☆Not started
Compare authentication factors: something you know (password), something you have (phone, card), and something you are (fingerprint). Explain why two factors of the same…

Compare authentication factors: something you know (password), something you have (phone, card), and something you are (fingerprint). Explain why two factors of the same type do not constitute true multi-factor authentication and why SMS codes are the weakest second factor (SIM swapping), yet still better than nothing.

Solve

Security policies that actually work

A security rule that people can't follow gets broken. A good policy is judged by its real effect, not by how strict it sounds.

Reasoned rules for a high school's password policy:

  • Minimum length before forced complexity. Requiring "one capital letter and one symbol" produces "Password1!". A long passphrase resists much more and is easier to remember.

  • Expiration only when a leak is suspected. If people are forced to change it every month, they make "Key01," "Key02"... and it gets worse.

  • Password managers allowed and recommended, so passwords aren't repeated.

  • Mandatory two-factor authentication on the school email, because the email is used to reset the other accounts.

  • Secure account recovery: verify identity through a trustworthy channel, never with questions that are easy to find out on social media.

Practice★★★Not started
A banking institution implements a strict security measure: for any action in its mobile application (including simply checking the balance), the customer must enter a…

A banking institution implements a strict security measure: for any action in its mobile application (including simply checking the balance), the customer must enter a 16-character password, pass facial recognition, and type a code sent via SMS. Three months later, customer cancellations increase by 28% and incidents due to locked accounts skyrocket, while it is also detected that many users store their passwords in unencrypted notes on their phones. Analyze why this policy has caused a paradoxical degradation of security and design a risk-based adaptive authentication strategy. Justify which authentication factors (something you know, have, or are) you would require in three different cases: checking routine transactions, issuing an international transfer of 5,000 pesos from a new device, and changing the phone number associated with the account.

Solve
Practice★★★Not started
Design a password policy for a high school: minimum length vs forced complexity (and why long passphrases win), reasoned expiration (why very short expiration periods…

Design a password policy for a high school: minimum length vs forced complexity (and why long passphrases win), reasoned expiration (why very short expiration periods degrade password security), permitted password managers, mandatory two-factor authentication for email, and account recovery. Justify each rule based on its actual impact on security.

Solve

Encryption, public networks, and VPNs

There are two different situations:

  • At rest: stored data (phone disk, database, backups). It protects you if the device or server is stolen, but not what travels over the network.

  • In transit: data traveling over the network, as with HTTPS. It protects against anyone who intercepts the traffic, but not the data already stored on the server.

To be protected in both cases, you need both.

Public WiFi and VPNs

On an open network (café, shopping mall, airport) there are two risks: interception of unencrypted traffic, and a fake access point with a similar name ("Cafe_Gratis" versus "Cafe_Gratis_2") that lets the attacker see or alter what you do.

A VPN creates an encrypted tunnel between your device and a VPN server, so anyone watching the café's network only sees unreadable traffic.

Practice★☆☆Not started
Explain the basic concept of encryption: transforming readable data into unreadable data without the key. Distinguish between encrypting stored data (at rest) and…

Explain the basic concept of encryption: transforming readable data into unreadable data without the key. Distinguish between encrypting stored data (at rest) and encrypting communication (in transit, as HTTPS does), and explain what each one protects.

Solve
Practice★★☆Not started
Explain the risks of open public Wi-Fi networks (interception, rogue access point with a similar name) and how a VPN mitigates them (encrypted tunnel to the VPN server).…

Explain the risks of open public Wi-Fi networks (interception, rogue access point with a similar name) and how a VPN mitigates them (encrypted tunnel to the VPN server). What does a VPN not protect against (an infected device itself, phishing)?

Solve

Patches and firewalls

Security updates fix already-known vulnerabilities (flaws in software). A zero-day vulnerability is a flaw that attackers exploit before the manufacturer has a patch.

The time between the release of the patch and its installation is critical: once the patch is released, the flaw becomes public and attackers use it against anyone who hasn't updated. For a school, the recommendations are: automatic updates on student and staff computers, a weekly window for servers with testing beforehand, immediate priority for critical patches, and removing or isolating computers with systems that no longer receive support.

The router's firewall protects the whole local network; the device's firewall protects each computer (even if it is on another network or there is already an intruder inside the local one). They complement each other. Leaving "everything open for convenience" is the same as having no firewall: the rules are what make it useful.

Practice★☆☆Not started
Security updates patch known vulnerabilities. Explain what a 'zero-day' vulnerability is, why the time between patch release and installation is critical, and what…

Security updates patch known vulnerabilities. Explain what a 'zero-day' vulnerability is, why the time between patch release and installation is critical, and what update policy you would recommend for a high school.

Solve
Practice★☆☆Not started
Explain what a firewall does: what rules it applies to incoming and outgoing traffic, the difference between a router firewall and a host firewall, and why 'everything…

Explain what a firewall does: what rules it applies to incoming and outgoing traffic, the difference between a router firewall and a host firewall, and why 'everything open for convenience' defeats its purpose.

Solve

Backups and defense in depth

A copy on an external drive that is always connected does not protect against ransomware: the program also encrypts connected drives, and the backup falls along with the original.

Defense in depth: nested layers, from the outside in: firewall, two-factor authentication, data encryption, and backups. firewall two-factor encryption backup copies
Practice★☆☆Not started
Explain the '3-2-1' backup rule: how many copies, on how many different types of media, and where at least one of them must be located. Why does a backup on the same…

Explain the '3-2-1' backup rule: how many copies, on how many different types of media, and where at least one of them must be located. Why does a backup on the same constantly connected external hard drive fail to protect against ransomware?

Solve
Practice★★☆Not started
Explain the principle of defence in depth: why a single security measure is never enough and how layers are combined (perimeter firewall, two-factor authentication, data…

Explain the principle of defence in depth: why a single security measure is never enough and how layers are combined (perimeter firewall, two-factor authentication, data encryption, backups, staff training) against a ransomware attack.

Solve

Responding to an incident

Even with prevention, someday there will be an incident. What matters is having a protocol: identify, contain, eradicate, recover, and learn.

Data breaches

If an attacker extracts a database with names, addresses, CURPs (national ID numbers), and card numbers of 25,000 customers, hiding it is not an option: it is counterproductive legally and technically. In Mexico, the Federal Law on Protection of Personal Data Held by Private Parties requires informing the data subjects, without delay, when a breach significantly affects their property or moral rights (always check the current version of the law and which authority enforces it). Fixing the technical flaw does not erase the fact that the data already got out.

From a security standpoint, you have to notify so the affected people can block cards, change passwords, and watch for fraud. Staying silent leaves customers exposed and increases the reputational damage when it becomes known.

Practice★★★Not started
A regional hospital suffers a ransomware cyberattack on a Friday afternoon: operating room monitors lose communication with the central servers, and digital medical…

A regional hospital suffers a ransomware cyberattack on a Friday afternoon: operating room monitors lose communication with the central servers, and digital medical records appear encrypted with a ransom note demanding 2.5 BTC within 48 hours. The medical director proposes paying the ransom immediately "to save lives", while the head of maintenance suggests abruptly cutting off the electrical power to the server room. Critically evaluate both proposals, justifying their technical, ethical, and forensic risks. Next, design the containment, continuity of care, and recovery protocol that the technical team must execute, prioritizing patient safety and ensuring a complete restoration without reinfection.

Solve
Practice★★★Not started
The support department of an e-commerce company discovers on a Monday at 08:00 that, due to a security breach in its web gateway, an attacker has exfiltrated a database…

The support department of an e-commerce company discovers on a Monday at 08:00 that, due to a security breach in its web gateway, an attacker has exfiltrated a database containing names, home addresses, national ID numbers (DNI), and credit card numbers belonging to 25,000 customers. The commercial director proposes not to disclose the leak publicly in order to prevent a reputation crisis and the financial losses resulting from customer churn, arguing that the technical flaw has already been resolved by 11:00. Assess the director's proposal from both a legal and security perspective: determine the mandatory and non-extendable deadlines established by the GDPR regarding the supervisory authority and the affected individuals, classify the risk level to the users' rights, and predict the sanctions and legal liabilities the company faces if it deliberately conceals the incident.

Solve
Practice★★★Not started
A local e-commerce business with five employees stores personal and banking data of 12,000 customers on an unsegmented local server connected to the internet. During an…

A local e-commerce business with five employees stores personal and banking data of 12,000 customers on an unsegmented local server connected to the internet. During an audit, the following problems are recorded over the past year: two temporary connection losses during sales campaigns (estimated losses of 800 pesos per hour), daily automated SQL injection attempts on the database, administration credentials shared in a spreadsheet accessible to the entire staff, and an absence of offline backups disconnected from the network. Develop a semi-quantitative risk management matrix: assign a justified likelihood score (1 to 5) and impact score (1 to 5) to each of these threats, calculate the resulting inherent risk, and design the priority technical and organizational measures to address the two most critical risks with a limited budget of 2.500. pesos

Solve

Distributed databases and replication

A service that can't go down (the bank, a store during Buen Fin sales) spreads its data across several computers.

Distributed database: users send requests to a load balancer, which distributes them between nodes 1 and 3, with an active copy, and sends no traffic to node 2, which is down. users load balancer node 1 (copy) node 2 (down) ? node 3 (copy)

Advantages compared with a centralized database: availability (if one node goes down, others serve requests) and scalability (nodes are added when demand grows). The complication is consistency: while a node is down or disconnected, its data may become outdated, and it must be synchronized when it is recovered.

In the figure, node 2 is down. The service continues with nodes 1 and 3, and the user doesn't notice. When it comes back, node 2 must catch up on the changes it missed before receiving traffic, and that is how fault tolerance is taken advantage of.

Practice★☆☆Not started
Explain what a distributed database is and give two advantages compared to a centralised database (availability, scalability) and one complication it introduces…

Explain what a distributed database is and give two advantages compared to a centralised database (availability, scalability) and one complication it introduces (consistency between copies).

Solve
Practice★☆☆Not started
The figure shows a service with its data replicated across three nodes; one of them has failed and is marked with a question mark. Explain what happens to the service…

The figure shows a service with its data replicated across three nodes; one of them has failed and is marked with a question mark. Explain what happens to the service while the node is down, what the system must do upon recovering it, and what property of distributed systems is being taken advantage of.

users load balancer node 1: data copy active node 2: data copy ? node 3: data copy active
Solve
Practice★★☆Not started
Explain what data replication is and how it differs from a backup: what problem each one solves (hot failover vs loss or corruption of data) and why a reliable service…

Explain what data replication is and how it differs from a backup: what problem each one solves (hot failover vs loss or corruption of data) and why a reliable service needs both.

Solve

The CAP theorem and eventual consistency

CAP theorem triangle with the vertices consistency, availability, and partition tolerance: with the network cut, you must choose between consistency and availability. consistency (C) availability (A) partition tolerance (P) with the network cut, choose consistency or availability

Since network outages are unavoidable, in practice you choose between:

  • CP (consistency): the system rejects or delays operations until everything is synchronized.

  • AP (availability): each part keeps serving requests, even if they temporarily show different data. When the network returns, the copies converge: this is eventual consistency.

Practice★★★Not started
An online store replicates its database across two distant data centers. Following a network outage between them, each center continues to accept orders. Analyze the…

An online store replicates its database across two distant data centers. Following a network outage between them, each center continues to accept orders. Analyze the consistency issue that arises (the CAP theorem: consistency, availability, and partition tolerance), which option you would choose for product stock and which for customer reviews, justifying the difference.

Solve
Practice★★★Not started
A global platform combining a social network and a microtransaction gateway replicates its databases across nodes located in Europe, the Americas, and Asia. An…

A global platform combining a social network and a microtransaction gateway replicates its databases across nodes located in Europe, the Americas, and Asia. An unexpected cut in submarine communication cables temporarily isolates the European region from the rest of the continents. Apply the CAP theorem to predict the operational consequences if the system attempts to prioritize availability (AP systems) versus strict consistency (CP systems). Justify technically and economically why an eventual consistency model should be adopted for a video's view counter, whereas for users' digital wallet balances it is imperative to block unsynchronized transactions, analyzing the risk of double-spending.

Solve

Control systems: open loop and closed loop

Automatic systems govern machines and processes without direct human intervention: they regulate the temperature of a water heater, move a conveyor belt, or fill the water tank of a house. To analyze them, a block diagram is drawn: each block is a part of the system and the arrows show where the signal goes.

Block diagram of a closed loop: the reference and the sensor measurement are compared, the controller acts on the process, and the output returns through the sensor. desired value ± controller process sensor output
Practice★★★Not started
A wastewater treatment plant manages its pumps and chemical dosers using legacy programmable logic controllers (PLCs) whose operating systems no longer receive…

A wastewater treatment plant manages its pumps and chemical dosers using legacy programmable logic controllers (PLCs) whose operating systems no longer receive manufacturer patches and do not support reboots without interrupting supply. To allow technical staff to monitor alarms from home over the weekend, the company installed a 4G modem connected directly to the same switch where the PLCs and the corporate billing computers are located. Contrast the priorities of industrial cybersecurity (AIC triad: Availability, Integrity, and Confidentiality) with those of a corporate office environment, predict which critical attack vectors the current configuration introduces, and design a secure architecture based on zones and conduits segmentation (Purdue model / ISA-95), specifying the necessary protection elements to enable secure remote access without exposing the controllers to the internet.

Solve

Summary

Go back to the beginning: Ximena's text message mixes urgency, authority, and an unknown link. The right move is not to tap it and to check the package on the shipping company's official page. If she had tapped it, defense in depth (two-factor authentication, bank alerts, different passwords) would limit the damage.

See all the exercises in this section