← Voltar para a trilha Módulo 03

Infraestrutura Básica para Cibersegurança: Do Servidor à Nuvem

Cyber não acontece no vácuo, acontece em cima de uma infraestrutura. Você não defende (nem ataca em pentest autorizado) um ambiente que não entende. Este módulo constrói, peça por peça, o "prédio" onde tudo roda e mostra onde estão os pontos que importam para segurança.

Basic Infrastructure for Cybersecurity: From the Server to the Cloud

Cyber does not happen in a vacuum; it happens on top of an infrastructure. You cannot defend (or attack, in an authorized pentest) an environment you do not understand. This module builds, piece by piece, the "building" where everything runs and shows where the security-relevant points are.

1. Virtualização: a base de tudo hoje

Antigamente, cada serviço exigia um computador físico próprio (um para e-mail, outro para o site, outro para o banco). Desperdício gigantesco: a maioria usava 10% da capacidade. A virtualização transforma aquele terreno num prédio de apartamentos: uma máquina física poderosa hospeda vários computadores virtuais (VMs), cada um isolado, com seu próprio SO, "achando" que é real. Um servidor físico passa a rodar 10, 20, 50 servidores virtuais.

O hypervisor

É o software que cria e gerencia as VMs, dividindo os recursos físicos (CPU, RAM, disco, rede).

TipoOnde rodaExemplos
Tipo 1 (bare-metal)Direto sobre o hardware, sem SO por baixoVMware ESXi, Proxmox, Hyper-V, KVM
Tipo 2 (hosted)Sobre um SO já instaladoVirtualBox, VMware Workstation/Player

Tipo 1 é o padrão de datacenter e produção (rápido, sem SO consumindo recursos por baixo). Tipo 2 é o do notebook para montar laboratórios. Os três grandes players: VMware (ESXi + vCenter, líder corporativo), Proxmox VE (open source, ótimo para homelab e estudo) e Hyper-V (Microsoft, integrado ao Windows Server).

Por que isso importa para cyber

VM Escape: o "santo graal" ofensivo: sair de dentro de uma VM e comprometer o hypervisor (o host físico), controlando todas as VMs daquele host de uma vez. Raro e grave. O hypervisor é alvo prioritário: comprometer o ESXi/vCenter = acesso a dezenas de servidores. Ransomwares modernos miram o vCenter para cifrar todas as VMs simultaneamente. Isolamento é segurança: labs de malware rodam em VM isolada, com snapshots para reverter.

2. Servidores: o que são e para que servem

Um servidor é apenas um computador que fornece um serviço para outros (os "clientes"). O que o torna servidor não é o hardware, mas a função. Na prática têm hardware robusto (CPU, RAM ECC, fontes redundantes, discos em RAID) e ficam ligados 24/7. Formatos físicos: Tower (parece um PC grande), Rack (formato de gaveta, medido em "U", padrão de datacenter) e Blade (ultrafinos, alta densidade).

Papel (role)O que faz
Domain ControllerAutenticação e AD
File ServerArmazena e compartilha arquivos da rede
Web ServerHospeda sites/aplicações (Apache, Nginx, IIS)
Database ServerGuarda os dados (MySQL, PostgreSQL, SQL Server, Oracle)
Mail ServerE-mail (Exchange, Postfix)
DNS/DHCP ServerResolução de nomes e distribuição de IPs
Application ServerRoda a lógica de aplicações de negócio
Por que isso importa para cyber

Cada papel tem sua superfície de ataque e seu valor. O Domain Controller e o Database Server costumam ser os alvos finais (identidade e dados = a "joia da coroa"). Entender quais servidores existem é o primeiro passo do atacante (reconhecimento) e do defensor (saber o que proteger). Um servidor exposto desnecessariamente amplia o risco: daí a prática de hardening.

3. Armazenamento: onde os dados vivem

SiglaNomeO que é
DASDirect-Attached StorageDisco ligado direto ao servidor. Simples, rápido, mas preso a um servidor só.
NASNetwork-Attached StorageCofre de arquivos na rede (SMB/NFS). Ótimo para compartilhar entre muitos usuários.
SANStorage Area NetworkRede dedicada de alta velocidade de blocos (LUNs via Fibre Channel/iSCSI). Datacenter.
Por que isso importa para cyber

