MSF笔记(一)

这几天又学习了下神器,做了下笔记。

Kali linux 下

启动 msfconsole

启动数据库

Service postgresql start

查看

Service postgresql status

msf > service postgressql start

[*] exec: service postgressql start

Help帮助

创建一个工作台

Workspace -a 名

在msf中查看是否连接

msf > db_status
[*] postgresql connected to msf
msf > workspace -a test
[*] Added workspace: test
msf > 

进入工作台

Workspqce 工作台名称

删除工作台

Workspqce 工作台名 -d

使用nmap扫描主机

msf > workspace test

[*] Workspace: test

msf > db_nmap -sS 100.78.205.58

结果

msf > workspace test

[*] Workspace: test

msf > db_nmap -sS 100.78.205.58

[*] Nmap: Starting Nmap 7.01 ( https://nmap.org ) at 2016-07-13 16:20 CST

[*] Nmap: Nmap scan report for 100.78.205.58

[*] Nmap: Host is up (0.030s latency).

[*] Nmap: Not shown: 996 filtered ports

[*] Nmap: PORT STATE SERVICE

[*] Nmap: 135/tcp open msrpc

[*] Nmap: 139/tcp open netbios-ssn

[*] Nmap: 445/tcp open microsoft-ds

[*] Nmap: 5357/tcp open wsdapi

[*] Nmap: Nmap done: 1 IP address (1 host up) scanned in 63.74 seconds

导出

msf > db_export 1.xml

导入

Db_import 名

导出位置在。。

可以输入pwd看当前位置就会导到哪个位置

查看扫描的主机

hosts

查看扫描结果

Db_services

信息收集模块

可以进行whois查询的

msf > whois baidu.com
[*] exec: whois baidu.com

Whois Server Version 2.0

Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.

   Server Name: BAIDU.COM.CN
   Registrar: BEIJING INNOVATIVE LINKAGE TECHNOLOGY LTD. DBA DNS.COM.CN
   Whois Server: whois.dns.com.cn
   Referral URL: http://www.dns.com.cn

   Server Name: BAIDU.COM.MORE.INFO.AT.WWW.BEYONDWHOIS.COM
   IP Address: 203.36.226.2
   Registrar: INSTRA CORPORATION PTY, LTD.
   Whois Server: whois.instra.net
   Referral URL: http://www.instra.com

   Server Name: BAIDU.COM.S18.4BO.CN
   Registrar: XIN NET TECHNOLOGY CORPORATION
   Whois Server: whois.paycenter.com.cn
   Referral URL: http://www.xinnet.com

   Server Name: BAIDU.COM.ZZZZZ.GET.LAID.AT.WWW.SWINGINGCOMMUNITY.COM
   IP Address: 69.41.185.203
   Registrar: TUCOWS DOMAINS INC.
   Whois Server: whois.tucows.com
   Referral URL: http://www.tucowsdomains.com

   Server Name: BAIDU.COM.ZZZZZZ.COM.MORE.INFO.AT.WWW.BEYONDWHOIS.COM
   IP Address: 203.36.226.2
   Registrar: INSTRA CORPORATION PTY, LTD.
   Whois Server: whois.instra.net
   Referral URL: http://www.instra.com

………………….

**Nslookup

查DNS也可以**

Nmap 后面加-O就可以看操作系统

启动postgresql后,在打开msf就自动连接了。

也可以手动连接

db_connect postgres:[email protected]/msf

也可以连接mysql,当然这个就一定要手动了

db_connectroot:[email protected]/msf3

连接本机mysql的msf3数据库

Mysql的默认密码toor,使用db_conner连接时会自动创建msf3库

扫描网段中的存活ip

Msf> use auxiliary/scanner/ip/ipidseq
IP序号ID扫描器。与nmap的 -sI -O选项类似

msf > use auxiliary/scanner/ip/ipidseq
msf auxiliary(ipidseq) > show options

Module options (auxiliary/scanner/ip/ipidseq):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   INTERFACE                   no        The name of the interface
   RHOSTS                      yes       The target address range or CIDR identifier
   RPORT      80               yes       The target port
   SNAPLEN    65535            yes       The number of bytes to capture
   THREADS    1                yes       The number of concurrent threads
   TIMEOUT    500              yes       The reply read timeout in milliseconds

msf auxiliary(ipidseq) > set RHOSTS 192.168.20/42
RHOSTS => 192.168.2。0/42
msf auxiliary(ipidseq) > set THREADS 50
THREADS => 50

msf auxiliary(ipidseq) > run  启动

清除那个设置

Unset 参数名

使用portscan模块

扫描端口

msf auxiliary(syn) > show options

Module options (auxiliary/scanner/portscan/syn):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   BATCHSIZE  256              yes       The number of hosts to scan per set
   INTERFACE                   no        The name of the interface
   PORTS      1-10000          yes       Ports to scan (e.g. 22-25,80,110-900)
   RHOSTS                      yes       The target address range or CIDR identifier
   SNAPLEN    65535            yes       The number of bytes to capture
   THREADS    1                yes       The number of concurrent threads
   TIMEOUT    500              yes       The reply read timeout in milliseconds

msf auxiliary(syn) > set RHOSTS  192.168.1.1
RHOSTS => 192.168.1.1
msf auxiliary(syn) > set THREADS 50
THREADS => 50
msf auxiliary(syn) > 

特定扫描

Smb_version模块

msf > use auxiliary/scanner/smb/smb_version
msf auxiliary(smb_version) > show options

Module options (auxiliary/scanner/smb/smb_version):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   RHOSTS                      yes       The target address range or CIDR identifier
   SMBDomain  .                no        The Windows domain to use for authentication
   SMBPass                     no        The password for the specified username
   SMBUser                     no        The username to authenticate as
   THREADS    1                yes       The number of concurrent threads

msf auxiliary(smb_version) > 

服务器信息块(SMB)是一个网络文件共享协议,它允许应用程序和终端用户从远端的文件服务器访问文件资源

找mssql主机 也就是sqlserver

msf > use auxiliary/scanner/mssql/mssql_ping
msf auxiliary(mssql_ping) > show options

Module options (auxiliary/scanner/mssql/mssql_ping):

   Name                 Current Setting  Required  Description
   ----                 ---------------  --------  -----------
   PASSWORD                              no        The password for the specified username
   RHOSTS                                yes       The target address range or CIDR identifier
   THREADS              1                yes       The number of concurrent threads
   USERNAME             sa               no        The username to authenticate as
   USE_WINDOWS_AUTHENT  false            yes       Use windows authentification (requires DOMAIN option set)

msf auxiliary(mssql_ping) > 

写着可以用TAB补全建看看是否能补全,也是看看写没写错,或者补全

SSH 服务器扫描

msf auxiliary(mssql_ping) > use auxiliary/scanner/ssh/ssh_version
msf auxiliary(ssh_version) > show options

Module options (auxiliary/scanner/ssh/ssh_version):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   RHOSTS                    yes       The target address range or CIDR identifier
   RPORT    22               yes       The target port
   THREADS  1                yes       The number of concurrent threads
   TIMEOUT  30               yes       Timeout for the SSH probe

msf auxiliary(ssh_version) > 

我直接从一个模块进入到另一个模块了

基本都是设置目标主机和线程

Telnet服务器扫描

msf > use auxiliary/scanner/telnet/telnet_version
msf auxiliary(telnet_version) > show options

Module options (auxiliary/scanner/telnet/telnet_version):

   Name      Current Setting  Required  Description
   ----      ---------------  --------  -----------
   PASSWORD                   no        The password for the specified username
   RHOSTS                     yes       The target address range or CIDR identifier
   RPORT     23               yes       The target port
   THREADS   1                yes       The number of concurrent threads
   TIMEOUT   30               yes       Timeout for the Telnet probe
   USERNAME                   no        The username to authenticate as

msf auxiliary(telnet_version) > 

FTP主机扫描

msf > use auxiliary/scanner/ftp/ftp_version
msf auxiliary(ftp_version) > show options

Module options (auxiliary/scanner/ftp/ftp_version):

   Name     Current Setting      Required  Description
   ----     ---------------      --------  -----------
   FTPPASS  [email protected]  no        The password for the specified username
   FTPUSER  anonymous            no        The username to authenticate as
   RHOSTS                        yes       The target address range or CIDR identifier
   RPORT    21                   yes       The target port
   THREADS  1                    yes       The number of concurrent threads

msf auxiliary(ftp_version) > 

这些用法基本一样

扫描 FTP匿名登陆

*msf auxiliary(ftp_version) > use auxiliary/scanner/ftp/anonymous
msf auxiliary(anonymous) > show options
Module options (auxiliary/scanner/ftp/anonymous):
   Name     Current Setting      Required  Description
   ----     ---------------      --------  -----------
   FTPPASS  [email protected]  no        The password for the specified username
   FTPUSER  anonymous            no        The username to authenticate as
   RHOSTS                        yes       The target address range or CIDR identifier
   RPORT    21                   yes       The target port
   THREADS  1                    yes       The number of concurrent threads*

扫描到后,在开一个窗口直接 ftp IP 就可以进入,用户名 anonymous 密码为空 就可以进入了。

有的都不用输入用户名

扫描局域网中有哪些主机存活

msf > use auxiliary/scanner/discovery/arp_sweep
msf auxiliary(arp_sweep) > show options 

Module options (auxiliary/scanner/discovery/arp_sweep):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   INTERFACE                   no        The name of the interface
   RHOSTS                      yes       The target address range or CIDR identifier

扫描网站目录

msf > use auxiliary/scanner/http/dir_scanner
msf auxiliary(dir_scanner) > show options 

Module options (auxiliary/scanner/http/dir_scanner):

   Name        Current Setting                                          Required  Description
   ----        ---------------                                          --------  -----------
   DICTIONARY  /usr/share/metasploit-framework/data/wmap/wmap_dirs.txt  no        Path of word dictionary to use
   PATH        /                                                        yes       The path  to identify files
   Proxies                                                              no        A proxy chain of format type:host:port[,type:host:port][...]
   RHOSTS                                                               yes       The target address range or CIDR identifier
   RPORT       80                                                       yes       The target port
   THREADS     1                                                        yes       The number of concurrent threads
   VHOST                                                                no        HTTP server virtual host

扫描SNMP主机

msf > use auxiliary/scanner/snmp/snmp_login
msf auxiliary(snmp_login) > show options 

Module options (auxiliary/scanner/snmp/snmp_login):

   Name              Current Setting                                                       Required  Description
   ----              ---------------                                                       --------  -----------
   BLANK_PASSWORDS   false                                                                 no        Try blank passwords for all users
   BRUTEFORCE_SPEED  5                                                                     yes       How fast to bruteforce, from 0 to 5
   DB_ALL_CREDS      false                                                                 no        Try each user/password couple stored in the current database
   DB_ALL_PASS       false                                                                 no        Add all passwords in the current database to the list
   DB_ALL_USERS      false                                                                 no        Add all users in the current database to the list
   PASSWORD                                                                                no        The password to test
   PASS_FILE         /usr/share/metasploit-framework/data/wordlists/snmp_default_pass.txt  no        File containing communities, one per line
   RHOSTS                                                                                  yes       The target address range or CIDR identifier
   RPORT             161                                                                   yes       The target port
   STOP_ON_SUCCESS   false                                                                 yes       Stop guessing when a credential works for a host
   THREADS           1                                                                     yes       The number of concurrent threads
   USER_AS_PASS      false                                                                 no        Try the username as the password for all users
   VERBOSE           true                                                                  yes       Whether to print output for all attempts
   VERSION           1                                                                     yes       The SNMP version to scan (Accepted: 1, 2c, all)

简单网络管理协议(SNMP),由一组网络管理的标准组成,包含一个应用层协议(application layer protocol)、数据库模型(database schema)和一组资源对象。该协议能够支持网络管理系统,用以监测连接到网络上的设备是否有任何引起管理上关注的情况。

搜索网站中的E-mail地址

msf > use auxiliary/gather/search_email_collector 

DOMAIN设置域名

没有线程设置

这个用的是Google的~~

嗅探抓包

msf > use auxiliary/sniffer/psnuffle
msf auxiliary(psnuffle) > run

直接run就可以

但是只能抓FTP

时间: 2024-10-12 09:03:47

MSF笔记(一)的相关文章

软件开发-MSF方法(《构建之法》读书笔记2)

MSF-微软解决方案框架,是一套大型系统开发指南,它描述了如何用组队模型.过程模型和应用模型来开发Client/Server结构的应用程序,是在微软的工具和技术的基础上建立并开发分布式企业系统应用的参考.在现在的软件开发项目中每一个软件开发项目都要经过 一个生命周期.MSF过程模型是从传统的软件开发瀑布模型和螺旋模型发展而来的,它瀑布模型中基于里程碑的规划与螺旋模型中的增量迭代的长处结合起来.MSF作为现在流行的软件开发思路,其有自己的基本原则. MSF基本原则: 1:推动信息共享和沟通 2:为

构建之法 第七章 MSF 读书笔记

MSF 9条基本原则: 1.推动信息共享与沟通 2.为共同的远景而工作 3.充分授权和信任 4.各司其职,对项目共同负责 5.交付增量的价值 6.保持敏捷,预期和适应变化 7.投资质量 8.学习所有的经验 9.与顾客合作 在一个高效的团队中,所有的成员都应该能得到充分的授权,他们有权在职权范围内按照自己的承诺完成任务,同时,他们也充分信任其他同事能实现各自的承诺.类似的,团队的顾客(包括内部和外部的顾客)也认为团队能兑现承诺,并进行相应的规划.

msf ms10-010利用笔记

nmap -sV -Pn xxxxx  扫描端口and系统信息 use auxiliary/scanner/smb/smb_ms17_010   扫描模块 set Rhosts 扫描目标 use exploit/windows/smb/ms17_010_eternalblue   攻击模块 需要设置目标ip RHOST 本机IP LHost 攻击载荷 set payload windows/x64/meterpreter/reverse_tcp load mimikatz  加载mimikatz

基础渗透测试笔记二

xss跨站漏洞纯手打笔记(基础) XSS漏洞扫描 常用工具: wvs 椰树 safe3 Xelenium w3af vega xss扫描插件+burp Beef: beef+msf拿客户端shell(ie6 xp) use windows/browser/ms10_002_aurora set PAYLOAD windows/meterpreter/reverse_tvp PAYLOAD =>wondows/meterpreter/reverse_tcp set SRVHOST (my ip)

其他漏洞笔记合集

xss跨站漏洞纯手打笔记(基础) XSS漏洞扫描 常用工具: wvs 椰树 safe3 Xelenium w3af vega xss扫描插件+burp Beef: beef+msf拿客户端shell(ie6 xp) use windows/browser/ms10_002_aurora set PAYLOAD windows/meterpreter/reverse_tvp PAYLOAD =>wondows/meterpreter/reverse_tcp set SRVHOST (my ip)

读书笔记摘录:

选择书籍: <VSTS软件开发指南> 读书摘要: 通过阅读<VSTS软件开发指南>了解软件开发方法(MSF)和工具(VSTS),通过Visual Studio制作的具体实例解释程序设计的基本原则,在阅读过后,主要了解了三方面的内容层次:了解VSTS的基本功能:掌握在软件设计开发过程中的个人技术发挥优势所在以及两人合作的内容要求:通过软件开发实例(包括本次的电梯设计),了解部分实例的具体解决技巧,有效衔接了理论内容与在阅读过程中所学到的开发技巧,真正做到活学活用,灵活掌握知识体系结构

【安全牛学习笔记】实验环境

准备实验环境 渗透非授权系统的弊端 搭建自己的实验环境 安装虚拟机 微软最新版软件 http://msdn .microsoft.com/en-ca/subscriptions/aa336858 windows虚拟机 http://dev.modern.ie/tools/vms/ 安装自己的虚拟机 Xp Win7 2003 选择"Download software" linux虚拟机 http://www.turnkeylinux.org Ubuntu Lamp安装 Metasploi

kali 渗透的一些笔记

kali实战笔记 17:55 2016/7/19 by: _Silvers kali系统安装后的配置及美化安装vmwareToolstar zxvf VMwareTools-sfsfsfasfasfsaf #解压安装包cd 到解压后的安装目录 ./ 绿色的可执行文件 #进行安装# 等待安装结束,期间根据提示进行y/n确定reboot # 重启kalikali系统更新及替换国内软件源leafpad /etc/apt/sources.list注释掉官方的更新源复制国内的更新源 #可百度国内更新源地址

【安全牛学习笔记】FUZZING

FUZZING ╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋ ┃FUZZING                                                                             ┃ ┃思路:                                                                              ┃ ┃    将EIP修改为shellcode代码的内存