Showing posts with label Exercise log File Analysis. Show all posts
Showing posts with label Exercise log File Analysis. Show all posts

Friday, March 6, 2026

Windows Forensic — Audit Log Cleared

Windows Forensic — Audit Log Cleared

picoCTF เป็นเกม ด้าน computer security ที่จัดโดย มหาวิทยาลัย Carnegie Mellon หรือ CMU ที่มุ่งเป้าไปที่นักเรียนมัธยมและ มหาวิทยาลัยให้มาแสดงทักษะความสามารถ

Windows Forensic — Audit Log Cleared
photo Credit:PicoCTF

Windows Forensic — Audit Log Cleared

Description

One of the employees at your company has their computer infected by malware! Turns out every time they try to switch on the computer, it shuts down right after they log in. The story given by the employee is as follows:
  1. They installed software using an installer they downloaded online
  2. They ran the installed software but it seemed to do nothing
  3. Now every time they bootup and login to their computer, a black command prompt screen quickly opens and closes and their computer shuts down instantly.
See if you can find evidence for the each of these events and retrieve the flag (split into 3 pieces) from the correct logs!
The analysis of Windows Event Logs should follow the digital forensic methodology recommended by the National Institute of Standards and Technology (NIST SP 800-86), which includes the stages of collection, examination, analysis, and reporting.

Collection of digital evidence


1️⃣ Evidence Identification (ระบุหลักฐาน)
File Name: Windows_Logs.evtx
Source: Employee Workstation(PicoCTF) Download the Windows Log file here
Evidence Type: Windows Event Log

Windows Forensic — Audit Log Cleared


2️⃣ Evidence Preservation (การรักษาหลักฐาน)

Windows Forensic — Audit Log Cleared

#Get-FileHash Windows_Logs.evtx
MD5    checksum:       630F28FF65702E0794256E87172C39CB
SHA1    checksum:      7D242525D3A1FA26923821F9C4416A895BB3C7F6
 
Step > Action
Receive evidence> Investigator
Calculate hash > SHA1 ,MD5
Store copy > Forensic workstation

3️⃣ Create Working Copy
Windows_Logs_original.evtx > Windows_Logs_analysis.evtx
4️⃣ Evidence Examination
Forensic tools
  • Event Viewer
  • PowerShell

Examination of forensic artifacts


5️⃣ Event Log Classification
Log TypeDescription
SecurityAuthentication events
6️⃣  Identify Suspicious Events

Event ID Description
  • 1102 Audit Log Cleared
  • 1033 Windows Installer
  • 4657 Registry Value Modified
  • 1074 System Shutdown

Windows Forensic — Audit Log Cleared

Windows Forensic — Audit Log Cleared

Event Analysis: Event ID 1102 – Audit Log Cleared
The screenshot shows a Windows Security Event Log entry with Event ID 1102.
 In digital forensic investigations, Event ID 1102 is considered a highly suspicious event because it may indicate an attempt to remove evidence from the system.

Attackers or malicious software may clear logs in order to:

  • hide malicious activities

  • remove traces of system compromise

  • prevent investigators from reconstructing the attack timeline

Therefore, this event is often associated with anti-forensic behavior.

Windows Forensic — Audit Log Cleared

Event Analysis: Event ID 1033 – Windows Installer Activity
The screenshot shows a Windows Application Event Log entry with Event ID 1033, generated by the Windows Installer service. However, the Manufacturer field contains an encoded value, which is unusual and may indicate hidden information. 

cGljb0NURntFdjNudF92aTN3djNyXw== This format resembles Base64 encoding, a common encoding method used to represent binary or text data. 
Malicious software installers sometimes embed encoded or obfuscated values in metadata fields to:
  • hide commands
  • store configuration data
  • conceal indicators of compromise

Windows Forensic — Audit Log Cleared


Event ID 4657 – Registry Value Modified 
The screenshot shows a Windows Security Event Log entry with Event ID 4657, which indicates that a registry value has been modified on the system.

The presence of Event ID 4657 suggests that the installed program modified the Windows Registry, which may indicate that malware created a persistence mechanism.

Windows Forensic — Audit Log Cleared

Event ID 1074 — System Shutdown Initiated The screenshot shows a Windows System Event Log entry with Event ID 1074, which records that a process initiated a system shutdown or restart.

Relationship to the Incident Scenario

The employee reported:

1️⃣ They installed software downloaded from the internet
2️⃣ The software appeared to do nothing
3️⃣ A command prompt briefly appears during login
4️⃣ The computer shuts down immediately

