Friday, May 08, 2009

วิธี Audit file และ Folder

Concept
- Enable Audit Polocy สำหรับ audit file และ folder ต้องเลือก audit ที่ "Audit Object Access"
โดยไปที่ Computer Configuration/Windows Settings/Security Setting/Local Policy/Audit Policy/Audit Object Access เลือกว่าจะให้ audit กรณีไหน Failure , Success
-ไปที่ Object ที่ต้องการ audit เช่น file หรือ folder ก็ได้ click ขวาเลือก properties ไปที่แถบ Security กดปุ่ม Advanced ไปที่แถบ Audit แล้วใส่ User หรือ Group ที่ต้องการ Audit เสร็จแล้วเลือกว่าต้องการให้ audit กรณีไหนบ้างเช่น Delele file and folder และที่สำคัญ ห้ามเลือก Apply these auditing entries to objects and/or containers winthin this container only โดยเด็ดขาด ไม่งั้น มันจะไม่มีผลกับ object ที่อยู่ภายใน
- วิธีดู Event Log จะอยู่ใน Security Log แต่จะมีเยอะมาก จะต้องทำ Filter ดูเฉพาะ Source และ Category ที่ต้องการจะดูเท่านั้นเช่น Source = Security , Category = Object Access ถ้าจะดูว่าลบอะไรต้อง Click เข้าไปดูข้างใน

Note
- ต้องระวัง Log เต็มให้เพิ่มขนาด log ให้มีขนาดใหญ่พอที่จะเก็บข้อมูลได้นาน 1-2 เดือน
- สำหรับ Windows Server 2008
http://blogs.dirteam.com/blogs/jorge/archive/2008/04/29/auditing-in-windows-server-2008.aspx

การใช้ Filter สำหรับการหาไฟล์ที่ถูก Delete

1. Event ID ที่เกี่ยวข้องคือ 4663 , 4656
2. Event Level = Information
3. Event Sources = Microsoft-Windows-Security-Auditing
4. Task Catagory = File System
5. Keyword = Audit Success
6. เมื่อสร้าง Filter เสร็จแล้วสามารถ Save ให้เป็น Custom Filter ได้ด้วย

No comments:

Post a Comment