Looking for a breakthrough in the penetration of those things

Creative Commons License Copyright: Attribution, allow others to create paper-based, and must distribute paper (based on the original license agreement with the same license Creative Commons )

Here Insert Picture Description
0x00 to find the target
in their routine testing in detecting and observing others find the idea very early to gather information has a crucial role, often do not need to have a deep study of certain vulnerabilities, if collected early enough goal, only need to check some of the common risk vulnerabilities can be fruitful common ideas
1. segment information

1) through a sub-domain

If such a loophole exists domain transfer is the best, if not the general will storm broke a subdomain

I used software dnsmap, the basic usage

./dnsmap target-domain.com -w 你的域名字典 -r 要保存结果文件的绝对路径

Pan made for domain name resolution can use the -i should ignore the ip to avoid false positives, such as the breaking process xxx.com domain name does not exist in domain names resolve to 1.1.1.1, use the command

./dnsmap xxx.com -w domain.txt -i 1.1.1.1 -r /tmp/result.txt 

The results in the following format:
Here Insert Picture Description
where the default compiled dnsmap there is a problem, the solution and the use of other methods, please refer to

http://pan.baidu.com/s/1nt5HMw5

We can add on the basis of the default dictionary on some, such as oa, zabbix, nagios, cacti, erp, sap, crm, etc., many companies are this naming

Penetration, then the general will to find the target from oa, mail and other important business segment, if we find that some of the domain name management background

xx.admin.xxx.com this, we can continue to expand, look for third-level domain under admin.xxx.com

Detection was accidentally discovered when a ntp.nb.xxx.com a station name, and further the breaking nb.xxx.com the domain, the following results
Here Insert Picture Description
wherein zabbix.nb.xxx.com the site exposed to the external network, earlier versions, use zabbix injection vulnerability successfully acquired rights
Here Insert Picture Description
while sub-domain name can also be a search engine syntax site: collect xxx.com (growing conditions, more accessible, such as inurl, intitle etc.)

2) No. AS

Jwhois use

yum install -y jwhois

carried out

whois -h asn.shadowserver.org origin 1.1.1.1

Where companies obtain ip AS No.

继续执行

whois -h asn.shadowserver.org prefix as号

即可获得该as号对应网段

注:一般只有大企业才会有as号,并且一个企业可能会有多个as号

3)DNS
Here Insert Picture Description
4)spf记录
Here Insert Picture Description
如何判断cdn?

如果误把cdn的ip加到目标里会影响一些人工时间,如何判断cdn?最简单的方法是用多地ping功能

http://ping.chinaz.com/
Here Insert Picture Description
2.利用whatweb寻找web入口

使用方法

./whatweb 1.1.1.1/24 --log-brief=output_file(详细使用参考使用说明) 

默认的话只识别80端口的,如果此时我们想识别下8080端口,再加上–url-suffix=”:8080”即可

可根据title,cms等信息寻找目标,一般把后台或者存在已知漏洞的系统作为目标,同时可寻找nginx低版本存在解析漏洞的站点,受影响版本为0.5全版本,0.6全版本,0.7<=0.7.65,0.8<=0.8.37

附上一则实例:

在检测某企业时,whatweb批量识别指纹发现存在一台nginx版本比较低且存在解析漏洞的站点,首页为空白页,对目录结构暴破发现.bash_history文件
Here Insert Picture Description
操作历史中发现有打包文件且放在web目录下
Here Insert Picture Description
下载打包文件,内容如下
Here Insert Picture Description
其中发现有log文件,且log文件会记录user-agent信息
Here Insert Picture Description
使用firefox插件User Agent Switcher更改user-agent信息
Here Insert Picture Description
一句话代码写入log文件后利用解析漏洞直接获取webshell
Here Insert Picture Description
3.利用nmap寻找可利用服务

详细用法参考使用手册,个人常用命令为(-P0参数视情况添加,如果没有禁ping可以不加,提升速度)

./nmap -sT -sV 1.1.1.1/24 -P0 -oN /tmp/port_result.txt --open 

Ip较少的情况下可以扫全端口以及一些基本信息

./nmap -sT -sV -p 1-65535 1.1.1.1 -P0 -A

利用nmap可以发现一些非80/443/8080这种常见端口上的web以及一些容易出问题的端口如

873(rsync无验证)/21(ftp匿名账户)/11211(memcache无验证)/27017(mongodb无验证)等,碰到不认识的服务别急着放弃,去exploit-db等站点搜一下是否存在已知漏洞吧,说不准直接找到个RCE呢(很多时候我也会在乌云search一下,搜到的话就是实际例子,看着更直白)

