SlideShare una empresa de Scribd logo
1 de 66
© Black Hills Information Security | @BHInfoSecurity
Red Team Apocalypse
Beau Bullock (@dafthack)
© Black Hills Information Security | @BHInfoSecurity
Sobre la charla
• La perspective del Blue Team:
• El ultimo pentest salio bien
• No se encontraron vulnerabilidades criticas
• Sistemas parchados, controls de acceso de
red, application whitelisting, etc…
• Pero…
• …La organizacion encuentra una base de datos
critica siendo vendida en la dark web ( o en
Wilson) . Que paso ?
• La perspectiva del Red Team:
• La organizacion objetivo tiene los ultimos productos: EDR/BA/AV
• La Ingenieria social standard no funciona
© Black Hills Information Security | @BHInfoSecurity
About
• Pentest/Red Team en Black Hills
Information Security
• Con certificationes por SANS, OffSec, y
otros…
• Organizador de CitySec Meetup
• Podcasts
• Tradecraft Security | Weekly, Hacker
Dialogues | CoinSe
• Entusiasta avido de OWA
© Black Hills Information Security | @BHInfoSecurity
Original Pentest
Apocalypse
• Vulnerability Management Program
• Group Policy Preferences
• Widespread Local Administrator
Account
• Weak Passwords (Password
Spraying)
• Over Privileged Users
• Sensitive Data in File Shares
• Intranet Information Disclosure
• NetBios and LLMNR Poisoning
• Local Workstation Privilege
Escalation
© Black Hills Information Security | @BHInfoSecurity
Red Team vs Pen Test
• Un Pentest tradicional busca encontrar la mayor cantidad de
vulnerabilidades en el tiempo establecido
• Usar herramientas COTS tools como scaners de vulnerabilidades
• Generalmente no preocupa alertar al blue team
• Las pruebas Red Team simulan adversarios
reales enfocados en lograr un objetivo.
• Se tiende a usar backdoors y herramientas
propias
• Se intenta pasar desapercibido y no alertar al
blue team
© Black Hills Information Security | @BHInfoSecurity
Red Team Methodology
• Reconnaissance
• Compromise
• Persistence
• Command and Control
• Asset Discovery
• Privilege Escalation
• Lateral Movement
• Actions on Objectives
© Black Hills Information Security | @BHInfoSecurity
Reconnaissance
© Black Hills Information Security | @BHInfoSecurity
External Recon
• Passively discover:
• External hosts
• Contacts at target organization
• Usan infrastructura en la nube ?
O365, Amazon AWS, Google G-
Suite, etc…
• Recon-NG
• Shodan
• LinkedIn
© Black Hills Information Security | @BHInfoSecurity
PowerMeta
• Descubriar archivos expuestos
publicamente
• Extraer metadata
• Provee informacion de
• La nomenclatura de usuarios (jperez vs
perezj)
• Nombres de equipos
• Informacion del Domain ( Active
Diretory)
• https://github.com/dafthack/Power
Meta
© Black Hills Information Security | @BHInfoSecurity
Compromise
© Black Hills Information Security | @BHInfoSecurity
Email Attacks
© Black Hills Information Security | @BHInfoSecurity
Business Email
Compromise
• Los portals externos de correo ( webmail )
• Incluso si usan 2 factores de autenticacion
• OWA I’m looking at you
• Servicios en la nube tambien son objectivos(Gmail,
O365, etc.)
• Pentesters pueden ignorar sistemas de correo
como objectivo
• Atacantes maliciosos (y Red Teamers) no
• Los servidores de correo son un gran fuente de
informacion para un atacante para entender la
red interna
•
© Black Hills Information Security | @BHInfoSecurity
Business Email Compromise
• MailSniper
• https://github.com/dafthack/MailSniper
• Enumeracion de usuarios / dominio
• Password Spraying
• Descarga del GAL ( Global Address List )
• Descubre Open Inbox delegation
• Permite buscar texto en correos como passwords,
2FA codes, etc…
• Salta algunos productios 2FA al conectarse
directamente a EWS ( Exchange Web Services ) en
vez de OWA
•
© Black Hills Information Security | @BHInfoSecurity
OWA Attack Flow
© Black Hills Information Security | @BHInfoSecurity
Red Teaming G-Suite
© Black Hills Information Security | @BHInfoSecurity
Google Hangouts Ruse
• Remember this? ----------->
• Una invitacion a chatear en Gmail
• Aparentemente esto era mucho
trabajo para algunos usuarios
© Black Hills Information Security | @BHInfoSecurity
Google Hangouts Ruse
• Ahora, Google Hangouts permite
chatear sin tener que aprobar
• Solo se necesita tener el correo
• Puedes enviar un mensaje
aparentando ser alguien mas
• Di hola, envia un link, roba
credenciales y/o obtienes una shell
© Black Hills Information Security | @BHInfoSecurity
Google Hangouts Ruse
• Puedes cambiar los settings para requirir
ver una invitacion
• Pero incluso con eso, impersonar a alguien
es posible
• Para configurar invicationes:
• Hangouts.google.com, click hamburger menu
in top left, Settings, “Customize Invite
Settings”, switch all to “Can send you an
invitation”
• There doesn’t appear to be a global option
for locking down accounts across an org
© Black Hills Information Security | @BHInfoSecurity
Google Doc Ruse
• Que tal si logramos que google envio un correo de phising por ti ?
• Google Docs es perfecto para esto
• Crea un Google Doc con un nombre llamativo como “Critical Update
Pending”
• Anhade contenido y un comentario al doc con tu link phishing
• En el comentario, escribe la direccion de la victima con el prefijo “+”
(i.e. +hacker@gmail.com) then check ‘Assign’
• Google enviara un correo a tu objectivo desde <random-
string>@docs.google.com
© Black Hills Information Security | @BHInfoSecurity
Google Doc Ruse
© Black Hills Information Security | @BHInfoSecurity
Google Doc Ruse
© Black Hills Information Security | @BHInfoSecurity
Google Calendar Event
Injection
• Silencioamente inyecta eventos en
un calendario
• Crea urgencia a traves de
recordatorios
• Incluye un link malicioso
• An email isn’t necessary, simply
add a Google user to an event and
select checkbox to not notify them
• Google will automatically add it to
their calendar
• This presents a unique phishing
situation
© Black Hills Information Security | @BHInfoSecurity
• A few ideas:
• Include a link to a conference call site but
have it pointing to a credential collection
page (CredSniper!)
• Include a malicious “agenda”
• Have victims navigate to a fake Google
Auth page and collect creds
• Gets more fun with Google API
• It’s possible to make it look like they
already accepted the invite!
• This completely bypasses the setting in
G-calendar for not auto-adding events.
•
Google Calendar Event
Injection
© Black Hills Information Security | @BHInfoSecurity
Phishing 2FA Creds
© Black Hills Information Security | @BHInfoSecurity
• CredSniper by Mike Felch (@ustayready)
• https://github.com/ustayready/CredSniper
• Framework para obtener credenciales
• Puede clonar un sitio web
• Intercepta tokens de 2FA
• Redirige a la victima a la web real y
permite al atacante obtener acceso
Phishing 2FA Creds
© Black Hills Information Security | @BHInfoSecurity
Malicious Outlook Add-Ins
© Black Hills Information Security | @BHInfoSecurity
Outlook Web Add-Ins
• Microsoft permite add-ins para varios
productos
• Outlook tiene “Web Addins” como tambien
desktop add-ins
• LOS WEB ADD-INS SON SYNCRONIZADOS A
LOS CLIENTES DE BROWSER & ESCRITORIO
• El ataque:
• Consigue credentiales
• Anhade un Add-in malcioso al Outlook web
client
• El add-in es replicado a las sesiones web y el
cliente de escritorio Outlook
© Black Hills Information Security | @BHInfoSecurity
Outlook Add-in Potential
• Bueno… puede literalmente forzar al browser
a visitar a un site malicioso.
• Cada vez que el add-in es ejecutado, usa el
archivo “Manifest”
• Podemos hostear cualquier html/js
• Nota: El Outlook desktop client usa el
browser Edge
Que puede hacer un add-in ?
© Black Hills Information Security | @BHInfoSecurity
Outlook Add-In Browser
Hook
• Browser Exploitation Framework (BeEF)
• Inyectar hook.js al add-in
• Se puede utilizar plugins de BeEF
• Enumerate system/browser/LAN
• Inyectar otros frames
• Puedes lanzar un formulario para robar
credenciales, descargar un, etc...
• Es necesario mas research en el potential
para moviento lateral interno.
Podemos “infectar” el browser de la victima
usando BeEF!
© Black Hills Information Security | @BHInfoSecurity
DEMO:
Outlook Add-In PoC
© Black Hills Information Security | @BHInfoSecurity
Onsite Attacks
© Black Hills Information Security | @BHInfoSecurity
Dropbox
• Un dispositivo de pentesting
completamente funcional que puede ser
dejado en las premisas del objectivo
• Utiliza tuneles SSH reversos persistentes
• Puedes ser controlado por Wifi
• Relativamente indistinguible
• ODROID-C2 instruciones aqui:
• https://www.blackhillsinfosec.com/how-to-
build-your-own-penetration-testing-drop-
box/
© Black Hills Information Security | @BHInfoSecurity
NAC Bypass
• Impersonar a otro dispositivo
• Encuentra una impresora o un telefono VOIP; Anota y
replica la MAC and/or IP
• Voiphopper to para saltar de VLAN’s
• Para NAC en Wi-Fi impersona la MAC y el User Agent
de un dispositivo conectado
• Dispositivo Nat de Capa 2 y Capa 3
• Helps avoid triggering port security rules on 802.1X
• Device spoofs both sides of wire
• Passively learns MAC addresses
• Check out SilentBridge -
https://github.com/s0lst1c3/silentbridge
© Black Hills Information Security | @BHInfoSecurity
PXE Booting Attacks
• Obtain the “Golden” image from the network
• Set VM to “Boot from network”, boot VM,
and get the image
• Mount image & profit
• Steal Admin hashes
• Set local admin pass pre-boot
• Overwrite Sticky keys (sethc.exe)
© Black Hills Information Security | @BHInfoSecurity
Persistence
© Black Hills Information Security | @BHInfoSecurity
Backdoors for
Persistence
• Microsoft O365/Azure:
• Un Add-In de Outlook que reenvie todos
los correos a un atacante
• Una cuenta backdoor en Azure
• Todos los usuarios del dominio O365 pueden
ver informacion sobre otros usuarios incluyendo
usuarios, correo, telefono, etc.
• Google G-Suite:
• Application Password
• Backup Codes
• Email forward rule
© Black Hills Information Security | @BHInfoSecurity
Command and Control
© Black Hills Information Security | @BHInfoSecurity
Expired Categorized Domains
© Black Hills Information Security | @BHInfoSecurity
Expired Categorized
Domains
• Tecnica usada para saltarse la categorizacion
utilizado por los proxies web
• Utilizar sites que hayan sido previamente
categorizados
• Trivial para encontrar
• expireddomains.net
• Domainhunter.py
• Simula utilizar un sitio web comprometido
© Black Hills Information Security | @BHInfoSecurity
Domain Fronting
© Black Hills Information Security | @BHInfoSecurity
Domain Fronting
• Otra tecnica utilizada para saltar restriciones del web proxy
• Esconde el verdadero destino de una coneccion TTP
• Initial target domain for the traffic
redirects to secondary host
• Can use a Content Delivery
Network such as AWS Cloudfront
•Can be difficult to detect and block
•Wait your C2 channel is going to
“opensource.carbonblack.com”?
© Black Hills Information Security | @BHInfoSecurity
Domain Fronting
© Black Hills Information Security | @BHInfoSecurity
Asset Discovery
© Black Hills Information Security | @BHInfoSecurity
PowerUp SQL
• Herramienta en PowerShell par atacar
MSSQL
• https://github.com/NetSPI/PowerUpSQL
• SQL Server discovery
• Detecta configuraciones debiles
• Escalamiento de privilegios
• Data sample searches
• OS command injection
© Black Hills Information Security | @BHInfoSecurity
Privilege Escalation
© Black Hills Information Security | @BHInfoSecurity
Kerberoasting
• Permite a un usuario preguntar al dominio por un Service Principal
Name ( SPN ) de una cuenta asociada a un servicio
• Un peticion de autenticacion por Kerberos
resulta en un Service Ticket que en parte es
encriptado utilizando el password hash de
la Service Account.
• Lo que esto significa es que un usuario del
dominio puede obtener el hash de una
cuenta e intentar crackearla para elevar
privilegios.
© Black Hills Information Security | @BHInfoSecurity
Weaponized LNK File
• Deja un archivo shortcut (LNK) en un directorio compartido
• El icono apunta a una locacion UNC controlada por el atacante
• El atacante levante un servicio
SMB
• Se puede usar Inveigh
• https://github.com/Kevin-
Robertson/Inveigh
• Obteher hashes NetNTLMv2
© Black Hills Information Security | @BHInfoSecurity
Evading Failed Login Detection
© Black Hills Information Security | @BHInfoSecurity
Evading Failed Login
Detection
• Standard password spraying alerted on?
• Looked to evade and tried RDP spraying
• Tested out xFreeRDP from Linux against a
Windows Server RDP
• To our surprise the failed login event did not
contain the source IP address…
• Hostname was in the log… but xFreeRDP has an
option to set the client hostname (wat?)
• Set out to write a spraying tool for RDP
© Black Hills Information Security | @BHInfoSecurity
NLA FTW
• Why was there no IP in the log?
• It turns out RDP w/ NLA (Network Layer Authentication) doesn’t log
source IP in the security log
• NLA pre-authenticates prior to RDP access
• Causes Logon type 3 (Network) instead of 10 (RemoteInteractive)
• Allegedly there is supposed to be a log with the IP located here:
Applications and Services Logs > Microsoft > Windows >
RemoteDesktopServices-RdpCoreTS > Operational (Event ID 140)
© Black Hills Information Security | @BHInfoSecurity
What log?
• This is what a failed RDP using NLA should look like:
• …But authenticating via NLA doesn’t <ALWAYS> generate this log…
Because this alert is very, VERY misleading.
• It turns out this alert only fires when the USER is invalid.
• Valid user + invalid password = No eventID 140 log
Remember this is an “Applications and Services Log”... not “Security”
© Black Hills Information Security | @BHInfoSecurity
DEMO:
RDPSpray PoC
© Black Hills Information Security | @BHInfoSecurity
Lateral Movement
© Black Hills Information Security | @BHInfoSecurity
Living off the Land
• Utilizar herramientas nativas para
evitar descargar malware
• Reconocimiento de usuarios/grupos
• Listar directorios remotos, copiar.
• Ejectuar procesos remotamente
• Ataques de password
• Descubrimiento de red
• Windows tiene mucho para usar
ofensivamente:
• PowerShell, C#, WMI, etc…
© Black Hills Information Security | @BHInfoSecurity
Living off the Land
• Comandos net
• net groups “DOMAIN ADMINS” /DOMAIN
• net accounts /domain
• net localgroup administrators hax /add
• Listar directorios remotoes
• dir hostC$files
• get-WmiObject -class Win32_Share -
computer
• Ejecutar comandos remotamente
• Invoke-Command -ComputerName -
ScriptBlock {Command Here}
• wmic /node:”computer-name” process call
create “cmd.exe /c C:evil.bat”
• Crear tarejas programads
• SCHTASKS /s remote_machine /U username
/P password /create /tn “not evil" /tr
"C:evil.bat" /sc ONCE /sd 01/01/1910 /st
00:00
•WMI
• WMI OPS from Chris Truncer -
https://github.com/FortyNorthSecurity/WMI
Ops
• Encontrar passwords en GPP
• findstr /S cpassword
%logonserver%sysvol*.xml
• CMD.exe Password Spray
• @FOR /F %n in (users.txt) DO @FOR /F %p in
(pass.txt) DO @net use
DOMAINCONTROLLERIPC$
/user:DOMAIN%n %p 1>NUL 2>&1 &&
@echo [*] %n:%p && @net use /delete
DOMAINCONTROLLERIPC$ > NUL
© Black Hills Information Security | @BHInfoSecurity
Stealthy Host/Domain
Enumeration
• Cada vez hay mas y mas antivirus,
analisis de compartamiento, app
whitelisting, etc. los productos ahora
bloquean on alertan cuando se usando
comandos nativos
• Ejem:net, ipconfig, whoami, netstat,
etc.
• Puedes usar PowerShell en vez de las
tools nativas
• https://github.com/dafthack/HostRecon
• Utiliza tambien tecnicas para usar
Powershell sin llamar a powershell.exe
© Black Hills Information Security | @BHInfoSecurity
BloodHound
• Enumera y obteiener:
• Los administratores en todos los sistemas
• Sesiones de usuario
• Information de gruops
• Informacion de confianza entre dominios
• Encuentra un camino a Domain Admin
• Author(s):
• Andrew Robbins (@_wald0), Will Schroeder
(@harmj0y), and Rohan Vazarkar (@CptJesus)
• https://github.com/BloodHoundAD/BloodHound
© Black Hills Information Security | @BHInfoSecurity
Actions and Objectives
© Black Hills Information Security | @BHInfoSecurity
Finding Sensitive Data
• PowerView ShareFinder/FileFinder
• Find shares on network then search them for files with certain terms in
title: ‘*pass*’, ‘*sensitive*’, ‘*admin*’, ‘*secret*’, ‘*login*’,
‘*unattend*.xml’, ‘*.vmdk’, ‘*creds*’, or ‘*credential*’
• Locate RDP Jump Hosts
• Get-NetComputers | Get-NetRDPSessions | Export-Csv –
NoTypeInformation rdpsessions.csv
• Admin on Virtualization Hypervisors
© Black Hills Information Security | @BHInfoSecurity
Detection and Prevention
© Black Hills Information Security | @BHInfoSecurity
Solid Systems
Administration
• Systems and software inventory (yes, CSC Top 20 are useful)
• Workstations should never talk to workstations - client to server
communication only
• Windows firewall or Private VLANS
• Baseline images with GPO enforcement
• All inbound and outbound network traffic go through an application
proxy system
• Any exceptions for direct outbound communication are by documented
exception only
•
© Black Hills Information Security | @BHInfoSecurity
Enforce Good User
Behavior
• Change every inbound email subject line with a tag such as
(External):
• Inform your users that any email with that tag needs extra scrutiny
• Minimum of 15 characters for any domain account password
• If you have to compromise to sell it to the business, no complexity
requirements and 6 month change interval
• Consider additional credential defenses
• Commercial offerings available
• CredDefense Toolkit for Free
• https://github.com/creddefense
© Black Hills Information Security | @BHInfoSecurity
Host Log Consolidation
• Consolida los logs mas importantes de las laptops/desktops,
servidores a una locacion central
• Monitorea Powershell y ejecusion de procesos
• Sysmon es una poderosa y gratis options para monitorear actividad
de los hosts
• Una vez con el monitoreo, configura alertas en “comandos
anormales” como commandos net
• No tiene que ser caro:
• https://www.blackhillsinfosec.com/end-point-log-consolidation-windows-
event-forwarder/
© Black Hills Information Security | @BHInfoSecurity
Network Logging
• NetFlow, Bro, or Full Packet Capture?
• Depende del presupuesto y capacidades
• Bro es un buen balance entre NetFlow 5-Tuple y los requerimientos
de storage de Full Packet Capture.
• Captura los protocles mas comunes a archivos de texto
• Provee visibilidad a trafico SSL sin tener que romper SSL
• Informacion anomala de un certificado
• SSL fingerprinting - JA3 project - https://github.com/salesforce/ja3
• Detectar un backdoor con RITA (AIHunt)
• https://www.blackhillsinfosec.com/projects/rita/
© Black Hills Information Security | @BHInfoSecurity
Red Team Prepper
• Don’t wait on the Red Team prepare on your
own
• Use @vysecurity’s Red Team Tips to find
techniques to try to detect
• https://github.com/vysec/RedTips
• MITRE ATT&CK Framework for threat actor
techniques
• https://attack.mitre.org/wiki/Main_Page
• Red Canary’s Atomic Red Team - portable
scripts to test ATT&CK framework
• https://github.com/redcanaryco/atomic-red-team
© Black Hills Information Security | @BHInfoSecurity
Summary and
Conclusions
• Black Hills Information Security
• http://www.blackhillsinfosec.com
• @BHInfoSecurity
• Beau Bullock @dafthack
• Questions?

