سورس سي شارب للفكرة الأخيرة:
يقوم بتوليد قيم عشوائية في كل مرة يشغل فيها اللودر
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.IO;
public class Program {
public static void Main() {
STARTUPINFO si = new STARTUPINFO();
PROCESS_INFORMATION pi = new PROCESS_INFORMATION();
CreateProcess("bios.exe",
null,
IntPtr.Zero,
IntPtr.Zero,
false,
CreateSuspended,
IntPtr.Zero,
null,
ref si,
out pi);
string RandomStrBuffer = Path.GetRandomFileName();
byte lpBuffer = Encoding.Unicode.GetBytes(RandomStrBuffer.Replace(".", ""));
IntPtr lpNumberOfBytesWritten = IntPtr.Zero;
WriteProcessMemory(pi.hProcess,
(IntPtr)0x00517A4F,
lpBuffer,
lpBuffer.Length,
ref lpNumberOfBytesWritten);
byte lpBuffer2 = {
0x90,
0x90,
0x90
};
IntPtr lpNumberOfBytesWritten2 = IntPtr.Zero;
WriteProcessMemory(pi.hProcess,
(IntPtr)0x00511B66,
lpBuffer2,
lpBuffer2.Length,
ref lpNumberOfBytesWritten2);
byte lpBuffer3 = {
0xBA,
0x4F,
0x7A,
0x51,
0x00,
0xC3,
0x90,
0x90,
0x90,
};
IntPtr lpNumberOfBytesWritten3 = IntPtr.Zero;
WriteProcessMemory(pi.hProcess,
(IntPtr)0x00511838,
lpBuffer3,
lpBuffer3.Length,
ref lpNumberOfBytesWritten3);
ResumeThread(pi.hThread);
}
[DllImport("kernel32.dll")]
static extern bool CreateProcess(string lpApplicationName,
string lpCommandLine,
IntPtr lpProcessAttributes,
IntPtr lpThreadAttributes,
bool bInheritHandles,
uint dwCreationFlags,
IntPtr lpEnvironment,
string lpCurrentDirectory,
ref STARTUPINFO lpStartupInfo,
out PROCESS_INFORMATION lpProcessInformation);
[DllImport("kernel32.dll")]
static extern bool WriteProcessMemory(IntPtr hProcess,
IntPtr lpBaseAddress,
byte lpBuffer,
int dwSize,
ref IntPtr lpNumberOfBytesWritten);
[DllImport("kernel32.dll")]
private static extern uint ResumeThread(IntPtr hThread);
public const uint CreateSuspended = 0x00000004;
}
public struct PROCESS_INFORMATION {
public IntPtr hProcess;
public IntPtr hThread;
public uint dwProcessId;
public uint dwThreadId;
}
public struct STARTUPINFO {
public uint cb;
public string lpReserved;
public string lpDesktop;
public string lpTitle;
public uint dwX;
public uint dwY;
public uint dwXSize;
public uint dwYSize;
public uint dwXCountChars;
public uint dwYCountChars;
public uint dwFillAttribute;
public uint dwFlags;
public short wShowWindow;
public short cbReserved2;
public IntPtr lpReserved2;
public IntPtr hStdInput;
public IntPtr hStdOutput;
public IntPtr hStdError;
}
رابط الملف التنفيذي للتجربة:
https://up.top4top.net/downloadf-1108lleyu1-rar.html