Onde os dados estão determina como protegê-los. Um NAS mal configurado (compartilhamento aberto, sem autenticação) vaza a empresa inteira: achado clássico em pentest interno. Ransomware busca justamente storage compartilhado, porque cifrar o NAS/File Server atinge o negócio todo. Controles: criptografia em repouso, controle de acesso rigoroso nos compartilhamentos e segmentação (rede de storage separada da rede de usuários).

4. RAID: redundância e desempenho de disco

Discos falham; é questão de quando, não se. RAID (Redundant Array of Independent Disks) combina vários discos para ganhar desempenho, redundância, ou ambos.

RAIDComo funcionaTolera falha?Uso
0Striping (divide os dados). Sem redundância.Nenhuma (perdeu 1, perdeu tudo)Velocidade pura
1Mirroring (cópia idêntica em 2 discos)1 discoSegurança de dados
5Striping + paridade distribuída (mín. 3)1 discoBom equilíbrio
6Como o 5, mas paridade dupla (mín. 4)2 discosMais seguro
10 (1+0)Espelha e divide (mín. 4)DependePerformance + segurança

Regra mental: só velocidade? RAID 0. Segurança simples com 2 discos? RAID 1. Bom equilíbrio custo/segurança? RAID 5 ou 6. Banco de dados exigente? RAID 10.

Por que isso importa · RAID NÃO é backup

Esse é o erro conceitual mais comum. RAID protege contra falha de hardware (um disco quebrou). Não protege contra: arquivo apagado por engano, ransomware (que cifra tudo, inclusive no RAID), corrupção lógica ou desastre físico. Se o ransomware cifra os dados, o RAID replica fielmente... os dados cifrados. RAID e backup são camadas diferentes e complementares.

5. Backup: a última linha de defesa

Se tudo der errado (ransomware, incêndio, erro humano, sabotagem), o backup traz a empresa de volta. Num incidente de ransomware, ter backup bom e testado é a diferença entre restaurar em horas ou pagar resgate.

TipoO que copiaRestauração
FullTudo, sempreRápida (é só ele)
IncrementalSó o que mudou desde o último backupLenta (full + todos os incrementais na ordem)
DiferencialSó o que mudou desde o último FULLMédia (full + o último diferencial)

Estratégia comum: full semanal + incrementais/diferenciais diários.

Regra de ouro 3-2-1:   3 cópias · 2 mídias diferentes · 1 offsite
Versão moderna 3-2-1-1-0:  + 1 cópia imutável/offline · 0 erros (testado)
Por que isso importa para cyber

Ransomware evoluiu para atacar os backups primeiro. Se o backup está na mesma rede, montado e acessível, o atacante cifra ou apaga o backup antes da produção: aí a vítima não tem para onde voltar. Conceitos-chave: backup imutável (WORM) (uma vez escrito, não pode ser alterado por um período), offline/air-gapped (desconectado, fora do alcance) e testar a restauração (backup nunca restaurado é esperança, não backup: muitas empresas descobrem na hora H que estava corrompido).

6. Snapshots: a "foto" do momento

Um snapshot captura o estado exato de uma VM (ou storage) num instante, permitindo voltar àquele ponto. É o "save game": você salva antes da fase difícil; se morrer, volta ao save.

SnapshotBackup
O que éEstado no tempo, geralmente na mesma infraestruturaCópia independente dos dados
Depende do original?Sim, se o storage morre, o snapshot morre juntoNão, é cópia separada
Uso típicoReverter uma mudança rápida (update, teste)Recuperação de desastre real
LongevidadeCurto prazoLongo prazo
Por que isso importa para cyber

Snapshots são ouro para laboratório: tira um da VM limpa, executa/analisa um malware, e reverte ao estado anterior em segundos. É a prática padrão de análise de malware. Em produção, atacantes podem apagar snapshots (assim como backups) para impedir recuperação: monitorar exclusão de snapshots é uma detecção válida. E snapshots antigos esquecidos podem conter dados sensíveis ou credenciais desatualizadas: vetor de vazamento.