Más contenido relacionado

Similar a Red Team Apocalypse - BSides Peru (En español)

Summer boot camp sciende umh
Summer boot camp sciende umhSummer boot camp sciende umh
Summer boot camp sciende umhAlejandro Quesada
 
Protegiendo los secretos de tus aplicaciones con Azure Key Vault
Protegiendo los secretos de tus aplicaciones con Azure Key VaultProtegiendo los secretos de tus aplicaciones con Azure Key Vault
Protegiendo los secretos de tus aplicaciones con Azure Key VaultLuis Beltran
 
Wordpress hardening (Campus Party Mexico 4)
Wordpress hardening (Campus Party Mexico 4)Wordpress hardening (Campus Party Mexico 4)
Wordpress hardening (Campus Party Mexico 4)hecky NeobitsOrg
 
Vulnerabilidades en Aplicaciones Web PHP
Vulnerabilidades en Aplicaciones Web PHPVulnerabilidades en Aplicaciones Web PHP
Vulnerabilidades en Aplicaciones Web PHPMoises Silva
 
La Web como plataforma de referencia: viejos ataques y nuevas vulnerabilidades
La Web como plataforma de referencia: viejos ataques y nuevas vulnerabilidadesLa Web como plataforma de referencia: viejos ataques y nuevas vulnerabilidades
La Web como plataforma de referencia: viejos ataques y nuevas vulnerabilidadesNextel S.A.
 
