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

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

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

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

工具目录

分类

查看所有分类
Loading categories
Sentinel-GPT — 自动化威胁狩猎管道,可摄取Azure日志,利用LLM推理检测可疑活动、评估风险,并生成包含CLI命令的修复手册。 | Kitploit
工具/GitHubGitHub/ayush-parab/sentinel-gpt
云安全威胁情报学习与教育事件响应AI 安全日志分析
GitHubayush-parab/sentinel-gpt

Sentinel-GPT

自动化威胁狩猎管道,可摄取Azure日志,利用LLM推理检测可疑活动、评估风险,并生成包含CLI命令的修复手册。

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

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

Sentinel-GPT:用于威胁狩猎的智能AI代理 🛡️

一个自动化网络安全流水线,利用基于LLM的推理将原始Azure日志转化为可执行情报。

Python Azure OpenAI Security License

📖 概述

Sentinel-GPT 是一个专为网络安全威胁狩猎设计的AI代理。它与Azure Log Analytics工作区(日志生成源)以及OpenAI的ChatGPT API(该代理的大脑)相集成。我们将日志提供给经过训练的代理,使其能够识别可疑活动、搜索威胁、向用户发出警报,同时提供修复步骤。

⚠️ 问题与解决方案

  • 问题: 在现代世界中,大多数企业(无论大小)要么已完全迁移到云端,要么正在使用混合云设置。随着网络规模的扩大,每周会产生数百万条日志和警报。SOC分析师遭受“警报与日志疲劳”,难以区分小配置错误和实际入侵。
  • 解决方案: 一个对大量日志进行分析的代理化流水线。它不仅标记错误,还能理解入侵的上下文,评估风险与影响,并即时编写修复计划。

🏗️ 架构

  1. 提取: Python脚本使用KQL查询Azure Log Analytics以获取相关日志
  2. 上下文化: 结构化日志并为代理提供系统提示,赋予其威胁猎人的角色
  3. 分析(大脑): 数据被发送到OpenAI的选定LLM进行分析
  4. 输出: 生成全面的安全情报报告

🚀 关键特性

  • 与Azure和OpenAI ChatGPT无缝集成,并可扩展至其他云平台。
  • 将复杂的JSON日志块转换为通俗易懂的执行摘要。
  • 自动化修复手册:隔离受损资源的具体操作和CLI命令(Azure CLI/PowerShell)。

🛠️ 快速开始与设置

前置条件

  • 拥有Log Analytics工作区的Azure订阅。
  • OpenAI API密钥(推荐GPT-4.1以处理复杂推理)。
  • Python 3.10+

安装

  1. 克隆仓库:
root@kitploit:~
git clone https://github.com/Ayush-Parab/cybersecurity-agentic-AI
cd cybersecurity-agentic-AI
  1. 安装依赖
root@kitploit:~
pip install -r requirements.txt
  1. 配置环境 创建.env文件:
root@kitploit:~
OPENAI_API_KEY="your_key"
LOG_ANALYTICS_WORKSPACE_ID="your_id"

📊 示例输出

输入日志:

root@kitploit:~
TimeGenerated,Status,User,IPAddress,Computer,SyslogMessage
2026-02-12 02:00:15.912351+00:00,Failure,,,Test-VM-For-Logs,Connection closed by invalid user  98.80.4.65 port 35908 [preauth]
2026-02-12 02:00:15.706067+00:00,Failure,,98.80.4.65,Test-VM-For-Logs,Invalid user  from 98.80.4.65 port 35908
2026-02-12 01:59:38.275807+00:00,Success,Ayush,103.38.69.120,Test-VM-For-Logs,Accepted password for Ayush from 103.38.69.120 port 31551 ssh2
2026-02-12 01:59:24.542329+00:00,Failure,,,Test-VM-For-Logs,Connection reset by invalid user balloon 103.38.69.120 port 31573 [preauth]
2026-02-12 01:59:22.850922+00:00,Failure,balloon,103.38.69.120,Test-VM-For-Logs,Failed password for invalid user balloon from 103.38.69.120 port 31573 ssh2
2026-02-12 01:59:17.554208+00:00,Failure,balloon,103.38.69.120,Test-VM-For-Logs,Failed password for invalid user balloon from 103.38.69.120 port 31573 ssh2
2026-02-12 01:59:13.693935+00:00,Failure,,103.38.69.120,Test-VM-For-Logs,Invalid user balloon from 103.38.69.120 port 31573
2026-02-12 01:59:06.649583+00:00,Failure,,,Test-VM-For-Logs,Connection reset by invalid user hamster 103.38.69.120 port 31890 [preauth]
2026-02-12 01:59:03.577720+00:00,Failure,hamster,103.38.69.120,Test-VM-For-Logs,Failed password for invalid user hamster from 103.38.69.120 port 31890 ssh2
2026-02-12 01:58:55.777039+00:00,Failure,hamster,103.38.69.120,Test-VM-For-Logs,Failed password for invalid user hamster from 103.38.69.120 port 31890 ssh2
2026-02-12 01:58:51.167792+00:00,Failure,,103.38.69.120,Test-VM-For-Logs,Invalid user hamster from 103.38.69.120 port 31890
2026-02-12 01:54:50.302217+00:00,Success,Ayush,103.38.69.120,Test-VM-For-Logs,Accepted password for Ayush from 103.38.69.120 port 31565 ssh2