7. Alta disponibilidade (HA): o serviço que não pode cair

Projetar o ambiente para que, se um componente falhar, o serviço continue funcionando, idealmente sem o usuário perceber. Um avião tem múltiplos motores: se um falha, os outros mantêm o voo. A meta é eliminar pontos únicos de falha (SPOF).

  • Redundância: duplicatas dos componentes críticos (energia, links, servidores).
  • Cluster: grupo de servidores trabalhando como um só. Se um nó falha, outro assume.
  • Failover: a redundância "assumir" automaticamente quando o principal falha.
  • Load balancing: distribuir requisições entre vários servidores (desempenho + disponibilidade).
  • Uptime / SLA: disponibilidade em "noves". "Cinco noves" = 99,999% = ~5 min de indisponibilidade por ano.
Por que isso importa para cyber

HA e segurança se cruzam na disponibilidade: o "A" da tríade CIA (Confidencialidade, Integridade, Disponibilidade). Ataques de DDoS miram exatamente a disponibilidade; balanceadores e arquiteturas resilientes ajudam a absorver. Por outro lado, HA adiciona componentes (balanceadores, nós de cluster, redes de replicação) que também precisam ser protegidos. Entender a arquitetura de HA te diz o que pode ser isolado num incidente sem derrubar o serviço.

8. Cloud: a infraestrutura de outra pessoa (que você configura)

Usar infraestrutura de um provedor (AWS, Azure, Google Cloud) pela internet, pagando pelo uso. Em vez de comprar um carro (servidor físico), você usa um aluguel sob demanda: pega quando precisa, do tamanho que precisa, escala em minutos.

ModeloO provedor entregaVocê gerenciaAnalogia (pizza)
IaaSVMs, rede, storageSO, apps, dadosCompra ingredientes e cozinha
PaaSAmbiente pronto para appsSó app e dadosPizza pré-assada, só esquenta
SaaSAplicação pronta (Gmail, Office 365)Só dados/configPizza entregue pronta

Modelos de implantação: pública (compartilhada do provedor), privada (dedicada) e híbrida (mistura, o padrão hoje).

O conceito mais importante · Responsabilidade Compartilhada

O provedor cuida da segurança DA nuvem (datacenter físico, hardware, rede base). VOCÊ cuida da segurança NA nuvem (configurações, dados, acessos, senhas). A esmagadora maioria dos vazamentos não é falha do provedor: é erro de config do cliente: bucket S3 público, permissão IAM larga demais, porta admin aberta, credencial vazada num repositório. O provedor entregou os cadeados; o cliente deixou a porta escancarada. Cloud Security gira em torno de IAM, menor privilégio, revisão de config (CSPM), criptografia e monitoramento: exatamente o mundo do Google Workspace.

9. Como um ambiente corporativo real se organiza

                    INTERNET
                       │
               [ Firewall de borda ]  ← controla tudo que entra/sai
                       │
      ┌────────────────┼──────────────────┐
   ┌──┴───┐      ┌─────┴──────┐      ┌─────┴─────┐
   │ DMZ  │      │ Firewall   │      │  VPN /    │
   │ web/ │      │ interno    │      │  Acesso   │
   │e-mail│      └─────┬──────┘      │  Remoto   │
   └──────┘   ┌────────┼────────┬──────────┐
              │        │        │          │
           Usuários Servidores Banco     Gestão
                        │        de Dados
                   Domain Controller (AD) ← autentica tudo

Domain Controller: o AD é o cartório central; o DC autentica todos e é o alvo nº 1. File Servers: documentos compartilhados via SMB/NFS, concentram dados sensíveis → alvo de ransomware. Application Servers: rodam os sistemas de negócio (ERP, intranet). Database Servers: dados estruturados (clientes, transações, credenciais), a joia da coroa, nunca acessíveis direto da internet. DMZ: a recepção do prédio: zona intermediária onde ficam os serviços expostos (site, e-mail); se comprometida, o atacante fica preso ali (há outro firewall até a rede interna). Segmentação: dividir a rede em zonas isoladas (VLANs + firewalls), defesa nº 1 contra movimento lateral. Acesso remoto: VPN, RDP (porta 3389) e jump hosts / bastion hosts (máquina intermediária fortificada por onde todo acesso admin passa, criando ponto único de controle e auditoria).

