"Practice Report" Linux practice Three

Source: Internet
Author: User

Linux Practice--Program hackOne, Master NOP, JNE, JE, JMP, CMP assembly instructions machine code
    • The NOP:NOP instruction is the "null instruction". When executing to the NOP instruction, the CPU does nothing, just as an instruction to execute the past and continue executing a command behind NOP. (Machine code: 90)
    • JNE: Conditional transfer directives, if not equal, jumps. (Machine code: 75)
    • JE: Conditional transfer instruction, if equal, jumps. (Machine code: 74)
    • JMP: Unconditional transfer instructions. Direct transfer within the section of JMP Short (machine code: EB) directly within the section of JMP near (machine code: E9) Section indirectly transfer JMP Word (Machine code: FF) between segments Direct (FAR) Transfer JMP remote (machine code: EA)
    • CMP: Compare instruction, function equivalent to subtraction instruction, just compare operation between operands, do not save result. After the CMP directive executes, it affects the flag register. Other relevant instructions are identified by identifying these affected flag register bits to get a comparison result.
second, mastering the Disassembly and hex programmer
    • Instruction "Objdump-d Login" To view the disassembly code
    • Change 750e to 7500
      Note: In order to skip the password check, that is, regardless of the results of the comparison, the normal landing.
      Jne is the conditional jump, if the condition satisfies, then jumps;
      Jne the next two lines is the output content;
      JMP is a jump statement (no conditions, then jump directly)
      The next two lines of JMP are also output.
      Jne that jumps when comparisons are not equal. That is, when the input and the saved password is not equal, jump to the next line of MOV in JMP, if the comparison results are equal, then execute jne next two lines of MOV, call line, description, the execution MOV, call line output is "right".

VI Open Login, enter ":%!" Xxd

Input:/750e find that location, compare to four weeks, determine the location and change it to 7500

Enter ":%! Xxd-r "Save

Enter ": Wq" to save

Run the login test results

"Practice Report" Linux practice Three

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.