Make your owner PE Protector

无壳程序与有壳程序的部分实例(Exeinfo PE测试) 无壳: (1)MS Visual C# / Basic.NET ] - EP Token : 06000005 (2)TASM / MASM / FASM - assembler - 2015-04-03 (3)Autoit v3.3.12.0 - Jonathan Bennett & AutoIt Team ( 01.06.2014 ) - www.Autoitscript.com/autoit3 - exe stub : Microsoft Visual C++ v.11 - 2012 ( 阅读详情

 

Preface

This article was written to provide the better understanding to people who do not have any experience in this field. I am not going to describe about PE structure, so I think it was explained enough in Matt Pietrek's articles in MSDN. I strongly recommend to read his article before continuing to read this article if you don't have any previous experience with PE structure. You could find useful the relevant reference link at the end of article.

This article will appear in three parts:

  1. Your first EXE Protector
    This part will describe how to make a powerful EXE protector and packer by using Visual C++ Win32 Programming.
  2. Support OCX, DLL, and SCR
    This part will introduce to include other PE type in additional to EXE file type. It will explain some tricks which you should know for OCX and DLL protecting.
  3. Use Cryptography API
    This part will demonstrate how to use Microsoft Cryptography API function to encrypt and decrypt PE section information.

This article contains yoda's protector source from version 1.01 to 1.03. It is first time people can look at its source after six month of appearance on web. It is based on [6] yoda's Crypter assembly source by Danilo Bzdok and compression source from [7] UPX library by Markus F.X.J. Oberhumer & Laszlo Molnar and [9] aPLib compression library by Joergen Ibsen. Thus, we should appreciate them for helping me to create this tool. I also should be grateful to people for trying and testing it on different windows version around the world. I think this article will be a small present to all people who involve and assist to make yoda's protector.

Contents

Introduction

The Portable Executable format is standard format under Microsoft Windows NT® operating system. It contains information for code, data, resource, dynamic link libraries importation. It is modifiable by using recent powerful debuggers such as OllyDbg or SoftICE with a little knowledge about assembly language. It causes to waste time of software development companies to obtain money for their productions. Therefore, they are led to purchase the tool like EXE protector to prevent from illegal copy. My idea is what will happen if every person has owner EXE protector. Cracker person will face different EXE protector with different methods. Thus, I think every of us can have their owner EXE protector.

A short aspect about PE Structure

The Portable Executable includes information for the MS-DOS, the Windows NT, and Sections. This information is provided for Windows Operating System to allocate memory, import dynamic link libraries, and perform code.

Table-1

MS-DOS informationIMAGE_DOS_HEADER
MS-DOS Stub Program
Windows NT informationPE Signature ("PE")
IMAGE_FILE_HEADER
IMAGE_OPTIONAL_HEADER
Sections information

IMAGE_SECTION_HEADER[0]
...
IMAGE_SECTION_HEADER[n]

SECTION[0]
...
SECTION[n]


You can find more about PE file format in [1] "Microsoft Portable Executable and Common Object File Format Specification". Matt Pietrek clarifies it enough in [2] "Peering Inside the PE: A Tour of the Win32 Portable Executable File Format", and [3a/b] "An In-Depth Look into the Win32 Portable Executable File Format".

Moreover, PEView [4] by Wayne J. Radburn will help you to find all aspects about PE file format.

http://www.programmersheaven.com/articles/Ashkbiz/peprotector1/peview.gif
Figure-1



There are all requirement data structures for PE file format in included <winnt.h> file inside your Visual C++. IMAGE_DOS_HEADER, IMAGE_NT_HEADERS, IMAGE_SECTION_HEADER structures represent all you need to work with PE file format. The relevant information for these structures could be found in [5] MSDN library.

Open PE files

We have to load PE file format to memory for working with its information. Some Windows API function will help us do it very easy: ''CreateFile(), GetFileSize(), GlobalAlloc(), ReadFile(), CloseHandle()''.

I make a class to work with PE files. It helps me to open files and put DOS header, NT headers, Section Headers, and Sections into separate places in memory and then rebuild all as form as new PE files.

class PEStructure 
{
private:
      DWORD ReservedHeaderSize;
      DWORD ReservedHeaderRO;
public:
      DWORD                   dwRO_first_section;
      IMAGE_DOS_HEADER        image_dos_header;
      char                    *reservedheader;
      IMAGE_NT_HEADERS        image_nt_headers;
      IMAGE_SECTION_HEADER    image_section_header[MAX_SECTION_NUM];
      char                    *image_section[MAX_SECTION_NUM];
      void OpenFileName(char* FileName);
      void UpdateHeaders(BOOL bSaveAndValidate);
      void UpdateHeadersSections(BOOL bSaveAndValidate);
      void Free();
};



