Skip to content

Latest commit

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Komo 综合资产收集和漏洞扫描工具

Komoisacomprehensiveassetcollectionandvulnerabilityscanningtool
██╗ ██╗ ██████╗ ███╗ ███╗ ██████╗ {v1.0#dev}
██║ ██╔╝██╔═══██╗████╗ ████║██╔═══██╗
█████╔╝ ██║ ██║██╔████╔██║██║ ██║
██╔═██╗ ██║ ██║██║╚██╔╝██║██║ ██║
██║ ██╗╚██████╔╝██║ ╚═╝ ██║╚██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ByKomomon

image-20220927001227577

注:如果需要获得最新beta版本请前往beta分支,该分支更新将比较慢。

Intro&&Feature

🚀Komo是一个综合资产收集和漏洞扫描工具,并且支持进度记录,通过多种方式对子域进行获取,收集域名,邮箱,子域名存活探测,域名指纹识别,域名反查ip,ip端口扫描,web服务链接爬取并发送给xray扫描,对web服务进行POC扫描,web弱口令扫描,对主机进行主机POC扫描,常见端口弱口令扫描。

🚋Komo集成了oneforallsubfinderksubdomainamassctfremailallhttpxnaabuTxPortMapeholegoon3crawlergoradhakrawlergaugospiderURLfindervscannucleiafrogvulmapSweetBabyScanxray20多款工具,全自动化、智能化工具。本工具依托各工具特色,进行模块化构建。

Komo的目的为了一键化,便捷性,可移植性,便于打点和红队外围渗透工作,所以将基于模块化开发,所有工具都汇总到统一接口,以便于下一个模块调用和后续某模块新增工具。==如果你有好的工具和改进建议,可以添加下面的公众号群聊来沟通==

Komo的每个模块可以单独拿出来直接使用,每个模块下面都有一个main,注意工具下载到对应目录下即可。

Komo可以自动下载所需的所有工具,不用使用者自己下载每个工具,使用python3 Komo.py install 即可,同时也便于移动,这保证了Komo的体积足够精简

Komo目前已经适配window、linux。

Project structure

流程图

Usage

初始化

安装python3python2暂时不支持)

安装相应的库文件pip3 install -r requirements.txt

第一次使用下载所需工具,以及部分工具初始化(goon,vulmap,afrog)

注:国内访问github可能存在超时问题,推荐使用代理下载工具进行初始化。

python3Komo.pyinstallpython3Komo.py--proxyhttp://127.0.0.1:10809installpython3Komo.py--proxysocks5://127.0.0.1:10809install

如下图所示,如果下载失败,则需要手动去下载对应工具到对应目录。

image-20220927001258352

注意:使用v2ray的开全局不一定能行,可以使用clash开TUN。

配置

配置文件config/config.yaml

部分配置讲解

修改有runtime字段的工具的runtime字段,设置工具的运行时间,如果超时则kill掉,推荐设置600-1200s

crawlergo:
toolname: crawlergo
runtime: 900
rad:
toolname: rad
runtime: 900

修改xray的监听端口

other:
xray:
toolname: xray
listenport: 7777 #修改监听端口

其他配置为以后扩充开发预留配置,暂时不用修改。

oneforall等工具的配置,要在初始化之后进入到对应工具目录进行修改,比如oneforall:core/tools/domain/Oneforall

Komo 支持多种模式

install:下载所有工具

all: 资产收集+攻击,多种方式收集域名,收集域名邮箱,域名存活探测,域名反查ip,域名指纹识别,ip端口扫描,web服务链接爬取,将爬取的链接发送给xray进行扫描,POC漏洞扫描,反查的ip进行其他端口漏洞扫描,弱口令扫描

all2: 资产收集+攻击,提供子域名,域名存活探测,域名反查ip,域名指纹识别,ip端口扫描,web服务链接爬取,将爬取的链接发送给xray进行扫描,POC漏洞扫描,反查的ip进行其他端口漏洞扫描,弱口令扫描

