20155308《網絡對抗》Exp6 信息蒐集與漏洞掃描
原理與實踐說明
實踐內容
本實踐的目標是掌握信息蒐集的最基礎技能。具體有:安全
- 各類搜索技巧的應用
- DNS IP註冊信息的查詢
- 基本的掃描技術:主機發現、端口掃描、OS及服務版本探測、具體服務的查點
- 漏洞掃描:會掃,會看報告,會查漏洞說明,會修補漏洞
基礎問題
- 哪些組織負責DNS,IP的管理?
- ICANN是統一整個互聯網名稱與數字地址分配的國際組織,旗下有三個支持組織,其中ASO負責IP地址系統的管理,DNSO負責互聯網上的域名系統的管理,因此ICANN、ASO以及ASO旗下的地區性註冊機構組織負責IP的管理,ICANN、DNSO以及DNSO旗下的註冊機構組織負責DNS的管理
- 什麼是3R信息?
- 即Registrar, Registrar, Registrant,分別表示爲官方註冊局、註冊商、註冊人
實踐內容
信息蒐集(以baidu.com爲例)服務器
whois查詢
- 使用whois查詢域名註冊信息(進行whois查詢時去掉www等前綴),能夠獲得3R註冊信息,包括註冊人的名字、組織、城市等信息。
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
nslookup,dig查詢
<1> 先進行nslookup查詢網絡
![](http://static.javashuo.com/static/loading.gif)
<2> 再進行dig查詢tcp
nslookup能夠獲得DNS解析服務器保存的Cache的結果,但並非必定準確的。dig能夠從官方DNS服務器上查詢精確的結果。工具
![](http://static.javashuo.com/static/loading.gif)
- 可使用www.maxmind.com根據IP查詢地理位置:
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
tracert路由探測
- 在Linux下使用traceroute命令探測到博客園通過的路由:
![](http://static.javashuo.com/static/loading.gif)
- 因爲虛擬機使用的是nat鏈接,traceroute返回的TTL exceeded消息沒法映射到源IP地址、源端口、目的IP地址、目的端口和協議,所以沒法反向NAT將消息路由傳遞回來,因此在Windows下從新進行探測,能夠經過網上的ip查詢工具查詢到這些路由所在地,分析出數據包所走的路線
搜索引擎查詢
- 能夠利用百度等搜索引擎查詢咱們想要的信息,格式爲
filetype:pdf 關鍵字 site:edu.cn
,例如我要在站點範圍爲edu.cn的網站查詢有關學校的pdf文檔:
![](http://static.javashuo.com/static/loading.gif)
nmap掃描
![](http://static.javashuo.com/static/loading.gif)
- 使用
nmap –sn
命令掃描活動的主機,看看可否掃描到本身的主機:
![](http://static.javashuo.com/static/loading.gif)
- 使用TCP/SYN方式對本身的kali機進行掃描:
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
- 在Kali終端下輸入
nmap -sS -sU -top-ports 50 IP地址
去分別掃描tcp和udp最有可能開放的50個端口
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
smb服務的查點
- 使用
msfconsole
指令進入msf
,再輸入search _version
指令查詢可提供的查點輔助模塊:
![](http://static.javashuo.com/static/loading.gif)
- 輸入
use auxiliary/scanner/smb/smb_version
指令使用輔助模塊,查看須要配置的參數:
![](http://static.javashuo.com/static/loading.gif)
- 配置好RHOSTS參數後,使用
exploit
指令開始掃描,能夠發現目標主機的smb版本信息:
漏洞掃描學習
- openvas配置(用老師的虛擬機),在Kali中輸入
openvas-check-setup
來查看openvas的安裝狀態:
![](http://static.javashuo.com/static/loading.gif)
- 發現有錯誤,根據FIX的提示進行修改便可。
- 輸入openvasmd指令來開啓服務後從新檢測,出現下列信息說明安裝狀態正常:
![](http://static.javashuo.com/static/loading.gif)
- 輸入openvasmd --user=admin --new-password=20155308命令添加用戶帳號admin和密碼(學號)
- 輸入openvas-start開啓openvas
![](http://static.javashuo.com/static/loading.gif)
- 打開網址https://127.0.0.1:9392,輸入帳號和密碼,第一次打開時提示不安全,點Advanced將https://127.0.0.1:9392設置爲可信任的站點便可
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
實踐總結及體會
- 本次實驗經過學習經常使用的信息收集的幾種方式,經過利用網上的各類軟件進行IP地址等信息的實際,爲下一步的攻擊作好了準備性的工做。
- 可是這種信息的收集仍是基於幾個方面的收集,可是也是必不可少的工做。只有對本身主機有了全方位的理解,才更有利於作好網絡攻防的接下來的工做。