nmap,端口扫描,获取ssh服务器的ip地址
2015-06-29 20:40
176 查看
arp - a // 同一个网段,如果用虚拟机桥接则不行 ifconfig -a //old ip addr //ip a :iproute2 suite sudo nmap -sS 192.168.1.* //或者sudo nmap -sS -p 22 192.168.1.0/24; if you ip address is in 192.168.1.1-255. -sP 渗透内网之后判断当前网络哪些主机在线; -p 22 端口号,ssh默认端口为22 ; -sS为TCP SYN 扫描 (又称半开放,或隐身扫描): e.g. : sudo nmap -p 22 --open -sV 10.0.0.0/24 nmap : the executable name -p 22 : specifies the port to test --open : suppress output for clients that are not listening -sV : display the version string reported by the scanned server -sP : Check which hosts are live and up in Network, with this option nmap skips port detection and other things, its fast. -sS : stealthy Scan -PS : TCP ACK (PA) and TCP Syn (PS);or just -PA 10.0.0.0/24 : the target network, could have been 192.168.0.0/24 (/24 specifies a subnet of 255.255.255.0, look up slash notation)
注意:不同的参数对扫描时间和扫描结果有影响,可以尝试不同的参数组合(sudo nmap -sP -PS22 –open 10.10.40.1/24),不过记得加上sudo,不然由于nmap不能发送raw package而可能探测不到主机。一般探测都要指定扫描某些特定端口(ssh 22,http 80等),不然会很费时间。
几个常用命令(运行nmap - -help):
sudo nmap -sn 192.168.1.* // Ping scan, diable port scan,快速找到主机。
sudo nmap -sS -p22 --open 192.168.1.* //syntax: -sS/sT/sA/sW/sM: TCP SYN/Connect()/ACK/Window/Maimon scans;-p 指定端口,--open显示打开的端口;快速找打开22端口的主机,ssh登陆用。
相关文章推荐
- c 循环左移
- c 转二进制
- 二义性 消除左递归
- c++ 循环左移
- ARM寻址方式(6.18)
- myEclipse如何将程序部署到tomcat(附录MyEclipse调试快捷键)
- 尹中立:“人造牛市”的结局可能会非常悲惨
- c++ 循环左移
- 第一次在stackoverflow上提问,亮瞎了。。
- c++ 字母排序
- UITextField使用
- Unity3d vector3.forward和transform.forward的区别!
- c++ 字母排序
- 黑马程序员---Java多线程的用法详解
- BZOJ3932 任务查询系统
- zlib交叉编译,libpng交叉编译
- 进击的java(8):springmvc+redis实现登录与拦截器
- 10001---MyBatis介绍
- Makefile编写(6.17)
- 数组-08. 字符串转换成十进制整数(15)