collect:只资产收集,多种方式收集域名,收集域名邮箱,域名存活探测,域名反查ip,域名指纹识别,ip端口扫描,web服务链接爬取

subdomain: 通过多种方式进行域名收集,dns爬取,爆破,证书获取,DNS运营商处获取。

finger: 对收集到的域名或域名文件进行存活探测和指纹识别(Ehole+wapplyzer)

portscan:对反查的ip列表或ip文件进行端口扫描

sensitive:对收集到的存活域名或域名文件进行url爬取

webattack:对收集到的存活域名或域名文件进行url爬取,然后发送给xray进行扫描,同时也调用nuclei,afrog,vulmap,vscan进行漏洞扫描

hostattack:对反查的ip列表或ip文件进行常见服务弱口令扫描和漏洞扫描

install 下载所有工具

功能:根据系统下载所有工具以及部分工具初始化

python3 Komo.py install
python3 Komo.py --proxy http://127.0.0.1:10809 install
python3 Komo.py --proxy socks5://127.0.0.1:10809 install

all 全扫描

输入:域名/域名文件

功能:多种方式收集域名,收集域名,邮箱,域名存活探测,域名反查ip,域名指纹识别,ip端口扫描,web服务链接爬取,将爬取的链接发送给xray进行扫描,POC漏洞扫描,反查的ip进行其他端口漏洞扫描,弱口令扫描

python3Komo.py--domainexample.comallpython3Komo.py--domains ./domains.txtall

注意:记得使用该模式之前先启动xray,否则webattack不能完全扫描

xray.exe webscan --listen 127.0.0.1:7777 --html-output 1.html

all2

输入:子域名/子域名文件

功能:提供子域名,不扫描子域,域名存活探测,域名反查ip,域名指纹识别,ip端口扫描,web服务链接爬取,将爬取的链接发送给xray进行扫描,POC漏洞扫描,反查的ip进行其他端口漏洞扫描,弱口令扫描

python3Komo.py--subdomainaaa.example.comall2python3Komo.py--subdomains ./subdomains.txtall2

注意:记得使用该模式之前先启动xray,否则webattack不能完全扫描

xray.exe webscan --listen 127.0.0.1:7777 --html-output 1.html

collect

输入:域名/域名文件

功能:全方位资产收集,多种方式收集域名,收集域名,邮箱,域名存活探测,域名反查ip,域名指纹识别,ip端口扫描,web服务链接爬取

python3Komo.py--domainexample.comcollectpython3Komo.py--domains ./domains.txtcollect

collect1

输入:域名/域名文件

功能:只资产收集,多种方式收集域名,收集域名,域名存活探测,域名反查ip,域名指纹识别

功能比collect 少了端口扫描,web链接爬取

python3Komo.py--domainexample.comcollect1python3Komo.py--domains ./domains.txtcollect1

collect2

输入:域名/域名文件

功能:只资产收集,多种方式收集域名,收集域名,邮箱,域名存活探测,域名反查ip,域名指纹识别,ip端口扫描

功能比collect 少了web链接爬取

python3Komo.py--domainexample.comcollect2python3Komo.py--domains ./domains.txtcollect2

subdomain

输入:域名/域名文件

功能:通过多种方式进行域名收集,dns爬取,爆破,证书获取,DNS运营商处获取。

python3Komo.py--domainexample.comsubdomainpython3Komo.py--domains ./domains.txtsubdomain

finger

输入:url/url文件

功能:对收集到的域名或域名文件进行存活探测和指纹识别(Ehole+wapplyzer)

python3Komo.py--urlhttp://example.comfingerpython3Komo.py--urls ./urls.txtfinger

portscan

输入:ip/ip文件

功能:对反查的ip列表或ip文件进行端口扫描和端口指纹识别

默认端口扫描列表

