Reverse Engineering for Beginners

(avery) #1

CHAPTER 54. JAVA CHAPTER 54. JAVA


Perhaps, JVM has some other checks related to the stack maps.


OK, let’s patch it differently by removing the call tonag():


Figure 54.3:IDA

0 is the opcode forNOP.


Now that works!


54.17.2 Second example


Another simple crackme example:


public class password
{
public static void main(String[] args)
{
System.out.println("Please enter the password");
String input = System.console().readLine();
if (input.equals("secret"))
System.out.println("password is correct");
else
System.out.println("password is not correct");
}
}


Let’s load it in IDA:

Free download pdf