La Web como plataforma de referencia: viejos ataques y nuevas vulnerabilidades
La Web como plataforma de referencia: viejos ataques y nuevas vulnerabilidadesLa Web como plataforma de referencia: viejos ataques y nuevas vulnerabilidades
La Web como plataforma de referencia: viejos ataques y nuevas vulnerabilidadesPablo Garaizar
 
STIC XV CCN-CERT - Cibervigilancia con warrior (Ivan Portillo y Wiktor Nykiel)
STIC XV CCN-CERT - Cibervigilancia con warrior (Ivan Portillo y Wiktor Nykiel)STIC XV CCN-CERT - Cibervigilancia con warrior (Ivan Portillo y Wiktor Nykiel)
STIC XV CCN-CERT - Cibervigilancia con warrior (Ivan Portillo y Wiktor Nykiel)Iván Portillo
 
Virus, el arte de algunos - Alberto García de Dios (/Rooted CON 2011)
Virus, el arte de algunos - Alberto García de Dios (/Rooted CON 2011)Virus, el arte de algunos - Alberto García de Dios (/Rooted CON 2011)
Virus, el arte de algunos - Alberto García de Dios (/Rooted CON 2011)Oskar Laguillo
 
Seguridad en Aplicaciones Web y Comercio Electrónico
Seguridad en Aplicaciones Web y Comercio ElectrónicoSeguridad en Aplicaciones Web y Comercio Electrónico
Seguridad en Aplicaciones Web y Comercio ElectrónicoRené Olivo
 
De presa a cazador Campus Party 2011
De presa a cazador Campus Party 2011De presa a cazador Campus Party 2011
De presa a cazador Campus Party 2011Jhon Jairo Hernandez
 
De presa a cazador
De presa a cazador De presa a cazador
De presa a cazador campus party
 
Diapositivas exposición no. 6
Diapositivas exposición no. 6Diapositivas exposición no. 6
Diapositivas exposición no. 6xcardonal
 

Similar a Red Team Apocalypse - BSides Peru (En español) (20)

14-Seguridad de la Información
14-Seguridad de la Información14-Seguridad de la Información
14-Seguridad de la Información
 
Summer boot camp sciende umh
Summer boot camp sciende umhSummer boot camp sciende umh
Summer boot camp sciende umh
 
Msdn Te Invita A Ser Parte De UXity
Msdn Te Invita A Ser Parte De UXityMsdn Te Invita A Ser Parte De UXity
Msdn Te Invita A Ser Parte De UXity
 
(13/05) MSDN te invita a ser parte de Uxity
(13/05) MSDN te invita a ser parte de Uxity(13/05) MSDN te invita a ser parte de Uxity
(13/05) MSDN te invita a ser parte de Uxity
 
Phish and tricks
Phish and tricksPhish and tricks
Phish and tricks
 
Protegiendo los secretos de tus aplicaciones con Azure Key Vault
Protegiendo los secretos de tus aplicaciones con Azure Key VaultProtegiendo los secretos de tus aplicaciones con Azure Key Vault
Protegiendo los secretos de tus aplicaciones con Azure Key Vault
 