21,22,23,25,53,53,69,80,81,88,110,111,111,123,123,135,137,139,161,177,389,427,443,445,465,500,515,520,523,548,623,626,636,873,902,1080,1099,1433,1434,1521,1604,1645,1701,1883,1900,2049,2181,2375,2379,2425,3128,3306,3389,4730,5060,5222,5351,5353,5432,5555,5601,5672,5683,5900,5938,5984,6000,6379,7001,7077,8080,8081,8443,8545,8686,9000,9001,9042,9092,9100,9200,9418,9999,11211,11211,27017,33848,37777,50000,50070,61616
python3Komo.py--ip1.1.1.1portscanpython3Komo.py--ips ./ips.txtportscan

sensitive

输入:url/url文件

功能:对收集到的存活域名或域名文件进行url爬取(crawlergo,rad,gau,URLFinder,gospider,hakrawler)

python3Komo.py--urlhttp://example.comsensitivepython3Komo.py--urls ./urls.txtsensitive

webattack

输入:url/url文件

功能:对url进行爬取,然后发送给xray进行扫描,同时也调用nuclei,afrog,vulmap,vscan进行漏洞扫描

python3Komo.py--urlhttp://example.comwebattackpython3Komo.py--urls ./urls.txtwebattack

注意:记得使用该模式之前先启动xray,否则webattack不能完全扫描

xray.exe webscan --listen 127.0.0.1:7777 --html-output 1.html

webattack2

输入:url/url文件

功能:只进行poc扫描(nuclei,afrog,vulmap,vscan)

python3Komo.py--urlhttp://example.comwebattack2python3Komo.py--urls ./urls.txtwebattack2

hostattack

输入:ip/ip文件

功能:对反查的ip列表或ip文件进行常见服务弱口令扫描和漏洞扫描

python3Komo.py--ip1.1.1.1hostattackpython3Komo.py--ips ./ips.txthostattack

完整Usage

KomohelpsummarypageKomoisanautomatedscanningtoolsetmode:
installDownloadtherequiredtools--proxySetproxyallallscanandattack:subdomain, survivaldetection, finger, portscan, emailcollect, sensitive(crawlurls), pocscan, Weakpasswordscanning, to_xray--domainonedomain--domainsadomainfileall2runscanandattackexceptdomaincollection: survivaldetection, finger, portscan, emailcollect, sensitive(crawlurls), pocscan, Weakpasswordscanning, to_xray--subdomainonesubdomain--subdomainsasubdomainfilecollectrunallcollectionmodules :subdomain, survivaldetection, finger, port, emailcollect, sensitive(crawlurls), pocscan, to_xray--domainonedomain--domainsadomainfilecollect1runcollectionmodules :subdomain, survivaldetection, finger--domainonedomain--domainsadomainfilecollect2runcollectionmodules :subdomain, survivaldetection, finger, portscan--domainonedomain--domainsadomainfilesubdomainonlycollectsubdomain--domainonedomain--domainsadomainsfilefingeronlycollectthesurvivalURLandfingerprint--urloneurl--urlsanurlsfileportscanonlycollectportfromiporips--iponeip--ipsanipsfilesensitiveonlycollectdirectorywithcrawl,email--urloneurl--urlsanurlsfilewebattackonlyattackwebfromurlorurls: pocscan, Weakpasswordscanning, crawlurlstoxray--urloneurl--urlsanurlsfilewebattack2onlypocscanfromurlorurls: pocscan, Weakpasswordscanning--urloneurl--urlsanurlsfilehostattackonlyattackipfromiporips--iponeip--ipsanipsfileattackrunwebattackandhostattack: crawlurltoxray, pocscan, WeakpasswordscanningExample:
python3Komo.pyinstallpython3Komo.py--domainexample.comallpython3Komo.py--domains ./domains.txtallpython3Komo.py--domainexample.comcollectpython3Komo.py--domains ./domains.txtcollectpython3Komo.py--domainexample.comcollect1python3Komo.py--domains ./domains.txtcollect1python3Komo.py--domainexample.comcollect2python3Komo.py--domains ./domains.txtcollect2python3Komo.py--domainexample.comsubdomainpython3Komo.py--domains ./domains.txtsubdomainpython3Komo.py--subdomainaaa.example.comall2python3Komo.py--subdomains ./subdomains.txtall2python3Komo.py--urlhttp://example.comfingerpython3Komo.py--urls ./urls.txtfingerpython3Komo.py--urlhttp://example.comsensitivepython3Komo.py--urls ./urls.txtsensitivepython3Komo.py--urlhttp://example.comwebattackpython3Komo.py--urls ./urls.txtwebattackpython3Komo.py--urlhttp://example.comwebattack2python3Komo.py--urls ./urls.txtwebattack2python3Komo.py--ipexample.comportscanpython3Komo.py--ips ./domains.txtportscanpython3Komo.py--ipexample.comhostattackpython3Komo.py--ips ./domains.txthostattack

