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