4.利用搜索引擎寻找后台或重要系统

常用搜索语法为site:xxx.com inurl:login

Inurl的值可以自由变换,常用的包括admin、manage或者使用intitle:找管理、登录之类的关键字,有些站点出来的结果可能多数为同一站点下的误报,比如博客类的,问问类的,可使用-来减少误报,比如google中搜索site:baidu.com inurl:login -zhidao就可以在结果中去除zhidao相关的结果,百度可输入

site:baidu.com inurl:login -site:zhidao.baidu.com

实例参考: WooYun: 对苏宁易购一次完整的web检测过程(多图)

5.搞一个精简的路径字典

我们可以把容易出问题且危害比较高的常见路径做成一个精简的小字典,针对之前收集的域名去遍历,比如/invoker/JMXInvokerServlet、wwwroot.zip这种,发现的话很大几率可以搞到权限

0x01 利用
这里列出几个常见的系统利用方法

  1. 后台

当前面的过程中发现后台或者重要系统时,一般会进行如下几种检测

1)awvs综合扫描(经常有意外发现) 2)目录结构暴破 3)口令暴破(admin不行的时候,不一定是密码不对,很多时候是用户名不对,尝试想到的可获取用户名的一切方法,如翻翻js、css文件,html源码注释内容,或者.svn目录下的信息泄露等,密码可针对系统名称及域名等信息做一些变形加到字典中) 4)Html源码、js等文件获取信息(有些开发者会把一些管理地址以注释形式放到html源码中,管理的接口地址写在js中,运气好的话可以直接越权访问) 5)参数值暴破(一些框架写的后台登陆页面可能是这种格式xx.com/?c=login,日常可以收集一些常见的参数值,如index、main、upload、edit、adduser等、运气好的话可以直接越权操作)

  1. axis2

文件包含:

www.xxx.com/axis2/services/listServices 查看所有services

www.xxx.com/axis2/services/xxxxx?xsd=../conf/axis2.xml xxxxx替换任意服务均可,读取axis2配置文件获取后台账户
Here Insert Picture Description
www.xxx.com/axis2/axis2-admin/ 登陆管理后台

后台部署文件代码执行:

使用metasploit
Here Insert Picture Description
Resin

文件读取:

http://www.xxx.com/resin-doc/resource/tutorial/jndi-appconfig/test?inputFile=/etc/passwd
Here Insert Picture Description
也可以通过

http://www.xxx.com/resin-doc/resource/tutorial/jndi-appconfig/test?inputFile=http://1.1.1.1

实现SSRF

solr敏感信息泄漏

http://xxx.org:8080/solr/admin/file/?file=solrconfig.xml

搜索xml文件,找到data-import.xml
Here Insert Picture Description
访问http://xxx.org:8080/solr/admin/file/?file=data-import.xml获取数据库密码
Here Insert Picture Description
Hudson(jenkins类似)

参考 WooYun: 搜狐某应用远程Groovy代码执行!

Zenoss

Google关键字:intitle:”Zenoss Login”

默认口令admin/zenoss

利用方法参考

WooYun: 从一个默认口令到youku和tudou内网(危害较大请尽快修复)

Zabbix

后台:http://www.xxx.com/zabbix

默认密码:admin/zabbix

Google:inurl:zabbix/dashboard.php

利用方法参考 WooYun: 应用汇zabbix运维不当导致任意命令执行。

另外这个zabbix注入的也很多都存在http://drops.wooyun.org/papers/680

Cacti

默认登陆路径www.xxx.com/cacti/index.php

默认密码admin/admin

利用方法参考 WooYun: cacti后台登陆命令执行漏洞

Splunk

默认后台地址:

http://xxx.com:8000/zh-CN/account/login?return_to=%2Fzh-CN%2F
Here Insert Picture Description
默认账户admin/changeme 默认端口8000
Here Insert Picture Description
msf有利用模块

exploit / Multi / HTTP / splunk_upload_app_exec
Here Insert Picture Description
0x02 end of the
recommended two clouds comprehensive introductory essay

1. From the clouds to see the operation and maintenance of security that point thing

http://drops.wooyun.org/papers/410

2. Attack JavaWeb 7-Server Application articles 1

http://drops.wooyun.org/tips/604

...... To target the actual message

Guess you like

Origin blog.csdn.net/kclax/article/details/92128074