> For the complete documentation index, see [llms.txt](https://calvin-lai.gitbook.io/calvin-lai-security/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://calvin-lai.gitbook.io/calvin-lai-security/red-team-windows/01-reconnaissance.md).

# 01 Reconnaissance

After getting the initial access to a Windows environment, the commands are used for the Reconnaissance.

{% tabs %}
{% tab title="Operating System" %}

```
# Systeminfo
systeminfo
hostname 

# Hotfix info
wmic qfe get Caption,Description,HotFixID,InstalledOn

# Read Environment Variable
Get-ChildItem Env: | ft Key,Value

# Installed Software
reg query HKEY_LOCAL_MACHINE\SOFTWARE
```

{% endtab %}

{% tab title="User" %}

```
# To see what tokens we have 
whoami /priv

# What users/localgroups are on the machine?
net users
Get-LocalUser | ft Name,Enabled,LastLogon
net localgroups
Get-LocalGroup | ft Name
net localgroup Administrators
Get-LocalGroupMember Administrators | ft Name, PrincipalSource
net user morph3
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\Currentversion\Winlogon" 2>nul | findstr "DefaultUserName DefaultDomainName DefaultPassword"

# Crosscheck local and domain too
net user morph3 /domain
net group Administrators /domain
```

{% endtab %}

{% tab title="Network" %}

```
# Connected drives
net use
wmic logicaldisk get caption,description,providername

# Network information
ipconfig /all
route print
arp -A

# Recursive string scan
findstr /spin "password" *.*
findstr /i /s "password" *.* 
gci  -recurse –include *.txt | select Fullname 

# Search for writeable directories
dir /a-r-d /s /b
dir abc.txt /s /p 

# Running processes
tasklist /SVC

# Network connections
netstat -ano

```

{% endtab %}

{% tab title="Dumping Windows Credentials" %}
{% embed url="<https://calvin-lai.gitbook.io/calvin-lai-security/tools/04-windows-enum-and-exploit/dumping-windows-credentials>" %}
{% endtab %}
{% endtabs %}

{% embed url="<https://www.absolomb.com/2018-01-26-Windows-Privilege-Escalation-Guide>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://calvin-lai.gitbook.io/calvin-lai-security/red-team-windows/01-reconnaissance.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