''OpenFileName()'' will open PE files to place in ''image_dos_header, reservedheader, image_nt_headers, image_section_header[]'', and ''image_section[]''. All PE structures will abstract by this function in my tool.

void PEStructure::OpenFileName(char* FileName)
{
      hFile=CreateFile(FileName,
                       GENERIC_READ,
                       FILE_SHARE_WRITE | FILE_SHARE_READ,
                       NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
      if(hFile==INVALID_HANDLE_VALUE)
      {
            ShowErr(FileErr);
            return;
      }
      dwFsize=GetFileSize(hFile,0);
      if(dwFsize == 0)
      {
            CloseHandle(hFile);
            ShowErr(FsizeErr);
            return;
      }
      dwOutPutSize=dwFsize+IT_SIZE+DEPACKER_CODE_SIZE+ALIGN_CORRECTION;
      pMem=(char*)GlobalAlloc(GMEM_FIXED | GMEM_ZEROINIT,dwOutPutSize);
      if(pMem == NULL)
      {
            CloseHandle(hFile);
            ShowErr(MemErr);
            return;
      }
      ReadFile(hFile,pMem,dwFsize,&dwBytesRead,NULL);
      CloseHandle(hFile);
      CopyMemory(&image_dos_header,pMem,sizeof(IMAGE_DOS_HEADER));
      ReservedHeaderRO=sizeof(IMAGE_DOS_HEADER);
      ReservedHeaderSize=image_dos_header.e_lfanew-sizeof(IMAGE_DOS_HEADER);
      reservedheader=new TCHAR[ReservedHeaderSize];
      CopyMemory(&image_nt_headers,
                 pMem+image_dos_header.e_lfanew,
                 sizeof(IMAGE_NT_HEADERS));
      dwRO_first_section = image_dos_header.e_lfanew + sizeof(IMAGE_NT_HEADERS);
      UpdateHeadersSections(TRUE);
}



Verify if PE file is valid

It is important to verify file is a Win32 Portable Executable file by checking ''e_magic'' of ''image_dos_header'' and Signature of ''image_nt_header'' to prevent of unpredictable fault.

if(PEfile.image_dos_header.e_magic!='ZM')
{
      GlobalFree(pMem);
      CloseHandle(hFile);
      if(MakeBackup) DeleteFile(szFnameBackup);
      ShowErr(PEErr);
      return;
}
if(PEfile.image_nt_headers.Signature!='EP')
{
      GlobalFree(pMem);
      CloseHandle(hFile);
      if(MakeBackup) DeleteFile(szFnameBackup);
      ShowErr(PEErr);
      return;
}



Make Extra Section

There is a trick inside yoda's Protector to create extra section for protection and unpacking purposes. Visual C++ aids it to make this extra part without using of assembler compiler and linker. If you look at PE_LOADER_CODE() subroutine inside the ''CryptStuff.cpp'' you will find what I am talking about. This is same as the method that was done by Danilo Bzdok in his [6] yoda's Crypter. Of course, he did it only by using assembly language in MASM32 without any high level language. I made ''GetFunctionRVA(), GetFunctionSize()'' and CopyFunction()'' to rob code from PE_LOAD_CODE() and use it to create additional section for target PE file.

DWORD GetFunctionRVA(void* FuncName)
{
      void *_tempFuncName=FuncName;
      char *ptempFuncName=PCHAR(_tempFuncName);
      DWORD _jmpdwRVA,dwRVA;
      CopyMemory(&_jmpdwRVA,ptempFuncName+1,4);
      dwRVA=DWORD(ptempFuncName)+_jmpdwRVA+5;
      return(dwRVA);
}


DWORD GetFunctionSize(void* FuncName)
{
      DWORD dwRVA=GetFunctionRVA(FuncName);
      char* pFuncBody=PCHAR(dwRVA);
      UCHAR _temp;
      bool notEnd=TRUE;
      char *DepackerCodeEnd=new TCHAR[10];
      DWORD l=0;
      do
      {
            CopyMemory(&_temp,pFuncBody+l,1);
            if(_temp==0xC3)
            {
                  CopyMemory(DepackerCodeEnd,pFuncBody+l+0x01,10);
                  DepackerCodeEnd[9]=0x00;
                  if(strcmp(DepackerCodeEnd,"ETGXZKATZ")==0)
                  {
                        notEnd=FALSE;
                  }
            }
            l++;
      }while(notEnd);
      return(l);
}



''GetFunctionRVA()'' will seek to Relative Virtual Address of specific subroutine to use by ''GetFunctionSize()'' and ''CopyFunction()''. ''GetFunctionSize()'' will return the size of target routine to be exploited by CopyFunction(). It seeks a key word ("ETGXZKATZ") to calculate routine size. Finally, ''CopyFunction()'' is a complete routine to steal all code from PE_LOADER_CODE() subroutine to place in packed PE file.

char* CopyFunction(void* FuncName)
{
    DWORD dwRVA=GetFunctionRVA(FuncName);
    DWORD dwSize=GetFunctionSize(FuncName);
    char* pFuncBody=PCHAR(dwRVA);
    char* filebuff=new TCHAR[dwSize+1];
    CopyMemory(filebuff,pFuncBody,dwSize);
    return(filebuff);
}



This method can illuminate in the following code:

char    *pDepackerCode;
DWORD    DEPACKER_CODE_SIZE;
:
DEPACKER_CODE_SIZE=GetFunctionSize(PE_LOADER_CODE);
pDepackerCode=new TCHAR[DEPACKER_CODE_SIZE];
pDepackerCode=CopyFunction(PE_LOADER_CODE);
:
void PE_LOADER_CODE()
{
      _asm
      {
      //--------------------------------------------------
      //---------- START OF THE PE LOADER CODE -----------
DepackerCode:
      :
      :
      :
DepackerCodeEND:
    RET
    //"ETGXZKATZ" <<-- KEY WORD
    INC EBP     //'E'
    PUSH ESP    //'T'
    INC EDI     //'G'
    POP EAX     //'X'
    POP EDX     //'Z'
    DEC EBX     //'K'
    INC ECX     //'A'
    PUSH ESP    //'T'
    POP EDX     //'Z'
    }
}



Pack and Crypt Sections

UPX compressor source [7] code is an alternative choice to pack sections of PE files. I use [8] LZO data compression library by Markus F.X.J. Oberhumer to pack code and data section. Polymorphism encryption and decryption method [6] by Danilo Bzdok is simple and good enough to crypt PE section by some modification in C++ language as you see inside ''EncryptBuff()'' and ''DecryptBuff()'' in ''PER.CPP''.

This protector separates Sections in different allocation parts of memory. Afterwards it packs and crypts part of sections by CompressPE() and CryptPE().

//------ ENCRYPT THE SECTIONS -----
// generate PER
PEfile.UpdateHeadersSections(TRUE);
SecEncryptBuff=new TCHAR[SEC_PER_SIZE];
SecDecryptBuff=new TCHAR[SEC_PER_SIZE];
MakePER(SecEncryptBuff,SecDecryptBuff,SEC_PER_SIZE);
CopyMemory(pDepackerCode+dwRO_SEC_DECRYPT,
           SecDecryptBuff,
           SEC_PER_SIZE);    
// encrypt !
CompressPE(pMem);
CryptPE(pMem);
RemoveSectionNames(pMem);
newsection.Misc.VirtualSize=DepackCodeVirtualSize+0x2000;
PEfile.image_section_header[PEfile.image_nt_headers.FileHeader.NumberOfSections-1]
        .Misc.VirtualSize = newsection.Misc.VirtualSize;
PEfile.UpdateHeadersSections(FALSE);
//---------------------------------



LZO data compression library [8] has compressor source in C++ and also decompressor source in both C++ and assembly. Hence, we have all sources to pack in high level language and unpack in low level language. I used ''lzo1x_999_compress_level()'' from LZO library to compress sections inside ''CompressPE()'' and its assembly source ''lzo1f_decompress_asm_fast_safe()'' to decompress sections ''inside _DecompressPE()'' in assembly source of ''PE_LOADER_CODE()''.

It is important to pay attention to image_nt_headers.OptionalHeader.SectionAlignment and image_nt_headers.OptionalHeader.FileAlignment to prevent of Win32 incompatible file error in Windows version above Windows 98. Variables in IMAGE_SECTION_HEADER should be adapted to file-alignment and section- alignment. I reserved ''UpdateHeadersSections()'' function to retrieve and rebuilt all PE file format structures.

void PEStructure::UpdateHeadersSections(BOOL bSaveAndValidate)
{
    DWORD i;
    if(bSaveAndValidate)//TRUE = data is being retrieved
    {
        DWORD SectionNum = PEfile.image_nt_headers
                           .FileHeader.NumberOfSections;
        CopyMemory(&image_dos_header,pMem,sizeof(IMAGE_DOS_HEADER));
        ReservedHeaderSize = image_dos_header.e_lfanew -
                             sizeof(IMAGE_DOS_HEADER);
        if((ReservedHeaderSize&0x80000000)==0x00000000)
        {
            CopyMemory(reservedheader, 
                       pMem+ReservedHeaderRO,
                       ReservedHeaderSize);
        }
        CopyMemory(&image_nt_headers,
             pMem+image_dos_header.e_lfanew,
             sizeof(IMAGE_NT_HEADERS));
     dwRO_first_section = image_dos_header.e_lfanew +
                            sizeof(IMAGE_NT_HEADERS);
       CopyMemory(&image_section_header, 
                  pMem+dwRO_first_section, 
                  SectionNum*sizeof(IMAGE_SECTION_HEADER));
       for(i=0;i< SectionNum;i++)
       {
           image_section[i] = (char*)GlobalAlloc(
                GMEM_FIXED | GMEM_ZEROINIT,
            PEAlign(image_section_header[i].SizeOfRawData,
                PEfile.image_nt_headers.OptionalHeader.FileAlignment));
           CopyMemory(image_section[i],
               pMem + image_section_header[i].PointerToRawData,
               image_section_header[i].SizeOfRawData);
       }
    }
   else//FALSE = data is being initialized 
   {
       DWORD SectionNum = PEfile.image_nt_headers
                          .FileHeader.NumberOfSections;
       CopyMemory(pMem,
            &image_dos_header,sizeof(IMAGE_DOS_HEADER));
            ReservedHeaderSize=image_dos_header.e_lfanew -
                               sizeof(IMAGE_DOS_HEADER);
       if((ReservedHeaderSize&0x80000000)==0x00000000)
       {
          CopyMemory(pMem + ReservedHeaderRO,
                     reservedheader,
                     ReservedHeaderSize);
       }
       CopyMemory(pMem+image_dos_header.e_lfanew,
            &image_nt_headers,
            sizeof(IMAGE_NT_HEADERS));
       dwRO_first_section = image_dos_header.e_lfanew +
                            sizeof(IMAGE_NT_HEADERS);
       CopyMemory(pMem+dwRO_first_section,
                 &image_section_header,
                 SectionNum*sizeof(IMAGE_SECTION_HEADER));
       for(i=0;i< SectionNum;i++)
       {
           CopyMemory(pMem+image_section_header[i].PointerToRawData,
                      image_section[i],
                      image_section_header[i].SizeOfRawData);
       }
    }
} 



Built Import Table Directory

PE unpack section need to import two essential API functions to load dynamically all other API functions in Run-time load. LoadLibraryA() and GetProcAddress() from Kernel32.dll are vital function to import other API function with some tricky methods. AssembleIT() is reserved to undertake this task. We should change the import table address and size for turning to new import table directory inside extra section. To retrieve the old import table, it has to reload and rebuild import table directory in the next step to perform program code. Loader section use LoadLibraryA() and GetProcAddress() to seek relative virtual address of importation function of dynamic link libraries.

Table-2

 Import Table Address -> "Kernel32.dll", 0x00
  LoadLibrary_RVA
  GetProcessAddres_RVA
  0x00,0x00
 LoadLibrary_RVA -> 0x00,0x00,"LoadLibraryA"
 GetProcessAddres_RVA -> 0x00,0x00,"GetProcessAddress"


Reload Import Table and API Redirection

It is important to protect import table directory from reverse engineering process. Danilo Bzdok has used technical methods to destroy import thunk data and crypt import information in [6] yoda's Crypter. This part is retrievable again by loader code section. I applied his methods in my PE Protector with bringing some part of code to C and remind other part in assembly. ''ProcessOrgIT()'' provide all we need to do our purpose. In loader section, ''INIT_IMPORT_TABLE()'' routine implements our point about API redirection and Import table rebuilt.

Anti-debug methods

PE Protector should able to detect if program debugs and prevent from debugging. OllyDbg and SoftICE are two important debuggers that can bypass many tricks which cause to halt debuggers. However, I should introduce some simple methods to detect debuggers. I know all of these methods do not have any effect in recently additional plug-ins for mentioned debuggers.

1. IsDebuggerPresent Windows API: ''IsDebuggerPresent()'' will return none zero value whenever the current process is running in the context of a debugger.


2. SoftICE detection: It can find SoftICE debugger by check if ''NTICE'' driver in windows NT and ''SICE'' driver in windows 98 are active .

if(CreateFile( "////.//NTICE", GENERIC_READ | GENERIC_WRITE, 
      FILE_SHARE_READ | FILE_SHARE_WRITE, 
      NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,
      NULL)!=INVALID_HANDLE_VALUE) 
{ 
    There is SoftICE NT on your system; 
} 


if(CreateFile( "////.//SICE", GENERIC_READ | GENERIC_WRITE, 
      FILE_SHARE_READ | FILE_SHARE_WRITE, 
      NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,
      NULL)!=INVALID_HANDLE_VALUE) 
{ 
    There is SoftICE98 on your system; 
}



3. Probe Processes: Some time it needs to search for specific process or isolates to specially process. It was demonstrated how finding parent process and check if it is ''EXPLORER.EXE'' and killing all parent process except Explorer windows in sample source code. There are both C++ and assembly code inside ''CryptStuff.CPP'' to illuminate this task.

void GetFileNameFromPath(char* szSource)
{
      char *szTemp=strrchr(szSource,'//');    
      if(szTemp!=NULL)
      {
            szTemp++;
            DWORD l=DWORD(strlen(szTemp))+1;
            CopyMemory(szSource,szTemp,l);
      }
}
void AntiDebug()
{
      char lpszSystemInfo[MAX_PATH];
      HANDLE hSnapshot=NULL;
      DWORD PID_child;
      DWORD PID_parent,PID_explorer;
      HANDLE hh_parnet = NULL;
      PROCESSENTRY32    pe32 = {0};
      pe32.dwSize = sizeof(PROCESSENTRY32);//0x128;
      PID_child=GetCurrentProcessId();//getpid();
      hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
      if (Process32First(hSnapshot, &pe32))
      {
            while (Process32Next(hSnapshot, &pe32))
            {
                  GetFileNameFromPath(pe32.szExeFile);
                  CharUpperBuff(pe32.szExeFile,strlen(pe32.szExeFile));
                  if(strcmp(pe32.szExeFile,"EXPLORER.EXE")==0)
                  {
                        PID_explorer=pe32.th32ProcessID;
                  }
                  if(pe32.th32ProcessID==PID_child)
                  {
                        PID_parent=pe32.th32ParentProcessID;
                  }
            }
      }
      if(PID_parent!=PID_explorer)
      {
            hh_parnet= OpenProcess(PROCESS_ALL_ACCESS, 
                                    TRUE, PID_parent);
            TerminateProcess(hh_parnet, 0);
      }
      else
      {
            MODULEENTRY32    me32 = {0};
            me32.dwSize = sizeof(MODULEENTRY32);
            hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE,
                        PID_explorer);
            if (Module32First(hSnapshot, &me32))
            {
                  do
                  {
                        if(PID_explorer==me32.th32ProcessID)
                        {
                              GetWindowsDirectory(lpszSystemInfo,
                               MAX_PATH+1);
                              strcat(lpszSystemInfo,"//");
                              strcat(lpszSystemInfo,"EXPLORER.EXE");
                      CharUpperBuff(me32.szExePath,
                                    strlen(me32.szExePath));
                              if(strncmp(me32.szExePath,
                                          lpszSystemInfo,
                                    strlen(lpszSystemInfo)))
                              {
                                 GetFileNameFromPath(me32.szExePath);
                                 if(strcmp(me32.szExePath,
                                    "EXPLORER.EXE")==0)
                                 {
                                    hh_parnet= 
                                        OpenProcess(PROCESS_ALL_ACCESS,
                                          TRUE, PID_explorer);
                                    TerminateProcess(hh_parnet, 0);
                                 }
                              }
                        }
                  }while (Module32Next(hSnapshot, &me32));
            }
      }
}