The forensic evidence supports this narrative.

Evidence Correlation Timeline

Analysis and timeline reconstruction


7️⃣ Timeline Reconstruction
Time Event ID     Event

03:55:14 1102     Audit log cleared

03:55:57 1033     Software installed

03:56:19 4657     Registry modified

05:02:35 1074     System shutdown


Reporting and documentation of findings


Investigation Conclusion

The analysis of Windows Event Logs revealed a sequence of suspicious events.

Key findings include:

  • Installation of potentially malicious software

  • Registry modification suggesting persistence mechanism

  • Programmatic system shutdown initiated by shutdown.exe

These events indicate a likely malware infection affecting the system.

Further investigation should include:

  • malware analysis

  • registry artifact examination

  • disk forensic analysis

Windows Forensic — Audit Log Cleared

Windows Forensic — Audit Log Cleared

Ref: 

PicoCTF

Digital forensic analysis conducted according to:

    • NIST SP 800-86 Guide to Integrating Forensic Techniques into Incident Response

อ่านเพิ่มเติม: 


หมายเหตุ:เนื้อหาในเว็บไซต์นี้มีขึ้นเพื่อวัตถุประสงค์ในการให้ข้อมูลและเพื่อการศึกษาเท่านั้น ช่วยเตือนความจำ


* หากมีข้อมูลข้อผิดพลาดประการใด ขออภัยมา ณ ที่นี้ด้วย  รบกวนแจ้ง Admin เพื่อแก้ไขต่อไป
ขอบคุณครับ

#WindowsForensic #ComputerForensics #dfir #forensics #digitalforensics #computerforensic #investigation #cybercrime #fraud

Monday, February 24, 2025

Digital Forensics: log file Analysis

Digital Forensics: log file Analysis

 
Check Windows Event Logs.
  • On Windows XP  , are stored in c:\windows\system32\config
  • By default, Event Viewer log files use the .evt extension and are located in the %SystemRoot%\System32\winevt\Logs folder.
    • Application.evtx: Logs events from applications and programs.
    • Security.evtx: Logs security events like successful or failed logins.
    • System.evtx: Logs events related to Windows system components and drivers
      log file Analysis

Export all successful logon events to a text file named `logons.txt` on the computer's Desktop.

  1. Open Event Viewer and expand Windows Logs. (เปิดโปรแกรม Event Viewer)