Sentinel-GPT 分析结果:

root@kitploit:~
Yes — this looks suspicious.

What stands out
- 103.38.69.120: Multiple “Invalid user/Failed password” attempts (hamster/balloon), then successful SSH password logins for Ayush at 01:54:50 and 01:59:38 on Test-VM-For-Logs. This is consistent with brute-force/credential stuffing followed by success. Verify with Ayush if both logins are expected from that IP.
- 98.80.4.65: Single invalid-user probe — likely generic scan, still block if not needed.

Immediate actions (Azure-first)
- Contain: Block 103.38.69.120 at the NSG/Azure Firewall. Restrict TCP/22 to trusted IPs only or close it and use Azure Bastion or Defender for Cloud Just‑In‑Time VM access.
- Credentials: If any Ayush login is unrecognized, reset Ayush password/SSH keys, invalidate cached credentials, remove from sudoers if not required, and terminate active SSH sessions.
- SSH hardening: Disable password auth (PasswordAuthentication no), enforce SSH keys or AADLoginForLinux with Conditional Access MFA, and restart sshd.
- Detection/response: Run Microsoft Defender for Servers/Endpoint AV scan on the VM and review alerts. Check for new users, sudoers changes, suspicious processes, and authorized_keys modifications.

Hunt next (Log Analytics/Sentinel – KQL)
- Brute-force followed by success from same IP (10m window):
let window=10m;
let ssh = Syslog
| where ProcessName == "sshd" and Facility in ("auth","authpriv")
| extend SrcIP = extract(@"from (\d+\.\d+\.\d+\.\d+)",1, SyslogMessage);
let fails = ssh
| where SyslogMessage has_any ("Invalid user","Failed password")
| summarize FailCount=count(), FirstFail=min(TimeGenerated), LastFail=max(TimeGenerated) by Computer, SrcIP;
ssh
| where SyslogMessage has "Accepted password"
| extend SrcIP = extract(@"from (\d+\.\d+\.\d+\.\d+)",1, SyslogMessage), User = extract(@"for (\S+)",1, SyslogMessage)
| join kind=inner (fails) on Computer, SrcIP
| where TimeGenerated between (FirstFail .. LastFail + window) and FailCount >= 3
| project TimeGenerated, Computer, User, SrcIP, FailCount
- Pivot that IP across all VMs:
Syslog
| where ProcessName == "sshd" and SyslogMessage has_any ("Invalid user","Failed password","Accepted password")
| extend SrcIP = extract(@"from (\d+\.\d+\.\d+\.\d+)",1, SyslogMessage)
| where SrcIP in ("103.38.69.120","98.80.4.65")
| project TimeGenerated, Computer, SyslogMessage, SrcIP
| order by TimeGenerated desc

Validate and scope
- Correlate with Azure Activity Logs for any NSG/VM changes around the same time.
- If Defender for Endpoint is enabled, check for post-login activity (new services, unusual outbound connections) on Test-VM-For-Logs.

Hardening (ongoing)
- Keep SSH closed to the internet; prefer Bastion or JIT.
- Enable Sentinel analytics for “multiple SSH failures followed by success” and blocklists for repeated offenders.
- Install and tune fail2ban on the VM.
- Patch OS and rotate secrets used on that VM.

🗺️ 路线图

  • 基于分析结果自动在Azure NSG中屏蔽IP
  • 实现护栏(GuardRails)
  • 全自动KQL查询生成
  • 支持其他云平台,如AWS、GCP和OCI
  • 集成Outlook/Gmail以发送自动警报

🤝 贡献与联系

该项目欢迎协作,目前仍在进行中!如果你有关于新安全代理或日志解析器的想法,欢迎提交PR。

与我联系: Linkedin

下载工具