mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-25 20:37:48 +08:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b535736c9c | |||
| ef55a70a9b | |||
| f20bfdda9b | |||
| 1fad5a3bef | |||
| 401588b1c1 | |||
| 542bd2e048 | |||
| d86fdb283a | |||
| 4fe646030d |
@@ -5,7 +5,7 @@
|
||||
[](https://codeclimate.com/github/shmilylty/OneForAll/maintainability)
|
||||
[](https://github.com/shmilylty/OneForAll/tree/master/LICENSE)
|
||||
[](https://github.com/shmilylty/OneForAll/tree/master/)
|
||||
[](https://github.com/shmilylty/OneForAll/releases)
|
||||
[](https://github.com/shmilylty/OneForAll/releases)
|
||||
|
||||
👊**OneForAll是一款功能强大的子域收集工具** 📝[English Document](https://github.com/shmilylty/OneForAll/tree/master/docs/en-us/README.md)
|
||||
|
||||
@@ -233,6 +233,8 @@ FLAGS
|
||||
7. 利用搜索引擎发现子域(目前有18个模块:`ask`, `baidu`, `bing`, `bing_api`, `duckduckgo`, `exalead`, `fofa_api`, `gitee`, `github`, `github_api`, `google`, `google_api`, `shodan_api`, `so`, `sogou`, `yahoo`, `yandex`, `zoomeye_api`),在搜索模块中除特殊搜索引擎,通用的搜索引擎都支持自动排除搜索,全量搜索,递归搜索。
|
||||
* **支持子域爆破**,该模块有常规的字典爆破,也有自定义的fuzz模式,支持批量爆破和递归爆破,自动判断泛解析并处理。
|
||||
* **支持子域验证**,默认开启子域验证,自动解析子域DNS,自动请求子域获取title和banner,并综合判断子域存活情况。
|
||||
* **支持子域爬取**,根据已有的子域,请求子域响应体以及响应体里的JS,从中再次发现新的子域。
|
||||
* **支持子域置换**,根据已有的子域,使用子域替换技术再次发现新的子域。
|
||||
* **支持子域接管**,默认开启子域接管风险检查,支持子域自动接管(目前只有Github,有待完善),支持批量检查。
|
||||
* **处理功能强大**,发现的子域结果支持自动去除,自动DNS解析,HTTP请求探测,自动筛选出有效子域,拓展子域的Banner信息,最终支持的导出格式有`txt`, `csv`, `json`。
|
||||
* **速度极快**,[收集模块](https://github.com/shmilylty/OneForAll/tree/master/collect.py)使用多线程调用,[爆破模块](https://github.com/shmilylty/OneForAll/tree/master/brute.py)使用[massdns](https://github.com/blechschmidt/massdns),DNS解析速度每秒可解析350000以上个域名,子域验证中DNS解析和HTTP请求使用异步多协程,多线程检查[子域接管](https://github.com/shmilylty/OneForAll/tree/master/takeover.py)风险。
|
||||
@@ -267,7 +269,6 @@ FLAGS
|
||||
## ⌛后续计划
|
||||
|
||||
- [ ] 各模块持续优化和完善
|
||||
- [x] 子域收集爬虫实现(包括从JS等静态资源文件中收集子域)
|
||||
- [ ] 操作强大交互人性的前端界面实现
|
||||
|
||||
更多信息请参阅[后续开发计划](https://github.com/shmilylty/OneForAll/tree/master/docs/todo.md)。
|
||||
|
||||
@@ -296,7 +296,7 @@ class Brute(Module):
|
||||
brute.py --target d.com --fuzz True --place m.*.d.com --fuzzlist subnames.txt run
|
||||
|
||||
Note:
|
||||
--fmt csv/json (result fmt)
|
||||
--fmt csv/json (result format)
|
||||
--path Result path (default None, automatically generated)
|
||||
|
||||
|
||||
|
||||
+2
-1
@@ -234,7 +234,7 @@ class Database(object):
|
||||
table_name = table_name.replace('.', '_')
|
||||
sql = f'select id, alive, request, resolve, url, subdomain, level,' \
|
||||
f'cname, ip, public, cdn, port, status, reason, title, banner,' \
|
||||
f'cidr, asn, org, addr, isp, source from "{table_name}" order by subdomain'
|
||||
f'cidr, asn, org, addr, isp, source from "{table_name}" '
|
||||
if alive and limit:
|
||||
if limit in ['resolve', 'request']:
|
||||
where = f' where {limit} = 1'
|
||||
@@ -242,6 +242,7 @@ class Database(object):
|
||||
elif alive:
|
||||
where = f' where alive = 1'
|
||||
sql += where
|
||||
sql += ' order by subdomain'
|
||||
logger.log('TRACE', f'Get the data from {table_name} table')
|
||||
return self.query(sql)
|
||||
|
||||
|
||||
+2
-3
@@ -1,4 +1,3 @@
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
@@ -10,10 +9,10 @@ import platform
|
||||
import subprocess
|
||||
from urllib.parse import scheme_chars
|
||||
from ipaddress import IPv4Address, ip_address
|
||||
from distutils.version import LooseVersion
|
||||
from pathlib import Path
|
||||
from stat import S_IXUSR
|
||||
|
||||
import dns
|
||||
import requests
|
||||
import tenacity
|
||||
from dns.resolver import Resolver
|
||||
@@ -526,7 +525,7 @@ def check_dep():
|
||||
if implementation != 'CPython':
|
||||
logger.log('FATAL', f'OneForAll only passed the test under CPython')
|
||||
exit(1)
|
||||
if version < '3.6':
|
||||
if LooseVersion(version) < LooseVersion('3.6'):
|
||||
logger.log('FATAL', 'OneForAll requires Python 3.6 or higher')
|
||||
exit(1)
|
||||
|
||||
|
||||
+6
-1
@@ -75,7 +75,12 @@ brute_ip_blacklist = {'0.0.0.0', '0.0.0.1'} # IP黑名单 子域解析到IP黑
|
||||
ip_appear_maximum = 100 # 多个子域解析到同一IP次数超过100次则标记为非法(泛解析)子域
|
||||
|
||||
# altdns模块设置
|
||||
enable_fast_alt = True # 是否开启快速置换(默认True,只使用部分置换规则)
|
||||
altdns_increase_num = True
|
||||
altdns_decrease_num = True
|
||||
altdns_replace_word = False
|
||||
altdns_insert_word = False
|
||||
altdns_add_word = False
|
||||
|
||||
|
||||
# banner识别模块设置
|
||||
banner_process_number = 4 # 识别进程数量(默认4)
|
||||
|
||||
@@ -8,6 +8,10 @@ OneForAll遵守[语义化版本格式](https://semver.org/)。
|
||||
# Unreleased
|
||||
|
||||
# Released
|
||||
## [0.4.3](https://github.com/shmilylty/oneforall/releases/tag/v0.4.3) - 2020-11-29
|
||||
- 修复了已知问题
|
||||
- 更新了文档
|
||||
|
||||
## [0.4.2](https://github.com/shmilylty/oneforall/releases/tag/v0.4.2) - 2020-11-23
|
||||
- 添加了数据表初始化处理流程,修复了#163中出现的问题。
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
[](https://codeclimate.com/github/shmilylty/OneForAll/maintainability)
|
||||
[](https://github.com/shmilylty/OneForAll/tree/master/LICENSE)
|
||||
[](https://github.com/shmilylty/OneForAll/tree/master/)
|
||||
[](https://github.com/shmilylty/OneForAll/releases)
|
||||
[](https://github.com/shmilylty/OneForAll/releases)
|
||||
|
||||
👊**OneForAll is a powerful subdomain integration tool** 📝[中文文档](https://github.com/shmilylty/OneForAll/tree/master/README.md)
|
||||
|
||||
@@ -234,7 +234,9 @@ At present, OneForAll is under development, there must be a lot of problems and
|
||||
6. Use 6 threat intelligence modules: `alienvault`, `riskiq_ api`, `threatbook_ api`, `threatkeeper `, `virustotal`, `virustotal_ api`, which need to be added and improved.
|
||||
7. Use 16 search engines modules: `ask`, `baidu`, `bing`, `bing_api`, `fofa_api`, `gitee`, `github_api`, `google`, `google_api`, `shodan_api`, `so`, `sogou`, `yahoo`, `yandex`, `zoomeye_api`, except for special search engines. General search engines support automatic exclusion of search, full search and recursive search.
|
||||
* **Support subdomain brute force**, can use dictionary mode or custom fuzz mode. Supports bulk brute and recursive brute, and automatically determine wildcard or not and processing.
|
||||
* **Support subdmain verification**, default enable, automatically resolve DNS, request subdomain to obtain response, and determine subdomain alive or not.
|
||||
* **Support subdomain verification**, default enable, automatically resolve DNS, request subdomain to obtain response, and determine subdomain alive or not.
|
||||
* **Support subdomain crawling**, according to the existing subdomains, the response body of the request subdomain and the JS in the response body can be found again from the new subdomain.
|
||||
* **Support subdomain replacement**, according to the existing subdomain, use subdomain replacement technology to discover new subdomains again.
|
||||
* **Support subdomain takeover**, default enable, supports bulk inspection, and automatic takeover subdomain (only Github, remains to be improved at present).
|
||||
* **Powerful processing feature**, support automatic deduplicate, DNS resolve, HTTP request, filter valid subdomains and information for subdomains. Supported export formats: `txt`, `csv`, `json`.
|
||||
* **Very fast**, [collection module](https://github.com/shmilylty/OneForAll/tree/master/collect.py) uses multi-threading, [brute module](https://github.com/shmilylty/OneForAll/tree/master/brute.py) uses [MassDNS](https://github.com/blechschmidt/massdns), MassDNS is capable of resolving over 350,000 names per second using publicly available resolvers. DNS resolve and HTTP requests use async-coroutine. [subdomain takeover](https://github.com/shmilylty/OneForAll/tree/master/takeover.py) uses multi-threading.
|
||||
@@ -268,7 +270,6 @@ The project uses [SemVer](https://semver.org/) for version management, and you c
|
||||
## ⌛Follow-up plan
|
||||
|
||||
- [ ] Continuous optimize and improve of each module
|
||||
- [x] Subdomain collection crawler (collect subdomains from static files such as JS)
|
||||
- [ ] Implementation of front-end interface for powerful interaction
|
||||
|
||||
For more details, read [todo.md](https://github.com/shmilylty/OneForAll/tree/master/docs/todo.md).
|
||||
|
||||
+8
-4
@@ -186,11 +186,15 @@ class Altdns(Module):
|
||||
for subdomain in self.now_subdomains:
|
||||
subname, parts = split_domain(subdomain)
|
||||
subnames = subname.split('.')
|
||||
self.increase_num(subname)
|
||||
self.decrease_num(subname)
|
||||
self.replace_word(subname)
|
||||
if not settings.enable_fast_alt:
|
||||
if settings.altdns_increase_num:
|
||||
self.increase_num(subname)
|
||||
if settings.altdns_decrease_num:
|
||||
self.decrease_num(subname)
|
||||
if settings.altdns_replace_word:
|
||||
self.replace_word(subname)
|
||||
if settings.altdns_insert_word:
|
||||
self.insert_word(parts)
|
||||
if settings.altdns_add_word:
|
||||
self.add_word(subnames)
|
||||
count = len(self.new_subdomains)
|
||||
logger.log('DEBUG', f'The altdns module generated {count} subdomains')
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ blue = '\033[01;34m'
|
||||
red = '\033[1;31m'
|
||||
end = '\033[0m'
|
||||
|
||||
version = 'v0.4.1'
|
||||
version = 'v0.4.3'
|
||||
message = white + '{' + red + version + ' #dev' + white + '}'
|
||||
|
||||
oneforall_banner = f"""
|
||||
|
||||
Reference in New Issue
Block a user