Using the Run Dialog:
    Press Windows + R to open the Run dialog. (กดปุ่ม Windows + R บนคีย์บอร์ดเพื่อเปิดหน้าต่าง Run
    )
      Type eventvwr and press Enter.

      log file Analysis

        Or Using the Start Menu:
          Click on the Start button or press the Windows key.
            Type Event Viewer in the search box and select it from the search results.

            • Under Windows Logs, click on the Security which will populate the security events
              log file Analysis
            • In the Actions area, select Filter Current Log.(ในส่วน Actions (ด้านขวา) ให้คลิกที่ Filter Current Log.)
              log file Analysis
            • In the All Event IDs field, enter the Event ID 4624, then click OK. (ในช่อง All Event IDs ให้ป้อนหมายเลข Event ID: 4624 จากนั้นคลิก OK เพื่อกรองหาเฉพาะเหตุการณ์ล็อกออนที่สำเร็จ)
            • In the Actions area, click on Save Filtered Log File As. (กลับไปที่ส่วน Actions อีกครั้ง แล้วคลิกที่ Save Filtered Log File As.)
              log file Analysis
            • Select Desktop for the location, for the file name type logons.txt or logons.event, and select Text or Event files for the Save as type.
            • Click the Save button.

            2. Export all events from the security log to a file named `security.txt` on the server's Desktop.

            1. In the Action area, click Clear Filter to remove the filter from the previous section.
            • Right click on Security under Windows Logs and select Save All Events As.
            • Select Desktop for the location, for the file name type security.txt or security.event  and select Text or Event files for the Save as type.
            • Click the Save button.

            Q:On the system, what time did the user last log into the system?  Download Event log (จากบันทึกเหตุการณ์ที่ส่งออกมา (Download Event log) ผู้ใช้ล็อกอินเข้าสู่ระบบครั้งล่าสุดเมื่อเวลาใด?

            Ans:

              A user successfully logged on to a computer. For information about the type of logon, see the Logon Types table below.

            4624(S): An account was successfully logged on.

            หมายเหตุ: Event ID 4624 หมายถึง "An account was successfully logged on" หรือ "มีการล็อกออนเข้าสู่ระบบบัญชีผู้ใช้สำเร็จ" ซึ่งใช้สำหรับติดตามการล็อกอินที่ประสบความสำเร็จ

            log file Analysis 4624
            ที่มา:ultimatewindowssecurity

            อ่านเพิ่มเติม  Event Viewer

            หมายเหตุ:เนื้อหาในเว็บไซต์นี้มีขึ้นเพื่อวัตถุประสงค์ในการให้ข้อมูล  เผยแพร่ความรู้และให้โอกาสในการค้นคว้าหาข้อมูลเพื่อการศึกษา   บุคคลที่สนใจโดยทั่วไป รวมถึงนักเรียน นิสิต นักศึกษา  ในการเรีบนรู้เท่านั้น

            * หากมีข้อมูลข้อผิดพลาดประการใด ขออภัยมา ณ ที่นี้ด้วย  รบกวนแจ้ง Admin เพื่อแก้ไขต่อไป
            ขอบคุณครับ


            Thursday, October 10, 2024

            Digital Forensics:Log file Sample

            Digital Forensics:Log file Sample

            ตัวอย่าง Aข้อมูลจราจร (Log file) การเข้าถึงเว็บไซต์

            2024-07-17 10:15:30 INFO User connected: IP=192.168.1.10, MAC=00:1A:2B:3C:4D:5E [1, 2]
            2024-07-17 10:16:45 INFO Website accessed: URL=https://www.example.com, UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36 [1, 2]
            2024-07-17 10:20:00 WARNING Firewall blocked: Source IP=10.0.0.1, Destination IP=203.0.113.10, Port=80, Protocol=TCP [3]
            2024-07-17 10:25:00 INFO Router rebooted [9] 

            Digital Forensics:Log file Sample


            1. ผู้ใช้เชื่อมต่อภายในเครือข่าย

            IP/MAC:
            • IP 192.168.1.10 (IP ภายใน) + MAC 00:1A:2B:3C:4D:5E


            2. การเข้าถึงเว็บไซต์

            • User-Agent:

            • เบราว์เซอร์: Chrome เวอร์ชัน 91.0.4472.124 (เวอร์ชันเก่า )
            • OS: Windows 10 (64-bit)

            เว็บเป้าหมาย:

            • https://www.example.com (เว็บทั่วไป ไม่มีเนื้อหาเสี่ยง)

            ตัวอย่าง B ข้อมูลจราจร (Log file)  เฟอร์วอลล์บล็อกการเชื่อมต่อ

            2024-07-17 10:20:00 WARNING Firewall blocked: Source IP=10.0.0.1, Destination IP=203.0.113.10, Port=80, Protocol=TCP [3]  
            Digital Forensics:Log file Sample

            • รายละเอียดเหตุการณ์:

              • Source IP = ต้นทาง: IP 10.0.0.1 (IP ภายใน อาจเป็นเราเตอร์หรือเซิร์ฟเวอร์)

              • Destination IP = ปลายทาง: IP 203.0.113.10 (IP สาธารณะ RFC 5737 ใช้สำหรับตัวอย่าง)

              • พอร์ต/โปรโตคอล: พอร์ต 80 (HTTP) + โปรโตคอล TCP


            • การวิเคราะห์:

            สาเหตุการบล็อก:
            - นโยบายองค์กรไม่อนุญาตให้ส่งข้อมูล HTTP ผ่านพอร์ต 80  
            - อาจเป็นการพยายามส่งข้อมูลละเอียดอ่อน (Log, Credential) ไปภายนอก

                • ความเสี่ยงสูง:

                • Source IP = IP ต้นทาง (10.0.0.1) อาจถูกบุกรุกหรือตั้งค่าผิดพลาด
                • Destination IP =ปลายทาง 203.0.113.10 อาจเป็น C2 Server (Command & Control) ของมัลแวร์


              ตัวอย่าง C  ข้อมูลจราจร (Log file) เราเตอร์บูตใหม่

              2024-07-17 10:25:00 INFO Router rebooted 

                • ความสัมพันธ์กับเหตุการณ์อื่น:

                - เกิด 5 นาที หลังจากเฟอร์วอลล์บล็อกการเชื่อมต่อ 
                •   - ไม่มีแท็ก [1,2,3] → อาจเป็นการบูตโดยผู้ดูแลระบบ หรือเกิดจากเหตุอื่น
                สรุปความสัมพันธ์และความเสี่ยง

                Digital Forensics:Log file Sample

                ตัวอย่าง D  ข้อมูลจราจร (Log file)  การเข้าถึงเว็บไซต์

                2025-07-17 14:33:27 NAT 10.0.0.12:58432 → 203.113.23.45:58432 TCP www.example.com 104.18.21.190 443 00:05:32

                รายละเอียดเหตุการณ์:

                Source IP = ต้นทาง: IP 10.0.0.12 (IP ภายในอาจเป็นเราเตอร์หรือเซิร์ฟเวอร์ อุปกรณ์ในเครือข่าย)
                Destination IP = ปลายทาง: IP 203.113.23.45 (IP Public Gateway) → DNS ปลายทางจริง: www.example.com (IP 104.18.21.190)
                พอร์ต/โปรโตคอล: พอร์ต 443 (HTTPS)  

                ตัวอย่าง E  ข้อมูลจราจร (Log file)  การซิงค์เวลาจากเซิร์ฟเวอร์

                2025-07-17 14:35:10 NAT 10.0.0.13:52678 → 203.113.23.46:52678 UDP ntp.org 129.6.15.28 123 00:00:02

                รายละเอียดเหตุการณ์:

                Source IP = ต้นทาง: IP 10.0.0.13 (IP ภายในอาจเป็นเราเตอร์หรือเซิร์ฟเวอร์ อุปกรณ์ในเครือข่าย)
                Destination IP = ปลายทาง: IP 203.113.23.46 (IP Public Gateway) →   ปลายทางภายนอก : ntp.org  (IP 129.6.15.28)
                พอร์ต/โปรโตคอล:  UDP/123 (NTP - Network Time Protocol)

                ตัวอย่าง F  ข้อมูลจราจร (Log file)  การเข้าถึงเว็บไซต์ฟิชชิ่ง

                2025-07-17 14:36:01 HTTP_ACCESS customer@isp.co.th GET http://phishing-site.com/index.html 104.21.24.190

                รายละเอียดเหตุการณ์:

                         - ผู้ใช้:customer@isp.co.th (บัญชีผู้ใช้ customer)
                         - การร้องขอ: GET http://phishing-site.com/index.html
                - Destination IP = ปลายทาง: IP 104.21.24.190

                          - พอร์ต/โปรโตคอล: HTTP (ไม่มีการเข้ารหัส!)

                Lab 1 ข้อมูลจราจร (Log file) (สถิติการใช้งานเครือข่าย)

                2025-07-17 10:30:45 NETFLOW: SrcIP=110.170.25.67, DstIP=104.16.24.35, Proto=TCP, SrcPort=54321, DstPort=443, Bytes=15.7MB, Pkts=11230, Duration=00:05:22

                Source IP: = ?

                Destination IP : =?

                port/protocol = พอร์ต/โปรโตคอล: ?


                Lab 2 ข้อมูลจราจร (Log file) (การเชื่อมต่อเครือข่าย)

                2025-07-17 08:12:34 PPPoE-SESSION START: User=customer123@isp.co.th, NAS=bras-01.bangkok.isp, IP=110.170.25.67, MAC=00:1B:44:11:3A:E7, Duration=00:02:15
                2025-07-17 12:45:21 PPPoE-SESSION STOP: User=customer456@isp.co.th, NAS=bras-02.chiangmai.isp, IP=110.170.33.122, RX=1.45GB, TX=350MB, Duration=04:22:10

                Digital Forensics:Log file Sample


                อ่านเพิ่มเติม:


                หมายเหตุ:เนื้อหาในเว็บไซต์นี้มีขึ้นเพื่อวัตถุประสงค์ในการให้ข้อมูล  เผยแพร่ความรู้และให้โอกาสในการค้นคว้าหาข้อมูลเพื่อการศึกษา   บุคคลที่สนใจโดยทั่วไป รวมถึงนักเรียน นิสิต นักศึกษา  ในการเรียนรู้เท่านั้น

                * หากมีข้อมูลข้อผิดพลาดประการใด ขออภัยมา ณ ที่นี้ด้วย  รบกวนแจ้ง Admin เพื่อแก้ไขต่อไป
                ขอบคุณครับ

                #WINDOWSFORENSIC #COMPUTERFORENSICS #DFIR #FORENSICS #DIGITALFORENSICS #COMPUTERFORENSIC #INVESTIGATION #CYBERCRIME #FRAUD

                Volatility Lab

                Volatility Lab  Image Wanna.vmem P.73 windows.info #python3  vol.py   -f '/home/kali/Desktop/Wanna/Wanna-MEM.vmem' windows.info     ...