This code will not work under Windows NT 4.0 because of absence ''CreateToolhelp32Snapshot(), Process32First(), Process32Next(), Module32First(), Module32Next()''. But all of these API functions could build by undocumented API function from ''NTDLL.DLL''. You can take a look at [10] 'Windows NT (2000) Native API reference' by Gary Nebbett. Furthermore, I recommend using [11] Process Explorer by Mark Russinovich to explore all run processes in your systems. It will help to understand better them.

http://www.programmersheaven.com/articles/Ashkbiz/peprotector1/procexp.gif
Figure-2



Eliminate unnecessary data

Some time you need to clean all unnecessary data such as debug information, relocation section and making small DOS header and remove MS-DOS stub Program. You should reserve these items in your PE Protector with some considerations. For instance, Relocation section do not have any effect in running EXE files but it plays an important role in OLE-Active Controls and Dynamic Link Libraries.

Sample code

The project compiles with Visual C++ .net 2003 and doesn't require any spare tools. It works under all Windows version except Windows NT 4.0 and Windows 95.

Conclusion

This article and its source could be an introduction to PE protector tools and demonstrating how these tools works. I hope it covers the absence of this kind of interesting topics and tools in open source area.

References

[1] "Microsoft Portable Executable and Common Object File Format Specification", Microsoft Corporation, Revision 6.0, February 1999
[2] "Peering Inside the PE: A Tour of the Win32 Portable Executable File Format", Matt Pietrek, MSDN Library, March 1994
[3a] "An In-Depth Look into the Win32 Portable Executable File Format", part 1, Matt Pietrek, MSDN Magazine, February 2002
[3b] "An In-Depth Look into the Win32 Portable Executable File Format", part 2, Matt Pietrek, MSDN Magazine, March 2002
[4] PEview Version 0.67, Wayne J. Radburn
[5] MSDN Library, Microsoft Corporation, April 2003
[6] yoda's Crypter, Danilo Bzdok
[7] UPX, the Ultimate Packer for eXecutables, Markus F.X.J. Oberhumer & Laszlo Molnar
[8] LZO real-time data compression library, Markus F.X.J. Oberhumer
[9] aPLib compression library, Joergen Ibsen
[10] "Windows NT (2000) Native API reference", Gary Nebbett
[11] Process Explorer, Mark Russinovich

