增加uac提权检测
This commit is contained in:
BIN
Image/7.png
Normal file
BIN
Image/7.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 71 KiB |
12
README.md
12
README.md
@@ -4,6 +4,8 @@
|
|||||||
RmEye是一个window上的基于att&ck现代EDR设计思想的威胁响应工具.
|
RmEye是一个window上的基于att&ck现代EDR设计思想的威胁响应工具.
|
||||||
不同于EDR,它轻量、高效.自身定位是轻量级威胁检出工具.
|
不同于EDR,它轻量、高效.自身定位是轻量级威胁检出工具.
|
||||||
而不是繁重的、需要付费的、效果不明的所谓的EDR
|
而不是繁重的、需要付费的、效果不明的所谓的EDR
|
||||||
|
RmEye基于att&ck模型,如果您对att&ck模型不熟悉,请先阅读相关文章后再使用:
|
||||||
|
https://key08.com/index.php/2022/08/09/1505.html
|
||||||
|
|
||||||
### 功能特点
|
### 功能特点
|
||||||
1. 基于att&ck设计.所有设计只是为了符合att&ck的攻击路径、攻击链(虽然规则里面没有标注T因为懒惰)
|
1. 基于att&ck设计.所有设计只是为了符合att&ck的攻击路径、攻击链(虽然规则里面没有标注T因为懒惰)
|
||||||
@@ -21,6 +23,10 @@ RmEye是一个window上的基于att&ck现代EDR设计思想的威胁响应工具
|
|||||||
7. 受限于Sysmon,很多att&ck的T没有覆盖,也无法覆盖.
|
7. 受限于Sysmon,很多att&ck的T没有覆盖,也无法覆盖.
|
||||||
请牢记,RmEye自身定位是轻量级威胁检出工具
|
请牢记,RmEye自身定位是轻量级威胁检出工具
|
||||||
|
|
||||||
|
### 最新新闻
|
||||||
|
2022/8/29:
|
||||||
|
增加uac提权检测插件`uac_bypass_detect`,但是受限于sysmon,没有办法获取RPC信息,因此只能检测一部分的UAC提权行为.并且有误报,请酌情考虑
|
||||||
|
|
||||||
### 检出截图
|
### 检出截图
|
||||||
威胁列表:
|
威胁列表:
|
||||||

|

|
||||||
@@ -34,6 +40,8 @@ apt样本:
|
|||||||

|

|
||||||
offic宏钓鱼:
|
offic宏钓鱼:
|
||||||

|

|
||||||
|
uac提权检测:
|
||||||
|

