Privilege Escalation [Searching]
Checking Environment Variable
# To list all variable
Get-ChildItem Env:
cmd /c "set"Searching for Hidden Plain text
# Searching for KeePass Database.
Get-ChildItem -Path C:\ -Include *.kdbx -File -Recurse -ErrorAction SilentlyContinue
# Searching for Text file and configuration file in Xampp
Get-ChildItem -Path C:\xampp -Include *.txt,*.ini -File -Recurse -ErrorAction SilentlyContinue
# Searching credential files in Home Directory of the user.
Get-ChildItem -Path C:\Users\<USERNAME> -Include *.txt,*.pdf,*.xls,*.xlsx,*.doc,*.docx,*.ini,*.exe, *.log, *.bak -File -Recurse -ErrorAction SilentlyContinue
# To search for running binary
tasklist /v
# You want to get Full name with above command
Get-ChildItem -Path C:\Users -Include *.txt,*.pdf,*.xls,*.xlsx,*.doc,*.docx,*.ini,*.exe, *.log, *.bak -File -Recurse -ErrorAction SilentlyContinue | Select-Object -ExpandProperty FullName
# If Above command output looks overwhelming then run command for each extention one by one.To better analysis of .log file. Transfer it to kali Linux and analyze it for sensitive data.
Accessing User account
More Details on Xfreerdp and Run as Tool
Finding Hidden information
If evil winrm is confirged then connect using below command:
Searching in Script Block Logging
Shortcut:
As there is a lots of content in the Script block Logging, It's Difficult to check All logs one by one.
Manual approach:
location of script block logging
I fount the operational file at the location:
Event Viewer > application and service logs > Microsoft > windows > Powershell > Operational
create Filter in this:

Now look for sensitive data in logs one by one 🤣.

Looking Inside Hidden Directory
Sometimes Hidden directories may contain sensitive information. For example, AppData Present in the Administrator Directory. So, We should check that also.
You can check for critical information in above files using below command:
Using Automated tool
We can also use Seatbelt for the same.
Last updated