Unattended Windows Installations

Nếu administrators sử dụng Windows Deployment Services để deploy nhiều host lên mạng, các credential có thể tồn tại trong các tập tin sau đây:

  • C:\Unattend.xml
  • C:\Windows\Panther\Unattend.xml
  • C:\Windows\Panther\Unattend\Unattend.xml
  • C:\Windows\System32\sysprep.inf
  • C:\Windows\System32\sysprep\sysprep.xml
  • C:\Windows\System32\config

PowerShell History

Lịch sử của PowerShell được lưu ở trong file và ta có thể truy xuất thông qua câu lệnh sau:

type %userprofile%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt

Câu lệnh trên chỉ có thể chạy ở trong cmd.exe. Hoặc nếu muốn chạy ở trong PowerShell thì thay %userprofile% thành $Env:userprofile.

Saved Windows Credentials

Liệt kê các credential đã được lưu:

cmdkey /list

Chạy command prompt bằng một credential có username là admin:

runas /savecred /user:admin cmd.exe

IIS Configuration

Internet Information Services (IIS) là web server mặc định của Windows. Cấu hình của nó được lưu ở trong file web.config và file này có thể chứa mật khẩu của DB.

Vị trí của web.config:

  • C:\inetpub\wwwroot\web.config
  • C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config

Câu lệnh tìm connection string ở trong file:

type C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config | findstr connectionString

Retrieve Credentials From Software: PuTTY

PuTTY là SSH client của Windows.

Câu lệnh để lấy credential từ PuTTY:

reg query HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\ /f "Proxy" /s

Resources