|
||||||
|
|
||||||
### 待做列表
|
### 待做列表
|
||||||
1. 更好的前端(目前是VUE-CDN模式,不太好,想换成VUE-CLI) 已经完成
|
1. 更好的前端(目前是VUE-CDN模式,不太好,想换成VUE-CLI) 已经完成
|
||||||
@@ -47,7 +55,7 @@ offic宏钓鱼:
|
|||||||
9. 完善目前的插件系统【目前重点】
|
9. 完善目前的插件系统【目前重点】
|
||||||
10. 云日志检测能力【目前重点】
|
10. 云日志检测能力【目前重点】
|
||||||
### 安装
|
### 安装
|
||||||
下载release( https://github.com/RoomaSec/RmEye/releases/tag/pre-release ),里面有客户端,服务端自行clone本项目
|
下载release( https://github.com/RoomaSec/RmEye/releases ),里面有客户端,服务端自行clone本项目
|
||||||
服务端是python3编写,安装完依赖库后输入
|
服务端是python3编写,安装完依赖库后输入
|
||||||
```
|
```
|
||||||
python webserver.py
|
python webserver.py
|
||||||
@@ -108,7 +116,7 @@ sysmon /uninstall
|
|||||||
2. 规则目前只支持rule_engine与yara的规则,其中yara的规则支持是以插件的形式支持
|
2. 规则目前只支持rule_engine与yara的规则,其中yara的规则支持是以插件的形式支持
|
||||||
3. 目前的规则字段完全依赖sysmon的字段,sysmon的字段请检查根目录下的provider.json(但是请记住纯小写,自行做大小写转换)
|
3. 目前的规则字段完全依赖sysmon的字段,sysmon的字段请检查根目录下的provider.json(但是请记住纯小写,自行做大小写转换)
|
||||||
|
|
||||||
规则目前有两种规则:
|
规则目前在`Server/rules`目录规则目前有两种规则:
|
||||||
rule_engine:
|
rule_engine:
|
||||||
如检测由CMD启动的ipconfig:
|
如检测由CMD启动的ipconfig:
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import global_vars
|
import global_vars
|
||||||
import yara
|
#import yara
|
||||||
import glob
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
rm_plugs_config = {
|
rm_plugs_config = {
|
||||||
"enable": False,
|
"enable": False,
|
||||||
|
|||||||
49
Server/plugins/uac_bypass_detect/prcoess_chain_detect.py
Normal file
49
Server/plugins/uac_bypass_detect/prcoess_chain_detect.py
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
import global_vars
|
||||||
|
import process
|
||||||
|
#import yara
|
||||||
|
|
||||||
|
rm_plugs_config = {
|
||||||
|
"enable": True,
|
||||||
|
"author": "huoji",
|
||||||
|
"description": "基于进程链的uac提权检测",
|
||||||
|
"version": "0.0.1"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def intergritylevel_to_int(str_name):
|
||||||
|
if str_name == 'high':
|
||||||
|
return 3
|
||||||
|
elif str_name == 'medium':
|
||||||
|
return 2
|
||||||
|
return 1
|
||||||
|
|
||||||
|
|
||||||
|
def rule_new_process_create(current_process: process.Process, host, raw_log_data, json_log_data):
|
||||||
|
if 'integritylevel' in json_log_data['data']:
|
||||||
|
integritylevel = intergritylevel_to_int(
|
||||||
|
json_log_data['data']['integritylevel'])
|
||||||
|
current_process.plugin_var['uac_flag'] = integritylevel
|
||||||
|
|
||||||
|
if 'uac_flag' not in current_process.chain.root_process.plugin_var:
|
||||||
|
current_process.chain.root_process.plugin_var['uac_flag'] = integritylevel
|
||||||
|
if integritylevel > current_process.chain.root_process.plugin_var['uac_flag']:
|
||||||
|
print('[uac bypass detect] detect uac bypass in process chain {}'.format(
|
||||||
|
current_process.path))
|
||||||
|
current_process.chain.root_process.plugin_var['uac_flag'] = integritylevel
|
||||||
|
current_process.set_score(300, "[UAC提权]进程权限等级变动")
|
||||||
|
return global_vars.THREAT_TYPE_PROCESS
|
||||||
|
# print('process chain: {} path: {} level: {} log level: {}'.format(
|
||||||
|
# current_process.chain_hash, current_process.path, integritylevel, current_process.chain.root_process.plugin_var['uac_flag']))
|
||||||
|
return global_vars.THREAT_TYPE_NONE
|
||||||
|
|
||||||
|
|
||||||
|
def rule_new_process_action(current_process, host, raw_log_data, json_log_data):
|
||||||
|
return global_vars.THREAT_TYPE_NONE
|
||||||
|
|
||||||
|
|
||||||
|
def rule_init():
|
||||||
|
print('[helloworld plugin] rule init')
|
||||||
|
|
||||||
|
|
||||||
|
def plugin_init():
|
||||||
|
print('[helloworld plugin] plugin init')
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
|
|
||||||
import json
|
import json
|
||||||
from sqlalchemy import false
|
|
||||||
import tools
|
import tools
|
||||||
import time
|
|
||||||
|
|
||||||
skip_process_path = ['c:\\program files\\rivet networks\\smartbyte\\raps.exe',
|
skip_process_path = ['c:\\program files\\rivet networks\\smartbyte\\raps.exe',
|
||||||
'c:\\program files (x86)\\sogouinput\\11.5.0.5352\\pinyinup.exe',
|
'c:\\program files (x86)\\sogouinput\\11.5.0.5352\\pinyinup.exe',
|
||||||
@@ -102,6 +100,7 @@ class Process:
|
|||||||
self.time = time
|
self.time = time
|
||||||
self.rmppid = ""
|
self.rmppid = ""
|
||||||
self.root_rmpid = ""
|
self.root_rmpid = ""
|
||||||
|
self.plugin_var = {}
|
||||||
self.md5 = md5
|
self.md5 = md5
|
||||||
self.user = user
|
self.user = user
|
||||||
self.chain: ProcessChain = None
|
self.chain: ProcessChain = None
|
||||||
@@ -150,6 +149,7 @@ class ProcessChain:
|
|||||||
self.rpc_process_chain = ""
|
self.rpc_process_chain = ""
|
||||||
self.time = root_process.time
|
self.time = root_process.time
|
||||||
self.host = root_process.host
|
self.host = root_process.host
|
||||||
|
self.plugin_var = {}
|
||||||
self.add_root_process(root_process)
|
self.add_root_process(root_process)
|
||||||
|
|
||||||
def get_operationlist(self):
|
def get_operationlist(self):
|
||||||
|
|||||||
@@ -306,6 +306,21 @@ rule = [
|
|||||||
'score': 30,
|
'score': 30,
|
||||||
'name': '从服务创建的进程'
|
'name': '从服务创建的进程'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'rules': [
|
||||||
|
'parentimage =~ ".*svchost.exe"',
|
||||||
|
'originalfilename =~ ".*werfault.exe"'
|
||||||
|
],
|
||||||
|
'score': 60,
|
||||||
|
'name': 'svchost.exe启动了werfault'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'rules': [
|
||||||
|
'parentimage =~ ".*werfault.exe"',
|
||||||
|
],
|
||||||
|
'score': 30,
|
||||||
|
'name': '从werfault创建的进程'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'rules': [
|
'rules': [
|
||||||
'originalfilename =~ ".*wscript.exe"',
|
'originalfilename =~ ".*wscript.exe"',
|
||||||
|
|||||||
Reference in New Issue
Block a user