Study guide

Social engineering: attack and defence.

How attackers manipulate trust, the tactics you will actually meet, the signs that give them away, and the technical and human controls that stop them, with a safe phishing simulation to run on your own machine.

Antes de começar: por que o fator humano importa maisBefore you start: why the human factor matters most

A maioria das invasões reais não começa com um exploit técnico: começa com uma pessoa confiando em quem não devia. Engenharia social é a técnica de manipular essa confiança para obter acesso, informação ou dinheiro. Segundo relatórios anuais de resposta a incidentes (como o Verizon DBIR), é o vetor inicial mais comum de violação de dados — mais do que qualquer vulnerabilidade de software isolada, porque explora algo que nenhum patch corrige: confiança humana.Most real breaches do not start with a technical exploit: they start with a person trusting someone they should not have. Social engineering is the technique of manipulating that trust to gain access, information or money. According to annual incident-response reports (like the Verizon DBIR), it is the most common initial breach vector — more than any single software vulnerability, because it exploits something no patch fixes: human trust.

Esta nota explica o ataque para que você o reconheça e o defenda — não é um roteiro para manipular pessoas reais. O laboratório de phishing usa e-mails fictícios seus, interceptados por um servidor de teste, nunca alvos reais sem consentimento. Simular phishing contra colegas ou terceiros sem autorização explícita da organização é, no mínimo, uma violação ética, e pode ser crime.This note explains the attack so you can recognise and defend against it — it is not a script for manipulating real people. The phishing lab uses fictional emails of your own, intercepted by a test server, never real targets without consent. Simulating phishing against colleagues or third parties without an organisation's explicit authorization is, at minimum, an ethical violation, and can be a crime.
Onde esta nota se encaixa: é o complemento humano da nota de ataque e defesa web e de servidor — a mesma trilha da cibersegurança para quem programa, só que do lado de quem nunca escreve uma linha de SQL malicioso e ainda assim entra.Where this note fits: it is the human counterpart to the web and host attack and defence note — the same path as cybersecurity for developers, just from the side of someone who never writes a line of malicious SQL and still gets in.

Os seis princípios de influência (Cialdini)The six principles of influence (Cialdini)

O psicólogo Robert Cialdini catalogou os gatilhos que fazem pessoas dizerem "sim" — e são exatamente os que um pretexto de engenharia social explora. Reconhecer o gatilho, no momento em que ele é usado contra você, já é metade da defesa.Psychologist Robert Cialdini catalogued the triggers that make people say "yes" — and they are exactly the ones a social-engineering pretext exploits. Recognising the trigger, at the moment it is used against you, is already half the defence.

PrincípioPrincipleComo aparece num ataqueHow it shows up in an attack
AutoridadeAuthority"Sou do suporte de TI / da diretoria" — um crachá falso, um e-mail que parece do chefe"I'm from IT support / from the board" — a fake badge, an email that looks like it's from the boss
Urgência/escassezUrgency/scarcity"Sua conta será bloqueada em 1 hora" — não dá tempo de pensar ou confirmar"Your account will be locked in 1 hour" — no time to think or verify
Prova socialSocial proof"Todo o seu time já preencheu isso" — nomes reais de colegas aumentam a credibilidade"Your whole team already filled this out" — real colleagues' names boost credibility
Simpatia/afinidadeLikingum perfil falso que parece interessado nos mesmos hobbies, antes de pedir algoa fake profile that seems interested in the same hobbies, before asking for something
ReciprocidadeReciprocityum "favor" pequeno antes (segurar a porta, ajudar com algo) antes do pedido reala small "favour" first (holding the door, helping with something) before the real ask
Compromisso/coerênciaCommitment/consistencyfazer a pessoa concordar com algo pequeno primeiro, depois pedir maisgetting the person to agree to something small first, then asking for more

As táticas mais comuns, e como reconhecê-lasThe most common tactics, and how to spot them

Cada tática combina um ou mais dos princípios acima com um canal específico (e-mail, telefone, presença física). Saber o nome ajuda a reconhecer o padrão rápido, antes de reagir ao conteúdo.Each tactic combines one or more of the principles above with a specific channel (email, phone, physical presence). Knowing the name helps you spot the pattern quickly, before reacting to the content.

