# Problem
: This problem is about operator priority.
# How To Solve.
: First, connect the server ssh mistake@pwnabler.kr -p2222 and check the program source code.
The problem is the 17th line. A problem arises because comparison operators have higher precedence than arithmetic operators.
First, open("/home/mistake/password",0_RDONLY,0400) <0 is computed, This operation takes the form of a positive number<0. Therefore, It becomes False and returns 0. Fd=0 is equal to stdio. The first input value is put into pw_buf, the second input value is put into pw_buf2. and compare the xor operation value of pw_buf2 with the value of pw_buf to see the flag if it is the same.
No comments:
Post a Comment