V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
DollarKiller
V2EX  ›  信息安全

BlackWater 基于 RUST 的端口扫描器 撼动 NMAP 地位

  •  
  •   DollarKiller · 2020-12-15 19:40:11 +08:00 · 2845 次点击
    这是一个创建于 1199 天前的主题,其中的信息可能已经有所发展或是发生改变。

    https://github.com/dollarkillerx/blackwater

    Blackwater 是 rust 编写基于 SCP 并发模型的 端口扫描器 官方测试 1 秒内扫描 6W 个端口

    吊打传统测试软件 NMAP

    官方貌似还打算更进分布式版本

    ubuntu@ubuntu:~/$ time blackwater -i 110.242.68.3 -p1-65535
    
     _      _
    | |    | |
    | |_   | |   __
    | | |  | |  |  |
    | _ |  |_|  |  |
    Black Water
    Asynchronous Port Scanner written in rust
    https://github.com/dollarkillerx/blackwater
    
    110.242.68.3:80
    110.242.68.3:443
    110.242.68.3:2000
    110.242.68.3:5060
    
    real    0m1.637s
    user    0m1.196s
    sys     0m1.672s
    
    ubuntu@ubuntu:~/$ time ./blackwater -i www.baidu.com -p1-65535 
     _      _
    | |    | |
    | |_   | |   __
    | | |  | |  |  |
    | _ |  |_|  |  |
    Black Water
    Asynchronous Port Scanner written in rust
    https://github.com/dollarkillerx/blackwater
    
    www.baidu.com:80
    www.baidu.com:2000
    www.baidu.com:443
    www.baidu.com:5060
    
    real    0m1.151s
    user    0m0.654s
    sys     0m0.697s
    
    ubuntu@ubuntu:~/$ time ./blackwater -i www.bing.com -p1-65535 
     _      _
    | |    | |
    | |_   | |   __
    | | |  | |  |  |
    | _ |  |_|  |  |
    Black Water
    Asynchronous Port Scanner written in rust
    https://github.com/dollarkillerx/blackwater
    
    www.bing.com:80
    www.bing.com:443
    www.bing.com:2000
    
    real    0m1.079s
    user    0m0.589s
    sys     0m0.442s
    
    ubuntu@ubuntu:~/$ time ./blackwater -i github.com -p1-65535 
     _      _
    | |    | |
    | |_   | |   __
    | | |  | |  |  |
    | _ |  |_|  |  |
    Black Water
    Asynchronous Port Scanner written in rust
    https://github.com/dollarkillerx/blackwater
    
    github.com:2000
    github.com:22
    github.com:80
    github.com:443
    github.com:5060
    
    real    0m1.137s
    user    0m0.685s
    sys     0m0.756s
    

    Parameter adjustment, solve the problem of packet loss

    There are many reasons for packet loss, roughly divided into two.

    1. network problems (solution: 1. switch to a better network 2. modify the -t timeout time)
    2. cpu processing super link performance is insufficient (solution: reduce the number of concurrent)
    • Extranet scan, not missing a port
      • Modify thread parameters -c Calculation formula: Number of current CPU logical cores * 100
      • Example: Current CPU logical core is 4 cores Parameter is blackwater -i github.com -c 400 -p 1-65535
    • Intranet scan, not missing a port
      • Modify thread parameters -c Calculation formula: Number of current CPU logical cores * 250
      • Example: Current CPU logical core is 4 cores Parameter is blackwater -i 192.168.88.11 -c 1000 -p 1-65535
    13 条回复    2020-12-18 15:07:38 +08:00
    janxin
        1
    janxin  
       2020-12-15 19:48:10 +08:00
    nmap 的强项不是速度快是功能全...速度本来就不快...
    laminux29
        2
    laminux29  
       2020-12-15 20:29:37 +08:00
    传统软件功能多,业务复杂。一旦复杂起来,就很难追求极致的性能。这是软件开发的原理,没办法的。

    Blackwater 如果发展起来,功能增多后,同样也会面临这个问题。

    看看早期的 nginx 、redis 、mongodb 、mysql,Java 、.Net 、CPP,甚至 CPU 、GPU 的发展史,也都遇到过这些问题。
    liuxu
        3
    liuxu  
       2020-12-15 21:10:34 +08:00
    我第一次见人这么吹的
    arischow
        4
    arischow  
       2020-12-15 21:15:05 +08:00 via iPhone
    作者是你自己,却用第三方的口吻叙述,多少会让别人感到困惑,甚至反感。
    DollarKiller
        5
    DollarKiller  
    OP
       2020-12-15 21:22:26 +08:00
    @arischow
    @liuxu
    抱歉 令您感到不快
    宝宝知道错了 /(ㄒoㄒ)/~~
    David1119
        6
    David1119  
       2020-12-15 21:24:37 +08:00
    在 v2 推广就老老实实讲干货,搞标题党很容易被怼的
    IDAEngine
        7
    IDAEngine  
       2020-12-15 22:43:45 +08:00 via iPhone
    nmap 很慢很慢,一点都不快
    datou
        8
    datou  
       2020-12-15 22:45:30 +08:00
    建议楼主别滥用 jsdelivr 呀
    ragnaroks
        9
    ragnaroks  
       2020-12-16 08:46:55 +08:00
    端口扫描,不是越快越容易被屏蔽?
    DollarKiller
        10
    DollarKiller  
    OP
       2020-12-16 09:31:20 +08:00
    @ragnaroks 当你很快时 对方还没有反映多来 就扫描完了
    Dogtler
        11
    Dogtler  
       2020-12-16 16:02:18 +08:00
    我用 Mac 交叉 编译了一下,无法扫描到任何东西啊。
    DollarKiller
        12
    DollarKiller  
    OP
       2020-12-16 16:15:25 +08:00
    @Dogtler 参考阅读 Parameter adjustment, solve the problem of packet loss
    yokosovtoex
        13
    yokosovtoex  
       2020-12-18 15:07:38 +08:00
    就一个端口扫描功能,我 nmap 可以 10 项全能呢
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5618 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 06:34 · PVG 14:34 · LAX 23:34 · JFK 02:34
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.