Por que isso importa · o campo de batalha

Um atacante típico: 1) entra pela borda (phishing, serviço exposto na DMZ, VPN com credencial vazada); 2) ganha um pé numa máquina (foothold); 3) faz movimento lateral buscando o AD/DC; 4) escala até Domain Admin; 5) alcança a joia da coroa (banco) e/ou dispara ransomware no File Server. Cada peça é defesa: segmentação para conter o passo 3, hardening da DMZ para o passo 1, MFA na VPN e no RDP, monitoramento no DC para o passo 4, backup imutável para sobreviver ao passo 5.

10. Segurança aplicada à infraestrutura: princípios que amarram tudo

  • Defesa em profundidade: múltiplas camadas. Firewall de borda → DMZ → firewall interno → segmentação → hardening de host → EDR. Nunca uma barreira só.
  • Menor privilégio: cada usuário, serviço e sistema só o acesso que precisa. Vale para permissões de arquivo, contas de serviço, regras de firewall, IAM na cloud.
  • Superfície de ataque mínima (Hardening): desligar o que não é usado. Serviço que não roda não pode ser explorado; porta que não está aberta não é atacável.
  • Segmentação: dividir para conter. Um incidente numa zona não vira comprometimento total.
  • Redundância e backup: assumir que algo vai falhar ou ser atacado, e ter como se recuperar.
  • Monitoramento e logs centralizados: você não defende o que não enxerga. Logs fluindo para um SIEM é o que permite detectar o ataque em andamento.
  • Tríade CIA: toda decisão de segurança busca proteger Confidencialidade, Integridade e Disponibilidade. Toda a infra existe para sustentar esses três pilares.
Resumo de bolso

Virtualização: 1 físico → muitas VMs; Tipo 1 (ESXi/Proxmox/Hyper-V) = produção, Tipo 2 = laboratório. VM escape = comprometer o host. Servidores: definidos pela função; DC e banco = alvos supremos. Armazenamento: DAS (local), NAS (arquivos na rede), SAN (blocos de datacenter). RAID: 0=velocidade, 1=espelho, 5/6=paridade, 10=misto. RAID NÃO é backup. Backup: regra 3-2-1 (+imutável +testado); ransomware ataca o backup primeiro. Snapshot: "save game", vive no mesmo storage; não é backup. HA: eliminar SPOF; cluster, failover, load balancing; protege a Disponibilidade. Cloud: IaaS/PaaS/SaaS; responsabilidade compartilhada, maioria dos vazamentos é erro de config do cliente. Ambiente real: borda → DMZ → firewall interno → segmentação → DC no centro. Princípios: defesa em profundidade, menor privilégio, hardening, monitoramento, tríade CIA.

Próximo passo prático

Instale o Proxmox (gratuito) num PC antigo ou como VM aninhada e monte seu próprio mini-datacenter: um Windows Server virando Domain Controller, um Linux de file server e uma estação Windows ingressada no domínio. Configure uma segmentação simples com VLANs. Você vai enxergar, com as próprias mãos, exatamente o diagrama da seção 9: e aí os três módulos deixam de ser teoria e viram o ambiente onde você treina cyber de verdade.

1. Virtualization: the foundation of everything today

In the past, every service required its own physical computer (one for email, another for the website, another for the database). A huge waste: most of them used 10% of their capacity. Virtualization turns that plot of land into an apartment building: one powerful physical machine hosts several virtual computers (VMs), each one isolated, with its own OS, "believing" it is real. A single physical server can now run 10, 20, 50 virtual servers.

The hypervisor

It is the software that creates and manages VMs, dividing up the physical resources (CPU, RAM, disk, network).

