ysrc / xunfeng

巡风是一款适用于企业内网的漏洞快速应急,巡航扫描系统。
GNU General Public License v3.0
3.53k stars 1.34k forks source link

添加nmap进行端口扫描 #227

Closed Jaic1 closed 4 years ago

Jaic1 commented 4 years ago

暂时效果与masscan相同,可配置nmap扫描的线程数。之后考虑添加nmap的更多选项。

guardrails[bot] commented 4 years ago

:warning: We detected security issues in this pull request:

Hard-Coded Secrets (9) https://github.com/ysrc/xunfeng/blob/af7ed1552820fbce01f7fa724e13e8e47de6c845/db/Config.metadata.json#L1 https://github.com/ysrc/xunfeng/blob/af7ed1552820fbce01f7fa724e13e8e47de6c845/db/Heartbeat.metadata.json#L1 https://github.com/ysrc/xunfeng/blob/af7ed1552820fbce01f7fa724e13e8e47de6c845/db/History.metadata.json#L1 https://github.com/ysrc/xunfeng/blob/af7ed1552820fbce01f7fa724e13e8e47de6c845/db/Info.metadata.json#L1 https://github.com/ysrc/xunfeng/blob/af7ed1552820fbce01f7fa724e13e8e47de6c845/db/Plugin.metadata.json#L1 https://github.com/ysrc/xunfeng/blob/af7ed1552820fbce01f7fa724e13e8e47de6c845/db/Result.metadata.json#L1 https://github.com/ysrc/xunfeng/blob/af7ed1552820fbce01f7fa724e13e8e47de6c845/db/Statistics.metadata.json#L1 https://github.com/ysrc/xunfeng/blob/af7ed1552820fbce01f7fa724e13e8e47de6c845/db/Task.metadata.json#L1 https://github.com/ysrc/xunfeng/blob/af7ed1552820fbce01f7fa724e13e8e47de6c845/db/Update.metadata.json#L1 More info on how to fix Hard-Coded Secrets in [General](https://www.guardrails.io/docs/en/vulnerabilities/general/hard-coded_secrets.html?utm_source=ghpr).

Happy with the results? Give your feedback.

Jaic1 commented 4 years ago

数据库Config集合中type为nascan的文档中的字段config.Masscan.value由0|20000|/root/xunfeng/masscan/linux_64/masscan改为0|20000|/root/xunfeng/masscan/linux_64/masscan|200|。 添加了两项,200是默认nmap线程数,最后一项记录nmap端口扫描的选项

ywolf commented 4 years ago

感谢关注xunfeng项目,写得很好 目前xunfeng 资产探测 流程分为2种 1.自带的socket直接探测和指纹识别 2.先masscan快速探测出开放的端口,再使用socket进行二次判断和指纹识别 对于nmap定位应该为在masscan之后的二次判断和指纹识别,而不是跟它平等关系,又鉴于指纹配置自定义需求,也不准备使用nmap代替 socket+指纹识别 流程,因此此pr暂不合并,感谢关注

Jaic1 commented 4 years ago

感谢关注xunfeng项目,写得很好 目前xunfeng 资产探测 流程分为2种 1.自带的socket直接探测和指纹识别 2.先masscan快速探测出开放的端口,再使用socket进行二次判断和指纹识别 对于nmap定位应该为在masscan之后的二次判断和指纹识别,而不是跟它平等关系,又鉴于指纹配置自定义需求,也不准备使用nmap代替 socket+指纹识别 流程,因此此pr暂不合并,感谢关注

我目前在写扫描开放端口之后下一层的代码(你上面说的第一步),使用nmap加载nse脚本,对某些端口执行对应的识别和检测(建立端口和nse脚本的映射)。请问这个xunfeng有需要吗?

ywolf commented 4 years ago

不基于nmap的情况下,加强指纹获取的流程还是有一定价值的