# Recon - Initial Access

* <https://github.com/dafthack/HostRecon/blob/master/HostRecon.ps1>
* <https://gist.github.com/egre55/db41cc2df355e8591eacff561facf34e>

## Who we are&#x20;

```
whoami /fqdn
whoami /upn
whoami
```

## What are our privileges and which group do we belong to

```
whoami /priv
whoami /groups
whoami /all
```

## Systeminfo

```
systeminfo
hostname
```

Hotfix and KB information

```
wmic qfe get Caption,Description,HotFixID,InstalledOn
```

## Antivirus Status

```
Get-MpComputerStatus
```

## Which users/localgroups are on the machine

```
net users
net localgroups
net localgroup Administrators
net user morph3
```

Crosscheck local and domain groups too

```
net user morph3 /domain
net users /domain
net group "Domain Admins" /domain
```

## Network information

```
ipconfig /all
route print
arp -A

# Network connections
netstat -ano
```

Network shares

```
net view
```

## Logged on users

```
Get-NetLoggedon -ComputerName client251
```

## File - Directory enumerations

Recursive string scan

```
findstr /spin "password" *.*
```

To list all the files recursively

```
dir /a-D /S /B
```

Search for writeable directories

```
dir /a-r-d /s /b
```

## Running processes

```
tasklist /SVC
```

## Service related things

To check permissions of us on service vulnsvc

```
accesschk.exe /accepteula -uwcqv morph3 vulnsvc
```


---

# Agent Instructions: 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:

```
GET https://notes.morph3.blog/windows/recon-initial-access.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
