killchain-compendium/post exploitation/docs/windows/powershell_logs.md

23 lines
619 B
Markdown
Raw Normal View History

2021-12-09 01:50:04 +01:00
# Powershell Logs
2022-10-27 23:11:38 +02:00
## Powershell User History
```sh
cd $env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt
```
2021-12-09 01:50:04 +01:00
## Transcript Logs
* Enable via
```sh
reg add HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\PowerShell\Transcription /v EnableTranscripting /t REG_DWORD /d 0x1 /f
reg add HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\PowerShell\Transcription /v OutputDirectory /t REG_SZ /d C:/ /f
reg add HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\PowerShell\Transcription /v EnableInvocationHeader /t REG_DWORD /d 0x1 /f
```
2022-02-07 23:37:05 +01:00
## Usage
```sh
Get-EventLog -List
```