Showing posts with label Automation. Show all posts
Showing posts with label Automation. Show all posts

Monday, February 9, 2026

自動化工具與指令碼 - 加固與稽核

  • 如果您要加固 Windows 伺服器:首選 PowerSTIG (免費/開源) 或 ConfigOS (商業)。
  • 如果您要進行掃描與稽核:首選 DISA SCC 或 OpenSCAP
  • 如果您在 Azure 雲端:直接使用 Microsoft Defender for Cloud,它內建了 NIST 與 STIG 的自動化監控儀表板。
核心自動化方案
  • 針對 STIG/NIST:強烈建議使用 PowerSTIG (GitHub)。這是 Microsoft 工程師開發的 PowerShell 模組,能將複雜的 STIG 文件直接轉換為可執行的 DSC 代碼,非常適合大規模部署。
  • 針對 CIS:可利用 Ansible Lockdown。它提供現成的 Playbooks,能自動將 Windows 或 Linux 加固至符合 CIS Benchmark 的狀態。
  • 針對 PCI DSS/HIPAA:這兩者多為「合規框架」。建議使用 Microsoft Purview 合規性管理員,它會自動掃描您的 M365 與 Azure 設定,並根據 PCI/HIPAA 要求提供一鍵式的改善建議。

如果您追求最高安全性(政府級),請選擇 DISA STIG + PowerSTIG;如果您追求業界通用性(商用級),請選擇 CIS + Ansible



中國的標準更強調「合規性」與「管理+技術」的雙重考核。
等級保護 2.0 (MLPS 2.0)

  • 阿里雲加固基準:各大雲平台提供符合 MLPS 2.0 的自動化加固指南,例如「ACK 等保加固」會自動執行密碼複雜度、限制 root 權限、審計開啟等操作。
  • OpenSCAP (中國適配):在國產作業系統(如 Kylin 麒麟UnionTech UOS)中,常用 OpenSCAP 載入針對等級保護或行業標準的 XML 設定檔來進行自動化加固。

中國標準 (GB/T)
對應國際/美國標準
加固範圍
GB/T 22239 (等保 2.0)
NIST SP 800-53
系統、網絡、雲、IoT 等全維度加固
GB/T 18336 (CC)
ISO 15408 / Common Criteria
產品安全性設計認證
GB/T 35273 (隱私規範)
GDPR / NIST Privacy Framework
個人敏感數據保護與加密

Print Friendly and PDF
Share/Bookmark

Sunday, June 13, 2010

Do It Again 電腦自動操作工具

Do It Again is a free and simple program that allows you to make your computer automatically perform a task for you, whenever you want.

http://www.spacetornado.com/DoItAgain/

Print Friendly and PDF
Share/Bookmark

Friday, September 25, 2009

delete old files with a batch script

Here's some VBS code that will do what you want.  First, you will need to setup a scheduled task and run it daily.  Just change the number to the amount of days you want to keep file in that directory.  Any files in the directory will be deleted.  This file must be place WITHIN the directory you wish to clean.

'First, you will need to setup a scheduled task and run it
'daily.  Just change the number to the amount of days you
'want to keep file in that directory.  Any files in the
'directory will be deleted.  This file must be place WITHIN
'the directory you wish to clean.
'Courtesty of monsterjta @ tek-tips.com

'Start
'Delete any file in current directory that is older than iDaysOld

Option Explicit
on error resume next
Dim oFSO
Dim sDirectoryPath
Dim oFolder
Dim oFileCollection
Dim oFile
Dim iDaysOld
Dim CurDir

'Definitions
iDaysOld = 5
Set oFSO = CreateObject("Scripting.FileSystemObject")
sDirectoryPath = CreateObject("WScript.Shell").CurrentDirectory
sDirectoryPath = sDirectory & ""
set oFolder = oFSO.GetFolder(sDirectoryPath)
set oFileCollection = oFolder.Files

'Walk through each file in this folder collection.
For each oFile in oFileCollection
If oFile.DateLastModified < (Date() - iDaysOld) Then
oFile.Delete(True)
End If
Next

'Clean up
Set oFSO = Nothing
Set oFolder = Nothing
Set oFileCollection = Nothing
Set oFile = Nothing
'End

Source: http://www.tek-tips.com/viewthread.cfm?qid=1301870 Print Friendly and PDF
Share/Bookmark