<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sp1d3rM on Medium]]></title>
        <description><![CDATA[Stories by Sp1d3rM on Medium]]></description>
        <link>https://medium.com/@spiderm?source=rss-41a485c287c8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*y0nFrWsRbzRZuFupE-IMLg.png</url>
            <title>Stories by Sp1d3rM on Medium</title>
            <link>https://medium.com/@spiderm?source=rss-41a485c287c8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 04:34:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@spiderm/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Offensive Security, Red Team & Pentest: Você Não Entende Nenhum dos Três]]></title>
            <link>https://spiderm.medium.com/offensive-security-red-team-pentest-voc%C3%AA-n%C3%A3o-entende-nenhum-dos-tr%C3%AAs-6fdd27ff0000?source=rss-41a485c287c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/6fdd27ff0000</guid>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[offensive-security]]></category>
            <category><![CDATA[essay]]></category>
            <dc:creator><![CDATA[Sp1d3rM]]></dc:creator>
            <pubDate>Mon, 23 Feb 2026 17:51:22 GMT</pubDate>
            <atom:updated>2026-02-24T00:41:24.334Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introdução</h3><p>Diariamente vejo pessoas citando ou abordando “Red Teaming”. Eu sei que extensivamente muitas pessoas já tentaram — e digo <em>tentaram</em> porque o conceito de red team é abrangente — definir <em>o que é</em> red teaming. A definição de pentest, por outro lado, é mais ou menos a mesma ao redor do mundo, enquanto que a segurança ofensiva muitas vezes sequer é citada na conversa e, quando é, restringe-se a uma nota de rodapé, uma vírgula no meio da chuva de concepções errôneas.</p><p>E, caso você esteja se perguntando, <strong>definições importam</strong>. O que as coisas significam <strong>importam</strong> e importam muito. Se você não sabe quem você é, você pode ser qualquer coisa e, ao ser qualquer coisa, você acaba por servir múltiplos deuses (simbolicamente). Cortando as metáforas, se não entendemos (e uso a primeira pessoa do plural de forma desleixada, referindo-me tanto a nós enquanto área de segurança da informação, nós enquanto área de TI e nós enquanto sociedade) o que significa aquilo que nós mesmos fazemos (ou que nos rodeiam), nós não seremos capazes de servir o nosso propósito (neste caso, exercer a nossa profissão) da melhor maneira possível.</p><p>Eu, na minha humilde arrogância, acredito que possa colaborar para a conversa. Tentarei neste artigo elaborar o que é segurança ofensiva, red team e pentest. Suas principais diferenças e semelhanças e, enquanto o faço, desmistificar e quebrar os preconceitos que foram estabelecidos sobre a área. Mesmo que você já seja um profissional de segurança ofensiva ou um profissional de segurança da informação, eu acredito que em <em>algum</em> nível este artigo lhe será útil.</p><h3>Hacker, Qu’est-ce que c’est?</h3><p>Recentemente vi uma postagem no X — e depois no LinkedIn — sobre um grupo de agentes de IA que estava sendo chamado de <em>The AI Red Teamers</em>. A série de jargões clickbait, como “HACKING ATTACKS” (sim, em caps mesmo) imediatamente levantaram red flags na minha consciência, mas prossegui com a leitura. De forma geral, o post retratava um grupo de agentes de IA que trabalhavam em conjunto: um executava reconhecimento passivo e ativo, o outro iniciava explorações com base no reconhecimento do agente anterior, o outro cuidava de pós-exploração e o outro cuidava do reporting (e pelo que me parecia, tudo ao mesmo tempo). Apesar de interessante e <em>vagamente</em> — bem vagamente <strong>mesmo</strong> — assemelhar-se a <em>algum</em> aspecto de <em>algum</em> red team, aquele experimento não chega sequer aos dedos dos pés de um red team de verdade. E foi o burburinho que essas postagens começaram na bolha de segurança da informação (e TI também) que me fizeram ter o ímpeto que me faltava para escrever este artigo, o qual desejo já tinha há algum tempo.</p><p>Vamos começar definindo o que é <em>Offensive Security</em>.</p><h3>Offensive Security</h3><p>A <a href="https://www.ibm.com/think/topics/offensive-security">IBM</a> define Offensive Security como “o escopo de estratégias de segurança que utilizam as mesmas táticas que atores maliciosos usam em ataques reais”. A IBM com certeza possui pessoas muito mais inteligentes do que eu e, para dar a César o que é de César, a postagem é feita de uma forma que um leigo possa digerir. Mas eu tenho problemas com essa definição e eu vejo constantemente nós, de segurança, reverberarmos indiscriminadamente — até mesmo para profissionais de outras áreas de TI — essa definição.</p><p>Para entender o meu incômodo, precisamos recorrer a Aristóteles e à sua teoria das Quatro Causas, especificamente a <em>Causa Final</em> (o <em>Telos</em>, ou o propósito último de algo). Definir uma disciplina prática (uma <em>práxis</em>) baseando-se apenas nas ferramentas ou métodos que ela utiliza é um erro categórico brutal. Um cirurgião e um assassino utilizam lâminas afiadas para cortar a carne humana (a tática, a <em>causa eficiente</em>); no entanto, o que separa a medicina do homicídio é o <em>Telos</em>: um corta para curar, o outro corta para matar. Definir segurança ofensiva como “utilizar as mesmas táticas que atores maliciosos usam” é focar na lâmina e esquecer o propósito. Afinal, a tática é apenas a consequência da <strong>atividade ofensiva</strong> em si.</p><p>Eu gostaria de apresentar uma outra definição:</p><p>Primeiramente precisamos definir o que “ofensiva” significa. De acordo com o <a href="https://www.dicio.com.br/ofensivo/">Dicionário Online de Português</a>, “ofensivo” significa “que ataca”, “que causa ofensa ou dano físico” e “que tem como objetivo ataque”. Indo ainda mais longe, a palavra “ofensivo” etimologicamente é produto do latim OFFENSA, “injúria, ataque”, que advém de OFFENDERE e que significa “contra-atacar” (<a href="https://www.google.com/search?q=https://origemdapalavra.com.br/palavras/ofender/%23:~:text%3DResposta:,Pode%2520revis%25C3%25A1%252Dla%3F">fonte</a>).</p><p>Já a palavra “segurança” significa “estado ou condição de estar livre do perigo ou dano”, mas a sua origem etimológica — também latina — aponta que seu significado original era de “estar livre de preocupações” (<a href="https://www.etymonline.com/word/security">fonte</a>).</p><p>Desta maneira, compreendemos que <strong>OFENSIVO</strong> é aquilo que ataca, que causa dano e que <strong>SEGURANÇA</strong> é o estado ou condição de estar livre de perigo ou dano mas, mais ainda, de ter consciência de uma liberdade da preocupação de ser machucado ou ferido. Segurança Ofensiva trata-se do <strong>campo</strong> da Segurança da Informação que utiliza técnicas, táticas e procedimentos <strong>ofensivos</strong> para conduzir operações de segurança cibernética. Através destas táticas, ela cria segurança dando a confiança (que, então, gera uma maior — mas não completa — liberdade de preocupações) necessária para compreender como ataques podem ocorrer.</p><p>Por mais que no mundo corporativo isso signifique, <em>por exemplo</em>, executar testes de intrusão ou <em>red team engagements</em>, segurança ofensiva também é — e parecerá piada mas, acredite, não é — <em>ofensiva</em>. Em um contexto de guerra ou na aquisição de inteligência, hackers governamentais estão praticando segurança ofensiva ainda que não estejam necessariamente melhorando seus próprios sistemas através de estratégias ofensivas.</p><p>Sendo assim, podemos chegar à conclusão de que o que <em>realmente</em> define segurança ofensiva é <strong>ser o campo da segurança da informação que faz a utilização de estratégias ofensivas como uma medida de proteção a um escopo definido</strong>. Na segurança cibernética, segurança ofensiva é <strong>a utilização de estratégias ofensivas para a proteção de um escopo definido através do ciberespaço</strong>. Minha definição é <em>mais ou menos</em> embasada, também, na definição do <a href="https://csrc.nist.gov/glossary/term/offensive_cyberspace_operations">NIST</a> sobre <em>Offensive Cyberspace Operations</em>. Se você quiser fazer ainda mais senso desta definição, recomendo ler a definição deles (presente no glossário) de <em>cyberspace</em>.</p><p>Hackers governamentais <strong>protegem</strong> o seu país em guerra <strong>iniciando ofensivas</strong> contra o país rival (uma medida proativa). Pentesters <strong>protegem</strong> empresas <strong>identificando e mensurando a explorabilidade</strong> de vulnerabilidades, o que é uma atividade <strong>ofensiva</strong> (e igualmente proativa). Ainda que o objetivo não seja causar dano real nas atividades de <em>offsec</em> corporativo, você sempre busca entender qual seria o dano real. Em uma analogia, você está arrombando a porta, executando a varredura do apartamento, encontrando o suspeito, apontando a arma para a cabeça dele, mas você <strong>nunca</strong> atira. Isso deixa de ser ofensivo, <strong>deixa de ser um ataque?</strong> Não.</p><h3>Information Security</h3><p>Agora que já encontramos <em>common ground</em> no que tange ao significado de segurança ofensiva, podemos começar a mergulhar nas nuances dela. Penetration Testing e Red Team Operations <strong>são estratégias de segurança ofensiva</strong>. Elas utilizam táticas, técnicas e procedimentos ofensivos para a proteção de um escopo definido. Isso é importante de entender para que não haja confusão no <strong>objetivo geral</strong> de um pentest ou um engagement de red team: <strong>proteger através de táticas, técnicas e procedimentos ofensivos</strong>.</p><p>Segurança ofensiva é notoriamente uma metodologia <strong>proativa</strong>, porque ela se preza a fazer o trabalho do agressor. É <em>essencialmente</em> sempre uma atividade proativa. O ataque independe da ação de outro, o ataque <em>pode</em> ser uma reação a outro, mas ele nunca <em>precisa</em> ser. A defesa, por outro lado — e aqui me refiro estritamente às operações operacionais de defesa, o <strong>Blue Team</strong> — , é <em>essencialmente</em> <strong>reativa</strong>. Você só defende enquanto é atacado, ninguém pode se defender de “nada”. Evidentemente que ao iniciar esforços para instituir medidas defensivas (como arquitetura <em>Secure by Design</em> ou <em>Threat Intelligence</em>) <em>antes</em> de ser atacado, a organização está exercendo medidas proativas. Contudo, a operação primária de defesa cibernética nunca fará efeito pleno até você sofrer a ação do agressor, sendo, em sua ontologia corporativa, uma reação.</p><p>A conversa de que a segurança ofensiva existe para auxiliar a segurança defensiva é uma noção torpe de segurança cibernética. Segurança Ofensiva não existe <em>em função</em> da Segurança Defensiva, <strong>ambas existem em função da Segurança da Informação</strong>. A <em>Information Security</em> é a mãe de todas. O objetivo de <strong>todos</strong> os campos de segurança da informação é tornar a informação armazenada, editada ou transmitida através do ciberespaço o mais segura possível.</p><h3>Penetration Testing</h3><p>Uma das estratégias de segurança ofensiva é praticar <strong>penetration testing</strong>. Teste de intrusão (até porque “penetração” não é fiel ao termo inglês original, por mais que seja sua tradução literal) é definido, de acordo com uma das definições do <a href="https://csrc.nist.gov/glossary/term/penetration_testing">NIST</a> no “NIST Special Publication 800–152”, como “Testes que verificam até que ponto um sistema, dispositivo ou processo resiste a tentativas ativas de comprometer sua segurança”. Não é a única definição, porque existem múltiplos métodos para a execução de um pentest, mas é a melhor definição para Teste de Intrusão como um todo. Um pentester é, consequentemente, quem conduz testes contra um sistema, dispositivo ou processo a fim de mensurar o quanto estes são capazes de suportar tentativas de disrupção da sua segurança. O pentest intencionalmente busca abranger o máximo que <em>pode</em> (não o máximo <em>possível</em>). Idealmente, ele também seria utilizado para verificar <strong>todas</strong> as formas de romper a segurança de um escopo definido, mas no mundo corporativo — ora justificavelmente, ora não — isso nem sempre é possível.</p><p>Em sua essência, o pentest quer saber <em>o que</em> pode ser diretamente atacado, <em>como</em> pode ser diretamente atacado e qual seria o dano <strong>máximo</strong> de um ataque àquele escopo. Verdadeiramente, o que se pode tirar de valor de um pentest não é tão somente a <em>identificação</em> e <em>validação</em> de vulnerabilidades, mas também a sua <em>mensuração</em> (o que scanners automatizados em um vulnerability assessment não seriam capazes de fazer).</p><p>Desta maneira, o pentest é a estratégia de segurança ofensiva que busca proteger <strong>individualmente</strong> os elementos dentro do escopo definido. Não individualmente no sentido de vulnerabilidades individuais, mas no sentido de <strong>ataques</strong> individuais (e são individuais não porque os <em>danos</em> são unitários para cada elemento, mas porque o <em>benefício da proteção</em> é unitário para cada elemento. Cada elemento recebe um patch de segurança, uma nova função ou camada de segurança, etc).</p><p>Para que não haja confusão: se um pentester encontra uma falha de <em>Kerberoasting</em> em um <em>Active Directory</em>, ele está beneficiando única e exclusivamente a subseção da rede que utiliza aquele serviço. O <em>Active Directory</em> é um componente, não a rede inteira. O benefício do pentest foi para o <em>Active Directory</em>. Ainda que múltiplos hosts deixem de ser passíveis de sofrer esse ataque, o benefício da mitigação foi estritamente individual ao ecossistema testado. Mesmo quando nós, como pentesters, encontramos uma vulnerabilidade abrangente e até mesmo um pouco abstrata como <em>business logic flaws</em> e <em>insecure design</em>, o benefício da proteção <em>ainda é unitário</em>, neste caso beneficiando a lógica do negócio.</p><p>Se você não sabe se precisa de um pentest ou de um red team, pense assim: o que você quer proteger são os <em>elementos</em> do escopo definido, ou <em>as próprias defesas</em> do escopo definido? Se for a primeira opção, contrate um pentest.</p><h3>Red Team Operations</h3><p>Vamos começar pelo que Red Team <strong>NÃO</strong> é:</p><ul><li>Red Team <strong>não é</strong> um time de operações ofensivas <strong>no geral</strong>;</li><li>Red Team <strong>não é</strong> um time de pentesters;</li><li>Red Team <strong>não é</strong> sobre buscar vulnerabilidades;</li></ul><p>Se você vê uma vaga no LinkedIn que diz “Red Team” e a vaga está pedindo para conduzir testes de intrusão, <strong>é uma vaga de pentest</strong>. Se você tem um (ou até mesmo múltiplos) pentesters internamente, você tem um time de <strong>pentest</strong>, não um <strong>red team</strong>. Red Team <strong>pode</strong> ser um time de operações ofensivas, mas um red team nem sempre está executando operações ofensivas. Red Team é uma <strong>metodologia</strong> e, em última análise, <strong>uma postura operacional</strong>.</p><p><a href="https://www.youtube.com/watch?v=TGzMR9GfnIs&amp;t=1293s">Micah Zenko</a> abrange o conceito de red team no seu mais essencial nível no seu livro <em>Red Team: How to Succeed By Thinking Like the Enemy</em> e na sua palestra para a Social Engineering Village da <strong>DEFCON 27</strong> <em>Red Teaming Insights and Examples from Beyond</em>. De maneira geral, Red Team é o time, dentro de uma organização, que se opõe ao status quo a fim de identificar se este é verdadeiro. Essa ideia não é única de Micah, o livro <em>Red Team Development and Operations: A Practical Guide</em> de Joe Vest e James Tubberville também sublinha o mesmo conceito em sua introdução, no capítulo <em>Red Teaming Organizations</em>.</p><p><em>“Consider this: Assumptions, bias, misunderstandings and disbelief have a considerable impact on the security failures of an environment. An unbiased Red Team helps measure the gap between ‘what is’ and ‘what should be’ to get to the truth of security operations as a whole” — Red Team Development and Operations: A Practical Guide PDF version, pg. 20; 2019 Joe Vest and James Tubberville.</em></p><p>Em resumo: Red Team NÃO É um time de operações ofensivas como um todo, é uma metodologia, uma forma de pensar, uma postura operacional. Red Teaming não é só aplicado ao mundo militar e à cibersegurança, mas nestes dois campos ele é mais prevalente. E, na cibersegurança, o Red Team vai estar sim, em muitos casos, envolvido com operações ofensivas, mas não é isso que o define.</p><p>Agora que entendemos o que Red Teaming realmente é (uma metodologia), podemos compreender outro de seus fatores fundamentais: Red Teaming não é um teste de segurança convencional. Isso se deve ao fato de que o red team não quer um escopo (como definido no livro <em>Red Team Development and Operations: A Practical Guide</em>: <em>Nodes</em>) de ativos desnecessariamente grande, porque o custo operacional é exponencialmente maior à medida que o escopo (de ativos, alvos) aumenta.</p><p>Diferentemente dos testes convencionais, uma operação de red team não está buscando <strong>invadir</strong> os seus sistemas. Ele sabe que vai. O verdadeiro objetivo do red team é validar a sua detecção, resposta e restauração com base no IPDRR. Desta maneira, não se engane acreditando que o Red Team sempre irá iniciar de uma perspectiva externa, full black-box desautenticada. Não é esse o ponto. Se o objetivo da campanha ou operação é simular, por exemplo, um ataque de zero-day, por motivos éticos, operacionais e de tempo, é simplesmente mais fácil presumir o acesso inicial (o famoso <em>assumed breach</em>) e já partir de um ponto da rede interna (ou de um ambiente restrito).</p><p>Lembra do que te disse? Se você pretende proteger os <em>elementos</em> do escopo, você precisa de um pentest. Se o seu objetivo é proteger <em>as defesas</em> dos elementos no seu escopo, você precisa de um Red Team. Justamente porque o Red Team não vai proteger os elementos, não vai buscar cada elemento e individualmente validar um por um (como um bom pentest faria). O Red Team oferece proteção <strong>coletiva</strong> ao validar se as defesas, que são igualmente coletivas, estão devidamente operacionais. Diferentemente do pentest, onde os benefícios da proteção gerada pelo sucesso são individuais, os benefícios da proteção gerada por um exercício de red team bem-sucedido são <strong>coletivos</strong>.</p><p>Voltando ao exemplo anterior: em uma operação de Red Team, a existência ou não de um <em>Kerberoasting</em> não necessariamente altera o resultado macro da simulação. O que importa é testar a maturidade das defesas. Se um EDR/XDR pode ser bypassado em um host, <strong>ele provavelmente pode ser bypassado em todos os hosts</strong>. Essa medida de defesa está, por tanto, fundamentalmente vulnerável, o que diminui a capacidade de detecção e reação do time de Segurança Defensiva como um todo. Consertar essa descoberta de detecção é aumentar a maturidade de segurança de todos os elementos do escopo <strong>coletivamente</strong>.</p><ol><li><strong>Penetration Testing:</strong> Estratégia de segurança ofensiva que, através ou não do ciberespaço, utiliza táticas, técnicas e procedimentos ofensivos para proteger individualmente elementos de um escopo definido no ciberespaço;</li><li><strong>Red Team Engagement:</strong> Estratégia de segurança ofensiva que utiliza uma metodologia de posicionamento adversarial para proteger coletivamente elementos de um escopo.</li></ol><p>Red Team não se limita a defender <strong>apenas</strong> elementos dentro do ciberespaço. Um Red Team busca defender o ambiente como um todo, dentro e fora do ciberespaço (através de táticas de segurança física ou engenharia social, por exemplo), porque o objetivo final — a informação — inevitavelmente repousa no ciberespaço. Isto é uma abrangência fundamentalmente diferente do pentest. O pentest, por buscar proteger elementos individualmente, jamais seria capaz de defender o escopo <strong>inteiro</strong>. É por isso que fiz a diferenciação entre <em>máximo que pode</em> e <em>máximo possível</em>. Aquilo que é <em>possível</em> na totalidade não é o mesmo que <em>possível</em> em especificidades. Se o pentest deve proteger individualmente, não haveria tempo hábil para que ele individualmente protegesse todos os elementos possíveis do escopo.</p><p>Tenha como exemplo o seguinte escopo: <strong>uma companhia de energia elétrica de abrangência multiestadual</strong>. Essa companhia possui múltiplos escritórios ao redor de múltiplos estados, possui múltiplos ambientes web porque cada estado (ou conjunto de estados) pode exigir um tipo de tratamento e de imagem, múltiplos ambientes cloud, múltiplos sistemas operacionais, centenas (quando não milhares ou dezenas de milhares) de colaboradores empregados em inúmeros cargos e áreas do conhecimento, números de telefone, endereços de e-mail, etc. Um pentest tradicionalmente se limitaria a subescopos deste escopo e, tendo em vista o tamanho do ambiente, múltiplos pentests diferentes precisariam ser conduzidos para proteger individualmente cada elemento. Mesmo que se conseguisse passar pelo escopo <strong>inteiro</strong>, ao chegar ao final, <strong>o pentest feito no primeiro elemento do primeiro subescopo já estaria defasado</strong>, pelo tempo que levou para finalmente alcançar o último elemento. Observa que a complexidade da operação torna-se tão elevada que simplesmente não faria sentido empregar tanto trabalho para individualmente proteger cada elemento?</p><p>O caminho correto seria proteger individualmente os escopos mais facilmente acessíveis para um ator externo (aplicações web, mobile), em seguida os escopos facilmente acessíveis para colaboradores (rede interna da sede e principais escritórios, rede Wi-Fi de estações de energia mais críticas, ambiente Active Directory e ambiente Cloud) e, finalmente, coletivamente proteger o escopo através de exercícios de Red Team para proativamente manter controle do escopo e manter as defesas devidamente operacionais.</p><p>Evidentemente que ainda existem medidas reativas e proativas a serem implementadas entre estas etapas: a instauração ou contratação de um SOC, a instauração ou contratação de um time de CTI, implementação de controles de segurança modernos, etc. E, mesmo ao executar simulações ou emulações adversariais, você também idealmente desejará manter um time de pentest para que seja possível continuar protegendo os elementos previamente citados a nível individual.</p><p>Não adianta ter tão somente um e tão somente outro, como não adianta tentar ter todos de cara. Operações de Segurança exigem esforços de múltiplos times em busca do mesmo objetivo. Novamente, o Red Team <strong>precisa</strong> de um Blue Team para causar o maior impacto positivo possível em um escopo, mas o Red Team não é <strong>subordinado</strong> do Blue Team ou vice-versa; ambos o são da <strong>Segurança da Informação</strong>. Ambos, a partir de estratégias diferentes, buscam o mesmo objetivo.</p><h3>Um Pouco Sobre Purple Teaming</h3><p>Apesar de não ser o tópico central do texto, é importante ressaltar o que é Purple Teaming. Purple Teaming resume-se a duas definições populares: a colaboração entre Red e Blue Team, onde ambos estão consciente e ativamente interagindo um com o outro a fim de fazer melhorias em ambos os times; e as áreas da Segurança da Informação que podem ser percebidas como ofensivas ou defensivas em qualquer determinado momento.</p><p>Uma área da Segurança da Informação corriqueiramente associada ao Purple Team é a área de <em>Cyber Threat Intelligence</em>, porque pode operar tanto para a ofensa quanto para a defesa, de forma proativa ou reativa. Mas, de forma realmente geral, Purple Teaming nada mais é do que a colaboração estruturada do Red Team e do Blue Team.</p><h3>Conclusão</h3><p>Espero que, neste ponto, sejamos capazes de concordar e compreender as definições discutidas durante todo o texto e, de forma a recapitular, estas são suas definições finais:</p><ul><li><strong>Segurança Ofensiva:</strong> Campo da Segurança da Informação que utiliza estratégias ofensivas para a proteção de um escopo definido.</li><li><strong>Penetration Testing:</strong> Estratégia de Segurança Ofensiva que, através de táticas, técnicas e procedimentos ofensivos, protege individualmente elementos de um escopo definido.</li><li><strong>Red Teaming:</strong> Estratégia de Segurança Ofensiva que utiliza uma metodologia de posicionamento adversarial para atuar transversalmente, dentro e fora do ciberespaço, visando proteger coletivamente a organização e o seu ativo final (que reside no ciberespaço).</li><li><strong>Red Team:</strong> Time de especialistas em operações adversariais que propõem, organizam e executam atividades de Red Teaming.</li></ul><p>Existem diversas metodologias para Penetration Testing, assim como diversas estratégias para execução de atividades de Red Teaming. Em um texto futuro, quiçá, abordarei estes temas que também não são muito claros (especialmente as reais diferenças entre black-box e, principalmente, white-box e gray-box). Mas, no mínimo, precisávamos como um conjunto compreender o que é o que. “Dar nome aos bois”. E o mercado também.</p><p>Chega de vagas de pentest que dizem ser Red Team simplesmente porque são operações ofensivas ou clientes de Pentest querendo que você execute simulações de adversário, afinal é “a mesma coisa”. Chega de chamar um time de segurança ofensiva de “Red Team”. Um time de segurança ofensiva <strong>PODE</strong> ser um red team, seja na prática ou na sua postura operacional (“conceitualmente”), mas ele NÃO O É <em>per se</em>.</p><p><em>To talk is easy,</em><br><em>Show me the exploits.</em></p><p><strong><em>Sp1d3rM!^#</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hoh8J9Dal_wolHPG0-ka2w.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6fdd27ff0000" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Buckets of Poison: Leveraging S3 Buckets to Exploit Humans]]></title>
            <link>https://spiderm.medium.com/buckets-of-poison-using-s3-buckets-to-exploit-humans-271fda69bf0f?source=rss-41a485c287c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/271fda69bf0f</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[social-engineering]]></category>
            <dc:creator><![CDATA[Sp1d3rM]]></dc:creator>
            <pubDate>Mon, 19 Jan 2026 17:48:40 GMT</pubDate>
            <atom:updated>2026-02-24T00:42:17.367Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/338/1*s_NR1Yn_4NC8iitFIgTDMw.gif" /></figure><h3>INTRODUCTION</h3><p>Phishing have been the main source for company (and individual) compromise. According to <a href="https://www.huntress.com/phishing-guide/phishing-attack-statistics">Hutress</a>, “90% of cyber-attacks start with phishing” and companies spend millions upon millions of dollars on both cybersecurity and cybersecurity training, so their employees have the necessary mindset and weapons to identify or stop phishing attacks.</p><p>And <strong>still</strong>: the data is from December 2025, which means things are still pretty bad.</p><p>Let’s analyze an approach to phishing and social engineering. In this post, we will discuss what me and my friends/coworkers have been calling <strong>S3 Bucket Poisoning</strong>. How we leverage that to conduct credential stuffing and how do you even protect yourself against this type of attack.</p><h3>BUILDING TRUST IS HARD</h3><p>If phishing attacks from <em>un-trusted sources</em> already cause major damage to companies, imagine what attackers can do when they can compromise<em> trusted sources</em>. Your e-mail provider can’t help or warn you if your boss’s account gets compromised, your browser might not be able to stop an attack if a company’s website you trust (and so does your browser) gets a stored XSS payload, well, <em>stored</em> in their main page. That is the ultimate phishing attack.</p><p>Why? Because now I don’t need to get you confused on whether my e-mail is legit. I don’t need to convince you my website is not malicious. I don’t need to make you believe me, <strong>you already do</strong>. I only have to come up with a clever <em>enough</em> explanation to <em>why</em> you should download this binary file or <em>why</em> you should re-enter your credentials.</p><p>A big part of phishing attacks and social-engineering operations in general is either <strong>creating enough legitimacy</strong> or creating enough stress, so the victim <strong>don’t have time to process legitimacy</strong>. If we want to compromise a company and be persistent, giving real value to the P in APT, we need them to <strong>not even think they’ve got bamboozled</strong>. If they think they are interacting with a legitimate source they already trust, we have a big advantage.</p><h4>THE HUMAN CONDITION</h4><p>Now that we understand <em>why</em> compromising a trusted source might be worth your time (even though traditional phishing and spear-phishing attacks already work wonders), lets understand the attack.</p><p>As a broader category, there are many ways attackers can conduct such operations, but I believe it can all be boiled down to one episode of Amazon’s 2024 <em>Mr. &amp; Ms. Smith</em> (not to be confused with the movie). I know, but <strong>hear me out:</strong></p><p>On episode 2 <em>“Second Date”</em> from Amazon’s <em>Mr. &amp; Ms. Smith</em>, John and Jane (the two main characters, who are also spies) receive a mission: extract human intelligence in a black-tie auction by drugging the asset with truth serum. Initially John and Jane were going in as a couple, but right as they arrive at the location, John decides to go in as a <em>caterer</em> instead. This creates a perfect demonstration of two different attack perspectives:</p><p>1. The asset will see Jane as an unknown person. She must exercise <strong>extreme caution</strong> since she doesn’t want to get questioned about the legitimacy of her persona;<br>2. John is also unknown, but he is a caterer. Everyone <em>expects</em> him to be there and he would only have to care about the staff, but since they are all too worried about the event this might be a non-issue.</p><p>Everyone already puts <em>some</em> trust in John. He is a stranger who is <em>supposed</em> to be there, while she is a stranger who <em>happens</em> to be there.</p><p>Of course, this is not a perfect analogy, but it highlights the attack vector: the inherent trust we, humans, deposit in the things we <em>expect</em> to be true. By compromising trusted sources, we can exploit this vulnerability.</p><h4>THE MACHINE CONDITION</h4><p>We’ve been seeing a pattern in clients during engagements that might fairly easily bridge the gap between effort and gains. S3 Bucket Poisoning consists of the ability to send and access malicious files inside legitimate company’s S3 buckets. This is usually accomplished by the exploitation of an Insecure File Upload Function vulnerability.</p><p>Even though the back-end usually applies a different naming convention to files stored in the bucket, in many instances we’ve seen the same functions or other API endpoints that interact with those files returning the full post-processing name (sometimes with path included) of the malicious file, which grants the ability to access it. Furthermore, those who don’t disclose the full-path inside the bucket tend to have pretty deterministic naming conventions (such as hashing the file and using the hash as the filename).</p><p>By “accessing” the file, we mean a broader idea than just typing the URL and pressing enter without authentication. If you can write the file through a file upload vulnerability but <strong>can’t</strong> access it in the traditional sense, <strong>it doesn’t mean other people can’t too</strong>. Maybe the bucket is configured to allow direct access only by specific people, which you might be able to exploit to gain further access (through another vulnerability, for instance) or to conduct a phishing campaign against people of interest that you know might be able to access it (which would also mean they are privileged in some way).</p><h3>LIVING-OFF YOUR LAND</h3><p>This vulnerability <strong>might not be immediately apparent</strong> to a client, as most of the time only HTML files can be sent to the bucket and it does not represent immediate harm to the company’s systems. We don’t get to read sensitive files or system configurations, XSS through the uploaded files are possible, but things like session cookies usually are not transported once the client access the link and we don’t get remote code execution, so what’s the big deal?</p><p>Let’s see how we can leverage the vulnerability to gain further access to client’s systems.</p><h4>S3 BUCKET POISONING IN PRACTICE</h4><p>First off you need a little context. The following attack path occurred in a <em>Continuos Penetration Testing</em> model, which can be shallowly described as a long duration and less restricted in scope penetration test. So we had <em>carte blanche</em> to perform phishing attacks, as well as ample time to orchestrate it. This might not be possible inside most traditional penetration tests, hence why I’m directing this towards a more advanced scenario (in a red team operation, for instance).</p><p>While I was pentesting one of their main web application, I found a vulnerability in their API which allowed me to create an account in their platform (which should only be possible once you’ve paid for their service). After that, a whole world of possibilities opened. I was the second pentester in this project (we do project rotations every now and then so the minds are always fresh and we can prevent tunnel vision) and my friend <a href="https://www.linkedin.com/in/luiz-eduardo-76sec67/">Razielx64</a> had done a very good job at chaining and reporting many bugs, which made my job harder.</p><p>Once I had access to an account, I noticed that they allowed for editing the account’s information and upload of a profile picture. This means I would be testing that component for file upload vulnerabilities.</p><p>Of course, since this is one of their most important applications, WAF was present. I actually was a little bit stupid and tried to just bypass the WAF the old fashioned way (by understanding what rules were being applied) and this took a couple of hours. It didn’t worked well and that’s when I remembered that this was a file upload situation, I could just try the junk padding technique.</p><p>The junk padding technique consists in exploiting an inherent vulnerability in many WAF configurations: <strong>request body inspection limits</strong>. It would be very inefficient if WAFs were analyzing the whole request body (since requests can get very lengthy depending on the operation), therefore WAF manufacturers (sometimes the client itself) setup a request body inspection limit.</p><p>We can exploit that by adding a whole chunk of trash data <strong>before</strong> our malicious payload. Once the WAF reads our requests content, it will inevitably reach its request body inspection limit and will determine that our request is <strong>not malicious</strong>, since our payload comes after the limit. By applying this technique, I successfully uploaded a `.html` file to their S3 bucket:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*USJ1BMu4nStb6P-m.png" /><figcaption>Successful exploitation of file upload function</figcaption></figure><p>In a penetration test, you need to test what the vulnerability allows you to do after being exploited. Since this is not the scope of this article, I’ll jump to the fact that the best use case for this vulnerability is the enhancement of phishing attacks.</p><p>After the analysis was done, me and my team sat down and brainstorm ideas: which audience we would be targeting (support teams, devs, marketing, etc) and prepared the attack. To facilitate the testing and final exploitation, I created a proof of concept exploit that loads a file and does the proper treating of the request, finally exploiting the vulnerability and generating a final phishing URL.</p><h4>HAPPY PHISHING</h4><p>One of the key patterns we noticed that enhanced our ability to perform credible phishing was the fact that, not only the application gave us the full path to the uploaded file inside the S3 bucket but it was also exposing the same files through another domain (static.target.com). This behavior can be seen in many organizations, where they will have a “static” subdomain which loads static files to other web applications (or are used for other reasons, such as storage of landing pages). This static content is often stored in buckets.</p><p>By referencing the same file inside “static.target.com”, we were able to access it normally This is great because the URL is going to be perfectly <em>digestible</em> for most users, since many of the targets would not think much when clicking a linking that sends them to a legitimate domain of their own company that they might already know exists. Then, again, we would be exploiting the <em>expectation</em> that this subdomain is safe, since it have always been safe until this specific instance.</p><p>You can find a PoC script that exploits this simple vulnerability in my <a href="https://github.com/Sp1derM0rph3us/exploits-poc/blob/main/web-vulns/s3-bucket-poisoning.py">GitHub</a>. To exemplify it here, I created a simple login page fully in HTML:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/0*NnfBdLIBsKdNQaKW.png" /><figcaption>Fake login screen</figcaption></figure><p>For those which do not understand portuguese: it’s a simple “restricted access, please provide your credentials to continue” screen.</p><p>Inside the malicious “login_page.html” file, we inserted a simple POST form that sent to our machine the credentials provided and, then, redirected the user to another page. For this demo, I used Burp’s collaborator to demonstrate this.</p><p>Once the victim sent their credentials to our server, it would’ve been logged like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5Sv8_V0GumCS-4wd.png" /><figcaption>Receiving credentials in Collaborator</figcaption></figure><p>With this setup, we could gather plenty credentials used by collaborators inside the company which allowed for further tests inside environments previously not accessible through traditional technical exploitation. The rest is history.</p><h4>ANOTHER QUICK EXAMPLE</h4><p>This was an example of escalating an HTML file upload through unrestricted file upload, it was an exceptionally easy case (which is often not the norm). In another instance, we had to do some extra steps.</p><p>The client’s application allowed for the upload of PDF files to a S3 bucket and, in the process of doing so, it relied on the Content-Type header to force the file into a specific file format. For instance, if we uploaded a “evil.html” file but didn’t change the Content-Type (that defaults to PDF), it would force the file to PDF or a nonexistent file format. This is not sufficiently secure, since we just have to change the Content-Type to “text/html” and GG. In this instance we couldn’t perform a phishing attack since it was a traditional 1 week penetration test, but the attack path was there. This is also an interesting story, since it highlights how traditional penetration testing <strong>is not sufficient for an organization’s security anymore</strong>. We could’ve achieved <strong>full compromise</strong> from a completely unauthenticated perspective if we were less time and scope constrained. But this is a story for another time.</p><h3>SO, HOW THE HECK DO I DEFEND AGAINST THIS?</h3><p>Since this attack exploits such a fundamental aspect of the human nature, it is a challenge to mitigate it. This can not be easily prevented through traditional phishing training and phishing simulations <em>most</em> organizations do. And it is not only about zero trust either, because if we try to live a life where we fully do not trust anything (<strong>literally anything</strong>), we most likely would go crazy or, at the very least, become very inefficient professionals.</p><p>The best thing you, as an individual, can do is not <em>fully</em> trust anything. You can expect what once was true to be true again in the near future, but if it looks <em>different</em> than usual or if it <em>sounds</em> unusual, you should double check. Even if it comes from a trusted source.</p><p>Ask colegues if they’ve noticed or were warned of the changes you noticed, if they’ve received the same e-mail or just simply talk about it with someone else before taking action. This, of course, is bound to eventually fail anyway, but it’s the best you can do.</p><p>As an organization, you should aim to have <strong>defense in-depth</strong> and presume you will be breached sooner or later. Don’t only work <em>prevention</em>, work <em>handling</em>.</p><p>Whether you get initially breached by a malware delivered by a phishing campaign or by your employee’s accounts getting leaked because they inserted their credentials in a phishing website, you must be able to respond as quickly and precisely as possible.</p><p>The approach we discussed also have their own shortcomings. For instance, if you setup proper logging and monitoring, depending on the compromised application and its legitimate function, it would be possible to detect the attack by the sudden change in traffic type (for instance, if an endpoint is used to be accessed mostly by API endpoints, it should raise suspicion that suddenly common browsing client traffic is coming in) or volume (simply isn’t normal for the compromised endpoint to get so much traffic). Those were basic examples of patterns you could use to detect such attack, but you could setup other (more complex) methods.</p><p>We’ve been saying this for years and it still is one of the most fundamental truths about technology: <strong>no system is safe</strong>. If no system is safe, the best thing you can do is <strong>prepare</strong>.</p><h3>CONCLUSION</h3><p>This was a demonstration on how attackers can leverage a somewhat low-severity vulnerability to gain further access to a company’s environment. When we, as an industry, discuss phishing, we tend to talk about un-trusted source phishing (which comes from an attacker controlled and created infrastructure) but the risks of trusted source phishing are very real. Even though it might not be the primary method for phishing, once it happens it tends to hurt as bad, maybe even worse. I hope that this article has shed some light on the issue and brought some knowledge, even if little, to you.</p><p>Keep hacking,<br><strong>Sp1d3rM*!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*vjy_Z97U_4751voe.gif" /><figcaption>‘till next time!</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=271fda69bf0f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>