Knowledge Hub

Hacking with PowerShell

TryHackMe27 answered prompts

Hacking with PowerShell TryHackMe walkthrough with 27 answered prompts and lab methodology notes.

Prompts and answers

  • What is the command to get a new object?
    Get-New
  • What is the location of the file "interesting-file.txt"
    C:\Program Files
  • Specify the contents of this file
    notsointerestingcontent
  • How many cmdlets are installed on the system(only cmdlets, not functions and aliases)?
    6638
  • Get the MD5 hash of interesting-file.txt
    49A586A2A9456226F8A1B4CEC6FAB329
  • What is the command to get the current working directory?
    Get-Location
  • Does the path "C:\Users\Administrator\Documents\Passwords" Exist (Y/N)?
    N
  • What command would you use to make a request to a web server?
    Invoke-WebRequest
  • Base64 decode the file b64.txt on Windows.
    ihopeyoudidthisonwindows
  • How many users are there on the machine?
    5
  • Which local user does this SID(S-1-5-21-1394777289-3961777894-1791813945-501) belong to?
    Guest
  • How many users have their password required values set to False?
    4
  • How many local groups exist?
    24
  • What command did you use to get the IP address info?
    Get-NetIPAddress
  • How many ports are listed as listening?
    20
  • What is the remote address of the local port listening on port 445?
    ::
  • How many patches have been applied?
    20
  • When was the patch with ID KB4023834 installed?
    6/15/2017 12:00:00 AM
  • Find the contents of a backup file.
    backpassflag
  • Search for all files containing API_KEY
    fakekey123
  • What command do you do to list all the running processes?
    Get-Process
  • What is the path of the scheduled task called new-sched-task?
    /
  • Who is the owner of the C:\
    NT SERVICE\TrustedInstaller
  • What file contains the password?
    Doc3M
  • What is the password?
    johnisalegend99
  • What files contains an HTTPS link?
    Doc2Mary
  • How many open ports did you find between 130 and 140(inclusive of those two)?
    11