webminar ataques de fuerza bruta kali linux
webminar ataques de fuerza bruta kali linux webminar ataques de fuerza bruta kali linux
webminar ataques de fuerza bruta kali linux
 
Wordpress hardening (Campus Party Mexico 4)
Wordpress hardening (Campus Party Mexico 4)Wordpress hardening (Campus Party Mexico 4)
Wordpress hardening (Campus Party Mexico 4)
 
Vulnerabilidades en Aplicaciones Web PHP
Vulnerabilidades en Aplicaciones Web PHPVulnerabilidades en Aplicaciones Web PHP
Vulnerabilidades en Aplicaciones Web PHP
 
La Web como plataforma de referencia: viejos ataques y nuevas vulnerabilidades
La Web como plataforma de referencia: viejos ataques y nuevas vulnerabilidadesLa Web como plataforma de referencia: viejos ataques y nuevas vulnerabilidades
La Web como plataforma de referencia: viejos ataques y nuevas vulnerabilidades
 
La Web como plataforma de referencia: viejos ataques y nuevas vulnerabilidades
La Web como plataforma de referencia: viejos ataques y nuevas vulnerabilidadesLa Web como plataforma de referencia: viejos ataques y nuevas vulnerabilidades
La Web como plataforma de referencia: viejos ataques y nuevas vulnerabilidades
 
STIC XV CCN-CERT - Cibervigilancia con warrior (Ivan Portillo y Wiktor Nykiel)
STIC XV CCN-CERT - Cibervigilancia con warrior (Ivan Portillo y Wiktor Nykiel)STIC XV CCN-CERT - Cibervigilancia con warrior (Ivan Portillo y Wiktor Nykiel)
STIC XV CCN-CERT - Cibervigilancia con warrior (Ivan Portillo y Wiktor Nykiel)
 
Virus, el arte de algunos - Alberto García de Dios (/Rooted CON 2011)
Virus, el arte de algunos - Alberto García de Dios (/Rooted CON 2011)Virus, el arte de algunos - Alberto García de Dios (/Rooted CON 2011)
Virus, el arte de algunos - Alberto García de Dios (/Rooted CON 2011)
 
Shuabang Botnet
Shuabang BotnetShuabang Botnet
Shuabang Botnet
 
Semana de la I+D - Proyecto OPOSSUM
Semana de la I+D - Proyecto OPOSSUMSemana de la I+D - Proyecto OPOSSUM
Semana de la I+D - Proyecto OPOSSUM
 
S8 hack-hacking con google bing y shodan p4
S8 hack-hacking con google bing y shodan p4S8 hack-hacking con google bing y shodan p4
S8 hack-hacking con google bing y shodan p4
 
Seguridad en Aplicaciones Web y Comercio Electrónico
Seguridad en Aplicaciones Web y Comercio ElectrónicoSeguridad en Aplicaciones Web y Comercio Electrónico
Seguridad en Aplicaciones Web y Comercio Electrónico
 
De presa a cazador Campus Party 2011
De presa a cazador Campus Party 2011De presa a cazador Campus Party 2011
De presa a cazador Campus Party 2011
 
De presa a cazador
De presa a cazador De presa a cazador
De presa a cazador
 
Diapositivas exposición no. 6
Diapositivas exposición no. 6Diapositivas exposición no. 6
Diapositivas exposición no. 6
 

Más de Beau Bullock

Getting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract AuditingGetting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract AuditingBeau Bullock
 
Getting Started in Pentesting the Cloud: Azure
Getting Started in Pentesting the Cloud: AzureGetting Started in Pentesting the Cloud: Azure
Getting Started in Pentesting the Cloud: AzureBeau Bullock
 
Weaponizing Corporate Intel: This Time, It's Personal!
Weaponizing Corporate Intel: This Time, It's Personal!Weaponizing Corporate Intel: This Time, It's Personal!
Weaponizing Corporate Intel: This Time, It's Personal!Beau Bullock
 
Travelocalypse: It's Dangerous Business, Hacker, Going Out Your Front Door
Travelocalypse: It's Dangerous Business, Hacker, Going Out Your Front DoorTravelocalypse: It's Dangerous Business, Hacker, Going Out Your Front Door
Travelocalypse: It's Dangerous Business, Hacker, Going Out Your Front DoorBeau Bullock
 
Covert Attack Mystery Box: A few novel techniques for exploiting Microsoft “f...
Covert Attack Mystery Box: A few novel techniques for exploiting Microsoft “f...Covert Attack Mystery Box: A few novel techniques for exploiting Microsoft “f...
Covert Attack Mystery Box: A few novel techniques for exploiting Microsoft “f...Beau Bullock
 
Red Team Apocalypse (RVAsec Edition)
Red Team Apocalypse (RVAsec Edition)Red Team Apocalypse (RVAsec Edition)
Red Team Apocalypse (RVAsec Edition)Beau Bullock
 
OK Google, How Do I Red Team GSuite?
OK Google, How Do I Red Team GSuite?OK Google, How Do I Red Team GSuite?
OK Google, How Do I Red Team GSuite?Beau Bullock
 
Red Team Apocalypse
Red Team ApocalypseRed Team Apocalypse
Red Team ApocalypseBeau Bullock
 
A Look Into Emerging Security Issues Within Cryptocurrency Ecosystems
A Look Into Emerging Security Issues Within Cryptocurrency EcosystemsA Look Into Emerging Security Issues Within Cryptocurrency Ecosystems
A Look Into Emerging Security Issues Within Cryptocurrency EcosystemsBeau Bullock
 
A Google Event You Won't Forget
A Google Event You Won't ForgetA Google Event You Won't Forget
A Google Event You Won't ForgetBeau Bullock
 
Pwning the Enterprise With PowerShell
Pwning the Enterprise With PowerShellPwning the Enterprise With PowerShell
Pwning the Enterprise With PowerShellBeau Bullock
 
How to Build Your Own Physical Pentesting Go-bag
How to Build Your Own Physical Pentesting Go-bagHow to Build Your Own Physical Pentesting Go-bag
How to Build Your Own Physical Pentesting Go-bagBeau Bullock
 
Pentest Apocalypse - SANSFIRE 2016 Edition
Pentest Apocalypse - SANSFIRE 2016 EditionPentest Apocalypse - SANSFIRE 2016 Edition
Pentest Apocalypse - SANSFIRE 2016 EditionBeau Bullock
 
Fade from Whitehat... to Black
Fade from Whitehat... to BlackFade from Whitehat... to Black
Fade from Whitehat... to BlackBeau Bullock
 
Beyond the Pentest: How C2, Internal Pivoting, and Data Exfiltration Show Tru...
Beyond the Pentest: How C2, Internal Pivoting, and Data Exfiltration Show Tru...Beyond the Pentest: How C2, Internal Pivoting, and Data Exfiltration Show Tru...
Beyond the Pentest: How C2, Internal Pivoting, and Data Exfiltration Show Tru...Beau Bullock
 
Pentest Apocalypse
Pentest ApocalypsePentest Apocalypse
Pentest ApocalypseBeau Bullock
 

Más de Beau Bullock (16)

Getting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract AuditingGetting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract Auditing
 
Getting Started in Pentesting the Cloud: Azure
Getting Started in Pentesting the Cloud: AzureGetting Started in Pentesting the Cloud: Azure
Getting Started in Pentesting the Cloud: Azure
 
Weaponizing Corporate Intel: This Time, It's Personal!
Weaponizing Corporate Intel: This Time, It's Personal!Weaponizing Corporate Intel: This Time, It's Personal!
Weaponizing Corporate Intel: This Time, It's Personal!
 
Travelocalypse: It's Dangerous Business, Hacker, Going Out Your Front Door
Travelocalypse: It's Dangerous Business, Hacker, Going Out Your Front DoorTravelocalypse: It's Dangerous Business, Hacker, Going Out Your Front Door
Travelocalypse: It's Dangerous Business, Hacker, Going Out Your Front Door
 
Covert Attack Mystery Box: A few novel techniques for exploiting Microsoft “f...
Covert Attack Mystery Box: A few novel techniques for exploiting Microsoft “f...Covert Attack Mystery Box: A few novel techniques for exploiting Microsoft “f...
Covert Attack Mystery Box: A few novel techniques for exploiting Microsoft “f...
 
Red Team Apocalypse (RVAsec Edition)
Red Team Apocalypse (RVAsec Edition)Red Team Apocalypse (RVAsec Edition)
Red Team Apocalypse (RVAsec Edition)
 