An Empirical Study of Real-world Polymorphic Code Injection Attacks  An Empirical Study of Real-world Polymorphic Code Injection AttacksMichalis PolychronakisFORTH-ICS, Greece, email: mikepo@ics.forth.grKostas G. AnagnostakisI2R, Singapore, email: kostas@i 阅读详情

相关推荐

eye-protector-2.0.6.crx

比搜狗的护眼插件要好用多了,下载后直接插到搜狗浏览器里使用即可~ ps: Made by @千歳TheC· 代码托管于Github,如果喜欢这个扩展请给他一个Star,谢谢:)

[分享].Net脱壳利器de4dot介绍

De4Dot是一个很强的.Net程序脱壳,反混淆工具,支持对于以下工具混淆过的代码的清理:如 Xenocode、.NET Reactor、MaxtoCode、Eazfuscator.NET、Agile.NET、Phoenix Protector、Manco Obfuscator 、CodeWall、NetZ .NET Packer 、Rpx .NET Packer、Mpress .NET Packer、ExePack .NET Packer、Sixxpack .NET Packer、Rummage Obfu

扶强的专栏 1万+

bin2sc:从对象可执行格式32和64位PE,ELF二进制到Shellcode

bin2sc 二进制到shellcode 注意:Win32的核心DLL是kernel32.dll, user32.dll, and gdi32.dll 。 如果您的shellcode使用来自任何核心DLL的syscall,则需要添加它。 Win32库位于C:\\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\ ,在我的情况下是10.0.18362.0版本,但您的主机可能会更改。 安装 git clone https://github.com/SkyBulk/bin2sc.git chmod +x bin2sc.py python3 bin2sc.py 用法示例: python3 bin2sc.py shellcode.asm {sc_arr,sc_app} {linux,win} {x86,x64} /full/p

