Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
gibson — 网络监控工具,可映射进程与网络连接、识别云服务提供商并检测信标活动。 | Kitploit
工具/GitLabGitLab/hackinglz/gibson
防御工具OSINT (开源情报)取证分析云安全红队事件响应DNS 分析异常检测日志分析
GitLabhackinglz/gibson

gibson

网络监控工具,可映射进程与网络连接、识别云服务提供商并检测信标活动。

查看仓库
5个月前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
网站

Gibson

网络监控工具,可映射进程与网络连接之间的关系,识别云服务提供商,并生成防火墙规则。轻量级代理负责采集,服务器负责聚合,解析器负责分析。

截图

跨机器概览——操作系统版本对比、共享 IP 检测、所有主机中的疑似信标(beaconing)候选: 跨机器分析

单主机详情——严重告警(已停止支持(EOL)的操作系统,nc.exe 向未知 IP 发出信标): 主机详情 - 严重

单主机详情——警告(标记出疑似信标候选): 主机详情 - 警告

单主机详情——正常(无异常): 主机详情 - 正常

功能特性

采集器(Agent)

  • 🔒 安全:可选 AES-256-GCM 加密
  • 🗜️ 高效:可选 gzip 压缩
  • 🌐 云端上传:支持 HTTP/HTTPS 上传及 API 密钥
  • 📊 实时:流式数据采集
  • 🔍 DNS 解析:可选反向 DNS 查询
  • 💾 灵活存储:JSONL 格式,便于解析

解析器(分析器)

  • ☁️ 云服务检测:识别 AWS、Azure、GCP、Cloudflare 等
  • 🔥 防火墙规则:自动生成 iptables/Windows 规则
  • 📈 风险评分:识别可疑进程
  • 🗄️ 数据库导出:SQL 导出,便于进一步分析
  • 📊 丰富报告:包含详细洞察的 JSON 摘要

快速开始

构建

root@kitploit:~
cargo build --release

基本采集(5 分钟)

root@kitploit:~
# Simple collection
cargo run --release -- collect --duration-seconds 300

# With DNS lookups
cargo run --release -- collect --duration-seconds 300 --enable-dns

# With compression and encryption
cargo run --release -- collect \
  --duration-seconds 300 \
  --compress \
  --encrypt-key "your-secret-password"

解析采集的数据

root@kitploit:~
# Generate all reports
cargo run --release -- parse \
  --input connections.jsonl \
  --process-summary processes.json \
  --cloud-analysis cloud.json \
  --firewall-rules-iptables firewall.sh \
  --database-export network.sql

# Offline ownership lookup with local ASN DB (no network calls)
cargo run --release -- parse \
  --input connections.jsonl \
  --cloud-analysis cloud.json \
  --asn-db ip2asn-v4.tsv

# Live ARIN lookup with persistent cache (re-run skips already-queried IPs)
cargo run --release -- parse \
  --input connections.jsonl \
  --cloud-analysis cloud.json \
  --arin-lookup \
  --arin-cache arin_cache.json

一体化监控模式

root@kitploit:~
# Quick 5-minute analysis
cargo run --release -- monitor \
  --duration-seconds 300 \
  --output-dir ./analysis \
  --full-analysis

Agent 构建

agent 二进制是一个极简、无需任何标志的部署目标。所有配置均在编译时通过环境变量固化到二进制中——将其放到目标机器上,无需任何参数即可运行。

构建

root@kitploit:~
AGENT_SERVER="http://10.0.1.5:8080/upload" \
AGENT_KEY="labkey123" \
AGENT_INTERVAL="5" \
AGENT_BATCH="200" \
AGENT_DURATION="0" \
AGENT_DNS="false" \
AGENT_ENCRYPT_KEY="mysecretpassword" \
cargo build --release --bin agent

生成的二进制位于 target/release/agent,无外部依赖,也无需任何标志:

root@kitploit:~
./agent

环境变量

示例:加密的长期运行 Agent

root@kitploit:~
AGENT_SERVER="https://collector.internal/upload" \
AGENT_KEY="prod-api-key" \
AGENT_DURATION="0" \
AGENT_INTERVAL="30" \
AGENT_COMPRESS="true" \
AGENT_ENCRYPT_KEY="$(cat /etc/gibson/key)" \
cargo build --release --bin agent

高级用法

安全的远程采集

1. 加密采集并上传

root@kitploit:~
cargo run --release -- collect \
  --duration-seconds 3600 \
  --interval-seconds 10 \
  --compress \
  --encrypt-key "your-32-char-hex-key-or-password" \
  --upload-url "https://your-server.com/api/upload" \
  --api-key "your-api-key" \
  --batch-size 50 \
  --delete-after-upload

2. 长期监控(24 小时)

root@kitploit:~
cargo run --release -- collect \
  --duration-seconds 86400 \
  --interval-seconds 30 \
  --output connections_daily.jsonl \
  --enable-dns \
  --compress

IP 归属查询

