Code Perversion

by tibbar @ 2006-02-16 - 23:57:49

A little project of mine has been to write a complete code pervertor that would actually modify the opcodes of an executable, to perform equivalent operations but using different opcodes. This would be the ultimate method of "crypting" a file, since the executable in memory would still remain unique and undetected.

I therefore set about creating an engine that modifies the code with equivalent operations.

For instance,

mov EAX, 5;

is equivalent to:

push 5; pop EAX;

so I developed a library of equivalent operations for every x86 instruction commonly used. The engine will:

1) disassemble each instruction in a section of code;
2) select a random equivalent operation;
3) calculate extra space required to fit new equivalent operations and insert space in code;
4) assemble the equivalent operations.
5) scan entire code section looking for jmp's, jcc's, call's and adjusting the address they reference to allow for the extra space inserted in step 3.

Now, this actually has been done before. Zombie wrote code pervertor which could achieve this but only for instructions that have an equivalent instruction of equal size in bytes when assembled. I will be taking this to the next level.

The engine is currently mid-way through development and uses ollydbg's disassembler engine to perform the tedious task of disassembling each instruction.

While it's not complete, here's how it is working on a stub used in a program called Code Crypter that I wrote a while back.

the table view makes it easy to see how it is mutating each opcode. This was using a very limited library of equivalent opcodes for testing purposes.

The big problem at moment is handling things like JMP EAX. I have to use a little stub to adjust for code movement, which is not quite working yet.

The encrpytion process is recursive and pretty slow. It takes about 30 minutes to fully mutate a typical 100k executable. This is because each time it swaps an opcode for an equivalent sequence of opcodes, it must adjust all the JXX, JMP, CALL's in the code, for the padded space added by inserting the new code.

Hopefully I will get some time to work on this again soon.

Tibbar.

源码直接下载地址: https://pan.quark.cn/s/a4b39357ea24 过采样与欠采样构成了数字信号处理领域中两种基础的采样策略,它们在工程实践应用时各自展现出独特的长处与短处及适用情境。以下将深入阐释这两种采样方法的运作机制,并对它们在实际操作中的区别进行细致对比。 我们首先阐释过采样的核心概念。过采样(Oversampling)一般是指运用高于必要标准频率对模拟信号实施采样。举例而言,当信号频率为70MHz且信号带宽为20MHz时,依据奈奎斯特采样准则,理论上采样频率只需略高于40MHz(即信号带宽频率的两倍)即可达成无失真采样。然而,在现实操作中,系统构造者常常会采用超过140MSPS(每秒百万次采样)的采样速率,这通常超出理论所需。过采样的主要不利之处涵盖:提升ADC输出数据速率,引发FPGA的时序挑战;增大功耗、ADC及FPGA的制造成本。尽管存在这些不足,过采样依然具备其有利之处,例如可提供处理增益、频率规划的伸缩性以及能够处理更宽的信号带宽。 接下来,我们探讨欠采样的基本原理。欠采样(Undersampling)是指以低于理论标准频率对信号进行采样,这在处理高输入信号频率时尤为有效。例如,针对70MHz的中频(IF)信号,通过欠采样能够采用低于40MHz的采样频率进行采样,从而将数据速率降至FPGA,减少时序挑战,节省能量消耗和成本。实现欠采样的关键设计考量在于它能够在系统设计中达成所需的ADC动态性能。 欠采样的优势体现为能够简化硬件构造,比如降低对高速数据捕获的需求,并且在设计条件允许时,可选用较慢的ADC来削减成本。然而,欠采样技术也存在其局限性,例如在ADC的非理想表现可能导致非线性失真,诸如二阶(HD2)和三阶(HD3)谐...
源码链接: https://pan.quark.cn/s/3523d8c4b5d2 ### Qt5.9.1开发的应用程序转换为可安装`.exe`文件的详细流程 #### 一、概述 本资料将系统性地阐述如何将基于Qt5.9.1版本或其他Qt框架版本开发的应用程序转化为可直接安装的`.exe`安装文件。这一过程不仅适用于Qt5.9.1版本,对其他版本的Qt框架开发的应用同样适用。 #### 二、前期准备 在开展相关操作前,需确保已达成以下准备要求: 1. **开发环境配置**: 利用Qt5.9.1或其他版本完成应用程序的开发工作,并保证能够顺利编译出可执行程序。 2. **NSIS安装**: NSIS(Nullsoft Scriptable Install System)作为一个开源的Windows安装系统,能够支持创建专业的安装程序。用户可从官方渠道或可靠来源获取最新版的NSIS并进行安装。 #### 三、制作可执行程序的流程 ##### 3.1 打包应用程序文件 需要将已开发好的Qt应用程序的所有组件和资源整合到一个文件夹中,例如命名为`Qt_Video`。确保该文件夹内包含所有必要的库文件和资源文件,以便应用程序能够独立运行。 ##### 3.2 压缩文件随后,将整个`Qt_Video`文件夹压缩成`.zip`格式的文件。这一步骤可通过Windows内置的压缩工具或第三方软件完成。 ##### 3.3 创建安装文件接下来,借助NSIS将压缩文件转化为安装文件。具体操作如下: 1. **启动NSIS**: 运行NSIS软件并进入其主界面。 2. **选择基于ZIP的安装模式**: 在主界面中选取“**Installer based on ZIP file**...
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值