OK Google, How Do I Red Team GSuite?
OK Google, How Do I Red Team GSuite?OK Google, How Do I Red Team GSuite?
OK Google, How Do I Red Team GSuite?
 
Red Team Apocalypse
Red Team ApocalypseRed Team Apocalypse
Red Team Apocalypse
 
A Look Into Emerging Security Issues Within Cryptocurrency Ecosystems
A Look Into Emerging Security Issues Within Cryptocurrency EcosystemsA Look Into Emerging Security Issues Within Cryptocurrency Ecosystems
A Look Into Emerging Security Issues Within Cryptocurrency Ecosystems
 
A Google Event You Won't Forget
A Google Event You Won't ForgetA Google Event You Won't Forget
A Google Event You Won't Forget
 
Pwning the Enterprise With PowerShell
Pwning the Enterprise With PowerShellPwning the Enterprise With PowerShell
Pwning the Enterprise With PowerShell
 
How to Build Your Own Physical Pentesting Go-bag
How to Build Your Own Physical Pentesting Go-bagHow to Build Your Own Physical Pentesting Go-bag
How to Build Your Own Physical Pentesting Go-bag
 
Pentest Apocalypse - SANSFIRE 2016 Edition
Pentest Apocalypse - SANSFIRE 2016 EditionPentest Apocalypse - SANSFIRE 2016 Edition
Pentest Apocalypse - SANSFIRE 2016 Edition
 
Fade from Whitehat... to Black
Fade from Whitehat... to BlackFade from Whitehat... to Black
Fade from Whitehat... to Black
 
Beyond the Pentest: How C2, Internal Pivoting, and Data Exfiltration Show Tru...
Beyond the Pentest: How C2, Internal Pivoting, and Data Exfiltration Show Tru...Beyond the Pentest: How C2, Internal Pivoting, and Data Exfiltration Show Tru...
Beyond the Pentest: How C2, Internal Pivoting, and Data Exfiltration Show Tru...
 
Pentest Apocalypse
Pentest ApocalypsePentest Apocalypse
Pentest Apocalypse
 

Último

David_Gallegos - tarea de la sesión 11.pptx
David_Gallegos - tarea de la sesión 11.pptxDavid_Gallegos - tarea de la sesión 11.pptx
David_Gallegos - tarea de la sesión 11.pptxDAVIDROBERTOGALLEGOS
 
Modelo de Presentacion Feria Robotica Educativa 2024 - Versión3.pptx
Modelo de Presentacion Feria Robotica Educativa 2024 - Versión3.pptxModelo de Presentacion Feria Robotica Educativa 2024 - Versión3.pptx
Modelo de Presentacion Feria Robotica Educativa 2024 - Versión3.pptxtjcesar1
 
Inteligencia Artificial. Matheo Hernandez Serrano USCO 2024
Inteligencia Artificial. Matheo Hernandez Serrano USCO 2024Inteligencia Artificial. Matheo Hernandez Serrano USCO 2024
Inteligencia Artificial. Matheo Hernandez Serrano USCO 2024u20211198540
 
Análisis de Artefactos Tecnologicos (3) (1).pdf
Análisis de Artefactos Tecnologicos  (3) (1).pdfAnálisis de Artefactos Tecnologicos  (3) (1).pdf
Análisis de Artefactos Tecnologicos (3) (1).pdfsharitcalderon04
 
CommitConf 2024 - Spring Boot <3 Testcontainers
CommitConf 2024 - Spring Boot <3 TestcontainersCommitConf 2024 - Spring Boot <3 Testcontainers
CommitConf 2024 - Spring Boot <3 TestcontainersIván López Martín
 
Red Dorsal Nacional de Fibra Óptica y Redes Regionales del Perú
Red Dorsal Nacional de Fibra Óptica y Redes Regionales del PerúRed Dorsal Nacional de Fibra Óptica y Redes Regionales del Perú
Red Dorsal Nacional de Fibra Óptica y Redes Regionales del PerúCEFERINO DELGADO FLORES
 
LUXOMETRO EN SALUD OCUPACIONAL(FINAL).ppt
LUXOMETRO EN SALUD OCUPACIONAL(FINAL).pptLUXOMETRO EN SALUD OCUPACIONAL(FINAL).ppt
LUXOMETRO EN SALUD OCUPACIONAL(FINAL).pptchaverriemily794
 
La electricidad y la electronica.10-7.pdf
La electricidad y la electronica.10-7.pdfLa electricidad y la electronica.10-7.pdf
La electricidad y la electronica.10-7.pdfcristianrb0324
 
PLANEACION DE CLASES TEMA TIPOS DE FAMILIA.docx
PLANEACION DE CLASES TEMA TIPOS DE FAMILIA.docxPLANEACION DE CLASES TEMA TIPOS DE FAMILIA.docx
PLANEACION DE CLASES TEMA TIPOS DE FAMILIA.docxhasbleidit
 
Trabajando con Formasy Smart art en power Point
Trabajando con Formasy Smart art en power PointTrabajando con Formasy Smart art en power Point
Trabajando con Formasy Smart art en power PointValerioIvanDePazLoja
 
Análisis de los artefactos (nintendo NES)
Análisis de los artefactos (nintendo NES)Análisis de los artefactos (nintendo NES)
Análisis de los artefactos (nintendo NES)JuanStevenTrujilloCh
 
La Electricidad Y La Electrónica Trabajo Tecnología.pdf
La Electricidad Y La Electrónica Trabajo Tecnología.pdfLa Electricidad Y La Electrónica Trabajo Tecnología.pdf
La Electricidad Y La Electrónica Trabajo Tecnología.pdfjeondanny1997
 
LINEA DE TIEMPO LITERATURA DIFERENCIADO LITERATURA.pptx
LINEA DE TIEMPO LITERATURA DIFERENCIADO LITERATURA.pptxLINEA DE TIEMPO LITERATURA DIFERENCIADO LITERATURA.pptx
LINEA DE TIEMPO LITERATURA DIFERENCIADO LITERATURA.pptxkimontey
 
Slideshare y Scribd - Noli Cubillan Gerencia
Slideshare y Scribd - Noli Cubillan GerenciaSlideshare y Scribd - Noli Cubillan Gerencia
Slideshare y Scribd - Noli Cubillan Gerenciacubillannoly
 
Agencia Marketing Branding Google Workspace Deployment Services Credential Fe...
Agencia Marketing Branding Google Workspace Deployment Services Credential Fe...Agencia Marketing Branding Google Workspace Deployment Services Credential Fe...
Agencia Marketing Branding Google Workspace Deployment Services Credential Fe...Marketing BRANDING
 
certificado de oracle academy cetrificado.pdf
certificado de oracle academy cetrificado.pdfcertificado de oracle academy cetrificado.pdf
certificado de oracle academy cetrificado.pdfFernandoOblitasVivan
 
_Planificacion Anual NTICX 2024.SEC.21.4.1.docx.pdf
_Planificacion Anual NTICX 2024.SEC.21.4.1.docx.pdf_Planificacion Anual NTICX 2024.SEC.21.4.1.docx.pdf
_Planificacion Anual NTICX 2024.SEC.21.4.1.docx.pdfBetianaJuarez1
 
TALLER DE ANALISIS SOLUCION PART 2 (1)-1.docx
TALLER DE ANALISIS SOLUCION  PART 2 (1)-1.docxTALLER DE ANALISIS SOLUCION  PART 2 (1)-1.docx
TALLER DE ANALISIS SOLUCION PART 2 (1)-1.docxobandopaula444
 
Herramientas que posibilitan la información y la investigación.pdf
Herramientas que posibilitan la información y la investigación.pdfHerramientas que posibilitan la información y la investigación.pdf
Herramientas que posibilitan la información y la investigación.pdfKarinaCambero3
 

Último (20)

David_Gallegos - tarea de la sesión 11.pptx
David_Gallegos - tarea de la sesión 11.pptxDavid_Gallegos - tarea de la sesión 11.pptx
David_Gallegos - tarea de la sesión 11.pptx
 
Modelo de Presentacion Feria Robotica Educativa 2024 - Versión3.pptx
Modelo de Presentacion Feria Robotica Educativa 2024 - Versión3.pptxModelo de Presentacion Feria Robotica Educativa 2024 - Versión3.pptx
Modelo de Presentacion Feria Robotica Educativa 2024 - Versión3.pptx
 
