Skip to content
View in the app

A better way to browse. Learn more.

Kaspersky Support Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

”入侵防御-资源限制“模块无法记录事件日志

使用版本:

2025-04-08124900.thumb.jpg.696204a58a288d453e2393bcbc822fc1.jpg

 

遇到的问题:

我对一些文件夹设置了访问限制,规则确实生效了。没有授权的程序无法对文件夹内容进行操作。但是并没有在【报告】里产生事件日志,理论上是会记录日志的。

如何复现:

我创建了一个针对“F:\Temp\test\”目录的规则:

2025-04-08125253.thumb.jpg.b279b21fd6850466069167768577e58c.jpg

在该目录内有一个test.txt文本文件,文件内容为"hello"。

写了一个简单的python脚本,读取该文本内容并打印。

import os

def read_file(file_path):
    """
    读取指定路径的文本文件并打印内容到控制台
    
    Args:
        file_path (str): 文件的完整路径
    """
    try:
        # 检查文件是否存在
        if not os.path.exists(file_path):
            print(f"错误: 文件 '{file_path}' 不存在")
            return
        
        # 检查是否是文件
        if not os.path.isfile(file_path):
            print(f"错误: '{file_path}' 不是一个文件")
            return
        
        # 打开并读取文件内容
        with open(file_path, 'r', encoding='utf-8') as file:
            content = file.read()
            
        # 打印文件内容
        print("文件内容:")
        print("-" * 50)
        print(content)
        print("-" * 50)
        
    except UnicodeDecodeError:
        print("错误: 无法使用UTF-8编码读取文件,可能是二进制文件或使用了其他编码")
    except PermissionError:
        print(f"错误: 没有权限读取文件 '{file_path}'")
    except Exception as e:
        print(f"读取文件时发生错误: {e}")

def main():
    file_path = r'F:\Temp\test\test.txt'
    read_file(file_path)

if __name__ == "__main__":
    main()

脚本执行结果:

错误: 没有权限读取文件 'F:\Temp\test\test.txt'

查看【报告】,没有事件日志记录。(该周内没有任何日志,是因为我尝试重装了卡巴斯基,试图解决该问题。)

2025-04-08125540.thumb.jpg.9e170f255f912cb04391096440d437ce.jpg

 

然后我又尝试了更简单的测试,将一个视频文件放入该目录内,然后使用vlc播放器打开该视频文件。VLC播放器提示无法打开,说明规则成功阻止了VLC读取视频文件,但是报告日志依然是空的。

Edited by SDEa
添加空日志说明

Featured Replies

Hello,

我想请问你是在 交互式 保护模式下吗?

  • The topic was locked
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.