TáticaTacticComo funcionaHow it worksSinal de alertaRed flag
PhishingPhishinge-mail em massa fingindo ser de um serviço confiável, com um link ou anexo maliciosomass email pretending to be from a trusted service, with a malicious link or attachmentdomínio do remetente quase certo, mas não exatamente igualsender domain almost right, but not exactly matching
Spear phishingSpear phishingphishing dirigido a UMA pessoa, com detalhes reais sobre ela (cargo, projetos, colegas) para parecer legítimophishing aimed at ONE person, with real details about them (role, projects, colleagues) to look legitimateum pedido fora do padrão, mesmo vindo de alguém conhecidoan out-of-the-ordinary request, even from someone known
VishingVishinga mesma ideia, por telefone — "sou do banco, preciso confirmar seu código"the same idea, by phone — "I'm from the bank, I need to confirm your code"pedido de um código de uso único por telefone — nenhuma instituição legítima faz issoasking for a one-time code by phone — no legitimate institution does this
PretextingPretextinguma história inventada e consistente (um técnico, um auditor, um novo funcionário) para justificar um pedido fora do comuma made-up, consistent story (a technician, an auditor, a new hire) to justify an out-of-the-ordinary requesta história muda levemente se você pedir para confirmar um detalhethe story shifts slightly if you ask to confirm one detail
BaitingBaitingdeixar um pendrive "esquecido" no estacionamento, esperando que alguém o conecte por curiosidadeleaving a "lost" USB drive in the parking lot, hoping someone plugs it in out of curiosityqualquer mídia física não solicitadaany unsolicited physical media
TailgatingTailgatingseguir alguém por uma porta com controle de acesso, sem crachá próprio, confiando na educação da pessoafollowing someone through an access-controlled door with no badge of their own, relying on politenessalguém sem crachá visível pedindo para "só passar rapidinho"someone with no visible badge asking to "just slip through"
MFA fatigueMFA fatiguedisparar vários pedidos de aprovação de MFA seguidos, na esperança de que a vítima aprove um por cansaçofiring several MFA approval prompts in a row, hoping the victim approves one out of fatigueprompts de MFA que você não solicitou, em sequênciaMFA prompts you did not request, in a row

Defesa de domínio: SPF, DKIM e DMARCDomain defence: SPF, DKIM and DMARC

Antes de chegar à caixa de entrada de alguém, o phishing geralmente tenta forjar o campo "De" de um e-mail. Três registros DNS, usados juntos, fecham essa porta na maior parte dos provedores modernos.Before it reaches someone's inbox, phishing usually tries to forge an email's "From" field. Three DNS records, used together, close that door on most modern providers.

RegistroRecordO que fazWhat it does
SPFlista quais servidores têm permissão de enviar e-mail "em nome" do seu domíniolists which servers are allowed to send mail "on behalf of" your domain
DKIMassina criptograficamente cada e-mail enviado, provando que não foi alterado no caminhocryptographically signs each outgoing email, proving it was not altered in transit
DMARCdiz ao servidor de quem recebe o que fazer quando SPF ou DKIM falham (rejeitar, colocar em quarentena) e manda relatóriostells the receiving server what to do when SPF or DKIM fail (reject, quarantine) and sends reports
# checar os três registros de um domínio (seu, ou qualquer um público)
dig TXT +short exemplo.com | grep spf
dig TXT +short _dmarc.exemplo.com
dig TXT +short default._domainkey.exemplo.com   # o seletor DKIM varia por provedor

Resultado esperado: um domínio bem configurado mostra uma linha v=spf1 ..., uma v=DMARC1; p=reject; (ou quarantine) e um registro DKIM de pelo menos uma chave. A ausência de qualquer um deles é o tipo de falha que um relatório de postura de segurança aponta primeiro.Expected result: a well-configured domain shows a v=spf1 ... line, a v=DMARC1; p=reject; (or quarantine) one, and a DKIM record for at least one key. The absence of any of them is the kind of gap a security-posture report flags first.

Laboratório: uma campanha de phishing simuladaLab: a simulated phishing campaign

Gophish é um framework de código aberto feito exatamente para isso: equipes de segurança o usam para treinar a própria organização, enviando phishing simulado e medindo quem clicou — sem nenhum dado real sendo roubado.Gophish is an open-source framework built exactly for this: security teams use it to train their own organisation, sending simulated phishing and measuring who clicked — with no real data ever stolen.

docker run -d --name gophish -p 127.0.0.1:3333:3333 -p 127.0.0.1:8080:80 gophish/gophish
docker logs gophish 2>&1 | grep -i "password"   # a senha inicial do admin fica nos logs do container
# abra https://localhost:3333 (aceite o certificado autoassinado) e entre com admin / a senha acima

No painel, crie: um "Sending Profile" (um servidor SMTP de teste, como o Mailtrap, que captura e-mails sem enviá-los de verdade), um "Landing Page" (uma cópia visual de uma tela de login, só para medir cliques) e um grupo de "alvos" com e-mails fictícios seus. Dispare a campanha e veja o painel mostrar, em tempo real, quem abriu o e-mail e quem clicou — é exatamente essa métrica que times de segurança usam para medir o risco humano da própria empresa.In the panel, create: a "Sending Profile" (a test SMTP server, like Mailtrap, which captures emails without really sending them), a "Landing Page" (a visual copy of a login screen, just to measure clicks) and a "targets" group with fictional emails of your own. Launch the campaign and watch the panel show, in real time, who opened the email and who clicked — this is exactly the metric security teams use to measure their own company's human risk.

