惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
N
Netflix TechBlog - Medium
腾讯CDC
C
Check Point Blog
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
S
SegmentFault 最新的问题
F
Fortinet All Blogs
美团技术团队
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 司徒正美
F
Full Disclosure
Recorded Future
Recorded Future
D
DataBreaches.Net
博客园 - 【当耐特】
Martin Fowler
Martin Fowler
J
Java Code Geeks
I
InfoQ
Y
Y Combinator Blog
A
About on SuperTechFans
AI
AI
爱范儿
爱范儿
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Forbes - Security
Forbes - Security
W
WeLiveSecurity
M
MIT News - Artificial intelligence
雷峰网
雷峰网
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
Schneier on Security
Schneier on Security
The GitHub Blog
The GitHub Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Docker
Recent Commits to openclaw:main
Recent Commits to openclaw:main
量子位
V2EX - 技术
V2EX - 技术
Project Zero
Project Zero

博客园 - 紫雨轩 .Net

DNGuard Enterprise v3.56 released DNGuard Enterprise v3.30 released ComboBox 使用数据绑定时 Sorted 属性的bug DNGuard Enterprise v3.2 released DNGuard 企业版 v3.1 发布 DNGuard 专业版 v2.95 发布 DNGuard Enterprise v2.95 released 在 FlexGrid 控件中指定最右侧显示的列 .Net 中枚举AppDomains Windows 2003 上使用 Windows Live Writer DNGuard Enterprise v2.92 released - 紫雨轩 .Net DNGuard 标准版 v2.90发布 DNGuard Enterprise v2.90 released DNGuard Enterprise v2.82 released 采用Native 引导方式的.Net加密保护 C#中使用晚绑定实现压缩Access数据库 直接在.Net程序(C#)中执行 native code C#复杂表达式的问题 DNGuard HVM Trial V2.82 发布
.Net程序集的不同加载方式,以及其在内存中格式
紫雨轩 .Net · 2008-05-15 · via 博客园 - 紫雨轩 .Net

.Net程序集除了正常的有框架自动按需载入外,我们还可以通过反射手动载入程序集。
其中反射载入程序集有一种方式就是 以字节流的方式载入程序集。而不是直接从磁盘文件载入。
很多.Net压缩壳,和整体保护壳都采用了这种方式。

这种方式载入的程序集和从磁盘文件载入的程序集,其内存属性是不一样的。
字节流载入的内存属性是

MEM_MAPPED .
文件方式载入的内存属性是  MEM_IMAGE
(注:指使用api函数 VirtualQuery 获取的内存信息)

在 .Net 1.1中 这两种内存影像的布局是一样的,都是按照pe header的sections进行了内存映射的。

但是在 .Net 2.0 中这种情况变化了,字节流加载的程序集。在内存中的布局和它原始的字节流一样。没有按照pe header进行section的映射。

如果要进行程序集的整体dump,就需要考虑这两种不同的加载模式。
字节流加载的程序集,在获取Assembly的Location属性时会异常。

加密壳加密后的程序集,如果需要兼容后续使用压缩壳或整体加密壳再次保护,也需要在运行时考虑这种情况。
DNGuard 从2.6起就已经考虑处理了这种情况。