当前位置:网站首页>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
边栏推荐
- JWT certification process and use cases
- Flink learning 4:flink technology stack
- Flink learning 5: how it works
- ORM cache package for laravel
- Yalm 100b: 100billion parameter open source large model from yandex, Russia, allowing commercial use
- PAT甲级 1020 Tree Traversals
- 记录unity 自带读取excel的方法和遇到的一些坑的解决办法
- Constraintlayout Development Guide
- YaLM 100B:来自俄罗斯Yandex的1000亿参数开源大模型,允许商业用途
- Flink学习4:flink技术栈
猜你喜欢

H5 liquid animation JS special effect code

docker部署redis集群

Qingscan use

ESP8266

I earned 3W yuan a month from my sideline: the industry you despise really makes money!
![455. distribute biscuits [distribution questions]](/img/51/c7544d0eaa121cd461ffa678079473.jpg)
455. distribute biscuits [distribution questions]

DAMA、DCMM等数据管理框架各个能力域的划分是否合理?有内在逻辑吗?

PAT甲级 1018 Public Bike Management

Introduction to stm32
![[array] sword finger offer II 012 The sum of left and right subarrays is equal | sword finger offer II 013 Sum of two dimensional submatrix](/img/e4/7bae2a109dcf5e2a8f032e73b89479.png)
[array] sword finger offer II 012 The sum of left and right subarrays is equal | sword finger offer II 013 Sum of two dimensional submatrix
随机推荐
一文教你Kali信息收集
PAT甲级 1020 Tree Traversals
servlet与JSP期末复习考点梳理 42问42答
Memcached basics 11
Would rather go to 996 than stay at home! 24 years old, unemployed for 7 months, worse than work, no work
mmdetection 用yolox训练自己的coco数据集
dat. gui. JS star circle track animation 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)
TopoLVM: 基于LVM的Kubernetes本地持久化方案,容量感知,动态创建PV,轻松使用本地磁盘
Paddlepaddle 21 is implemented based on dropout with 4 lines of code droplock
Learn Tai Chi Maker - mqtt (VIII) esp8266 subscribe to mqtt topic
Flink learning 4:flink technology stack
Docker deploy redis cluster
Brief introduction of 228 dropout methods of pytorch and fast implementation of dropblock with 4 lines of code based on dropout
Leetcode 785: judgment bipartite graph
元透实盘周记20220627
Shell script series (1) getting started
Press key to control LED status reversal
Don't be brainwashed. This is the truth about the wages of 90% of Chinese people
学习太极创客 — MQTT(九)ESP8266 同时订阅和发布 MQTT 消息