跟踪 Unix 主机上的系统更改并通知您。
项目描述
通知
目录
关于
运营商使用多种工具来执行内部安全评估。这些工具可能难以远程跟踪并且具有时间敏感的输出。工具 rnotify 试图解决这个问题。下面列出了一些示例用例:
- 监控hashcat进程并在破解工作完成时通知
- 监视文件夹中使用 Responder 捕获的哈希值
- 使用 mitm6 和 ntlmrelayx 时监视和通知计算机帐户的创建
- 密码喷射作业完成时通知
在监控对象发生更改后,该工具可以使用 webhook 通知以下通信平台:
- 松弛
- 微软团队
- 不和谐
安装
该项目可以使用 pipx 安装:
pipx install rnotify
用法
该工具仅适用于基于 Unix 的操作系统。可以使用命令调用该实用程序,rnotify或者rn可以监视:
- 文件更改
- 添加到文件夹的新文件
- 进程退出 (PID)
Usage: rn [OPTIONS] COMMAND [ARGS]...
Notify on arbitrary filesystem events and process state changes.
Options:
--help Show this message and exit.
Commands:
file Notify on file changes
folder Notify on directory changes
pid Notify on process changes
所有模块都需要指定以下选项:
- 用于通知的 Webhook URL
- 与提供的 webhook 关联的通知提供程序
- 监控目标(文件、文件夹、pid)
所有模块都可选择允许指定以下选项:
- 实用程序的守护进程以在后台运行 rnotify
- 检查更改时工具使用的睡眠间隔
- 如下所示格式的配置文件
webhook = 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX'
target = '/tmp/screen.log'
notifier = 'slack'
create_daemon = 'True'
文件监控
可以使用file子命令监视文件更改:
Usage: rn file [OPTIONS] TARGET
Notify on file changes
Options:
-w, --webhook TEXT Webhook URL [required]
-n, --notifier [teams|slack|discord]
Notification provider. [required]
-f, --filter TEXT Filter changes by string.
-s, --sleep INTEGER Sleep time between checks [default: 5]
-d, --daemon Daemonize the utility
--config FILE Read configuration from FILE.
-h, --help Show this message and exit.
可以使用该-f标志过滤对日志文件的更改。
文件夹监控
可以使用folder子命令监视文件夹更改:
Usage: rn folder [OPTIONS] TARGET
Notify on directory changes
Options:
-w, --webhook TEXT Webhook URL [required]
-d, --daemon Daemonize the utility
-n, --notifier [teams|slack|discord]
Notification provider. [required]
-s, --sleep INTEGER Sleep time between checks [default: 5]
--config FILE Read configuration from FILE.
-h, --help Show this message and exit.
PID监控
可以使用pid子命令监视进程退出:
Usage: rn pid [OPTIONS] TARGET
Notify on process changes
Options:
-w, --webhook TEXT Webhook URL [required]
-n, --notifier [teams|slack|discord]
Notification provider. [required]
-s, --sleep INTEGER Sleep time between checks [default: 5]
-d, --daemon Daemonize the utility
--config FILE Read configuration from FILE.
-h, --help Show this message and exit.
使用示例
在前台观看 Responder logs 文件夹:
rn folder /opt/Responder/logs -w https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX -n slack
注意 hashcat 进程在后台停止:
rn pid 54782 -w https://hooks.teams.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX -n teams -d
在前台使用过滤器观察 gnu 屏幕日志的变化:
rn file /top/screen.log -f Account -w https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX -n slack
项目详情
下载文件
下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。
源分布
rnotify-0.1.3.tar.gz
(9.6 kB
查看哈希)
内置分布
rnotify-0.1.3-py3-none-any.whl
(9.5 kB
查看哈希)