Unpacking Storm Worm : Code and Import Address Table onto the heap

深入大模型-52-Harness综述之(二)四大子系统 一个Harness都由四个子系统拼成,Agentic Loop是主干,四个子系统是Tool系统、Memory & Context、Guardrails,再加上一个把它们优雅组织起来的Skill系统。 阅读详情
 As part of my series of blogs about custom packers, this blog presents techniques to quickly unpack the Storm Worm packer, even if the unpacked code is executed onto the heap, the code is relocated, and the Import Address Table is also on allocated memory.

Storm Worm attackers have been using many different packers, and even if their primary goal isn't to protect against reverse engineering, they have introduced various techniques to slow down analysis. Today's main trick is the execution of code onto the heap. This prevents process dumpers from working, because they dump to disk only the code loader (the actual process you are executing), and not the malicious code.

This is by no means a new technique, but I haven't seen many tutorials about unpacking packers that load code onto the heap. In the example you are about to view, the attackers' implementation is flawed, and it allows unpacking in a very short time. For obvious reasons, I'm not going to discuss the flaws, but I will show you how to unpack the file quickly.

Finding the Original Entry Point

The packer loader is rather linear, so finding the "jump" to the entry point is fairly trivial. Because it's all linear, simply scroll down through the code, until you find suspicious code like this:

We can put a breakpoint there and then execute the malware. By looking at the content of EBX, we see an address that is below the process image space. In my case, the address was 0x332DC8, and this is obviously not inside our executable image.