Result

Komo会将输出结果记录到result/{date} 目录下

该目录下会有多个文件夹,分别对应各个模块的输出:

domain_log

fingerlog

portscan_log

sensitive_log

vulscan_log

result/{date} 根目录下会有输出结果文件:

target 为domain或date

{target}.final.subdomains.txt 最终找到的所有子域名

{target}.links.csv 多个工具爬取到的所有link

{target}.many.tools.subdomains.txt 除oneforall之外的其他子域名收集工具收集到的域名

{target}.subdomains.ips.txt 域名反查的ip

{target}.subdomains.with.http.txt 存活的子域名并且带http(s)

欢迎Star ⭐ ⭐

更新日志

20230106

1、修复linux下子线程执行进入交互shell的bug

2、配置文件修改hakrawler采用下载方式,进一步缩进Komo体积

3、log文件增加扫描参数记录,便于回忆使用的参数。

4、install 模块添加代理参数--proxy,解决国内无法访问github下载工具的问题

20221227

1、增加进度机制,可以记录扫描进度,当未运行完终止时,下次再次运行的时候,使用原参数并增加--date参数, 来指定上次运行的结果文件夹,这样Komo会从上次终止的位置继续运行 比如第二次再运行使用python Komo.py --domain xx.com --date 11-11-11-11-11-11 all

2、linux版本适配完成

3、download模块添加goon,vulmap,afrog初始化

4、添加common模块

5、修改config.yaml,sensitiveinfo模块的工具运行时间,xray监听端口通过config.yaml配置

6、修改vulsan 模块,子线程不能执行的bug

20221011

download_tools 逻辑修改,bug修改,tools.yaml 添加tool_main_filename 键
sensitive模块添加killprocess
sensitive模块修改to_xray添加fromurl参数 只发送给xray,爬取的url的相关链接,减少请求量,提高效率
rad,gospider添加运行时间timeout,运行时间太长会卡住
domain模块修改 merge_result,将非目标子域名提取出来,放到result/{date}/{domain}.other.subdomains.txt中

20220907

今天完善了main,domain finger sensitive vulscan 在main中实现调用
domain finger sensitive vulscan 四个模块实现了顺序模块扫描,也实现了单独使用的时候指定单url 单urlsfile
vulscan的main分成了两个webmanager和hostmanager分别对web和ip进行漏洞扫描
hostmanager加上一个goon,去识别指纹和对端口服务进行弱口令扫描
第一版完成

About

🚀Komo, a comprehensive asset collection and vulnerability scanning tool. Komo 一个综合资产收集和漏洞扫描工具,集成了20余款工具,通过多种方式对子域进行获取,收集域名邮箱,进行存活探测,域名指纹识别,域名反查ip,ip端口扫描,web服务链接爬取并发送给xray,对web服务进行POC漏洞扫描,对主机进行主机漏洞扫描。

Topics

Resources

Stars

567 stars

Watchers

12 watching

Forks

Releases

Packages

Used by

Contributors

Languages