Skip to content
This repository was archived by the owner on Jun 17, 2025. It is now read-only.

Latest commit

 

History

History
364 lines (340 loc) · 29.1 KB

File metadata and controls

364 lines (340 loc) · 29.1 KB

Investigating Windows

Whats the version and year of the windows machine? search computer name registry để lấy đường dẫn trong hkey local machine image Which user logged in last? image image When did John log onto the system last? Answer format: MM/DD/YYYY H:MM:SS AM/PM image What IP does the system connect to when it first starts? image image When did Jenny last logon? image What two accounts had administrative privileges (other than the Administrator user)? Answer format: username1, username2 image check user thường chỉ có user: jenny có quyền admin vậy câu trả lời sẽ là: jenny, guest. Whats the name of the scheduled task that is malicous. image image image có xuất hiện 1 task khá lạ và check trên github thì lại có công dụng khác so với mô tả của task What file was the task trying to run daily?

  • nội dung phần action What port did this file listen locally for? xem hướng dẫn bên github thì sẽ có câu lệnh: nc.ps -l port -> port:1348

At what date did the compromise take place? hỏi thời gian khởi tạo image

What tool was used to get Windows passwords? khi dùng máy ảo cửa sửa của mimikatz cũng hiện liên tục hoặc có thể vào task schedule thấy task có tên gameover dẫn đến thư mục chứa mimimkatz

What was the attackers external control and command servers IP? image thực hiện mở file host như đường dẫn image image khi mở file host ra chúng ta thấy các trang như virustotal,... đều bị chặn khi để ip cục bộ khiến không thể truy cập có lẽ kẻ tấn công không muốn người dùng có thể vào được các trang này, câu trả lời sẽ là: 76.32.97.132

At what time did Windows first assign special privileges to a new logon? thực hiện mở event viewer mở phần security logon special có event id là 4672 thực hiện filter theo id đó và sort theo date image search google với keyword: local path for websites in iis path image image file có đuôi jsp What was the last port the attacker opened? dựa vào hint về firewall chúng ta có thể vào windows firewall để check If the Windows Firewall is turned off then it will have no effect, and the Inbound and Outbound rules will mean nothing. Inbound rules: These are to do with other things accessing your computer. If you are running a Web Server on your computer then you will have to tell the Firewall that outsiders are allowed to connect to it. Outbound rules: These are so that you can let some programs use the Internet, and Block others. You will want to let your Web Browser (Internet Explorer, Firefox, Safari, Chrome, Opera...) have access to the Internet, so you will tell Windows Firewall that it's allowed. tham khảo một số kiến thức thêm tại: https://superuser.com/questions/48343/what-are-inbound-and-outbound-rules-for-windows-firewall#:~:text=Inbound%20rules%20filter%20traffic%20passing,conditions%20specified%20in%20the%20rule. image Check for DNS poisoning, what site was targeted? dựa vào việc đổi ip của attacker trong câu trước dễ dàng có thể xác định được tên miền bị tấn công là google.com

Juicy Details

Reconnaissance mở file và thực hiện đọc lần lượt từ trên xuống dưới để tìm tên tool image

What endpoint was vulnerable to a brute-force attack? dễ dàng nghĩ đến việc tấn công brute-force thường nhằm vào password đồng thời hydra cũng là 1 tool brute-force image

What endpoint was vulnerable to SQL injection? nghĩ ngay đến sqlmap image

What parameter was used for the SQL injection? https://www.geeksforgeeks.org/use-sqlmap-test-website-sql-injection-vulnerability/ tham khảm về tutorial của sqlmap đọc theo thì tham số được sử dụng sẽ là q

What endpoint did the attacker try to use to retrieve files? (Include the /) xuất file thì chắc chắn phải là những hành động cuối cùng nên sẽ đi về cuối log search về tool feroxbuster có tác dụng như ảnh image tìm được câu trả lời là ftp

