# Investigating Windows https://tryhackme.com/r/room/investigatingwindows ## Whats the version and year of the windows machine? ![image](https://hackmd.io/_uploads/Hyj3niJZA.png) Get-ComputerInfo -Property “Os*” ![image](https://hackmd.io/_uploads/SJ9zaoJ-R.png) ## Which user logged in last? ![image](https://hackmd.io/_uploads/Hktpaj1WA.png) net user {username} |findstr “Last” ![image](https://hackmd.io/_uploads/HyEyx3kWR.png) ## When did John log onto the system last? ## What IP does the system connect to when it first starts? C:\ > Windows > System32 > drivers > etc HKEY\_LOCAL\_MACHINE >_ _SOFTWARE > Microsoft > Windows > CurrentVersion > Run ![image](https://hackmd.io/_uploads/BJI34nybA.png) Get-LocalGroupMember -Group “Administrators” ## What two accounts had administrative privileges (other than the Administrator user)? Answer format: username1, username2 ![image](https://hackmd.io/_uploads/r1E-I31WR.png) ## Whats the name of the scheduled task that is malicous. Get-Scheduled | where {$_.TaskPath -eq “\”} ![image](https://hackmd.io/_uploads/HyNlvnyZC.png) ## What file was the task trying to run daily? $task = Get-ScheduledTask | Where TaskName -eq “Clean file system” rồi đến $task.actions ![image](https://hackmd.io/_uploads/r1Gerheb0.png) ## What port did this file listen locally for? ## When did Jenny last logon? ## At what date did the compromise take place? ![image](https://hackmd.io/_uploads/r1cyuhg-R.png) ## During the compromise, at what time did Windows first assign special privileges to a new logon? Event Viewer > Windows log > Security > filter từ 12:00:00 AM đến 11:59:00 PM ![image](https://hackmd.io/_uploads/rJIqR3eb0.png) ## What tool was used to get Windows passwords? ![image](https://hackmd.io/_uploads/Sy4XobGb0.png) C:\ > TMP > mim-out ![image](https://hackmd.io/_uploads/HJWiRWfWC.png) ## What was the attackers external control and command servers IP? > Command and Control Server (C2) là một máy chủ hoặc hệ thống có chức năng định tuyến, kiểm soát và giám sát sự hoạt động của phần mềm độc hại hoặc các cuộc tấn công mạng. > Các máy chủ C&C Servers thường được thiết lập để ẩn[ địa chỉ IP](https://vinahost.vn/ip-la-gi/) thực của chúng và bảo vệ chúng bằng các biện pháp bảo mật để tránh bị phát hiện. Khi kẻ tấn công hack một máy được kết nối với mạng, chúng sẽ thiết lập một máy chủ giữa chúng và máy mục tiêu: kẻ tấn công sẽ gửi lệnh đến máy chủ C2, sau đó sẽ đưa lệnh đến máy mục tiêu. Máy chủ C2 cũng đóng vai trò là kho lưu trữ nhanh cho mọi dữ liệu được lấy từ máy mục tiêu, mặc dù kẻ tấn công thường sẽ xóa dữ liệu khỏi máy chủ C2 và đặt nó ở nơi nào đó an toàn hơn. Nói chung, kẻ tấn công đôi khi sẽ thêm địa chỉ IP của máy chủ C2 vào host file: nếu bạn bắt được kẻ tấn công trước khi chúng kết thúc và che dấu vết của chúng, bạn có thể nhìn thấy nó ở đó. Ở đây, có vẻ như kẻ tấn công chưa hoàn thành xong hoặc cẩu thả trong việc che giấu dấu vết. C:\ > Windows > System32 > driver > etc ![image](https://hackmd.io/_uploads/BkCELfGWR.png) ## What was the extension name of the shell uploaded via the servers website? ![image](https://hackmd.io/_uploads/rJZY0zM-R.png) ## What was the last port the attacker opened? ![image](https://hackmd.io/_uploads/ry2KxmfZR.png) ## Check for DNS poisoning, what site was targeted? ![image](https://hackmd.io/_uploads/rJ4fk7Gb0.png) # Disk Analysis & Autopsy https://tryhackme.com/r/room/autopsy2ze0 ## What is the MD5 hash of the E01 image? File Metadata ![image](https://hackmd.io/_uploads/H1AgwQz-A.png) ## What is the computer account name? Operating System Information > SYSTEM > File Metadata ![image](https://hackmd.io/_uploads/BJqeu7M-C.png) ## List all the user accounts. (alphabetical order) Mình chỉ cần user account nên mình có thể bỏ qua Guest, LocalService, DefaultAccount,... ![image](https://hackmd.io/_uploads/SyIsJrfZR.png) ## Who was the last user to log into the computer? ![image](https://hackmd.io/_uploads/HyUXgBGbA.png) ## What was the IP address of the computer? Chúng ta còn có thể truy cập Registry với Autopsy ![image](https://hackmd.io/_uploads/r15kfrf-A.png) ![image](https://hackmd.io/_uploads/HJ9QfSG-R.png) ## What was the MAC address of the computer? (XX-XX-XX-XX-XX-XX) ![image](https://hackmd.io/_uploads/HkZqMBfbR.png) ## What is the name of the network card on this computer? SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\NetworkCards ![image](https://hackmd.io/_uploads/H14sbLfZC.png) ## What is the name of the network monitoring tool? ## A user bookmarked a Google Maps location. What are the coordinates of the location? ![image](https://hackmd.io/_uploads/HkYs6rzWC.png) ## A user has his full name printed on his desktop wallpaper. What is the user's full name? ![image](https://hackmd.io/_uploads/HyxYQbUGbC.png) ## A user had a file on her desktop. It had a flag but she changed the flag using PowerShell. What was the first flag? Data Sources > HASAN2.E01 > Vol3 > Users > 'username' > AppData > Roaming > Microsoft > Windows > PowerShell > PSReadLine > ConsoleHost_history.txt ![image](https://hackmd.io/_uploads/H1rYNUfbR.png) ## The same user found an exploit to escalate privileges on the computer. What was the message to the device owner? ![image](https://hackmd.io/_uploads/BJDLLIf-C.png) ## 2 hack tools focused on passwords were found in the system. What are the names of these tools? (alphabetical order) Data Sources > HASAN2.E01 > Vol3 > Program Data > Microsoft > Windows Defender > Scans > History > Service > DetectionHistory > 02 # References and Further Readings https://haksthehax.com/2021/05/25/tryhackme-investigating-windows-part-1/ https://medium.com/@haircutfish/tryhackme-investigating-windows-task-1-investigating-windows-da65f32cf67f https://igorsec.blog/2023/12/22/tryhackme-investigating-windows/ https://terguttac.medium.com/tryhackme-disk-analysis-autopsy-d4883eb7ab51 https://vinahost.vn/cc-server-la-gi/ https://blog.razrsec.uk/tryhackme-disk-analysis-autopsy/ https://www.youtube.com/watch?v=kjDKgdoFufo