解析器支持两条互斥的路径来识别未匹配 IP 的归属方:

方法

下载 ip2asn 数据库(建议每周刷新):

root@kitploit:~
curl -O https://iptoasn.com/data/ip2asn-v4.tsv.gz && gunzip ip2asn-v4.tsv.gz

当提供 --asn-db 时,--arin-lookup 将被忽略。使用 --arin-cache 可将 ARIN 结果持久化到磁盘,从而在重新运行时跳过已查询过的 IP。

云服务提供商分析

root@kitploit:~
# Parse with cloud detection focus
cargo run --release -- parse \
  --input connections.jsonl \
  --cloud-analysis cloud_report.json \
  --min-connections 5 \
  --whitelist-processes "chrome,firefox,safari,edge"

用于数据采集的 Web 服务器搭建

方案 1:简单的 Python Flask 服务器

创建 collector_server.py:

root@kitploit:~
from flask import Flask, request, jsonify
import os
import json
import base64
from datetime import datetime
from Crypto.Cipher import AES
import gzip

app = Flask(__name__)

# Configuration
UPLOAD_DIR = "./collected_data"
API_KEY = "your-secure-api-key"
ENCRYPTION_KEY = bytes.fromhex("your-32-byte-hex-key")  # Optional

os.makedirs(UPLOAD_DIR, exist_ok=True)

def decrypt_data(encrypted_data, key):
    """Decrypt AES-256-GCM encrypted data"""
    decoded = base64.b64decode(encrypted_data)
    nonce = decoded[:12]
    ciphertext = decoded[12:]
    
    cipher = AES.new(key, AES.MODE_GCM, nonce=nonce)
    plaintext = cipher.decrypt_and_verify(ciphertext[:-16], ciphertext[-16:])
    return plaintext

@app.route('/api/upload', methods=['POST'])
def upload():
    # Verify API key
    if request.headers.get('X-API-Key') != API_KEY:
        return jsonify({"error": "Invalid API key"}), 401
    
    try:
        data = request.get_data()
        
        # If data is base64 encoded (encrypted)
        if data.startswith(b'eyJ'):  # JSON starts with {"
            # Not encrypted, parse directly
            batch = json.loads(data)
        else:
            # Encrypted data
            decrypted = decrypt_data(data, ENCRYPTION_KEY)
            batch = json.loads(decrypted)
        
        # Save to file
        hostname = batch.get('hostname', 'unknown')
        timestamp = datetime.now().strftime('%Y%m%d_%H%M%S')
        filename = f"{UPLOAD_DIR}/{hostname}_{timestamp}.json"
        
        with open(filename, 'w') as f:
            json.dump(batch, f)
        
        return jsonify({"status": "success", "file": filename}), 200
        
    except Exception as e:
        return jsonify({"error": str(e)}), 500

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000, ssl_context='adhoc')  # Use proper SSL in production

使用以下命令运行:

root@kitploit:~
pip install flask pycryptodome
python collector_server.py

方案 2:带基本上传功能的 Nginx

创建 /etc/nginx/sites-available/collector:

root@kitploit:~
server {
    listen 443 ssl;
    server_name collector.yourcompany.com;
    
    ssl_certificate /etc/ssl/certs/your-cert.pem;
    ssl_certificate_key /etc/ssl/private/your-key.pem;
    
    client_max_body_size 100M;
    
    location /upload {
        # API key validation
        if ($http_x_api_key != "your-secure-api-key") {
            return 403;
        }
        
        # Save uploaded files
        client_body_in_file_only on;
        client_body_temp_path /var/uploads/;
        
        # Pass to processing script
        proxy_pass http://localhost:8080;
        proxy_set_header X-File $request_body_file;
    }
}

方案 3:AWS Lambda 函数

root@kitploit:~
// index.js for AWS Lambda
const AWS = require('aws-sdk');
const crypto = require('crypto');
const s3 = new AWS.S3();

const BUCKET_NAME = 'your-network-data-bucket';
const API_KEY = process.env.API_KEY;
const ENCRYPTION_KEY = Buffer.from(process.env.ENCRYPTION_KEY, 'hex');

exports.handler = async (event) => {
    // Verify API key
    if (event.headers['X-API-Key'] !== API_KEY) {
        return {
            statusCode: 401,
            body: JSON.stringify({ error: 'Invalid API key' })
        };
    }
    
    try {
        let data = event.body;
        
        // Decrypt if needed
        if (!data.startsWith('{')) {
            // Encrypted data
            const encrypted = Buffer.from(data, 'base64');
            const nonce = encrypted.slice(0, 12);
            const ciphertext = encrypted.slice(12);
            
            const decipher = crypto.createDecipheriv('aes-256-gcm', ENCRYPTION_KEY, nonce);
            const decrypted = Buffer.concat([
                decipher.update(ciphertext.slice(0, -16)),
                decipher.final()
            ]);
            data = decrypted.toString();
        }
        
        const batch = JSON.parse(data);
        const key = `${batch.hostname}/${Date.now()}_${batch.batch_id}.json`;
        
        await s3.putObject({
            Bucket: BUCKET_NAME,
            Key: key,
            Body: data,
            ContentType: 'application/json'
        }).promise();
        
        return {
            statusCode: 200,
            body: JSON.stringify({ status: 'success', key })
        };
    } catch (error) {
        return {
            statusCode: 500,
            body: JSON.stringify({ error: error.message })
        };
    }
};

