sustainablelobster/dfir-chocolatey-packages

GitHub: sustainablelobster/dfir-chocolatey-packages

专门收集数字取证与应急响应工具的 Chocolatey 软件包集合,支持自动更新和 CI/CD 集成,帮助安全团队在 Windows 系统上快速部署和维护 DFIR 工具链。

Stars: 4 | Forks: 1

[![](https://ci.appveyor.com/api/projects/status/github/sustainablelobster/dfir-chocolatey-packages?svg=true)](https://ci.appveyor.com/project/sustainablelobster/dfir-chocolatey-packages) [更新状态](https://gist.github.com/sustainablelobster/9bec9a41eecea4b89447ad26780384ec) [![](http://transparent-favicon.info/favicon.ico)](#) [chocolatey/sustainablelobster](https://chocolatey.org/profiles/sustainablelobster) 本仓库包含 [chocolatey 自动化包](https://chocolatey.org/docs/automatic-packages)。 该仓库的设置允许您完全通过 GitHub Web 界面管理包(使用 AppVeyor 更新和推送包),以及/或者使用本地仓库副本。 ## 前置条件 要在本地运行,您需要: - Powershell 5+。 - [Chocolatey 自动化包更新器模块](https://github.com/majkinetor/au):`Install-Module au` 或 `cinst au`。 为了设置 AppVeyor 更新运行器,请查看 AU wiki 的 [AppVeyor 部分](https://github.com/majkinetor/au/wiki/AppVeyor)。 ## 创建包 要创建一个新包,请参阅[创建包更新脚本](https://github.com/majkinetor/au#creating-the-package-updater-script)。 ## 测试包 在包目录中运行:`Test-Package`。此函数可用于通过 `Vagrant` 参数在 [chocolatey-test-environment](https://github.com/majkinetor/chocolatey-test-environment) 中启动测试,也可以在本地测试包。 ## 自动包更新 ### 单个包 在要更新的包目录中运行: ``` cd ./update.ps1 ``` 如果此脚本缺失,则该包不是自动化的。 在调用脚本前设置 `$au_Force = $true`,即使未发现新版本也会更新包。 ### 多个包 要更新所有包,请运行 `./update_all.ps1`。它接受几个选项: ``` ./update_all.ps1 -Name a* # Update all packages which name start with letter 'a' ./update_all.ps1 -ForcedPackages 'cpu-z copyq' # Update all packages and force cpu-z and copyq ./update_all.ps1 -ForcedPackages 'copyq:1.2.3' # Update all packages but force copyq with explicit version ./update_all.ps1 -ForcedPackages 'libreoffice-streams\fresh:6.1.0]' # Update all packages but force libreoffice-streams package to update stream `fresh` with explicit version `6.1.0`. ./update_all.ps1 -Root 'c:\packages' # Update all packages in the c:\packages folder ``` 如果在调用前设置,以下全局变量会影响 `update_all.ps1` 脚本的执行: ``` $au_NoPlugins = $true #Do not execute plugins $au_Push = $false #Do not push to chocolatey ``` 您也可以在仓库根目录单独调用 AU 方法 `Update-AUPackages`(别名 `updateall`)。这只会为每个包运行更新器,而不包含 `update_all.ps1` 脚本中的任何其他选项。例如,要使用单个命令强制更新所有包,请执行: ``` updateall -Options ([ordered]@{ Force = $true }) ``` ## 测试所有包 您可以强制更新所有包或部分包,以查看在完成更新过程时的表现: ``` ./test_all.ps1 # Test force update on all packages ./test_all.ps1 'cdrtfe','freecad', 'p*' # Test force update on only given packages ./test_all.ps1 'random 3' # Split packages in 3 groups and randomly select and test 1 of those each time ``` **注意**:如果您在本地运行此命令,您的包将被更新。运行后请使用 `git reset --hard` 来还原更改。 ## 通过提交消息推送到社区仓库 您可以使用 git 提交消息强制更新并推送包。AppVeyor 构建设置为将参数从提交消息传递给 `./update_all.ps1` 脚本。 如果提交消息的第一行包含 `[AU ]` 消息,`forced_packages` 字符串将被发送到更新器。 示例: - `[AU pkg1 pkg2]` 仅强制更新包 `pkg1` 和 `pkg2`。 - `[AU pkg1:ver1 pkg2 non_existent]` 强制更新 `pkg1` 并使用显式版本 `ver1`,强制更新 `pkg2` 并忽略 `non_existent`。 要查看强制更新包时版本的行为,请参阅 [force 文档](https://github.com/majkinetor/au/blob/master/README.md#force-update)。 您也可以使用命令 `[PUSH pkg1 ... pkgN]` 推送手动包。这适用于文件层次结构中的任何包,并且根本不会调用 AU 更新器。 如果仓库中没有更改,请使用 `--allow-empty` git 参数: ``` git commit -m '[AU copyq less:2.0]' --allow-empty git push ``` ## 开始在您自己的包中使用 AU 要将此系统用于您自己的包,请执行以下步骤: * Fork 本项目。如果需要,将其重命名为 `au-packages`。 * 删除所有现有包。 * 使用您的仓库信息编辑 `README.md` 头部。 * 设置您的环境变量。详情请参阅 [AU wiki](https://github.com/majkinetor/au/wiki#environment-variables)。 现在添加您自己的包,请注意以下几点: * 您可以将手动包和自动包放在一起。要随时仅获取 AU 包,请使用 `Get-AUPackages` 函数(别名 `lsau` 或 `gau`)。 * 将所有包的附加文件(图标、截图等)保留在包目录中。这将与一个包相关的所有内容保留在其自己的目录中,便于移动或删除。
标签:AI合规, AppVeyor, Chocolatey, Conpot, DAST, Libemu, Powershell, Windows包管理, Windows安全, 库, 应急响应, 开源工具集, 恶意软件分析, 数字取证, 系统部署, 网络安全, 网络安全研究, 自动化脚本, 自动化运维, 软件分发, 隐私保护