mirror of
https://github.com/dobin/ShellcodeObfuscationLab
synced 2026-06-08 13:53:31 +00:00
data: add random_shellcode source files too
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
||||
char caesar[42] = {0xc, 0xb, 0x81, 0xd, 0x72, 0xd, 0x80, 0xd, 0x81, 0xd, 0x72, 0xd, 0x76, 0xd, 0x7b, 0xd, 0x80, 0xd, 0x87, 0xd, 0x84, 0xd, 0x7c, 0xd, 0x72, 0xd, 0x76, 0xd, 0x7b, 0xd, 0x80, 0xd, 0x87, 0xd, 0x84, 0xd, 0x7c, 0xd, 0x3f, 0xd, 0x3f, 0xd};unsigned char shellcode[42] = { 0x00 };
|
||||
|
||||
for (int i = 0; i < sizeof(caesar); i++)
|
||||
{
|
||||
if ((caesar[i] - 13) < 0)
|
||||
{
|
||||
printf(""); // because defender
|
||||
shellcode[i] = caesar[i] + 256 - 13;
|
||||
}
|
||||
else
|
||||
{
|
||||
shellcode[i] = caesar[i] - 13;
|
||||
}
|
||||
}
|
||||
|
||||
int idx = 0;
|
||||
while (idx < sizeof(shellcode))
|
||||
{
|
||||
if (idx == (sizeof(shellcode) - 1))
|
||||
{
|
||||
printf("0x%02x ", (unsigned char)shellcode[idx]);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("0x%02x, ", (unsigned char)shellcode[idx]);
|
||||
}
|
||||
idx++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user