部署策略

1. 企业网络监控

在关键系统上部署采集器:

root@kitploit:~
# Windows endpoints
gibson.exe collect --duration-seconds 3600 --upload-url https://sec.company.com/upload --api-key KEY

# Linux servers
./gibson collect --duration-seconds 7200 --compress --upload-url https://sec.company.com/upload

2. 云实例监控

在 Linux 上使用 systemd 服务:

root@kitploit:~
# /etc/systemd/system/network-monitor.service
[Unit]
Description=Network Connection Monitor
After=network.target

[Service]
Type=simple
User=monitor
ExecStart=/opt/monitor/gibson collect \
  --duration-seconds 3600 \
  --compress \
  --encrypt-key ${ENCRYPT_KEY} \
  --upload-url https://collector.internal/upload \
  --api-key ${API_KEY}
Restart=always

[Install]
WantedBy=multi-user.target

3. 容器部署

root@kitploit:~
FROM rust:1.75 as builder
WORKDIR /app
COPY . .
RUN cargo build --release

FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y ca-certificates
COPY --from=builder /app/target/release/gibson /usr/local/bin/
CMD ["gibson", "collect", "--duration-seconds", "3600", "--upload-url", "${UPLOAD_URL}"]

输出示例

进程摘要

root@kitploit:~
{
  "process_name": "chrome",
  "pid": 1234,
  "total_connections": 45,
  "unique_remote_ips": ["1.2.3.4", "5.6.7.8"],
  "cloud_providers": {
    "AWS": {
      "connection_count": 12,
      "services": {"CloudFront": 8, "S3": 4}
    }
  },
  "risk_score": 0.5
}

云服务分析

root@kitploit:~
{
  "AWS": {
    "provider": "AWS",
    "unique_ips": ["52.84.1.2", "54.230.3.4"],
    "unique_domains": ["d1234.cloudfront.net"],
    "services": {"CloudFront": 15, "S3": 3},
    "total_connections": 18
  }
}

防火墙规则(iptables)

root@kitploit:~
# Generated firewall rules
# ALLOW: Known Cloud Providers
iptables -A OUTPUT -p tcp -d 52.84.0.0/14 -j ACCEPT -m comment --comment "chrome to AWS"
iptables -A OUTPUT -p tcp -d 104.16.0.0/12 -j ACCEPT -m comment --comment "firefox to Cloudflare"

安全注意事项

  1. 加密密钥:使用 32 字节十六进制密钥或强密码
  2. API 密钥:定期轮换,使用环境变量
  3. TLS:上传始终使用 HTTPS
  4. 数据保留:实施自动清理策略
  5. 访问控制:限制采集器服务器的访问
  6. 监控:对可疑模式发出告警

性能提示

  • 长期监控请使用 --interval-seconds 30
  • 远程上传请启用压缩
  • 批大小设为 50-100 以获得最佳网络利用率
  • 如不需要,可禁用 DNS 查询(--enable-dns 标志)

故障排查

内存占用过高

  • 增大批上传大小
  • 缩短采集间隔
  • 启用压缩

上传失败

  • 检查网络连通性
  • 核对 API 密钥和 URL
  • 检查服务器日志
  • 确保 SSL 证书正确

进程缺失

  • 以适当的权限运行
  • 某些进程可能需要提升权限
  • 检查系统特定的限制

许可证

MIT

贡献

欢迎提交 Pull Request。

下载工具
变量默认值描述
AGENT_SERVERhttp://localhost:8080/upload上传端点 URL
AGENT_KEY(无)X-API-Key 请求头值
AGENT_INTERVAL5套接字轮询间隔(秒)
AGENT_BATCH200每批上传的记录数
AGENT_DURATION0运行时长(秒)(0 = 永久运行)
AGENT_DNSfalse将 IP 解析为主机名
AGENT_ESTABLISHEDtrue仅已建立(ESTABLISHED)的连接
AGENT_LOCAL_COPYfalse上传的同时保留本地 .jsonl 副本
AGENT_COMPRESSfalse上传前进行 gzip 压缩
AGENT_ENCRYPT_KEY(无)AES-256-GCM 加密负载(密码或 64 字符十六进制密钥)
AGENT_UA(reqwest 默认)HTTP User-Agent 请求头
标志
速度
网络
适用场景
本地 ASN 数据库--asn-db即时无重复分析、物理隔离(air-gapped)环境
实时 ARIN RDAP--arin-lookup较慢(按 IP)需要一次性查询、无本地数据库可用