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 6192445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:56:38+00:00 2026-05-24T02:56:38+00:00

I need to find null-free replacements for the following instructions so I can put

  • 0

I need to find null-free replacements for the following instructions so I can put the following code in shellcode.

The first instruction I need to convert to null-free is:

mov ebx, str    ; the string containing /dev/zero

The string str is defined in my .data section.
The second is:

mov    eax,0x5a

Thanks!

  • 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-24T02:56:39+00:00Added an answer on May 24, 2026 at 2:56 am

    Assuming what you want to learn is how assembly code is made up, what type of instruction choices ends up in assembly code with specific properties, then (on x86/x64) do the following:

    1. Pick up Intel’s instruction set reference manuals (four volumes as of this writing, I think). They contain opcode tables (instruction binary formats), and detailed lists of all allowed opcodes for a specific assembly mnemonic (instruction name).
      Familiarize yourself with those and mentally divide them into two groups – those that match your expected properties (like, not containing the ‘x’ character … or any other specific one), and those that don’t. The 2nd category you need to eliminate from your code if they’re present.

    2. Compile your code telling the compiler not to discard compile intermediates:

      gcc -save-temps -c csource.c

    3. Disassemble the object file:
      objdump -d csource.o
    4. The disassembly output from objdump will contain the binary instructions (opcodes) as well as the instruction names (mnemonics), i.e. you’ll see exactly which opcode format was chosen. You can now check whether any opcodes in there are from the 2nd set as per 1. above.

    5. The creative bit of the work comes in now. When you’ve found an instruction in the disassembly output that doesn’t match the expectations/requirements you have, look up / create a substitute (or, more often, a substitute sequence of several instructions) that gives the same end result but is only made up from instructions that do match what you need.
      Go back to the compile intermediates from above, find the csource.s assembly, make changes, reassemble/relink, test.

    6. If you want to make your assembly code standalone (i.e. not using system runtime libraries / making system calls directly), consult documentation on your operating system internals (how to make syscalls), and/or disassemble the runtime libraries that ordinarily do so on your behalf, to learn how it’s done.

    Since 5. is definitely homework, of the same sort like create a C for() loop equivalent to a given while() loop, don’t expect too much help there. The instruction set reference manuals and experiments with the (dis)assembler are what you need here.

    Additionally, if you’re studying, attend lessons on how compilers work / how to write compilers – they do cover how assembly instruction selection is done by compilers, and I can well imagine it to be an interesting / challenging term project to e.g. write a compiler whose output is guaranteed to contain the character ‘?‘ (0x3f) but never ‘!‘ (0x21). You get the idea.

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

Sidebar

Related Questions

Need to find the timestamp for the first minute of the first day of
I need to find out the value passed into an indexer. My code (c#)
var links = document.evaluate(//BODY/CENTER[1]/P[1]/TABLE[1]/TBODY[1]/TR[1], document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null).evaluate(//A); basically I need to find an element
I need to find the book code and book title for each book whose
I need to find a way to set ListView addapter to null.The reason I
I need to find rows in resultsets that have every column without null. These
I need to find out whether an image column in table is null. I've
I need to find UIElement s in (rectangle/area/bounds). MainWindow I'm doing the following: I
I need to find a flexible solution for access control in PHP. In the
i need to find out automationid for key board values? how to send keystrokes

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.