脱壳4 (未知壳)

脱壳4 (未知壳) 脱壳­IAT被加密如何分析? 1. 自上而下分析,单步跟踪 从程序开始单步分析,找到填充IAT的代码 2. 敏感API下断,栈回溯分析 ① GetProcAddress ② LoadLibraryA/W, GetModuleHandleA/W ③ VirtualAlloc/VitualAllocEx/HeapAlloc ④ VitrualProtect/ VitrualProtectEx 3. 敏感数据下断,栈回溯分析 在IAT表加密的地址处下断点,运行之后

qq_31507523的博客 575

yoda's Protector V1.03.3(默认保护)的脱壳方法和具体分析

描述对于破解爱好者对于程序壳的去发的工具。此工具就针对于yoda's Protector 壳的脱掉。

建立自已的PE Protector(部分)

PE Protector 调试器 反汇编器 OEP SEH 导入表 主要是描述在Visual C++编译器下,开发属于自己的PE Protector。

Windows 系统双网卡冲突

若内网网段永久路由跃点数小于缺省路由跃点数,则无需修改;若内网网段永久路由跃点数大于缺省路由跃点数,则需要在 “控制面板\网络和 Internet\网络连接\网卡属性”处修改该网卡的跃点数。将外网网卡跃点数修改至大于内网网段永久路由跃点数即可。插入双网卡时,会出现路由冲突问题,192.168.112.178的缺省路由跃点数为120,优先级高。外网网卡192.168.112.178连通外网。4. 解禁外网网卡,通过route print命令查看内网网段永久路由跃点数与外网网卡缺省路由跃点数大小;