Inteligencia Artificial. Matheo Hernandez Serrano USCO 2024
Inteligencia Artificial. Matheo Hernandez Serrano USCO 2024Inteligencia Artificial. Matheo Hernandez Serrano USCO 2024
Inteligencia Artificial. Matheo Hernandez Serrano USCO 2024
 
Análisis de Artefactos Tecnologicos (3) (1).pdf
Análisis de Artefactos Tecnologicos  (3) (1).pdfAnálisis de Artefactos Tecnologicos  (3) (1).pdf
Análisis de Artefactos Tecnologicos (3) (1).pdf
 
CommitConf 2024 - Spring Boot <3 Testcontainers
CommitConf 2024 - Spring Boot <3 TestcontainersCommitConf 2024 - Spring Boot <3 Testcontainers
CommitConf 2024 - Spring Boot <3 Testcontainers
 
Red Dorsal Nacional de Fibra Óptica y Redes Regionales del Perú
Red Dorsal Nacional de Fibra Óptica y Redes Regionales del PerúRed Dorsal Nacional de Fibra Óptica y Redes Regionales del Perú
Red Dorsal Nacional de Fibra Óptica y Redes Regionales del Perú
 
LUXOMETRO EN SALUD OCUPACIONAL(FINAL).ppt
LUXOMETRO EN SALUD OCUPACIONAL(FINAL).pptLUXOMETRO EN SALUD OCUPACIONAL(FINAL).ppt
LUXOMETRO EN SALUD OCUPACIONAL(FINAL).ppt
 
La electricidad y la electronica.10-7.pdf
La electricidad y la electronica.10-7.pdfLa electricidad y la electronica.10-7.pdf
La electricidad y la electronica.10-7.pdf
 
PLANEACION DE CLASES TEMA TIPOS DE FAMILIA.docx
PLANEACION DE CLASES TEMA TIPOS DE FAMILIA.docxPLANEACION DE CLASES TEMA TIPOS DE FAMILIA.docx
PLANEACION DE CLASES TEMA TIPOS DE FAMILIA.docx
 
Trabajando con Formasy Smart art en power Point
Trabajando con Formasy Smart art en power PointTrabajando con Formasy Smart art en power Point
Trabajando con Formasy Smart art en power Point
 
Análisis de los artefactos (nintendo NES)
Análisis de los artefactos (nintendo NES)Análisis de los artefactos (nintendo NES)
Análisis de los artefactos (nintendo NES)
 
El camino a convertirse en Microsoft MVP
El camino a convertirse en Microsoft MVPEl camino a convertirse en Microsoft MVP
El camino a convertirse en Microsoft MVP
 
La Electricidad Y La Electrónica Trabajo Tecnología.pdf
La Electricidad Y La Electrónica Trabajo Tecnología.pdfLa Electricidad Y La Electrónica Trabajo Tecnología.pdf
La Electricidad Y La Electrónica Trabajo Tecnología.pdf
 
LINEA DE TIEMPO LITERATURA DIFERENCIADO LITERATURA.pptx
LINEA DE TIEMPO LITERATURA DIFERENCIADO LITERATURA.pptxLINEA DE TIEMPO LITERATURA DIFERENCIADO LITERATURA.pptx
LINEA DE TIEMPO LITERATURA DIFERENCIADO LITERATURA.pptx
 
Slideshare y Scribd - Noli Cubillan Gerencia
Slideshare y Scribd - Noli Cubillan GerenciaSlideshare y Scribd - Noli Cubillan Gerencia
Slideshare y Scribd - Noli Cubillan Gerencia
 
Agencia Marketing Branding Google Workspace Deployment Services Credential Fe...
Agencia Marketing Branding Google Workspace Deployment Services Credential Fe...Agencia Marketing Branding Google Workspace Deployment Services Credential Fe...
Agencia Marketing Branding Google Workspace Deployment Services Credential Fe...
 
certificado de oracle academy cetrificado.pdf
certificado de oracle academy cetrificado.pdfcertificado de oracle academy cetrificado.pdf
certificado de oracle academy cetrificado.pdf
 
_Planificacion Anual NTICX 2024.SEC.21.4.1.docx.pdf
_Planificacion Anual NTICX 2024.SEC.21.4.1.docx.pdf_Planificacion Anual NTICX 2024.SEC.21.4.1.docx.pdf
_Planificacion Anual NTICX 2024.SEC.21.4.1.docx.pdf
 
TALLER DE ANALISIS SOLUCION PART 2 (1)-1.docx
TALLER DE ANALISIS SOLUCION  PART 2 (1)-1.docxTALLER DE ANALISIS SOLUCION  PART 2 (1)-1.docx
TALLER DE ANALISIS SOLUCION PART 2 (1)-1.docx
 
Herramientas que posibilitan la información y la investigación.pdf
Herramientas que posibilitan la información y la investigación.pdfHerramientas que posibilitan la información y la investigación.pdf
Herramientas que posibilitan la información y la investigación.pdf
 

