loading...
Cover image for Powershell For Hackers - Part 1

Powershell For Hackers - Part 1

ankitdobhal profile image Ankit Dobhal ・3 min read

Shell that also known as bash of windows is power-shell.~Ankit Dobhal
Alt Text
Welcome back my aspiring hackers this a series of Powershell Which Will Explain You the power of command line! So Let's Get Started!!
As you all know for being a professional hacker(white,black) you need to be proficient in Linux & its flavors. There are some reasons for this.
[!0]Linux is a open source operating system & most of the hacking tools are build in Linux.
[!1]The Terminal of Linux have full control over operating system besides of cmd.exe in windows.
For these couple of reasons we as a hacker/pen-tester believe that linux provide us a good environment for our penetration testing tasks but In recent years, Microsoft seems have gained religion is terms of the advantage of the command line and terminal in Linux. Finally now it seem they understand the strengths and advantages of the command line, and as a response, then it comes windows powershell.

What is Powershell?

Alt Text
PowerShell is a task-based command-line shell and scripting language built on . NET. PowerShell helps system administrators and power-users rapidly automate tasks that manage operating systems (Linux, macOS, and Windows) and processes. PowerShell commands let you manage computers from the command line.
note:For more details about the history of powershell visit wikipedia

Cmdlet In Powershell?

Alt Text
Cmdlets are specialized commands in the PowerShell environment that implement specific functions. Cmdlets are similar like commands in linux terminal.
One of the key differences between Windows PowerShell and the BASH shell in Linux is that Microsoft has developed cmdlets (command lets) for PowerShell. They cmdlets are single commands that accomplish sometimes more complex tasks similar to functions. These cmdlets take the form of verb-noun, such as "get-help".

Powershell Commands vs Linux Terminal Command :

Their are some major commands those are same in linux & as well as powershell ,but they both have their advantages in the filed of pen-testing like for example cat command is used in linux for reads data from the file and gives their content as output , this command also works in powershell.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Loading personal and system profiles took 703ms.
C:\windows\system32> cat

cmdlet Get-Content at command pipeline position 1
Supply values for the following parameters:
Path[0]:

Get-help In Powershell ?

Get-help in one of the important & basic command in power-shell ,specially if you want to use powershell as a hacking framework or tool this command will be very helpfull for you.Get-help lets you to find out whole help info about any particular command with detailed examples.
note:For examples their is a command in powershell 'invoke-psnmap' an nmap wrapper as a port scanner & you don't know that how to use this particular one so will use 'get-help'.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Loading personal and system profiles took 908ms.
C:\Users\HP> get-help invoke-psnmap

NAME
    Invoke-PSnmap

Alt Text

This is a part one of 'power-shell for pen-tester' series with some basic information about powershell its commands thanks for visiting this blog.
In next part I will explain about some important commands in power-shell which will help you to execute your penetration task in easy with window without using Linux.

Its a series only for learners in hacking so enjoy & support me
follow me on github,twitter & checkout ankitdobhal.github.io.
Alt Text

Posted on by:

ankitdobhal profile

Ankit Dobhal

@ankitdobhal

Penetration Tester With Automation Skill

Discussion

markdown guide