weixin_43849148的博客 5609

俄罗斯PE文件保护工具_Alex Protector 1.0

俄罗斯PE文件保护工具_Alex Protector 1.0

避坑指南:多门课程共用 VMware 时,如何避免网段“打架”

本文记录了一次真实的 VMware 网络排障:同一台电脑同时运行 Hadoop 三节点和 openEuler 时,因为两门课程使用了不同网段(`192.168.121.x` 与 `192.168.116.x`),出现了“修好一边、另一边掉线”的问题。文章按小白可执行思路,先统一 VMnet8 子网与 NAT 网关,再用 `nmtui`/`nmcli` 将 openEuler 迁移到 121 网段,最终实现 Xshell 正常连接、虚拟机互通稳定。全文配有截图、命令和验收清单,并给出后续新增虚拟机的通用避坑流

2401_85669197的博客 764

VSCode+ESP-IDF开发环境搭建:从零开始创建你的第一个物联网项目(2024最新版)

本文详细介绍了如何在2024年使用VSCode和ESP-IDF搭建物联网开发环境,从零开始创建第一个物联网项目。内容包括环境准备、ESP-IDF配置、项目创建与结构解析、构建烧录步骤以及高级技巧和常见问题解决方案,帮助开发者快速上手ESP32开发。

weixin_29165725的博客 332