TypeWhere it runsExamples
Type 1 (bare-metal)Directly on the hardware, with no OS underneathVMware ESXi, Proxmox, Hyper-V, KVM
Type 2 (hosted)On top of an already installed OSVirtualBox, VMware Workstation/Player

Type 1 is the standard for datacenters and production (fast, with no OS consuming resources underneath). Type 2 is the one you run on a laptop to build labs. The three big players: VMware (ESXi + vCenter, the enterprise leader), Proxmox VE (open source, great for homelabs and study) and Hyper-V (Microsoft, integrated into Windows Server).

Why this matters for cyber

VM Escape: the offensive "holy grail": breaking out of a VM and compromising the hypervisor (the physical host), taking control of every VM on that host at once. Rare and severe. The hypervisor is a priority target: compromising ESXi/vCenter = access to dozens of servers. Modern ransomware targets vCenter to encrypt all VMs simultaneously. Isolation is security: malware labs run in an isolated VM, with snapshots to roll back.

2. Servers: what they are and what they are for

A server is simply a computer that provides a service to others (the "clients"). What makes it a server is not the hardware but its function. In practice they have robust hardware (CPU, ECC RAM, redundant power supplies, disks in RAID) and stay on 24/7. Physical form factors: Tower (looks like a large PC), Rack (drawer-shaped, measured in "U", the datacenter standard) and Blade (ultra-thin, high density).

RoleWhat it does
Domain ControllerAuthentication and AD
File ServerStores and shares files across the network
Web ServerHosts websites/applications (Apache, Nginx, IIS)
Database ServerStores the data (MySQL, PostgreSQL, SQL Server, Oracle)
Mail ServerEmail (Exchange, Postfix)
DNS/DHCP ServerName resolution and IP address assignment
Application ServerRuns the logic of business applications
Why this matters for cyber

Each role has its own attack surface and its own value. The Domain Controller and the Database Server are usually the final targets (identity and data = the "crown jewels"). Knowing which servers exist is the first step for both the attacker (reconnaissance) and the defender (knowing what to protect). A server that is exposed unnecessarily increases risk: hence the practice of hardening.

3. Storage: where the data lives

AcronymNameWhat it is
DASDirect-Attached StorageDisk connected directly to the server. Simple and fast, but tied to a single server.
NASNetwork-Attached StorageA file vault on the network (SMB/NFS). Great for sharing among many users.
SANStorage Area NetworkA dedicated high-speed block-level network (LUNs over Fibre Channel/iSCSI). Datacenter.
Why this matters for cyber

Where the data lives determines how to protect it. A misconfigured NAS (open share, no authentication) leaks the entire company: a classic internal pentest finding. Ransomware specifically hunts for shared storage, because encrypting the NAS/File Server hits the whole business. Controls: encryption at rest, strict access control on shares, and segmentation (storage network separated from the user network).

4. RAID: disk redundancy and performance

Disks fail; it is a matter of when, not if. RAID (Redundant Array of Independent Disks) combines multiple disks to gain performance, redundancy, or both.

RAIDHow it worksFault tolerant?Use
0Striping (splits the data). No redundancy.None (lose 1, lose everything)Pure speed
1Mirroring (identical copy on 2 disks)1 diskData safety
5Striping + distributed parity (min. 3)1 diskGood balance
6Like 5, but with dual parity (min. 4)2 disksSafer
10 (1+0)Mirrors and stripes (min. 4)It dependsPerformance + safety

Rule of thumb: speed only? RAID 0. Simple safety with 2 disks? RAID 1. Good cost/safety balance? RAID 5 or 6. Demanding database? RAID 10.

Why this matters · RAID is NOT backup

This is the most common conceptual mistake. RAID protects against hardware failure (a disk died). It does not protect against: files deleted by mistake, ransomware (which encrypts everything, including what is on the RAID), logical corruption or physical disaster. If ransomware encrypts the data, RAID faithfully replicates... the encrypted data. RAID and backup are different, complementary layers.

5. Backup: the last line of defense

If everything goes wrong (ransomware, fire, human error, sabotage), backup brings the company back. In a ransomware incident, having a good, tested backup is the difference between restoring in hours and paying the ransom.

