powershell脚本:你的文件已经被黑客篡改.ps1
本人原创powershell脚本分享。
脚本用途:列出某目录下,所有软件签名不符的文件。
系统需求: win7 + powershell 2.0 及 以上。
#nd你的文件已经被黑客篡改.ps1 ps1文档应保存为,含有bom头的unicode文档。
#输入一个目录,验证此目录(含子目录)下,所有文件的签名是否被篡改。
#支持 win7 + powershell 2.0及以上。
Write-Warning '你输入一个目录。本脚本将验证此目录(含子目录)下,所有文件的签名是否被篡改'
Write-Warning '注意:当杀毒软件【拦截】病毒文件时,会使本脚本运行中途卡住。'
[string]$目标目录 = Read-Host -Prompt '输入一个目录'
if (-not (test-Path $目标目录) )
{
Write-error '无此目录,脚本退出!'
exit 1
} $所有文件 = (Get-ChildItem -LiteralPath $目标目录 -File -Recurse -ErrorAction 'SilentlyContinue' ).fullname Write-Warning '下列文件已经被黑客篡改!:'
foreach ($单个文件 in $所有文件)
{
$文件状态 = Get-AuthenticodeSignature -LiteralPath $单个文件
#QQ群号=183173532
#名称=powershell交流群
if ($文件状态.Status -eq 'HashMismatch')
{
Write-Host $单个文件 -ForegroundColor Red
}
}
powershell脚本:你的文件已经被黑客篡改.ps1的更多相关文章
- 【Azure 应用服务】使用PowerShell脚本上传文件至App Service目录
问题描述 使用PowerShell脚本上传文件至App Service目录的示例 脚本示例 对文件进行上传,使用的 WebClient.UploadFile 方法进行上传.当文件夹中包含子目录,执行以 ...
- 【黑客基础】Windows PowerShell 脚本学习(上)
视频地址:[黑客基础]Windows PowerShell 脚本学习 2019.12.05 学习笔记 1.$PSVersionTable :查看PowerShell的版本信息. 2.PowerShel ...
- 数据库管理——Powershell——使用Powershell脚本找出消耗最多磁盘空间的文件
原文:数据库管理--Powershell--使用Powershell脚本找出消耗最多磁盘空间的文件 原文译自: http://www.mssqltips.com/sqlservertip/2774/p ...
- 利用Nuget打包添加tools下intsall.ps1【powershell脚本】修改.csproj文件
利用Nuget打包添加tools下intsall.ps1[powershell脚本]修改.csproj文件, 以设置1.项目-生成->输出->选择[XML文件文件] 2.项目->调试 ...
- 技术分享:如何在PowerShell脚本中嵌入EXE文件
技术分享:如何在PowerShell脚本中嵌入EXE文件 我在尝试解决一个问题,即在客户端攻击中只使用纯 PowerShell 脚本作为攻击负荷.使用 PowerShell 运行恶意代码具有很多优点, ...
- PowerShell脚本自动设置安卓手机wifi代理
在实际测试工作中,经常要将安卓手机通过wifi代理的形式连接到本机的fiddler或charles服务器代理进行抓包测试.最近一直在想,有没有什么方法可以自动设置安卓手机的wifi代理,曾经想通过修改 ...
- 【HOW】用PowerShell脚本修改用户配置文件属性显示次序
首先将如下脚本保存为PowerShell文件,如:ReorderUserProfileProperty.ps1. 在执行此脚本时,如果不输入任何参数,将列出所有用户配置文件属性的名称和显示次序:如果只 ...
- 如何在windows计划中调用备份sharepoint2010网站集的powershell脚本
最近有个项目需要在在windows计划中使用powershell脚本备份sharepoint2010网站集,打开sharepoint的powershell执行命令管理界面的属性 查看: C:\Wind ...
- 云服务程序在启动的时候执行Powershell脚本
如果在云服务程序启动时候,需要执行Powershell脚本,我们需要将脚本嵌入到程序中,并且编写一个cmd来执行这个脚本,具体如下: 1.编写测试的Powershell脚本:每隔10分钟 检测dns ...
随机推荐
- Linux 设置系统时间和时区2.Ubuntu
查看当前时间状态 timedatectl status 设置时区 sudo dpkg-reconfigure tzdata Asia shanghai
- [ZOJ 4024] Peak
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4024 从前往后找满足al<al+1的最大下标l,从后往前找 ...
- error——Fusion log——Debugging Assembly Loading Failures
原文 So...you're seeing a FileNotFoundException, FileLoadException, BadImageFormatException or you sus ...
- laravel文件上传
一.视图文件代码 <td> <input type="file" name="brand_logo" id="logo" ...
- 【python 3】 集合方法操作汇总
基本数据类型 : set 集合(set)特点 : 无序 不能重复(自动去重) 用 {} 或 set()函数 来表示集合 空集合 : set() 1 name = {"江户部柯南", ...
- Database operation expected to affect 1 row(s) but actually affected 0 row(s). Data may have been modified or deleted since entities were loaded
asp.net 更新数据时报错:Database operation expected to affect 1 row(s) but actually affected 0 row(s). Data ...
- HDU 6495 冰水挑战
Problem Description Polar Bear Pitching helps you crystallize your message. The stage could not be a ...
- webgl学习
学习网址: https://www.yiibai.com/webgl/webgl_shaders.html# 多重纹理 https://blog.csdn.net/Chase_freedom/arti ...
- Day 5内存管理,定义变量
昨日内容回顾 python的2种执行方式 交互式 写一句翻译一句 优点:能及时发现bug,及时调试 缺点:关即消失,不能保存 命令行式 优点:可以永久保存 缺点:无法及时看到结果 python3 c: ...
- FreeMarker与Thymeleaf
FreeMarker 是一个模板引擎,一个基于模板生成文本输出的通用工具,使用纯 Java 编写,FreeMarker 被设计用来生成 HTML Web 页面,特别是基于 MVC 模式的应用程序,虽然 ...