Red Team Apocalypse - BSides Peru (En español)

  • 1. © Black Hills Information Security | @BHInfoSecurity Red Team Apocalypse Beau Bullock (@dafthack)
  • 2. © Black Hills Information Security | @BHInfoSecurity Sobre la charla • La perspective del Blue Team: • El ultimo pentest salio bien • No se encontraron vulnerabilidades criticas • Sistemas parchados, controls de acceso de red, application whitelisting, etc… • Pero… • …La organizacion encuentra una base de datos critica siendo vendida en la dark web ( o en Wilson) . Que paso ? • La perspectiva del Red Team: • La organizacion objetivo tiene los ultimos productos: EDR/BA/AV • La Ingenieria social standard no funciona
  • 3. © Black Hills Information Security | @BHInfoSecurity About • Pentest/Red Team en Black Hills Information Security • Con certificationes por SANS, OffSec, y otros… • Organizador de CitySec Meetup • Podcasts • Tradecraft Security | Weekly, Hacker Dialogues | CoinSe • Entusiasta avido de OWA
  • 4. © Black Hills Information Security | @BHInfoSecurity Original Pentest Apocalypse • Vulnerability Management Program • Group Policy Preferences • Widespread Local Administrator Account • Weak Passwords (Password Spraying) • Over Privileged Users • Sensitive Data in File Shares • Intranet Information Disclosure • NetBios and LLMNR Poisoning • Local Workstation Privilege Escalation
  • 5. © Black Hills Information Security | @BHInfoSecurity Red Team vs Pen Test • Un Pentest tradicional busca encontrar la mayor cantidad de vulnerabilidades en el tiempo establecido • Usar herramientas COTS tools como scaners de vulnerabilidades • Generalmente no preocupa alertar al blue team • Las pruebas Red Team simulan adversarios reales enfocados en lograr un objetivo. • Se tiende a usar backdoors y herramientas propias • Se intenta pasar desapercibido y no alertar al blue team
  • 6. © Black Hills Information Security | @BHInfoSecurity Red Team Methodology • Reconnaissance • Compromise • Persistence • Command and Control • Asset Discovery • Privilege Escalation • Lateral Movement • Actions on Objectives
  • 7. © Black Hills Information Security | @BHInfoSecurity Reconnaissance
  • 8. © Black Hills Information Security | @BHInfoSecurity External Recon • Passively discover: • External hosts • Contacts at target organization • Usan infrastructura en la nube ? O365, Amazon AWS, Google G- Suite, etc… • Recon-NG • Shodan • LinkedIn
  • 9. © Black Hills Information Security | @BHInfoSecurity PowerMeta • Descubriar archivos expuestos publicamente • Extraer metadata • Provee informacion de • La nomenclatura de usuarios (jperez vs perezj) • Nombres de equipos • Informacion del Domain ( Active Diretory) • https://github.com/dafthack/Power Meta
  • 10. © Black Hills Information Security | @BHInfoSecurity Compromise
  • 11. © Black Hills Information Security | @BHInfoSecurity Email Attacks
  • 12. © Black Hills Information Security | @BHInfoSecurity Business Email Compromise • Los portals externos de correo ( webmail ) • Incluso si usan 2 factores de autenticacion • OWA I’m looking at you • Servicios en la nube tambien son objectivos(Gmail, O365, etc.) • Pentesters pueden ignorar sistemas de correo como objectivo • Atacantes maliciosos (y Red Teamers) no • Los servidores de correo son un gran fuente de informacion para un atacante para entender la red interna •
  • 13. © Black Hills Information Security | @BHInfoSecurity Business Email Compromise • MailSniper • https://github.com/dafthack/MailSniper • Enumeracion de usuarios / dominio • Password Spraying • Descarga del GAL ( Global Address List ) • Descubre Open Inbox delegation • Permite buscar texto en correos como passwords, 2FA codes, etc… • Salta algunos productios 2FA al conectarse directamente a EWS ( Exchange Web Services ) en vez de OWA •
  • 14. © Black Hills Information Security | @BHInfoSecurity OWA Attack Flow
  • 15. © Black Hills Information Security | @BHInfoSecurity Red Teaming G-Suite
  • 16. © Black Hills Information Security | @BHInfoSecurity Google Hangouts Ruse • Remember this? -----------> • Una invitacion a chatear en Gmail • Aparentemente esto era mucho trabajo para algunos usuarios
  • 17. © Black Hills Information Security | @BHInfoSecurity Google Hangouts Ruse • Ahora, Google Hangouts permite chatear sin tener que aprobar • Solo se necesita tener el correo • Puedes enviar un mensaje aparentando ser alguien mas • Di hola, envia un link, roba credenciales y/o obtienes una shell
  • 18. © Black Hills Information Security | @BHInfoSecurity Google Hangouts Ruse • Puedes cambiar los settings para requirir ver una invitacion • Pero incluso con eso, impersonar a alguien es posible • Para configurar invicationes: • Hangouts.google.com, click hamburger menu in top left, Settings, “Customize Invite Settings”, switch all to “Can send you an invitation” • There doesn’t appear to be a global option for locking down accounts across an org
  • 19. © Black Hills Information Security | @BHInfoSecurity Google Doc Ruse • Que tal si logramos que google envio un correo de phising por ti ? • Google Docs es perfecto para esto • Crea un Google Doc con un nombre llamativo como “Critical Update Pending” • Anhade contenido y un comentario al doc con tu link phishing • En el comentario, escribe la direccion de la victima con el prefijo “+” (i.e. +hacker@gmail.com) then check ‘Assign’ • Google enviara un correo a tu objectivo desde <random- string>@docs.google.com
  • 20. © Black Hills Information Security | @BHInfoSecurity Google Doc Ruse
  • 21. © Black Hills Information Security | @BHInfoSecurity Google Doc Ruse
  • 22. © Black Hills Information Security | @BHInfoSecurity Google Calendar Event Injection • Silencioamente inyecta eventos en un calendario • Crea urgencia a traves de recordatorios • Incluye un link malicioso • An email isn’t necessary, simply add a Google user to an event and select checkbox to not notify them • Google will automatically add it to their calendar • This presents a unique phishing situation
  • 23. © Black Hills Information Security | @BHInfoSecurity • A few ideas: • Include a link to a conference call site but have it pointing to a credential collection page (CredSniper!) • Include a malicious “agenda” • Have victims navigate to a fake Google Auth page and collect creds • Gets more fun with Google API • It’s possible to make it look like they already accepted the invite! • This completely bypasses the setting in G-calendar for not auto-adding events. • Google Calendar Event Injection
  • 24. © Black Hills Information Security | @BHInfoSecurity Phishing 2FA Creds
  • 25. © Black Hills Information Security | @BHInfoSecurity • CredSniper by Mike Felch (@ustayready) • https://github.com/ustayready/CredSniper • Framework para obtener credenciales • Puede clonar un sitio web • Intercepta tokens de 2FA • Redirige a la victima a la web real y permite al atacante obtener acceso Phishing 2FA Creds
  • 26. © Black Hills Information Security | @BHInfoSecurity Malicious Outlook Add-Ins
  • 27. © Black Hills Information Security | @BHInfoSecurity Outlook Web Add-Ins • Microsoft permite add-ins para varios productos • Outlook tiene “Web Addins” como tambien desktop add-ins • LOS WEB ADD-INS SON SYNCRONIZADOS A LOS CLIENTES DE BROWSER & ESCRITORIO • El ataque: • Consigue credentiales • Anhade un Add-in malcioso al Outlook web client • El add-in es replicado a las sesiones web y el cliente de escritorio Outlook
  • 28. © Black Hills Information Security | @BHInfoSecurity Outlook Add-in Potential • Bueno… puede literalmente forzar al browser a visitar a un site malicioso. • Cada vez que el add-in es ejecutado, usa el archivo “Manifest” • Podemos hostear cualquier html/js • Nota: El Outlook desktop client usa el browser Edge Que puede hacer un add-in ?
  • 29. © Black Hills Information Security | @BHInfoSecurity Outlook Add-In Browser Hook • Browser Exploitation Framework (BeEF) • Inyectar hook.js al add-in • Se puede utilizar plugins de BeEF • Enumerate system/browser/LAN • Inyectar otros frames • Puedes lanzar un formulario para robar credenciales, descargar un, etc... • Es necesario mas research en el potential para moviento lateral interno. Podemos “infectar” el browser de la victima usando BeEF!
  • 30. © Black Hills Information Security | @BHInfoSecurity DEMO: Outlook Add-In PoC
  • 31. © Black Hills Information Security | @BHInfoSecurity Onsite Attacks
  • 32. © Black Hills Information Security | @BHInfoSecurity Dropbox • Un dispositivo de pentesting completamente funcional que puede ser dejado en las premisas del objectivo • Utiliza tuneles SSH reversos persistentes • Puedes ser controlado por Wifi • Relativamente indistinguible • ODROID-C2 instruciones aqui: • https://www.blackhillsinfosec.com/how-to- build-your-own-penetration-testing-drop- box/
  • 33. © Black Hills Information Security | @BHInfoSecurity NAC Bypass • Impersonar a otro dispositivo • Encuentra una impresora o un telefono VOIP; Anota y replica la MAC and/or IP • Voiphopper to para saltar de VLAN’s • Para NAC en Wi-Fi impersona la MAC y el User Agent de un dispositivo conectado • Dispositivo Nat de Capa 2 y Capa 3 • Helps avoid triggering port security rules on 802.1X • Device spoofs both sides of wire • Passively learns MAC addresses • Check out SilentBridge - https://github.com/s0lst1c3/silentbridge
  • 34. © Black Hills Information Security | @BHInfoSecurity PXE Booting Attacks • Obtain the “Golden” image from the network • Set VM to “Boot from network”, boot VM, and get the image • Mount image & profit • Steal Admin hashes • Set local admin pass pre-boot • Overwrite Sticky keys (sethc.exe)
  • 35. © Black Hills Information Security | @BHInfoSecurity Persistence
  • 36. © Black Hills Information Security | @BHInfoSecurity Backdoors for Persistence • Microsoft O365/Azure: • Un Add-In de Outlook que reenvie todos los correos a un atacante • Una cuenta backdoor en Azure • Todos los usuarios del dominio O365 pueden ver informacion sobre otros usuarios incluyendo usuarios, correo, telefono, etc. • Google G-Suite: • Application Password • Backup Codes • Email forward rule
  • 37. © Black Hills Information Security | @BHInfoSecurity Command and Control
  • 38. © Black Hills Information Security | @BHInfoSecurity Expired Categorized Domains
  • 39. © Black Hills Information Security | @BHInfoSecurity Expired Categorized Domains • Tecnica usada para saltarse la categorizacion utilizado por los proxies web • Utilizar sites que hayan sido previamente categorizados • Trivial para encontrar • expireddomains.net • Domainhunter.py • Simula utilizar un sitio web comprometido
  • 40. © Black Hills Information Security | @BHInfoSecurity Domain Fronting
  • 41. © Black Hills Information Security | @BHInfoSecurity Domain Fronting • Otra tecnica utilizada para saltar restriciones del web proxy • Esconde el verdadero destino de una coneccion TTP • Initial target domain for the traffic redirects to secondary host • Can use a Content Delivery Network such as AWS Cloudfront •Can be difficult to detect and block •Wait your C2 channel is going to “opensource.carbonblack.com”?
  • 42. © Black Hills Information Security | @BHInfoSecurity Domain Fronting
  • 43. © Black Hills Information Security | @BHInfoSecurity Asset Discovery
  • 44. © Black Hills Information Security | @BHInfoSecurity PowerUp SQL • Herramienta en PowerShell par atacar MSSQL • https://github.com/NetSPI/PowerUpSQL • SQL Server discovery • Detecta configuraciones debiles • Escalamiento de privilegios • Data sample searches • OS command injection
  • 45. © Black Hills Information Security | @BHInfoSecurity Privilege Escalation
  • 46. © Black Hills Information Security | @BHInfoSecurity Kerberoasting • Permite a un usuario preguntar al dominio por un Service Principal Name ( SPN ) de una cuenta asociada a un servicio • Un peticion de autenticacion por Kerberos resulta en un Service Ticket que en parte es encriptado utilizando el password hash de la Service Account. • Lo que esto significa es que un usuario del dominio puede obtener el hash de una cuenta e intentar crackearla para elevar privilegios.
  • 47. © Black Hills Information Security | @BHInfoSecurity Weaponized LNK File • Deja un archivo shortcut (LNK) en un directorio compartido • El icono apunta a una locacion UNC controlada por el atacante • El atacante levante un servicio SMB • Se puede usar Inveigh • https://github.com/Kevin- Robertson/Inveigh • Obteher hashes NetNTLMv2
  • 48. © Black Hills Information Security | @BHInfoSecurity Evading Failed Login Detection
  • 49. © Black Hills Information Security | @BHInfoSecurity Evading Failed Login Detection • Standard password spraying alerted on? • Looked to evade and tried RDP spraying • Tested out xFreeRDP from Linux against a Windows Server RDP • To our surprise the failed login event did not contain the source IP address… • Hostname was in the log… but xFreeRDP has an option to set the client hostname (wat?) • Set out to write a spraying tool for RDP
  • 50. © Black Hills Information Security | @BHInfoSecurity NLA FTW • Why was there no IP in the log? • It turns out RDP w/ NLA (Network Layer Authentication) doesn’t log source IP in the security log • NLA pre-authenticates prior to RDP access • Causes Logon type 3 (Network) instead of 10 (RemoteInteractive) • Allegedly there is supposed to be a log with the IP located here: Applications and Services Logs > Microsoft > Windows > RemoteDesktopServices-RdpCoreTS > Operational (Event ID 140)
  • 51. © Black Hills Information Security | @BHInfoSecurity What log? • This is what a failed RDP using NLA should look like: • …But authenticating via NLA doesn’t <ALWAYS> generate this log… Because this alert is very, VERY misleading. • It turns out this alert only fires when the USER is invalid. • Valid user + invalid password = No eventID 140 log Remember this is an “Applications and Services Log”... not “Security”
  • 52. © Black Hills Information Security | @BHInfoSecurity DEMO: RDPSpray PoC
  • 53. © Black Hills Information Security | @BHInfoSecurity Lateral Movement
  • 54. © Black Hills Information Security | @BHInfoSecurity Living off the Land • Utilizar herramientas nativas para evitar descargar malware • Reconocimiento de usuarios/grupos • Listar directorios remotos, copiar. • Ejectuar procesos remotamente • Ataques de password • Descubrimiento de red • Windows tiene mucho para usar ofensivamente: • PowerShell, C#, WMI, etc…
  • 55. © Black Hills Information Security | @BHInfoSecurity Living off the Land • Comandos net • net groups “DOMAIN ADMINS” /DOMAIN • net accounts /domain • net localgroup administrators hax /add • Listar directorios remotoes • dir hostC$files • get-WmiObject -class Win32_Share - computer • Ejecutar comandos remotamente • Invoke-Command -ComputerName - ScriptBlock {Command Here} • wmic /node:”computer-name” process call create “cmd.exe /c C:evil.bat” • Crear tarejas programads • SCHTASKS /s remote_machine /U username /P password /create /tn “not evil" /tr "C:evil.bat" /sc ONCE /sd 01/01/1910 /st 00:00 •WMI • WMI OPS from Chris Truncer - https://github.com/FortyNorthSecurity/WMI Ops • Encontrar passwords en GPP • findstr /S cpassword %logonserver%sysvol*.xml • CMD.exe Password Spray • @FOR /F %n in (users.txt) DO @FOR /F %p in (pass.txt) DO @net use DOMAINCONTROLLERIPC$ /user:DOMAIN%n %p 1>NUL 2>&1 && @echo [*] %n:%p && @net use /delete DOMAINCONTROLLERIPC$ > NUL
  • 56. © Black Hills Information Security | @BHInfoSecurity Stealthy Host/Domain Enumeration • Cada vez hay mas y mas antivirus, analisis de compartamiento, app whitelisting, etc. los productos ahora bloquean on alertan cuando se usando comandos nativos • Ejem:net, ipconfig, whoami, netstat, etc. • Puedes usar PowerShell en vez de las tools nativas • https://github.com/dafthack/HostRecon • Utiliza tambien tecnicas para usar Powershell sin llamar a powershell.exe
  • 57. © Black Hills Information Security | @BHInfoSecurity BloodHound • Enumera y obteiener: • Los administratores en todos los sistemas • Sesiones de usuario • Information de gruops • Informacion de confianza entre dominios • Encuentra un camino a Domain Admin • Author(s): • Andrew Robbins (@_wald0), Will Schroeder (@harmj0y), and Rohan Vazarkar (@CptJesus) • https://github.com/BloodHoundAD/BloodHound
  • 58. © Black Hills Information Security | @BHInfoSecurity Actions and Objectives
  • 59. © Black Hills Information Security | @BHInfoSecurity Finding Sensitive Data • PowerView ShareFinder/FileFinder • Find shares on network then search them for files with certain terms in title: ‘*pass*’, ‘*sensitive*’, ‘*admin*’, ‘*secret*’, ‘*login*’, ‘*unattend*.xml’, ‘*.vmdk’, ‘*creds*’, or ‘*credential*’ • Locate RDP Jump Hosts • Get-NetComputers | Get-NetRDPSessions | Export-Csv – NoTypeInformation rdpsessions.csv • Admin on Virtualization Hypervisors
  • 60. © Black Hills Information Security | @BHInfoSecurity Detection and Prevention
  • 61. © Black Hills Information Security | @BHInfoSecurity Solid Systems Administration • Systems and software inventory (yes, CSC Top 20 are useful) • Workstations should never talk to workstations - client to server communication only • Windows firewall or Private VLANS • Baseline images with GPO enforcement • All inbound and outbound network traffic go through an application proxy system • Any exceptions for direct outbound communication are by documented exception only •
  • 62. © Black Hills Information Security | @BHInfoSecurity Enforce Good User Behavior • Change every inbound email subject line with a tag such as (External): • Inform your users that any email with that tag needs extra scrutiny • Minimum of 15 characters for any domain account password • If you have to compromise to sell it to the business, no complexity requirements and 6 month change interval • Consider additional credential defenses • Commercial offerings available • CredDefense Toolkit for Free • https://github.com/creddefense
  • 63. © Black Hills Information Security | @BHInfoSecurity Host Log Consolidation • Consolida los logs mas importantes de las laptops/desktops, servidores a una locacion central • Monitorea Powershell y ejecusion de procesos • Sysmon es una poderosa y gratis options para monitorear actividad de los hosts • Una vez con el monitoreo, configura alertas en “comandos anormales” como commandos net • No tiene que ser caro: • https://www.blackhillsinfosec.com/end-point-log-consolidation-windows- event-forwarder/
  • 64. © Black Hills Information Security | @BHInfoSecurity Network Logging • NetFlow, Bro, or Full Packet Capture? • Depende del presupuesto y capacidades • Bro es un buen balance entre NetFlow 5-Tuple y los requerimientos de storage de Full Packet Capture. • Captura los protocles mas comunes a archivos de texto • Provee visibilidad a trafico SSL sin tener que romper SSL • Informacion anomala de un certificado • SSL fingerprinting - JA3 project - https://github.com/salesforce/ja3 • Detectar un backdoor con RITA (AIHunt) • https://www.blackhillsinfosec.com/projects/rita/
  • 65. © Black Hills Information Security | @BHInfoSecurity Red Team Prepper • Don’t wait on the Red Team prepare on your own • Use @vysecurity’s Red Team Tips to find techniques to try to detect • https://github.com/vysec/RedTips • MITRE ATT&CK Framework for threat actor techniques • https://attack.mitre.org/wiki/Main_Page • Red Canary’s Atomic Red Team - portable scripts to test ATT&CK framework • https://github.com/redcanaryco/atomic-red-team
  • 66. © Black Hills Information Security | @BHInfoSecurity Summary and Conclusions • Black Hills Information Security • http://www.blackhillsinfosec.com • @BHInfoSecurity • Beau Bullock @dafthack • Questions?