当前位置:网站首页>Implementation of window encryption shell
Implementation of window encryption shell
2022-06-27 02:52:00 【Sili can't write code】
Preface
Encrypted shell is a relatively elementary shell , At the end of this article, there are two different implementations in the source code link . Implementing encryption granularity is completely different .
Shell overview
The shell can generally play the role of compression and reverse engineering .
DbgView.exe Is a primitive program ,Dbgview_pack.ext Is an encrypted program , You can see that the disk size is reduced by half .
Of course, the source code of this article is not redirected, so the operation may crash . But there are not many problems with programs that do not need redirection . Such as the minesweeping program in the source code .

The schematic diagram of the encryption shell in this paper :
Source build
Let's first write a GUI The program lets the user choose an encrypted exe Program .
Ui The code writing project skips 、
We often see the event handling after clicking :
//szSrcExePath Shelled exe
//szDstExePath Output the shell exe
bool CPacker::Pack(const char const* szSrcExePath, const char const* szDstExePath)
{
/* * 1. analysis PE */
if (!AnalyzePE(szSrcExePath))
{
return false;
}
/* * Get import table information */
if (!GetImpInfos())
{
return false;
}
/* * 2. Compression joint Get compressed data */
if (!Compress())
{
return false;
}
/* * 3. Get shell code */
if (!GetCode())
{
return false;
}
/* * 4. Tectonic belt shell PE */
//1. Prepare section data
if (!GetSecData())
{
return false;
}
//2. Construct a new section table
if (!GetNewSecHdrs())
{
return false;
}
//3. Construct new PE head
if (!GetNewPeHdr())
{
return false;
}
//4. write file
if (!WriteNewPE2File(szDstExePath))
{
return false;
}
return true;
}
We will explain according to the sequence of function calls
Source link
Compress the sections separately , Erase the imported table
Encryption shell source code Erase the import table, etc
Original EXE The whole encryption . It is divided into two warehouses for storage One is shellcode Decompress , A compression tool
边栏推荐
- PAT甲级 1020 Tree Traversals
- paddlepaddle 19 动态修改模型的最后一层
- Mmdetection uses yolox to train its own coco data set
- Parameter estimation -- Chapter 7 study report of probability theory and mathematical statistics (point estimation)
- C language -- Design of employee information management system
- Learn Tai Chi Maker - mqtt (VI) esp8266 releases mqtt message
- Geometric distribution (a discrete distribution)
- PAT甲级 1025 PAT Ranking
- Super détaillé, 20 000 caractères détaillés, mangez à travers es!
- servlet与JSP期末复习考点梳理 42问42答
猜你喜欢
随机推荐
使用命令行安装达梦数据库
清华&华为等 综述 | 语义通信:原则与挑战
Detailed explanation of ThreadLocal
three. JS domino JS special effect
How does source insight (SI) display the full path? (do not display omitted paths) (turn off trim long path names with ellipses)
Paddlepaddle 20 implementation and use of exponentialmovingaverage (EMA) (support static graph and dynamic graph)
Leetcode 785: judgment bipartite graph
h5液体动画js特效代码
pytorch_grad_cam——pytorch下的模型特征(Class Activation Mapping, CAM)可视化库
servlet与JSP期末复习考点梳理 42问42答
Overview of Tsinghua & Huawei | semantic communication: Principles and challenges
Uni-app 之uParse 富文本解析 完美解析富文本!
Flink学习3:数据处理模式(流批处理)
YaLM 100B:来自俄罗斯Yandex的1000亿参数开源大模型,允许商业用途
正则表达式:语法
H5 liquid animation JS special effect code
Qingscan use
Pat class a 1024 palindromic number
Learning Tai Chi Maker - mqtt Chapter 2 (II) esp8266 QoS application
I earned 3W yuan a month from my sideline: the industry you despise really makes money!









