Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6763009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:25:33+00:00 2026-05-26T14:25:33+00:00

TASK: I’m building a set of x86 assembly reverse engineering challenges, of which I

  • 0

TASK:

I’m building a set of x86 assembly reverse engineering challenges, of which I have twenty or so already completed. They’re just for fun / education.

The current challenge is one of the more advanced ones, and involves some trickery that makes it look like the EP is actually in the normal program, but it’s actually packed away in another PE section.

Heres’ the basic flow:

  • Starts out as if it were a normal MSVC++ application.
  • Injected a sneaky call away to a bunch of anti-debugger tricks.
  • If they pass, a DWORD in memory is set to 1.
  • Later in the program flow, it checks for that value being 1, and if it works it decrypts a small call table. If it fails, it sends them off on a wild goose chase of fake anti-debug tricks and eventually just crashes.
  • The call table points to the real decryption routines that decrypt the actual program code section.
  • The decryption routines are called, and they decrypt using a basic looped xor (C^k^n where C is ciphertext, k is a 32-bit key and n is the current data offset)
  • VirtualProtect is used to switch the section’s protection flags from RW to RX.
  • Control flow is redirected to OEP, program runs.

The idea is that since they think they’re in normal program flow, it makes them miss the anti-debug call and later checks. Anyway, that all works fine.

PROBLEM:

The current problem is that OllyDbg and a few other tools look at the packed section and see that it has high entropy, and throw up a warning that it’s packed. The code section pointer in the PE header is correctly set, so it doesn’t get this from having EP outside code – it’s purely an entropy analysis thing.

QUESTION:

Is there an encryption method I can use that preserves low entropy, but is still easy to implement in x86 asm? I don’t want to use a plain xor, since it’s too easy, but I also don’t want it to catch it as packed and give the game away.

I thought of something like a shuffler (somehow produce a keystream and use it to swap 4-byte blocks of code around), but I’m not sure that this is going to work, or even be simple.

Anyone got any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:25:34+00:00Added an answer on May 26, 2026 at 2:25 pm

    Actually, OllyDbg works like this pseudocode:

    useful_bytes = number_of_bytes_in_section - count_bytes_with_values(0x00, 0x90, 0xCC)
    warn about compression if useful_bytes > 0x2000 and count_bytes_with_values(0xFF, 0xE8, 0x8B, 0x89, 0x83) / useful_bytes < 0.075
    

    So, the way to avoid that warning is to use enough bytes with the values 0xFF 0xE8 0x8B 0x89 0x83 in the compressed section.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Task: I have a camera mounted on the end of our assembly line, which
TASK : I have an existing xml document (UTF-8) which uses xml namespaces and
The task I have iS, I have a source is the CSV which needs
Task is simple. Have a tool which will parse CSS on network website, read
Task: have a jailbroken iPhone need to write an application which would receive notifications
Task at hand — I have three versions of some code, developed by different
The task is to take a list of tables which is changeable. Write a
Task: Cut or erase a file after first walk-through. i have an install file
Task: Write timestamps into MS SQL database table every second. Solutions: External application which
Task is: I have task queue stored in db. It grows. I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.