吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 124|回复: 4
上一主题 下一主题
收起左侧

[C&C++ 原创] xpack压缩壳源码,学习纯汇编写代码

  [复制链接]
跳转到指定楼层
楼主
西风 发表于 2026-7-6 12:36 回帖奖励
本帖最后由 苏紫方璇 于 2026-7-7 01:21 编辑

20年前用纯汇编写的压缩壳,以压缩为主,有点小花、小反调试都很简单,
主要功能就是加密原EXE,压缩体积,模拟windows填充api,
我不确定在现在的64位系统能工作正常哈,我提供的是源代码,可以自己修改一下。
界面很简陋,如图,在20年前能用纯汇编写还是比较牛逼的了。

当然好汉不提当年勇,这款壳原来在《黑客防线》中有刊登。
在发表模块中没有找到汇编模块,就放C模块发表了,请版主见谅。
关键代码如下,shellcode的部分,这款壳没有linkcode。
[Asm] 纯文本查看 复制代码
BigFlower
        call myjmp
        add        esi,dword ptr[ebx+(filehandle-shellcode1)] ;;;;导入表真实地址
        BigFlower
        mov dword ptr[ebx+(ApiCount-shellcode1)],0
       
        call CheckGetProc
        BigFlower
        call myjmp
        ;单独加密一个DLL

                push        ebx
                push        esi
                mov        eax,dword ptr[esi+12]
                add        eax,dword ptr[ebx+(filehandle-shellcode1)] ;;;dll名字
                push        eax
                BigFlower
                call        dword ptr[ebx+(secondfun-shellcode1)]  ;;;getmodulehandle
                .if        eax==0
                        pop        esi
                        pop        ebx
                        push        ebx
                        push        esi
                        mov        eax,dword ptr[esi+12]
                        add        eax,dword ptr[ebx+(filehandle-shellcode1)]
                        push        eax
                        BigFlower
                        call         dword ptr[ebx+(thirdfun-shellcode1)]  ;;;loadlibrary
                       
                       
                .endif
                pop        esi
                pop        ebx
                push        esi
               
               
                mov        edx,eax  ;;;;;edx存放dll模块句柄
                mov    [ebx+(DllName-shellcode1)],eax
                mov        eax,dword ptr[esi]  
                mov        edi,dword ptr[esi+16]
                add        edi,dword ptr[ebx+(filehandle-shellcode1)] ;;;;IAMGE_THUNK_DATA真实地址
                .if        eax==0
                        mov        eax,dword ptr[esi+16]
                       
                .endif
                mov        esi,eax
                BigFlower
                add        esi,dword ptr[ebx+(filehandle-shellcode1)] ;;;IMAGE_THUNK_DATA真实地址
                .while        dword ptr[esi]!=0
                        .if        (dword ptr[esi])&80000000h ;;;不为零则以序号输入
                       
                                mov        eax,dword ptr[esi]
                                and        eax,7fffffffh
                                push        ebx
                                push        edx
                                push         esi
                                push        edi
                               
                                push        eax
                                push        edx
                                call        GetApiAddress2
                                pop        edi
                                mov        dword ptr[edi],eax
                                pop        esi
                                pop        edx
                                pop        ebx
                        .else       
                                mov        eax,dword ptr[esi]
                                add        eax,2
                                push        ebx
                                push        edx
                                push         esi
                                push        edi
                                add        eax,[ebx+(filehandle-shellcode1)]
                               
               

                                push   eax
                                push   edx
                                ;call  GetApiAddress2
                  
                                call dword ptr [ebx+(aGetProcAddress-shellcode1)]

                                pop        edi
                              
                               
                           ;检测是否有硬件断点
                              
                                               
                                ;加密IAT
       
                  
                                BigFlower
                                       
                              
                     
                                     
                                mov ecx,[ebx+(ApiCount-shellcode1)]
                                mov    [ebx+(IATAddr-shellcode1)+ecx],eax
                                lea edx,[ebx+(AddrDeCryIAT-shellcode1)+ecx]
                                mov word ptr [edx],158bh
                                
                                mov eax, (IATAddr-shellcode1)
                                add eax,ecx
                                add eax,ebx
                                mov [edx+2], eax
                                mov word ptr [edx+6],0e2ffh
                                mov  eax,edx
                                add ecx,08h       
                                mov [ebx+(ApiCount-shellcode1)],ecx
                                 
                                         
                                 
                                
                                  BigFlower
                                
                                mov        dword ptr[edi],eax
      
                                pop        esi
                                pop        edx
                                pop        ebx
               
                        BigFlower
                        .endif
                        add        esi,4
                        add        edi,4
                       
                BigFlower       
                .endw
                pop        esi
                add        esi,20

下载地址:通过网盘分享的文件:xfpack3.rar
链接: https://pan.baidu.com/s/1RR0SX28ChRSVDUoy5G3GcA 提取码: 52pj
--来自百度网盘超级会员v8的分享

免费评分

参与人数 1吾爱币 +1 热心值 +1 收起 理由
zjdals + 1 + 1 我很赞同!

查看全部评分

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

沙发
bF6eUh3 发表于 2026-7-6 19:44

贴代码段可以用这个

免费评分

参与人数 1吾爱币 +1 热心值 +1 收起 理由
苏紫方璇 + 1 + 1 热心回复!

查看全部评分

3#
renpeng009 发表于 2026-7-6 21:51
4#
YYSUNFENG 发表于 2026-7-6 23:39
5#
小二神 发表于 2026-7-7 00:44
压缩后打不开啊
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - 52pojie.cn ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2026-7-7 01:32

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表