The loader allocated memory, then moved the code to be executed onto the heap, applied relocation, and then emulated the Windows loader to load the imports. (Emulate sounds exciting, but it's basically just doing the Windows PE loader job, and every packer does that.) The relocation is applied because the file never knows exactly where it will be executed from, since the code is executed onto the heap.

Dumping the real code

Because the executed code isn't within the process, standard memory dumpers won't dump the interesting bit, just the malware loader. Standard memory dumpers simply read the process memory and dump from ImageBase to ImageBase+SizeOfImage. In order to dump this one, you can use LordPE and use Dump Memory Region.

Just select the memory region corresponding to the original entry point address. In my case, since our address was 0x382DC8, the best memory region to dump is the one starting at 0x380000:

After a quick look at our dump with a hex editor, we realize that we have complete headers of the original unpacked file. Pretty much as we saw in my last blog, we have different headers in memory, one PE file for the malware, and one PE file for the "packed" loader.

Fixing the dumped executable

Since we have the original headers, we don't have to bother recreating them from scratch. We simply need to update them, since they are still in their original state, which means that the Raw Address of every section is not matching its Virtual Address equivalent. Indeed, when you dump a PE file from memory, the Raw information of every section must be updated so that it matches its virtual counterpart.

We also need to fix the import table. The packer loader updated the imports with Windows function addresses; therefore, our dump has hardcoded pointers to Windows functions. The file can still run, but the import table isn't really valid. We don't even have to use Import Reconstructor for this; we can do it statically with LordPE too.

The reason we can do it statically is because of the way the imports are working. If you are interested, I invite you to read about FirstThunk and OriginalFirstThunk in your favorite PE file format documentation.

So, open LordPE, go into Options, and check/uncheck as shown on the next picture. Basically you just have to uncheck the option for Wipe Relocation, and check FixDump (this is the Raw = Virtual fixing thing). You can see the settings here:

Also, don't forget to update the ImageBase of your file. By default it was 0x400000, but we have seen that the file was relocated. In my case, it was loaded at 0x380000, so I changed the ImageBase to 0x380000.

At this point, our file is totally unpacked. Imports were reconstructed (because we had all the needed information), the sections were realigned, and everything was nicely fixed. As you can see below, the file can now be analyzed in IDA with no problem:

Because of its design flaws, this packer was definitely very easy to unpack, probably a lot more so than the authors initially thought. Hopefuly, this blog gives you some hints on how to unpack packers that move the code and Import Address Table onto the heap.

Security Researcher: Nicolas Brulez

卷积码和Turbo码 通信原理相关博文目录:目录我们常在移动通信中遇到的卷积码就是一种非分组码,卷积码和信号处理中的卷积运算有关系吗?是不是就是信号处理中的卷积运算,先看看编码器的编码原理再说:下面是一个比较实用的卷积码编码器:它有三个移位寄存器D0,D1,D2和三个模2加法器,以及一个旋转开关组成,编码前,先将各级移位寄存器清零:现在假设输入的信息码元是1101:当输入的第一个码元为1时,三个模2加法器计算的结果都为... 阅读详情

相关推荐

UniTouch:多模态触觉对齐技术如何重塑零样本跨模态应用

UniTouch模型通过创新的多模态触觉对齐技术,成功将触觉数据映射到通用的视觉-语言嵌入空间,解决了触觉模态的“孤岛困境”。该技术利用对比学习和传感器特定标记,实现了高质量的零样本学习能力,使模型无需额外训练即可完成触觉分类、描述等任务,并能驱动跨模态生成,为机器人、VR和智能制造等领域提供了强大的触觉理解新范式。

weixin_29044713的博客 409

http://xing8s8.com/index.php,www.5200st.com

HTTP/1.1 301 Moved PermanentlyServer: nginxDate: Mon, 18 May 2020 01:56:28 GMTContent-Type: text/htmlContent-Length: 162Connection: keep-aliveKeep-Alive: timeout=20Location: https://www.5200st.com/Str...

weixin_42453228的博客 10万+

记一次springboot集成海康威视SDK过程

一开始没有接触过物联网这块,走了很多弯路,后面还是自己一点点摸索出来的。有个项目,需要对海康的门禁设备进行集成,后台统一管理设备,进行设备人脸数据的下发、删除等操作。3.我还接入了门禁设备的事件监听,门禁所有的事件都会上报到后台服务,这块代码有需要的可以找我。在linux系统中,sdk我使用的是绝对路径,把Linux版本的文件放到服务时,Acs文件夹下的 各个Manage都有现成的代码,可以根据自己的需要调用即可。路径也不要有中文,切记!2.sdk的存放路径不要有中文,不然会出现很多奇怪的问题。

huang_xiaoen的博客 2350

我的新地址 http://www.cppblog.com/flyingxu/

我的新地址 http://www.cppblog.com/flyingxu/这里的文章不会移过去,也不会继续更新,保持现状。以后会不会重新开始更新,也不确定。

No more love in C++, can't live on MFC... 12万+

鸿蒙进阶——HDI及IDL硬件接口IPC框架小结

HDI(Hardware Device Interface):OpenHarmony硬件设备接口,定义系统中跨进程通信的接口,实现服务间的跨进程通信

最美不过,心中有梦,身旁有你! 3910

AOSP Android14 Launcher3——动画核心类QuickstepTransitionManager详解

是一个复杂但核心的动画管理器。它利用 Android 的远程动画机制,拦截系统默认的窗口切换,并替换为高度定制、与 Launcher UI 深度集成的平滑过渡动画。当用户从一个应用程序通过手势或按键返回到 Launcher (桌面) 时,它负责创建和运行动画,使得应用程序窗口能够平滑地过渡(通常是缩小)到 Launcher 上的对应目标(图标、小部件或屏幕中心),同时 Launcher 界面元素(工作区、背景等)恢复显示。计算动画所需的各种参数,如窗口的起始/结束位置、缩放比例、透明度、圆角、裁剪区域等。

Micheal_Yang's Blog 2673

工具网址

查询依赖坐标及版本https://mvnrepository.com/

LuckyGuyy的博客 3万+

从零搭建 C# + YOLO 工业视觉系统:从模型训练到上位机部署(工业级落地)

做工业质检、自动化生产线的同学都懂:一套能用的工业视觉系统,既要“检测准”,又要“界面易操作”,还要“部署稳”。之前帮某电子厂做PCB缺陷检测,一开始用Python+YOLO做检测核心,QT做上位机,结果踩了无数坑:Python推理速度波动大,QT和Python跨语言集成繁琐,数据传递容易卡顿;后来换成C# + YOLO的组合,直接打通了“模型训练-上位机开发-工业部署”全流程——C#的WinForms/WPF开发上位机高效,工业相机SDK支持完善;

这里只有干货:从 Modbus 通信到 MES 对接,从 YOLO 训练到工控机部署,带你搞定工业软件开发全流程。 737

循环嵌套(多层 for 循环)

表:order(订单表,order_id, user_id)、user(用户表,user_id, user_name)✅ 优化:先查所有订单,拿到所有 user_id 批量 in 查询,内存 join。✅ 优化:先把优惠券转 HashMap,单层循环查找(hash 查找 O (1))SQL 只有 2 次,O (1) 数据库查询,内存遍历 O (n)。需求:查询所有订单列表,同时带出每个订单对应的用户名称。需求:订单列表、优惠券列表,把订单匹配对应的优惠券名称。复杂度:O (M+N),非常快。

weixin_43732943的博客 215

RK3588 C++ MeloTTS 推理

本文介绍了基于RK3588平台和RKNN工具链实现的端侧语音合成(TTS)系统。该系统支持中英文混合输入处理,通过自动合并英文单词、转换标点符号等方式预处理文本,并将其转换为音素和声调序列。核心推理流程包含编码器、中间处理和解码器三个阶段:编码器将音素序列转为隐藏状态,中间处理调节音调和语速,解码器生成最终波形。代码示例展示了输入数据设置和模型推理过程,利用RK3588内置NPU实现高效语音合成。该系统展现了在边缘计算设备上实现复杂AI任务的能力。

J。 200

R语言生存分析之限制性立方样条分析:样条回归、和多项式回归有什么不同?是否存在非线性关系、限制性立方样条cox回归模型

R语言生存分析之限制性立方样条分析:样条回归、和多项式回归有什么不同?是否存在非线性关系、限制性立方样条cox回归模型

statistics+insight+vista+power 635

Python+Agent入门笔记(六):记忆和状态,从“一次性问答”到“能用助手”

滑动窗口的缺点很明显:被扔掉的信息就真没了。如果用户第一轮说“我不吃辣”,隔了二十轮让他推荐餐厅,模型已经忘了。定期把旧的对话压缩成一段总结,作为一条特殊的消息插进去。"""把除 system 和最近 keep_recent 条以外的消息,压缩成一条摘要。返回新的 messages 列表。"""# 把旧消息拼成纯文本,让模型总结content = f"[工具结果]把除 system 和最近 keep_recent 条以外的消息,压缩成一条摘要。返回新的 messages 列表。

qq_41241612的博客 108

uniapp | vue2 | vue3 - 解决调用天地图功能服务时 http 网络请求报错 net::ERR ABORTED 503(Service Temporarily Unavailabl)

vue,uni-app,天地图,请求报错,503,请求失败,map.tianditu,天地图503,天地图请求503,接口503错误怎么办,vue天地图,uniAPP天地图,获取定位接口服务器报错503,获取当前定位,定位功能,IP属地定位,天地图服务器报错,如何解决报错,net::ERRABORTED503(ServiceTemporarilyUnavailabl),GET,POST,服务暂时不可用,react天地图,一直等待吗,报错怎么办,定位报错,轨迹,经纬度,天地图服务器503,在vue2

🏆 前端领域优质创作者 4439

【数据结构-5】单链表的实现

单链表,具体来说是单向的、不带头的、不循环的链表。链表由一个一个节点组成,每个节点分为数据域和指针域,数据域存放数据,指针域存放下一节点的地址。这样,就可以根据指针域中的地址找到下一个节点,节点就串起来了构成了单链表。

a bit 215

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

本地chatbot4--引入LangGraph

上一节实现了chatbot的连续调用工具的功能,但目前流程还是提示词→模型→解析→调用工具(可选)→输出线性的一条路走到底(LangChain)只适合简单线性任务(问答、摘要、简单RAG)agent的本质是:“模型决定调工具→执行→结果喂回模型→再决定……直到完成”。举例:读日志 → 解析 ─失败→ 重试(≤3次) ─→ 退出│成功↓算统计 → 对比历史 → 生成报告 → [人工审核卡点] → 发送。

weixin_45859446的博客 103

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

C# 数据结构和特殊类型

.NET Core(现称.NET)提供丰富数据结构,优化性能与开发效率。日常开发首选List<T>和Dictionary<TKey,TValue>;高性能场景推荐Span<T>与Memory<T>减少内存分配;并发环境使用ConcurrentDictionary等线程安全集合;避免非泛型集合如ArrayList。

cccloveforever的博客 747

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

C++ 入门笔记(十七):list 入门 —— 为什么 list 不能 sort?

第17课:用大白话讲清 list 的双向链表结构、哨兵头、push_back 四步、迭代器封装、merge 与 splice 的区别,以及 vector 排序为什么常比 list 快。

wo_jack的博客 251

list

的底层是双向链表结构,双向链表中每个元素存储在互不相关的独立节点中,在节点中通过指针指向其前一个元素和后一个元素。,因此反向迭代器的实现可以借助正向迭代器,即:反向迭代器内部可以包含一个正向迭代器,对正向迭代器的接口进行包装即可。是可以在常数范围内在任意位置进行插入和删除的序列式容器,并且该容器可以前后双向迭代。迭代到该位置,在这段位置上迭代需要线性的时间开销;最大的缺陷是不支持任意位置的随机访问,比如:要访问。还需要一些额外的空间,以保存每个节点的相关联信息。个元素,必须从已知的位置。

xie0510_的博客 293

3.链表相关知识点

链表

2501_93884468的博客 436

上万数据的批量插入

当数据达到上万上十万的时候,如何批量插入

junxunfs的博客 46

软件商店常见问题标准处理流程

从底层软件源来看,/etc/apt/sources.list配置错误、源地址失效、公网与内网离线源混用、ARM64与x86_64架构源串用,以及DNS解析异常、系统代理配置错误,都会导致商店无法获取应用数据;打开该应用,确认可正常运行;软件商店作为系统内置的图形化软件分发与安装入口(UKUI桌面配套组件,底层依赖APT软件源),承担着应用软件的浏览、搜索、下载、安装、升级与卸载等核心功能,是终端软件部署与管理的关键通道。覆盖软件商店启动、页面加载、应用下载、安装、卸载、搜索、自身更新等全部业务场景。

qq_39496637的博客 307

【AI 开发从入门到进阶 · 10】收官篇:LoRA 微调、模型评估、推理加速与生产部署全链路

本文系统梳理了大模型微调与生产落地的全流程,从决策是否微调、优选LoRA技术方案,到代码实现、效果评估、推理加速与FastAPI服务封装,最终构建可迭代的生产级AI系统。强调“逐级升级”原则,倡导以数据闭环驱动优化,避免技术冲动。全系列贯穿工程化思维,提供可复用模板与实战建议,助力开发者从模型训练迈向稳定可用的AI服务部署。

信息安全领域优质创作者|操作系统领域专家 128

ARIA规范

ARIA用来补充原生HTML缺失的语义,原则:优先原生标签,ARIA仅做补充。 ARIA角色role:定义组件身份,分为地标角色、构件角色、文档角色;构件角色用于自定义弹窗、tab、下拉菜单等复杂组件; ARIA状态与属性:以aria-开头,描述组件实时状态;常用:aria-label、aria-labelledby、aria-describedby、aria-hidden、aria-expanded、aria-selected、aria-modal、aria-live; 常用场景:图标按钮用aria-l

2401_83227843的博客 472

LangGraph(03):状态归约、并行更新与消息管理

并行节点写入报错?历史消息无法清理?本文拆解 LangGraph 状态归约与消息增删改机制,带你精确控制复杂工作流状态。

专注于 Agent 工程、AI 产品、Harness Engineering、LLM 算法等方向,OpenMathModel、Nivik 等开源项目作者 142

LangGraph 的分离思想总结

LangGraph 的分离思想,本质上是对"高内聚、低耦合"这一经典工程原则在 LLM 应用领域的落地。它通过状态与逻辑分离、节点职责分离、控制流与执行分离、计算与持久化分离、编排与实现分离五个层面,把一个难以维护的"大黑盒"拆解成一组可组合、可测试、可观测的部件。理解这套分离思想,比记住 API 更重要——因为当你面对新的智能体场景时,真正指导你做出合理拆分的,正是这些分离原则。

张晨光老师的播客 413

Java基础:泛型、类型擦除与 PECS 原则

泛型允许类、接口和方法使用类型参数,把许多类型检查提前到编译期,减少显式类型转换,提高代码复用性。例如。

cjpabc的博客 464
上一篇: 感觉比较好的hips+av配置方案
下一篇: 最新dns漏洞相关
iiprogram
博客等级 码龄25年 1068粉丝 1515原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值