Unity游戏开发实战:用柏林噪声打造3D随机地形(附完整C#代码)

本文详细介绍了如何在Unity游戏开发中使用柏林噪声算法生成3D随机地形,包含完整的C#代码实现。从基础柏林噪声原理到高级参数控制,再到性能优化和常见问题解决,帮助开发者掌握程序化地形生成技术,打造丰富多变的游戏世界。

weixin_29281941的博客 102

Make your owner PE Protector Part 1: Your first EXE Protector

PrefaceThis article was written to provide the better understanding to people who do not have any experience in this field. I am not going to describe about PE structure, so I think it was explain

2274

【FLINK+Kerberos+kafka】在华为云上 bootstrap.server使用IP的GSS initiate failed 问题处理

目前互联网上所有的资料显示都是说没有正确设置KDC之类的,但本博主实际通过java代码低版本 如使用kafka-client 0.11.0 ,2.4.0等版本手动创建kafkaconfig 或者使用华为云的LoginUtils类 都能够正常链接,所以应该是高版本添加了相关配置,或者flink在subtask 创建kafkaAdminClient时 丢弃或使用了默认的一些配置行为,导致了客户端和kdc验证之间出现了principal 不一致导致验证失败。client.dns.lookup配置项作用。

honghanyue1791的博客 576

路由,网关,DNS配置均正确,IP也不存在冲突,就是ping不通网关地址192.168.0.1?linux下网络-网卡路由配置操作

networkmanager提供了命令行工具-nmcli ,包括在networkmanager中。 如果说没有设置过主机名的话,默认是localhost.localdomain 查看网卡信息 查看具体网络接口信息: 显示所有设备状态: 修改配置文件,执行以下命令使其重新生效: 或者是systemctl restart network systemctl status NetworkManager #查看网络管理器状态 systemctl stop NetworkManager system

Java从入门到入土 919

IPCP(IP Control Protocol,IP控制协议)

IPCP(IP Control Protocol,IP控制协议)

天赐好车的博客 759

rk3568 修改开机动画

bootanimation.zip是一个Android设备启动时播放的动画文件,它包含了一系列的图片和描述文件,用于描述动画的播放顺序和持续时间。

weixin_35723192的博客 2730

The Enigma Protector v6.70 x64资源下载介绍:一款强大的软件保护工具

The Enigma Protector v6.70 x64资源下载介绍:一款强大的软件保护工具 去发现同类优质开源项目:https://gitcode.com/ 在数字世界中,软件的安全保护显得尤为重要。The Enigma Protector v6.70 x64 是一款专业的软件保护工具,适用于64位操作系统,它以其高效的保护机制和多样的应用场景,成为开发者和软件企业的首选。 项目介绍 The...

gitblog_06761的博客 455

JavaFX Stage

JavaFXStagejavafx.stage.Stage表示 JavaFX 桌面应用程序中的窗口。在 JavaFX 内部,Stage您可以插入一个 JavaFX Scene,它表示在窗口内显示的内容 - 在Stage.当 JavaFX 应用程序启动时,它会创建一个根Stage对象,该对象将传递给 start(Stage primaryStage)JavaFX 应用程序的根类的方法。此Stage 对象代表 JavaFX 应用程序的主窗口。

2012年开始工作,全栈开发老兵,目前已是一个老师,分享这么多年的心得体会 508

一个更加强大的查壳工具, 更新版本

<br /> <br /><br /><br />http://pid.gamecopyworld.com/<br /> <br />2003年的时候, 作者说:<br /> cdkillerMOV AL, 1 Join Date: Oct 2002 Posts: 1,878 Protection ID info thread - v6.4.0 (build 08.07.2010) would be nice if you can help me improvin

stereohomology 2万+

1.嵌入式控制器EC学习,编译环境搭建

工欲善其事,必先利其器。 在学习EC相关知识之前,首先需要完成EC代码编译环境的搭建,需要如下内容: Keil C51(用于EC中C代码的编译器环境) EC源代码,我们使用从网上可以下载到的 ITE_V12.4_Update 版的代码为例进行学习 代码编辑器,这个可以根据自己的习惯选择,VS Code或者Source Insight等 Keil C51下载地址: http://www.downcc.com/soft/307131.html 下载完成后请进行破解 EC源代码 ...

qq_30135687的博客 3918

时间序列、时间序列分析、时间序列效应分解、平稳时间序列、AIC和BIC

时间序列、时间序列分析、时间序列效应分解、平稳时间序列、AIC和BIC 目录 时间序列、时间序列分析、时间序列效应分解、平稳时间序列、AIC和BIC 时间序列 时间序列分析 时间序列效应分解 平稳时间序列 AIC和BIC 时间序列 时间序列数据是某个个体在多个时间点上收集的数据。分析时间序列的方法构成了数据分析的一个重要领域,即时间序列分析。时间序列根据所研究的依据不同,可产生不同的分类。按照研究对象可以分为一元时间序列和多元时间序列;按照时间属性可以分为离散时间序列和连续时间序列;按照序

data+scenario+science+insight 1228

試遍密界千山萬水...

(1) 先Upx / RLPack ,再 Themida,Themida不報錯就退出。(2) 先Themida,再Upx ,UPX不能壓縮。(3) 光用Themida /RLPack / ExeFog / AsdPack / ORiEN / BeRoeXePacker / Protection_ID,都能被Refox檢測出來。(4) 先 ExeFog,再Themida,能夠被認出程序已經壓縮了,如

mrtorney的专栏 730

温度PID控制PLC程序

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

Polymorphic Protector

 Among the large amount of malwares we view, we have seen a few this week that were heavily obfuscated by some sort of "polymorphic packer." Interestingly, unlike the results of most packers/protector

4040

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

廖雪峰Python教程[完整版]

廖雪峰的python教程整理的,已经排好版了,而且还是完整的,适合小白

微软技术日报 11-09:.NET 8 与 9 明日同时停止支持,注册表编辑器出了 WinUI 3 版

今天这四条消息的共同点是收口。.NET 8 和 9 的支持期到点,注册表编辑器的新界面只放在仓库里给人看,GitHub 把一类危险触发器按住默认,微软在安全报告里把防线从地址黑名单挪到行为。收口并不等于关门。.NET 10 还在支持期里,被按住的触发器可以用策略按文件放回来,实验室里的样例随时可能变成产品。区别在于这些动作要有人签字,不再是默认开着。如果今天只做一件事,去看一眼构建机上的 .NET 版本。明天之后,8 和 9 的漏洞补丁不会再来了。

海盗Sharp的博客 394

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

上一篇: PE_Info 之DIY
下一篇: Polymorphic Protector
iiprogram
博客等级 码龄25年 1068粉丝 1515原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值