shodan會員命令版


使用前奏:基於命令行的shodan會員版,首先需要拿到key(登錄后賬號信息里有),要不然會提示“Error: Please run “shodan init ” before using this command”
導入key:

shodan init T1N3uP0Lyeq5w0wxxxxxxxxxxxxxxx
如果未安裝則需要安裝shodan

pip install shodan //安裝
pip install -U shodan //后續升級
正式進入命令詳細說明之前,先用娛樂一下:

curl parrot.live //喪的時候對着會舞動的終端發發呆還是可以的
curl wttr.in //終端版天氣顯示,"宅"心仁厚久了,出門還是有必要看一眼的
1.顯示自己公網IP

shodan myip
2.創建監控指定IP網絡警報/情報信息,如果發現就會發送郵件通知(shodan注冊時的郵箱)

shodan alert create home xxx.xxx.xxx.xxx/24 //監控指定IP或者IP段,home即監控名稱,創建成功后提示如下信息:
Successfully created network alert!
Alert ID: G579Gxxxxxxxx
后續如果需要查看指定監控的IP是否存在信息泄漏等信息,可使用如下命令

shodan alert info G579Gxxxxxxxx
當然,也可以開啟指定ip相關的任何信息泄漏監控,開啟命令如下:

alert enable G579Gxxxxxxxx any //當然可以使用shodan alert triggers查看可以監控的服務,最后替換any為指定服務即可。
3.查看指定cve漏洞在shodan發現的總數

shodan count vuln:cve-2019-0708 //顯示結果:509187
當然也可以查看漏洞的地區分布情況:

shodan stats vuln:cve-2019-0708
也可以根據分類查看漏洞,哪些是私有雲服務器

shodan stats --facets org vuln:cve-2019-0708 tag:cloud
列出存在漏洞的top20的私有雲服務商

shodan stats --facets org:20 vuln:cve-2019-0708 tag:cloud
查看指定端口指定協議總計數量和漏洞數量、以及系統相關篩選

shodan count port:445 SMB //顯示445端口且是SMB協議總數,顯示結果:12311
shodan stats port:445 SMB //根據地區統計顯示445端口SMB協議數據
shodan stats --facets os port:445 SMB //根據操作系統分類統計數據
shodan stats --facets os 'port:445 SMB -os:Unix'//篩選指定系統
shodan stats port:445 SMB vuln:ms17-010 //篩選存在指定漏洞的數據
4.查看指定IP段在網絡中存活信息、端口泄漏信息

shodan count net:xxx.xxx.xxx.xxx/16 //顯示結果:70746
統計端口方面的泄漏信息

shodan stats --facets port net:xxx.xxx.xxx.xxx/16
下載指定ip段相關的信息

shodan download --limit -1 name net:xxx.xxx.xxx.xxx/16 //name為下載保存的名稱,-1 就是全部,下載內容的為所有服務器開放的信息數據
5.查看IP或者IP段存在的漏洞信息,應該是滲透初期最常用的命令之一

shodan stats --facets vuln net:xxx.xxx.xxx.xxx/24 //顯示某個段是否存在漏洞,或者指定某個IP
查看IP或者IP段存在漏洞的top10 信息

shodan stats --facets vuln:100 net:xxx.xxx.xxx.xxx/24
6.查看主機信息,端口信息,開放的服務等其它詳細信息,保存信息和查看下載的壓縮包信息

shodan host xxx.xxx.xxx.xxx //當前這個IP相關的所有信息
shodan host --save xxx.xxx.xxx.xxx //保存當前這個IP相關信息
shodan host --save --history xx.xx.xx.xx //保存IP歷史相關信息,如果沒有歷史記錄會提示"Error: Unable to parse JSON response"
shodan paser xxx.xxx.xxx.xxx.json.gz //查看下載下來的數據信息
shodan convert xxx.xxx.xxx.xxx.json.gz images //如果目標有漏洞,轉化成實際漏洞利用成功后的截圖,還可以轉化成 xlsx、kml、csv、geo.json.
7.shodan 在線掃描,端口等信息

shodan scan submit xxx.xxx.xxx.xxx //因為shodan host 搜索出來的信息不是最新的,所以可以通過掃描命令獲取最新的服務器信息

8.更多命令使用請使用 shodan --help查看


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM