博文

centos 7 Metasploit安装及配置数据库 postgresql 10(For Metasploit)

图片
centos 7 Metasploit安装及配置数据库 postgresql 10(For Metasploit) 安装 Metasploit 执行下面命令 curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && \ chmod 755 msfinstall && \ ./msfinstall 完成之后自动打开msf窗口 输入 msf > db_status 显示数据库未连接。 ############################################################################### 安装配置数据库 创建用户 [root@localhost ~]#useradd postgres 配置你的yum存储库 [root@localhost ~]# vim /etc/yum.repos.d/CentOS-Base.repo [base] 和[updates] 区段之间添加: exclude=postgresql* 安装pg的rpm文件 [root@localhost ~]# yum localinstall https://download.postgresql.org/pub/repos/yum/testing/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm 安装pg数据库 [root@localhost ~]# yum list postgresql* [root@localhost ~]# yum install postgresql10-server.x86_64 [root@localhost ~]# mkdir postgres /var/lib/pgsql/10/data 初始化数据库 [root@localhost ~]# /usr/pgsql-10/bin/postgresql10-s

w3af 使用方法

图片
运行  ./w3af_console  成功 输入 Plugins   进入插件选项 list audit   列出插件模块 audit file_upload os_commanding sqli xss  blind_sqli    使用这些选项  list crawl   列出插件  crawl find_backdoors phpinfo web_spider  使用这些模块扫描 返回 Back 设置目标 target Set  target http://www.xxxx.com/       目标网站               back 输入 start 开始 这个表示发现了漏洞 输入 exploit 输入 exploit sqlmap   进行注入,注入时间有点长,等待完成后根据提示输入  interact 0  ,进入数据库 shell ,然后输入 dbs 就可以获取到数据库的信息了。 输入 help  还可以执行其他命令

Centos7 安装w3af

图片
第一步   安装依赖 yum install python-pip yum install libxml2-devel libxslt-devel openssl-devel python-devel 第二步   克隆安装 git clone git clone --depth 1 https://github.com/andresriancho/w3af.git 第三步   启动 cd w3af ./w3af_console 第四步   执行安装依赖环境脚本   ,安装时间有点长可能卡住,耐心等待 /tmp/w3af_dependency_install.sh 如果安装 lxml 有问题 执行  sudo CFLAGS="-O0" pip install lxml  重新安装 如果遇到 openssl 的版本问题 cd /usr/lib/python2.7/site-packages/OpenSSL/ vi  SSL.py 在安装 pip install crypto 运行  ./w3af_console  成功

Centos 7 安装 openvas

图片
第一步   获取自动安装脚本获取安装的 atomic.repo wget -q -O - http://www.atomicorp.com/installers/atomic |sh 第二步   安装下载 openvas yum -y install openvas 第三步   开启安装 openvas , 默认使用 rsync 进行文件同步,时间有点长耐心等待 openvas-setup 设置连接 IP 地址 设置用户名密码 第四步   输入访问地址就可以访问 https://<IP>:9392

利用Censys进行信息侦查收集

Censys例子 Censys.io是一个新型的免费在线资源,它由密歇根大学的研究人员创建。这个项目提供了一个Web服务API,以及一个Python模块来提高API交互。一旦你创建了一个免费账户,那么就可以通过它使用Censys.io API。为了执行API查询,你需要API ID和与你的帐户关联的密钥值。这两个唯一的键值可以在“我的帐户”区域中找到。下面是一个在Python中与Censys.io API交互的简单例子: $ python >>> >>>   import  censys >>>   from  censys  import   * >>> >>>  api  =  censys . ipv4 . CensysIPv4 ( api_id = "[INSERT_KEY]" ,  api_secret = "[INSERT_KEY]" ) >>>  res  =  api . search ( "ip:8.8.8.8" ) >>>  res { u 'status' :  u 'ok' ,  u 'results' :   [{ u 'ip' :  u '8.8.8.8' ,  u 'protocols' :   [ u '53/dns' ]}],  u 'metadata' :   { u 'count' :   1 ,  u 'query' :  u 'ip:8.8.8.8' ,  u 'backend_time' :   34 ,  u 'page' :   1 ,  u 'pages' :   1 }}   >>>   for  i  in  res . get ( 'results' ): ...       print   "{} {}" . format ( i

Censys:新型搜索洞察引擎使用指南

图片
网址:https://censys.io/ ,每天的搜索超过25次需要注册。 Censys是一款用以搜索联网设备信息的新型搜索引擎,安全专家可以使用它来评估他们实现方案的安全性,而黑客则可以使用它作为前期侦查攻击目标、收集目标信息的强大利器。其功能与十分流行的Shodan十分相似,然而与Shodan相比其优势在于这是一款免费的搜索引擎,最初由密歇根大学的研究人员在10月发行,目前由谷歌提供支持。 搜索所有开放80端口的http信息: 80.http.get.status_code: 200 搜索23.20.0.0/14网段下的含有Schneider Electric 或者 Dell 的网站 ("Schneider Electric" or Dell) and 23.20.0.0/14 根据协议搜索 protocols: "22/ssh". 根据域名搜索 a:facebook.com 搜索所有的gmail服务器 mx:gmail.com 此外还支持: 根据ip段搜索 23.0.0.0/8 or 8.8.8.0/24 根据协议搜索 location.country_code: DE and protocols: ("23/telnet" or "21/ftp") 搜索没有安全证书的网站 Popular websites without browser trusted certificates: 搜索开启ssl的网站 80.http.get.headers.server: Apache and protocols: "443/https" 根据Alexa 排行榜搜索 alexa_rank: [1000 TO 1010]

利用Censys进行信息侦查收集

Censys例子 Censys.io是一个新型的免费在线资源,它由密歇根大学的研究人员创建。这个项目提供了一个Web服务API,以及一个Python模块来提高API交互。一旦你创建了一个免费账户,那么就可以通过它使用Censys.io API。为了执行API查询,你需要API ID和与你的帐户关联的密钥值。这两个唯一的键值可以在“我的帐户”区域中找到。下面是一个在Python中与Censys.io API交互的简单例子: $ python >>> >>>   import  censys >>>   from  censys  import   * >>> >>>  api  =  censys . ipv4 . CensysIPv4 ( api_id = "[INSERT_KEY]" ,  api_secret = "[INSERT_KEY]" ) >>>  res  =  api . search ( "ip:8.8.8.8" ) >>>  res { u 'status' :  u 'ok' ,  u 'results' :   [{ u 'ip' :  u '8.8.8.8' ,  u 'protocols' :   [ u '53/dns' ]}],  u 'metadata' :   { u 'count' :   1 ,  u 'query' :  u 'ip:8.8.8.8' ,  u 'backend_time' :   34 ,  u 'page' :   1 ,  u 'pages' :   1 }}   >>>   for  i  in  res . get ( 'results' ): ...       print   "{} {}" . format ( i