BTLO - Paranoid
Challenge: https://blueteamlabs.online/home/challenge/paranoid-e5e164befb
:::spoiler TOC [TOC] ::: :::info 此lab大部分是參考1的說明,因為本身第一次接觸aureport,所以不太清楚指令或者是注意的地方 :::
Tool
AUReport: $ sudo apt install auditd
Linux CLI
Background
1 |
|
起手式
1 |
|
==Q1==
What account was compromised?
Recon
既然是和帳號有關那就是和authentication有關,所以可以先用summary看他有多少user(結果如上),再用-au
指令看成功(失敗)的認證有多少
1 |
|
可以發現account name都是==btlo==,不過奇怪的是前面有一大堆的認證失敗,到最後才有三次的認證成功,所以我們可以很清楚的知道攻擊者就是==192.168.4.155==嘗試用==bruteforce==的方式透過ssh登入進來
:::spoiler Flag
Flag: btlo
:::
==Q2==
What attack type was used to gain initial access?
Recon
呈上題
:::spoiler Flag
Flag: bruteforce
:::
==Q3==
What is the attacker’s IP address?
Recon
呈上題
:::spoiler Flag
Flag: 192.168.4.155
:::
==Q4==
What tool was used to perform system enumeration?
Recon
根據1的說明,此時要使用到--tty
的參數列出登入進來之後下甚麼command
1 |
|
從以上結果得知,攻擊者進來以後先recon一下(hostname / whoami / ls / sudo -l(查看目前的身分可以下甚麼command)),最重要的是他wget了一個linpeas.sh,這是一個專用於linux based的提權工具,詳細的資訊可以看Linux權限提升研究: 自動化信息收集,甚至後面下載了一個evil,應該是自己寫的或是自己蒐集的武器庫,提權完了之後就是要查看最重要的地方,也就是==/etc/shadow==,就是真實存密碼的地方
:::spoiler Flag
Flag: linpeas
:::
==Q5==
What is the name of the binary and pid used to gain root?
Recon
既然我們已經知道他下載了一個evil tar並且執行其中的script,那麼在process紀錄中一定有相關資訊,此時可以下-p
列出所有process list,然後我們要著重在evil這個key word,所以記得grep
Exploit
1 |
|
:::spoiler Flag
Flag: evil, 829992
:::
==Q6==
What CVE was exploited to gain root access? (Do your research!)
Recon
只要上網找這一題的題目就會出現相關的CVE
:::spoiler Flag
Flag: CVE-2021-3156
:::
==Q7==
What type of vulnerability is this?
Recon
呈上題,也可以看chatgpt的回答
:::spoiler Flag
Flag: heap_based buffer overflow
:::
==Q8==
What file was exfiltrated once root was gained?
Recon
呈第4題
:::spoiler Flag
Flag: /etc/shadow
:::