靶機: easy_cloudantivirus

靶機: easy_cloudantivirus準備

  • 下載靶機(Target):https://www.vulnhub.com/entry/boredhackerblog-cloud-av,453/
  • 靶機推薦使用 VirtualBox 導入,注意以下兩個設置
    • 顯示 --> 顯卡控制器 --> VMSVGA
    • USB 設備 --> USB 1.1 (OHCI) 控制器
  • 配置網絡環境:https://www.cnblogs.com/shadow-/p/16815020.html
    • kali: NAT + [ Bridged/Host-Only ]
    • 靶機: Host-Only
完成上面內容后,需要對 kali 與 target 做 快照記錄 當前環境和布置 , 以免實驗過程中出現錯誤造成不可挽回的損失
打靶流程發現目標
此過程一般使用 Kali 中掃描工具 arp-scan, nmap, Fping, Nping, Arping, Nbtscan, ...
一般推薦 arp-scan 使用簡單
  • 使用 sudo arp-scan -l -I eth1 尋找目標,發現目標 192.168.56.109
    ┌──(kali?kali)-[~]└─$ sudo arp-scan -l -I eth1127 ?Interface: eth1, type: EN10MB, MAC: 08:00:27:ad:7a:24, IPv4: 192.168.56.111Starting arp-scan 1.9.8 with 256 hosts (https://github.com/royhills/arp-scan)192.168.56.10a:00:27:00:00:0d(Unknown: locally administered)192.168.56.10008:00:27:4d:8e:bePCS Systemtechnik GmbH192.168.56.10908:00:27:17:f5:a8PCS Systemtechnik GmbH3 packets received by filter, 0 packets dropped by kernelEnding arp-scan 1.9.8: 256 hosts scanned in 2.201 seconds (116.31 hosts/sec). 3 responded
    • 在 arp-scan 中參數 -I--interface= 簡寫作用是指定掃描的接口 , 如果沒有默認掃描 eth0
    • 在不知道網段使用 -l 參數 , 當然也可以直接填寫需要掃描的網段
    • 應當核實第一步,可以在 VirtualBox 上查看靶機的 MAC 地址與上面的目標是否相同,這一步也是驗證前面準備時的配置是否有用
  • 使用 nmap 對目標進行端口掃描,一個經典的 nmap 掃描命令 nmap -A -T4 192.168.56.109 即可
    ┌──(kali?kali)-[~]└─$ nmap -A -T4 192.168.56.1091 ?Starting Nmap 7.93 ( https://nmap.org ) at 2022-10-23 14:29 CSTNmap scan report for 192.168.56.109Host is up (0.0011s latency).Not shown: 998 closed tcp ports (conn-refused)PORTSTATE SERVICE VERSION22/tcpopensshOpenSSH 7.6p1 Ubuntu 4 (Ubuntu Linux; protocol 2.0)| ssh-hostkey:|2048 6a424b7c2a060f504b32cfb831e9c4f4 (RSA)|256 81c7600fd71e56f7a31e9f7627bd3127 (ECDSA)|_256 7190c326ba3be8b3537e7353274d6baf (ED25519)8080/tcp openhttpWerkzeug httpd 0.14.1 (Python 2.7.15rc1)|_http-server-header: Werkzeug/0.14.1 Python/2.7.15rc1|_http-title: Site doesn't have a title (text/html; charset=utf-8).Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernelService detection performed. Please report any incorrect results at https://nmap.org/submit/ .Nmap done: 1 IP address (1 host up) scanned in 7.83 seconds
    • 參數 -A 用來進行操作系統及其版本的探測
    • 參數 -T4 可以加快執行速度
    • 從掃描結果我們可以得到以下信息
      • 操作系統 OS 是 Linux
      • 開放了兩個端口 22/tcp(ssh: OpenSSH 7.6p1 Ubuntu 4), 8080/tcp(http: Werkzeug httpd 0.14.1)
注入測試對于 ssh 目前沒有頭緒,我們可以嘗試訪問其開發的 http 服務