TypeWhat it copiesRestore
FullEverything, every timeFast (just that one)
IncrementalOnly what changed since the last backupSlow (full + every incremental, in order)
DifferentialOnly what changed since the last FULLMedium (full + the latest differential)

Common strategy: weekly full + daily incrementals/differentials.

Golden rule 3-2-1:   3 copies · 2 different media · 1 offsite
Modern version 3-2-1-1-0:  + 1 immutable/offline copy · 0 errors (tested)
Why this matters for cyber

Ransomware has evolved to attack backups first. If the backup sits on the same network, mounted and accessible, the attacker encrypts or deletes it before hitting production: then the victim has nothing to fall back on. Key concepts: immutable backup (WORM) (once written, it cannot be modified for a set period), offline/air-gapped (disconnected, out of reach) and restore testing (a backup that has never been restored is hope, not a backup: many companies discover at the critical moment that it was corrupted).

6. Snapshots: a "picture" of the moment

A snapshot captures the exact state of a VM (or storage volume) at a point in time, allowing you to go back to that point. It is the "save game": you save before the hard level; if you die, you go back to the save.

SnapshotBackup
What it isPoint-in-time state, usually on the same infrastructureIndependent copy of the data
Depends on the original?Yes, if the storage dies, the snapshot dies with itNo, it is a separate copy
Typical useRolling back a quick change (update, test)Real disaster recovery
RetentionShort termLong term
Why this matters for cyber

Snapshots are gold for a lab: take one of the clean VM, run/analyze a malware sample, and revert to the previous state in seconds. It is standard practice in malware analysis. In production, attackers may delete snapshots (just like backups) to prevent recovery: monitoring snapshot deletion is a valid detection. And forgotten old snapshots may contain sensitive data or outdated credentials: a data leak vector.

7. High availability (HA): the service that cannot go down

Designing the environment so that, if a component fails, the service keeps running, ideally without the user noticing. An airplane has multiple engines: if one fails, the others keep it flying. The goal is to eliminate single points of failure (SPOF).

  • Redundancy: duplicates of critical components (power, links, servers).
  • Cluster: a group of servers working as one. If one node fails, another takes over.
  • Failover: the redundant component automatically "taking over" when the primary fails.
  • Load balancing: distributing requests across several servers (performance + availability).
  • Uptime / SLA: availability measured in "nines". "Five nines" = 99.999% = ~5 min of downtime per year.
Why this matters for cyber

HA and security intersect at availability: the "A" in the CIA triad (Confidentiality, Integrity, Availability). DDoS attacks target availability specifically; load balancers and resilient architectures help absorb them. On the other hand, HA adds components (load balancers, cluster nodes, replication networks) that also need to be protected. Understanding the HA architecture tells you what can be isolated during an incident without taking the service down.

8. Cloud: someone else's infrastructure (that you configure)

Using a provider's infrastructure (AWS, Azure, Google Cloud) over the internet, paying for what you use. Instead of buying a car (physical server), you use an on-demand rental: take it when you need it, in the size you need, and scale in minutes.

ModelThe provider deliversYou manageAnalogy (pizza)
IaaSVMs, network, storageOS, apps, dataBuy the ingredients and cook
PaaSReady-made environment for appsOnly app and dataPre-baked pizza, just heat it up
SaaSReady-made application (Gmail, Office 365)Only data/configPizza delivered ready to eat

Deployment models: public (shared, run by the provider), private (dedicated) and hybrid (a mix, the norm today).

The most important concept · Shared Responsibility

The provider is responsible for security OF the cloud (physical datacenter, hardware, underlying network). YOU are responsible for security IN the cloud (configurations, data, access, passwords). The overwhelming majority of breaches are not the provider's fault: they are customer misconfigurations: a public S3 bucket, an overly broad IAM permission, an open admin port, a credential leaked in a repository. The provider handed over the locks; the customer left the door wide open. Cloud Security revolves around IAM, least privilege, configuration review (CSPM), encryption and monitoring: exactly the world of Google Workspace.

