跳转到内容
Go back

工具使用备忘

更新于:

工具使用备忘

Gogo

 gogo -h                                                                                                                                                                                       Usage:
  D:\00PackageManager\Scoop\apps\gogo\current\gogo.exe

  WIKI: https://chainreactors.github.io/wiki/gogo/

  QUICKSTART:
    simple example:
      gogo -i 1.1.1.1/24 -p top2,win,db -ev

    list input spray:
      gogo -l ip.txt -p http

    stdin input:
      sometool | gogo -L -p http -q | exploit

    smart scan:
      gogo -i 192.168.1.1/16 -m s -p top2,win,db --af

    supersmart scan:
      gogo -i 10.1.1.1/8 -m ss -p top2,win,db --af

    smart+icmp scan:
      gogo -i 192.168.1.1/16 -m s --ping -p top2,win,db --af

    workflow:
      gogo -w 10

  FORMAT:
    standard format:
      gogo -F 1.dat

    json output:
      gogo -F 1.dat -o json -f 1.json

    filter output:
      gogo -F 1.dat --filter frame::redis


Miscellaneous Options:
  -k, --key=                                                                    String, file encrypt key
      --version                                                                 Bool, show version
  -P, --print=[port|workflow|neutron|extract]                                   String, show preset config
      --debug                                                                   Bool, show debug info
      --plugin-debug                                                            Bool, show plugin debug stack
      --proxy=                                                                  String, socks5 proxy url, e.g. socks5://127.0.0.1:11111

Input Options:
  -i, --ip=                                                                     IP/CIDR, support comma-split ip/cidr, e.g. 192.168.1.1/24,172.16.1.1/24
      --exclude=                                                                IP/CIDR, exclude IP/CIDR, support comma-split
      --exclude-file=                                                           File, exclude IP/CIDR filename
  -p, --port=                                                                   Port, support comma-split preset('-P port' show all preset), range, alias port, e.g. top2,mysql,12345,10000-10100,oxid,smb
                                                                                (default: top1)
      --port-config=                                                            File,custom port config file
  -l, --list=
  -L                                                                            Bool, same as -l, input from stdin
  -j, --json=                                                                   File, previous results file e.g. -j 1.dat1 or list of colon-split ip:port, e.g. 123.123.123.123:123
  -J                                                                            Bool, same as -j, input from stdin
      --filter-or                                                               FilterOr
  -w, --workflow=                                                               String, workflow name('-P workflow' show all workflow)
  -W                                                                            Bool, same as -w, input from stdin
  -F, --format=                                                                 File, to be formatted result file

Output Options:
  -f, --file=                                                                   String, output filename
      --path=                                                                   String, output file path
  -o, --output=                                                                 String,cmdline output format, default: full,
                                                                                format: color,full,json,jl(jsonline,jsonlines),extract,zombie,csv
                                                                                value: ip,port,stat(status),frame(framework),vuln,cpe,uri,wfn,title,target,url,midleware,protocol(schema) (default: default)
  -O, --file-output=                                                            String, file output format,choices same as -o, default: jsonlines (default: default)
      --output-delimiter=                                                       String, output delimiter, default [TAB] (default: "\t")
      --af                                                                      Bool, auto choice filename
      --hf                                                                      Bool, auto choice hidden filename
  -C, --compress                                                                Bool, close compress output file
      --tee                                                                     Bool, keep console output
  -q, --quiet                                                                   Bool, close log output
      --no-guess                                                                Bool, When formatting not output guess framework

Smart Options:
  -m, --mod=[s|ss|default|sc]                                                   String, smart mod (default: default)
      --ping                                                                    Bool, alive pre-scan
  -n, --no                                                                      Bool, just smart scan, return before default scan task
      --sp=                                                                     String, smart-port-probe, smart mod default: 80, supersmart mod default: icmp (default: default)
      --ipp=                                                                    String, IP-probe, default: 1,254 (default: default)

Advance Options:
  -s, --spray                                                                   Bool, enable port-first spray generator. if ports number > 500, auto enable
      --no-spray                                                                Bool, force to close spray
  -E, --exploit-name=                                                           String, specify neutron template name
      --ef=                                                                     String, load specified templates file
      --ff=                                                                     String, load specified finger file
      --payload=                                                                String, specify neutron payload
      --attack-type=[sniper|clusterbomb|pitchfork|pitchfork|clusterbomb|sniper] neutron attack types, sniper|clusterbomb|pitchfork
      --extract=                                                                String, custom Extract regexp
      --opsec                                                                   Bool, opsec mode
      --filter=                                                                 String, filter formatting(-F) results
      --output-filter=                                                          String, Filter output while scanning
      --scan-filter=                                                            String, Filter Scanning while scanning

Configuration Options:
  -e, --exploit                                                                 Bool, enable neutron exploit scan
  -v, --verbose                                                                 Bool, enable active finger scan
  -t, --thread=                                                                 Int, concurrent thread number,linux default: 4000, windows default: 1000
  -d, --timeout=                                                                Int, socket and http timeout (default: 2)
  -D, --ssl-timeout=                                                            Int, ssl and https timeout (default: 2)

Help Options:
  -h, --help                                                                    Show this help message

常用参数说明

运行端口扫描

gogo -i 10.254.10.83/24 --mod s -p win -t 50 -O zombie -C -f out.txt