Resultado esperado: o painel do Gophish mostra uma linha do tempo com "Email Sent" → "Email Opened" → "Clicked Link" para cada alvo de teste, sem que nenhum e-mail real tenha saído (o Mailtrap intercepta tudo). É assim que uma empresa mede sua taxa de cliques antes e depois de um treinamento de conscientização.Expected result: the Gophish dashboard shows a timeline with "Email Sent" → "Email Opened" → "Clicked Link" for each test target, with no real email ever leaving (Mailtrap intercepts everything). This is how a company measures its click rate before and after an awareness training.

Use só e-mails e "targets" fictícios seus (contas de teste, endereços que você controla). Rodar uma campanha do Gophish contra pessoas reais sem o consentimento explícito delas e da organização é o mesmo phishing que esta nota ensina a identificar — só que feito por você.Only use fictional emails and "targets" of your own (test accounts, addresses you control). Running a Gophish campaign against real people without their and the organisation's explicit consent is the same phishing this note teaches you to spot — just done by you.

Defesa: processo, cultura e controles técnicosDefence: process, culture and technical controls

Nenhum controle único resolve engenharia social — é uma combinação de tecnologia (que reduz o volume que chega) e cultura (que reduz a chance de alguém cair no que passa).No single control solves social engineering — it is a combination of technology (which reduces the volume that gets through) and culture (which reduces the odds that someone falls for what does).

ControleControlReduzReduces
SPF, DKIM e DMARC no domínio (acima)SPF, DKIM and DMARC on the domain (above)e-mails forjados "de" o seu próprio domínio chegando a outras empresas, e vice-versaemails forged "from" your own domain reaching other companies, and vice versa
MFA resistente a phishing (chaves FIDO2/passkeys)Phishing-resistant MFA (FIDO2 keys/passkeys)uma senha roubada sozinha não é mais suficiente para entrar — veja a nota de criptografia e chavesa stolen password alone is no longer enough to log in — see the cryptography and keys note
Cultura de verificação ("ligue de volta pelo número oficial")A verification culture ("call back on the official number")pedidos urgentes e fora do padrão por e-mail/telefone sozinhourgent, out-of-the-ordinary requests by email/phone alone
Treinamento recorrente + campanhas simuladas (como a do Gophish acima)Recurring training + simulated campaigns (like the Gophish one above)a taxa de cliques cai de forma mensurável com práticathe click rate measurably drops with practice
Crachá visível + política de "sem exceção" para tailgatingVisible badge + a "no exceptions" tailgating policyacesso físico não autorizadounauthorised physical access
Desabilitar USB autorun; política de "achou, entregue, não conecte"Disable USB autorun; a "found it, hand it in, don't plug it in" policyataques de baiting com pendriveUSB baiting attacks
Limitar o número de pedidos de MFA por janela de tempoRate-limiting MFA prompts per time windowataques de MFA fatigueMFA-fatigue attacks

Cola e revisãoCheat sheet and review

Cola: tática, sinal e defesaCheat sheet: tactic, signal and defence

TáticaTacticSinal de alertaRed flagDefesa principalMain defence
Phishingdomínio quase certonear-right domainSPF/DKIM/DMARC + treinamento
Vishingpedido de código por telefonecode requested by phonecultura de callbackcallback culture
Pretextinghistória que muda com detalhestory shifts under detailverificação de identidade por canal oficialidentity check via an official channel
Baitingmídia física não solicitadaunsolicited physical mediadesabilitar autorun, política de entregadisable autorun, hand-in policy
Tailgatingsem crachá, pedindo passagemno badge, asking to be let throughcrachá obrigatório, sem exceçõesmandatory badge, no exceptions
MFA fatigueprompts não solicitados em sérieunsolicited prompts in a rowMFA resistente a phishing, rate limitphishing-resistant MFA, rate limit

Perguntas de revisãoReview questions

PerguntaQuestionRespostaAnswer
Por que o phishing é o vetor inicial mais comum, segundo os relatórios do setor?Why is phishing the most common initial vector, per industry reports?Explora confiança humana, que é mais difícil de corrigir com uma atualização do que uma falha de software.It exploits human trust, which is harder to patch than a software flaw.
Qual princípio de Cialdini um e-mail de "sua conta será bloqueada em 1 hora" usa?Which Cialdini principle does a "your account will be locked in 1 hour" email use?Urgência/escassez: não dá tempo de verificar antes de agir.Urgency/scarcity: it gives no time to verify before acting.
O que o DMARC adiciona que SPF e DKIM sozinhos não dão?What does DMARC add that SPF and DKIM alone do not?Diz ao servidor de quem recebe o que fazer quando um dos dois falha, e manda relatórios de abuso.It tells the receiving server what to do when one of them fails, and sends abuse reports.
Cite dois controles que reduzem o risco de engenharia social sem depender só do usuário perceber.Name two controls that reduce social-engineering risk without relying solely on the user noticing.MFA resistente a phishing e SPF/DKIM/DMARC no domínio (entre outros: rate limit de MFA, políticas físicas).Phishing-resistant MFA and SPF/DKIM/DMARC on the domain (among others: MFA rate limiting, physical policies).