Wednesday, 27 July 2016
Saturday, 23 July 2016
MBEC - lab01/lab1A
Difficulty level: hard
Report: On loading the binary in IDA one can see that in the main() there is a interesting function called the auth().
Auth() :-
The function has a strcspn() at the beginning.
strcspn() :- compares two string given as input and returns the position of the first character of string 1 which has a character of string 2 .
then it has a strlen() func. which stores the length of the string in eax. The function then checks if the length is greater than 5, if not then you lose.
After that it runs a ptrace() function.
ptrace() :- It checks all the processes the system runs and and returns a value acording to the program being run.
This function is used to detect if GDB is being run and the program is debugged dynamically. It quits if it finds such processes happening.To bypass this security feature one can put a break point on the jump statement. And change the value of eax to something else , this does not affect the rest of the program as the value of eax is changed in the next statement itself.
The next node takes the fourth letter of the username and xors it with 4919 and adds a no to it. ebp-20 acts as the counter for the loops coming once it is greater than 6 it quits the loop.While in the loop the first node checks if the ACSII value of each of the letters of the username is greater than 31. Upon which the control moves to the next node. It takes each letter of the username then xors it with the value at ebp-16 ( which seems to be almost same for different inputs).
Subscribe to:
Comments (Atom)