格式化输出

gogo -F out.dat -o zombie -f format-result.txt
gogo -F out.dat -o url -f format-result.txt

gogo 默认并发说明

默认的并发 linux 为 4000, windows 为 1000, 为企业级网络环境下可用的并发。

建议根据不同环境,手动使用 -t 参数指定合适的并发数。

端口组

配置文件示例

---
- name: test
  ports:
    - '13306'
    - '1433'
    - '16379'

使用配置文件

gogo -i 192.168.154.0/24 --mod s -t 50 --port-config=config.yaml -p test --path . -C -o zombie -f out.json

格式化结果命令:

在 Windows 环境下测试有效

jq -r ".[] | \`"\(.server)://\(.ip):\(.port)\`"" file.json

使用 powershell 命令保存处理结果

jq -r ".[] | \"\(.service)://\(.ip):\(.port)\"" file.json | Out-File -FilePath out.txt -Encoding UTF8

Zombie

版本:v1.2.2

zombie -h
Usage:
  D:\00PackageManager\Scoop\apps\zombie\current\zombie.exe

        WIKI: https://chainreactors.github.io/wiki/zombie

        QUICKSTART:
                simple example:
                        zombie -i 1.1.1.1 -u root -s ssh

                brute multiple ssh targets(ip list):
                        zombie -I targets.txt -u root -p password -s ssh

                brute from file and auto parse
                        zombie -I targets.txt

                        targets.txt:
                        mysql://user:pass@1.1.1.1:3307
                        ssh://user@2.2.2.2
                        mssql://3.3.3.3:1433


                rude brute:
                        zombie -I targets.txt -U user.txt -P pass.txt


                brute from gogo dat:
                        zombie --gogo 1.dat

                brute from json file:
                        zombie -j 1.json

                weak password generate:
                        zombie -l 1.txt -p google --weakpass


Input Options:
  -i, --ip=             String, input ip
  -I, --IP=             File, input ip list filename
  -c, --cidr=           String, input cidr
  -u, --user=           Strings, input usernames
  -U, --USER=           File, input username list filename
  -a, --auth=           Strings, input auth, username::password
  -A, --AUTH=           File, input auth list filename
      --userrule=       String, input username generator rule filename
  -p, --pwd=            String, input passwords
  -P, --PWD=            File, input password list filename
      --pwdrule=        String, input password generator rule filename
  -d, --dict=           Strings, input dictionaries
  -j, --json=           File, input json result filename
  -g, --gogo=           File, input gogo result filename
  -s, --service=        String, input service name
  -S, --filter-service= String, filter service when input json/gogo file
      --param=          params

Output Options:
  -f, --file=           File, output result filename
  -O, --file-format=    String, output result file format (default: json)
  -o, --format=         String, output result format (default: string)
      --debug           Bool, enable debug
  -q, --quiet           Bool, quiet mode

Word Options:
      --top=            Int, top n words (default: 0)
      --force-continue  Bool, force continue, not only stop when first success ever host
      --weakpass        Bool, common weak password rule
      --no-unauth       Bool, skip check unauth
      --no-honeypot     Bool, skip check honeypot

Misc Options:
      --raw             Bool, parser raw username/password
      --strict          Bool, strict mode, when finger check pass will brute
  -t=                   Int, threads (default: 100)
      --timeout=        Int, timeout (default: 5)
  -m=                   String, clusterbomb/sniper (default: clusterbomb)
  -l, --list            Bool, list all service
      --bar             Bool, enable bar
      --version         Bool, show version

Help Options:
  -h, --help            Show this help message

常用参数说明

zombie -I targets.txt -s ssh -u root -p password -f out.txt -t 50

关于扫描策略的一点笔记

  1. 为了避免出现因为安全基线策略而导致的账户锁定问题,需要使用密码喷洒
    • 目前确认,受影响的服务包括 rdp、smb、ssh 等
    • 需要编写脚本来实现,逐个遍历密码列表,并设置 sleep 为 3-5 分钟

Spray

spray -u http://example.com -D
spray -l url.txt -d

Naabu

集成 Nmap

Naabu 已实现对 Nmap 的集成支持,可通过 Naabu 的扫描结果进行服务发现或执行 Nmap 支持的其他扫描类型。使用此功能前请确保已安装 nmap。

使用时,只需在 nmap-cli 参数后添加 Nmap 命令即可,例如:

naabu -host 10.254.10.83 -p "3389,445" -nmap-cli 'nmap --open -sV -oX nmap-output.xml'
naabu -list ip.txt -verify -ec -rate 9000 -retries 1 -p 0-65535 -warm-up-time 0 -c 50 -nmap-cli "nmap --open -sV -oX nmap-naabu-out.xml" -silent -o naabu-full.txt

排除主机列表

naabu 原始的参数

-exclude-hosts, -eh string  hosts to exclude from the scan (comma-separated)
-exclude-file, -ef string   list of hosts to exclude from scan (file)
 naabu -host 192.168.1.0/24 -exclude-hosts 192.168.1.1,192.168.1.5
naabu -host 192.168.1.0/24 -exclude-file exclude_ips.txt

参考资料


分享文章至:

Previous Post
Excel 获取本周周一至周五日期公式
Next Post
NFS 未授权访问