Stolen data Where can customers usually comment on a shopping website? hint: Where can customers usually comment on a shopping website? nghĩ đến ngay các đường link dẫn đến các sản phẩm xem lại log thì thấy được nmap quét image -> comment đánh giá về sản phẩm : product reviews

Was their brute-force attack successful? If so, what is the timestamp of the successful login? (Yay/Nay, 11/Apr/2021:09:xx:xx +0000) vào log lọc và đọc thông tin về hydra sau một hồi tìm hiểu thì nhưng mã như 401,500,501 là những mã báo lỗi còn mã 200 831 là báo thành công image

What user information was the attacker able to retrieve from the endpoint vulnerable to SQL injection? image như ở câu đầu tiên về việc lấy email thì hacker thực hiện việc tải xuống qua lệnh curl

What files did they try to download from the vulnerable endpoint? (endpoint from the previous task, question #5) câu này chỉ cần lấy tên file ở đuôi câu 5 phần trước image

What service and account name were used to retrieve files from the previous question? (service, username) dựa vào vài câu hỏi bên trên thì có thể trả lời service: ftp còn user vào check file vsftpd.log(là file log ghi lại quá trình đăng nhập) tên đăng nhập là anon nhưng khi submit lại báo sai thì tên anon này liên tưởng đến nhóm hacker mũ đen anonymous và cái tên này cũng có nghĩa là vô danh image

What service and username were used to gain shell access to the server? (service, username) em thực hiện search về tác dụng của các file log thì có search ra 1 file log liên quan đến việc xác thực tài khoản https://www.bkns.vn/cac-file-log-quan-trong-tren-linux.html#:~:text=File%20log%20%2Fvar%2Flog%2Fauth.log&text=Ch%E1%BB%A9a%20th%C3%B4ng%20tin%20x%C3%A1c%20th%E1%BB%B1c,ki%E1%BA%BFm%20trong%20file%20log%20n%C3%A0y. image khi vào auth.log dễ dàng nhận ra service mà hacker dùng chính là ssh và tấn công brute-force image username:www-data

Matryoshka doll

có hint về việc ẩn dữ liệu trong tấm ảnh nghĩ đến ngay tool binwalk image image image thực hiện liên tiếp vài lài thì hiện một file ẩn có tên là flag.txt đọc file thu được image

Glory of the Garden

bài này lúc đầu em nghĩ khó hơn nhưng có vẻ dùng strings | grep là done hint nói về hex editor em lúc đầu nghĩ về việc chỉnh sửa header nhưng có lẽ chỉ đọc strings của ảnh :v image

wireshark doo doo

export object http do em thấy http truyền khá nhiều file image thu được file có 1 file có tiêu đề khác các file còn lại em thử mở thì thấy đây là 1 dạng mã hóa rất dễ gặp khi gặp dạng bài network là rot13 image image

packet primer

image ngay hint đã nói về việc dùng đến analyse để follow stream :v image image flag: picoCTF{p4ck37_5h4rk_01b0a0d6}

wireshark 2

image lúc đầu xuất hiện khá nhiều cờ giả do em k biết đã submit thử chú ý những lần gửi cờ giả đều đến từ dst giống nhau dựa vài đó có thể lọc ra để ý thì dns gửi những chuỗi kí tự ghép lại giống base64:cGljb0NURntkbnNfM3hmMWxfZnR3X2RlYWRiZWVmfQ== decode ta thu được cờ image

Trivial Flag Transfer Protocol

image khi mới mở file bằng wireshark có thể thấy đã có gói được đẩy lên export object tftp để lấy các gói dữ liệu đã gửi image giải mã rot13 và cắt chuỗi cho hợp lý được thông điệp(file instructions.txt) image image thông điệp thứ 2 từ file plan từ đó ta thực hiện stego các ảnh image giải nén file deb xem bên trong có gì image các file đều chỉ dẫn tới 1 tool có thể mã hóa tệp khác trong ảnh là steghide dùng steghide với cả 3 hình và mật khẩu tác giả có để trong plan là DUEDILIGENCE image image

Carnage

What was the date and time for the first HTTP connection to the malicious IP? thực hiện lọc luồng http lấy time đầu tiên được kết nối image What is the name of the zip file that was downloaded? image đọc cột info để lấy thông tin tệp tải xuống What was the domain hosting the malicious zip file? thực hiện follow http stream image What is the name of the webserver of the malicious IP from which the zip file was downloaded? image phần dưới có hiển thị phần file trong file zip được tải xuống ở luồng What is the version of the webserver from the previous question? image phần x-powered-by thể hiện cho version của webserver Malicious files were downloaded to the victim host from multiple domains. What were the three domains involved with this activity? đọc sơ qua 1 số bài về https cộng với trong file thì cho thấy port mà SSL/TLS kết nối đến là 443 image dựa vào hint đầu bài cho tìm từ giây thứ 11 đến giây thứ 30 sẽ có 3 source khác nhau Which certificate authority issued the SSL certificate to the first domain from the previous question? follow tcp stream của source đầu tiên để lấy thông tin về nơi cấp cert image What are the two IP addresses of the Cobalt Strike servers? Use VirusTotal (the Community tab) to confirm if IPs are identified as Cobalt Strike C2 servers. (answer format: enter the IP addresses in sequential order) http thường được lưu ở cổng 8080 và 80 chọn statistíc -> conversation lọc packet truyền nhiều nhất ở port 8080 và 80 image image What is the Host header for the first Cobalt Strike IP address from the previous question? filter ip.addr == 185.106.96.158 follow tcp stream lấy tên host image What is the domain name for the first IP address of the Cobalt Strike server? You may use VirusTotal to confirm if it's the Cobalt Strike server (check the Community tab). lên virustotal và search ip của câu trên image What is the domain name of the second Cobalt Strike server IP? You may use VirusTotal to confirm if it's the Cobalt Strike server (check the Community tab). image What is the domain name of the post-infection traffic? thực hiện filter POST image tên source là tên câu trả lời What are the first eleven characters that the victim host sends out to the malicious domain involved in the post-infection traffic? phần info lấy 11 chữ cái đầu image What was the length for the first packet sent out to the C2 server? length là phần độ dài của gói tin image

What was the Server header for the malicious domain from the previous question? image follow http stream lấy tên server image The malware used an API to check for the IP address of the victim’s machine. What was the date and time when the DNS query for the IP check domain occurred? (answer format: yyyy-mm-dd hh:mm:ss UTC) image filter api rồi nhập các time đầu tiên kết nối tới mà malware sử dụng search thử thì có 1 api liên quan đến malware What was the domain in the DNS query from the previous question? lấy tên domain từ câu trước nhập vào Looks like there was some malicious spam (malspam) activity going on. What was the first MAIL FROM address observed in the traffic? search trên mạng về giao thức của email là smtp,pop,imap filter các giao thức trên với contains MAIL FROM và lấy mail đầu tiên image How many packets were observed for the SMTP traffic? vào statistics chọn protocol hierarchy image image số packet là 1439

What Lies Within

image dùng tool stego online decode ra flag

Squidgame

Attacker1 đầu tiên chúng ta dùng oletools 1 công cụ để phân tích các file word image sau khi phân tích thì có thể đọc documents để biết thêm về cách thức ẩn dữ liệu image đa số là các phép cộng các chuỗi nhưng có 1 đoạn replace mà chúng ta cần để ý image mở ở phần 4 có 1 đoạn chuỗi khớp với thuật toán mã hóa bên trên image kết quả sau khi decode image What is the malicious C2 domain you found in the maldoc where an executable download was attempted? http://fpetraardella.band/xap_102b-AZ1/704e.php?l=litten4.gas image What executable file is the maldoc trying to drop? image image In what folder is it dropping the malicious executable? (hint: %Folder%) câu này có 1 đoạn liên quan đến path search thì thấy folder là image Provide the name of the COM object the maldoc is trying to access.

gợi ý check trường clsid image search google về id thì ra kết quả là image Include the malicious IP and the php extension found in the maldoc. (Format: IP/name.php) câu này thì hiện khá rõ ràng image Find the phone number in the maldoc. (Answer format: xxx-xxx-xxxx) check meta file thì có hiện số điện thoại của author image Doing some static analysis, provide the type of maldoc this is under the keyword “AutoOpen”. image một công cụ khác trong oletool image dùng tool + pipe + grep để ra đáp án

Provide the subject for this maldoc. (make sure to remove the extra whitespace) subject lấy từ phần check file của câu phone number image

Provide the time when this document was last saved. (Format: YEAR-MONTH-DAY XX:XX:XX) hint : Use oletimes image

Provide the stream number that contains a macro. image stream 8 có contains Macro

Provide the name of the stream that contains a macro. name:ThisDocuments

Attacker2 Provide the streams (numbers) that contain macros. image có 4 luồng đang chứa macro Provide the size (bytes) of the compiled code for the second stream that contains a macro. lấy đáp án từ ảnh của câu trên: 13867 Provide the largest number of bytes found while analyzing the streams. lấy số lớn nhất ở cột thứ 2: 63641 Find the command located in the ‘fun’ field ( make sure to reverse the string). dùng olevba phân tích thì vô tình đọc được 1 đoạn shell được rev image Provide the first domain found in the maldoc. image Provide the second domain found in the maldoc. 2 câu lấy lần lượt các url mà attacker đã cố gắng tải các tệp dll độc hại Provide the name of the first malicious DLL it retrieves from the C2 server. xem path đầu tiên sẽ thấy tên dll được tải xuống đầu tiên: www1.dll image How many DLLs does the maldoc retrieve from the domains?:5 Provide the path of where the malicious DLLs are getting dropped onto? path ở ổ C ảnh trên

What program is it using to run DLLs? image How many seconds does the function in the maldoc sleep for to fully execute the malicious DLLs?:15 quy đổi về giây như thời gian ở trên ảnh Under what stream did the main malicious script use to retrieve DLLs from the C2 domains? (Provide the name of the stream). image thấy được olestream attacker2 Provide the executable name being downloaded. image dùng tool olevba để phân tích What program is used to run the executable? image Provide the malicious URI included in the maldoc that was used to download the binary (without http/https). sử dụng 1 tool khác để phân tích là viper monkey image What folder does the binary gets dropped in? ProgramData hỏi về thư mục chứa file binary image Which stream executes the binary that was downloaded? dễ dàng có thể thấy tên stream tải xuông file là: VBA/T -> A3 Attacker 4 Provide the first decoded string found in this maldoc. image có gợi ý đến phép xor bit image ra kết quả như trong ảnh

Provide the name of the binary being dropped. image hint có nói đến việc unxor thì em ném hết vào decode submit thì có 1 kết quả đúng image Provide the folder where the binary is being dropped to. decode phần open image image Provide the full URI from which the second binary was downloaded (exclude http/https). end function 1 thì tiếp đến sẽ là thời gian download malware thứ 2 image image Provide the name of the second binary. bin.exe (đoạn cuối của đường link tải file malware)

Attacker 5 What is the caption you found in the maldoc? image dùng oletools check từng cái một What is the XOR decimal value found in the decoded-base64 script? image thục hiện phân tích file doc thì có thấy 1 đoạn chuỗi base64 khi decode ra thì có đoạn gunzip decode tiếp thì value = 35; image Provide the full user-agent found. decode khi xor với 35 ra được đường dẫn image Provide the C2 IP address of the Cobalt Strike server. image Provide the path value for the Cobalt Strike shellcode. image Provide the port number of the Cobalt Strike C2 Server. Provide the first two APIs found. 2 câu này lấy đáp án từ câu trên