9. How a real corporate environment is organized

                    INTERNET
                       │
               [ Perimeter firewall ]  ← controls all inbound/outbound traffic
                       │
      ┌────────────────┼──────────────────┐
   ┌──┴───┐      ┌─────┴──────┐      ┌─────┴─────┐
   │ DMZ  │      │ Internal   │      │  VPN /    │
   │ web/ │      │ firewall   │      │  Remote   │
   │email │      └─────┬──────┘      │  Access   │
   └──────┘   ┌────────┼────────┬──────────┐
              │        │        │          │
            Users   Servers  Database  Management
                        │
                   Domain Controller (AD) ← authenticates everything

Domain Controller: AD is the central registry office; the DC authenticates everyone and is target #1. File Servers: documents shared via SMB/NFS, concentrating sensitive data → a ransomware target. Application Servers: run the business systems (ERP, intranet). Database Servers: structured data (customers, transactions, credentials), the crown jewels, never directly reachable from the internet. DMZ: the building's reception area: an intermediate zone where exposed services live (website, email); if it is compromised, the attacker is stuck there (there is another firewall before the internal network). Segmentation: dividing the network into isolated zones (VLANs + firewalls), the #1 defense against lateral movement. Remote access: VPN, RDP (port 3389) and jump hosts / bastion hosts (a hardened intermediate machine that all admin access passes through, creating a single point of control and auditing).

Why this matters · the battlefield

A typical attacker: 1) gets in through the perimeter (phishing, an exposed service in the DMZ, a VPN with a leaked credential); 2) gains a foothold on a machine; 3) moves laterally in search of the AD/DC; 4) escalates to Domain Admin; 5) reaches the crown jewels (the database) and/or deploys ransomware on the File Server. Every piece is a defense: segmentation to contain step 3, DMZ hardening for step 1, MFA on the VPN and RDP, monitoring on the DC for step 4, immutable backup to survive step 5.

10. Security applied to infrastructure: the principles that tie it all together

  • Defense in depth: multiple layers. Perimeter firewall → DMZ → internal firewall → segmentation → host hardening → EDR. Never a single barrier.
  • Least privilege: every user, service and system gets only the access it needs. This applies to file permissions, service accounts, firewall rules and cloud IAM.
  • Minimal attack surface (Hardening): turn off whatever is not used. A service that is not running cannot be exploited; a port that is not open cannot be attacked.
  • Segmentation: divide to contain. An incident in one zone does not become a full compromise.
  • Redundancy and backup: assume something will fail or be attacked, and have a way to recover.
  • Monitoring and centralized logging: you cannot defend what you cannot see. Logs flowing into a SIEM are what make it possible to detect an attack in progress.
  • CIA triad: every security decision aims to protect Confidentiality, Integrity and Availability. All of the infrastructure exists to uphold these three pillars.
Pocket summary

Virtualization: 1 physical machine → many VMs; Type 1 (ESXi/Proxmox/Hyper-V) = production, Type 2 = lab. VM escape = compromising the host. Servers: defined by their function; DC and database = top targets. Storage: DAS (local), NAS (files over the network), SAN (datacenter block storage). RAID: 0=speed, 1=mirror, 5/6=parity, 10=mixed. RAID is NOT backup. Backup: 3-2-1 rule (+immutable +tested); ransomware attacks the backup first. Snapshot: "save game", lives on the same storage; it is not a backup. HA: eliminate SPOFs; cluster, failover, load balancing; protects Availability. Cloud: IaaS/PaaS/SaaS; shared responsibility, most breaches are customer misconfigurations. Real environment: perimeter → DMZ → internal firewall → segmentation → DC at the core. Principles: defense in depth, least privilege, hardening, monitoring, CIA triad.

Practical next step

Install Proxmox (free) on an old PC or as a nested VM and build your own mini datacenter: a Windows Server promoted to Domain Controller, a Linux file server and a Windows workstation joined to the domain. Set up simple segmentation with VLANs. You will see, with your own hands, exactly the diagram from section 9: and then the three modules stop being theory and become the environment where you train cyber for real.

Treinar no Deck de Cyber → Módulo concluído ✓