Home > Uncategorized > Windows CMD / Powershell / DOS command -fu

Windows CMD / Powershell / DOS command -fu

Operating System related Information

  • View OS / System information:

CMD:

systeminfo
wmic qfe
  • Is there anything interesting in the Environment Variables:

CMD:

set

Powershell:

Get-ChildItem Env: | ft Key,Value
  • Are there any connected drives (Network or Local):

CMD:

net use
wmic logicaldisk get caption,description,providername

Powershell:

Lots of other DOS/Powershell wmic.exe related commands:

Get Manufacturer
wmic baseboard get product,manufacturer

Get Bios and Version
wmic bios get name

Get software, services, process information
wmic product list brief
wmic service list brief
wmic process list brief
wmic startup list brief

Put services in a HTML document
wmic service get /format:hform > c:\folder\services.html

Uninstall:
wmic product get name
wmic product where name=”Product name exactly as appears in above command” call uninstall

Kill a process:
wmic process where name=”iexplore.exe” call terminate

Change a process’s priority:
wmic process where name=”notepad.exe” call setpriority 64

Run commands on a remote node:
wmic /node:steve-pc service list brief

References:
https://www.sploitspren.com/2018-01-26-Windows-Privilege-Escalation-Guide/
https://betanews.com/2011/01/14/wmic-the-best-command-line-tool-you-ve-never-used/

Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: