About this tutorial:
Tutorial:Cracking SillyScroll 1.0, a Java program...

Target:SillyScroll 1.0(http://www.consultcom.com)

Tools:Java Development Kit 1.2.1, Jad 1.5.7, Microsoft Internet Explorer 5.0 or Netscape Communicator 4.7

Date:16th April 2000

Descriptions&Comments:Well, well, well... I am going to show you how cracking is like when we have our target's source code. Though not as fun as working with assembly, it is undoubtedly a lot more easier to crack using a decompiler as our main tool. No more useless texts here, let's proceed to crack a Java program, the only program which can be decompiled perfectly(yes, I know that even VB, C/C++ and Delphi programs can be decompiled, but then, the result is not as good as this). Come on now, accompany me through my first ever Java cracking adventure...

Protections:Java, shareware notice(s)

Disclaimer:This file is used for educational purposes only. Any misuse of the information presented here is not my responsibility.

Copyright information:This tutorial is copyright © ManKind

Starting words:
Hello,welcome to my tutorial. I am ManKind, a newbie in cracking who want to share my cracking skills with other newbies. Contact me at mankind001@bigfoot.com


The process:
First of all, let me explain a little about Java programming language and its program first. Java program could be run on any platform or Operating System(for example, Windows, Macintosh, Solaris). That's where it got its fame. It is VERY similar to C/C++ program, in term of programming syntax. Java executable doesn't have .exe extension unlike the normal programs of the MS-DOS and Microsoft Windows environment, instead, its extension is .class. This .class file(mostly) could be decompiled by Java Decompiler like Jad perfectly. Decompile? What's that? Its a process of retrieving the source code of an executable(in this condition, the .class file). What should we do with the source code after decompiling it? Distribute it, sell it or rip the original author's name, put in yours and distribute it to get credits and finally damage the developer(since source code is the most important thing to a software developer other than the programmer's brain)? No, that's not our purpose, that's a lamer's job. Our purpose is just to crack it.

Rename the sample.txt file into sample.html, open the html file with Internet Explorer or Netscape Communicator as you prefer and see the usage of this little Java applet(well, I called it program just now, but then, a Java program which is run from a browser is called applet). The banner on that page is nice, isn't it? Yeah, it is. Normal HTML codes can't do this, nor can a good gfx program creates a banner that nice and customizable(the text, its appearance, color, speed, etc.) and that really proof how useful Java and applet could be. This also means that you must support the author who puts in lots of hard work and effort into developing this applet. Look at the status bar of your browser, you see something like "FREE Java Applets at www.consultcom.com", that's want we want to crack, we want to remove that text. Let's now locate its executable which is SillyScrollTrial.class. Decompile it by putting jad.exe file into the same folder where SillyScrollTrial.class is and then open MS-DOS Prompt and do the following command to decompile the executable:

C:\PutInAppropriateDiskDriveAndDirectoryHere>jad SillyScrollTrial.class

It will generate something like this:

Parsing SillyScrollTrial.class... Generating SillyScrollTrial.jad

Exit the MS-DOS Prompt. Open the SillyScrollTrial.jad, what you got there? The source code(please do not spread this source code, it can damage the author easily!!!). There are two ways to crack now. First, see if we can make this program believe we are registered by fulfilling some conditions(for example, create some registry keys or create keyfiles...), and secondly, modify some of its source and re-compile it(this way is only possible with the full source code) and both could only be done by looking at its source. Before proceeding, I would like to state that it would be a lot better if you know Java programming language here or at least have a little programming knowledge(especially in C/C++ if you don't know Java at all) to be able to understand the code in the source file. Open up the source file and look around, finally, I concluded that we can't register it, so we need to modify the source so that it does not display the annoying text at our browsers' status bar and re-compile it to finish the job(maybe other ways are possible too, but I'm only going to show you how I do it). Search for "FREE Java Applets at www.consultcom.com" and you will come to the following line:

        slogan = "FREE Java Applets at www.consultcom.com";

This is something like a variable declaration. Look further down and you will find the following code which will display the above text:

    public void init() <-- a function
    {
        super.init();
        allowed = checkSecurity(); <-- check something
        if(!allowed) <-- if not(!) allowed, return and exit the function
        return;
        status = slogan; <-- else, get what's in slogan into status
        showStatus(status); <-- show status

The code look like C/C++, isn't it? I'll explain the above code. If allowed, the "FREE Java Applets at www.consultcom.com" message will be displayed at the status bar of the browser else if not(!) allowed, the "Unregistered: Contact support@consultcom.com" message will be displayed and you will not be able to use the applet at all(which is even worse than having the message at the status bar). Let's look at what it checks in the checkSecurity function:

    boolean checkSecurity()
    {
        String s = getParameter("copyright"); <-- get parameter of "copyright" in the .html into s
        if(s == null) <-- if s equals to null
        {
            error = unregistered;
            status = unregistered;
            showStatus(status);
            return false; <-- this value is important to the earlier code
        }
        int i = s.compareTo("Silly Scroll v1.0 Copyright (c) 2000, consulting.com Inc."); <-- if s != null, proceed to check the parameter
        if(i == 0) <-- if i equal to the correct parameter value
        {
            return true; <-- this value is important to the earlier code
        }
        else <-- else if i != to the correct parameter value
        {
            error = unregistered;
            status = unregistered;
            showStatus(status);
            return false; <-- this value is important to the earlier code
        }
    }

Oh, so it checks whether the following line exists in your .html file(most probably for credits), if it does, allowed=true else allowed=false:

<param name=copyright value="Silly Scroll v1.0 Copyright (c) 2000, consulting.com Inc.">

So, how to prevent the "FREE Java Applets at www.consultcom.com" message from being displayed in the status bar of our browsers? You remember the first line of code I show you? Here it is:

        slogan = "FREE Java Applets at www.consultcom.com";

I told you that this is something like variable declaration. So, if we declare slogan as "", then the following code that display slogan will just show blank text at the status bar:

        status = slogan;
        showStatus(status); <-- show status

Edit the line which I told you as variable declaration like below and then save the source:

        slogan = "";

Now, we could have stop here, try to re-compile the source and call it a crack but, as a cracker, it is always necessary for us to do the best crack available(yeah, rite. though DREAD is dead, its spirit is alive, heh, think different!). What's there do some more? Don't you think that the following line of HTML code could trouble the user when they are doing HTML codes?

<param name=copyright value="Silly Scroll v1.0 Copyright (c) 2000, consulting.com Inc.">

I don't know what you think, but I think I should remove the check of the above line from the applet(so that it runs eventhough the above line doesn't exist in the .html file). How to remove it? Take a look at the check:

    boolean checkSecurity()
    {
        String s = getParameter("copyright"); <-- get parameter of "copyright" in the .html into s
        if(s == null) <-- if s equals to null
        {
            error = unregistered;
            status = unregistered;
            showStatus(status);
            return false; <-- this value is important to the earlier code
        }
        int i = s.compareTo("Silly Scroll v1.0 Copyright (c) 2000, consulting.com Inc."); <-- if s != null, proceed to check the parameter
        if(i == 0) <-- if i equal to the correct parameter value
        {
            return true; <-- this value is important to the earlier code
        }
        else <-- else if i != to the correct parameter value
        {
            error = unregistered;
            status = unregistered;
            showStatus(status);
            return false; <-- this value is important to the earlier code
        }
    }

Edit it into the following so that the checkSecurity function always return true, meaning the user is allowed to run the applet(check back the the allowed/not allowed check):

    boolean checkSecurity()
    {
        return true;
    }

Save the source file. Rename it into SillyScrollTrial.java. Now we are ready to re-compile it. I hope you have installed and configured the Java Development Kit correctly, if not, continue reading the following instructions on how to do so in Windows environment(sorry, but if you are on other platforms, do contact me and see if I can help you).

1. Install it.
2. Set the PATH variable:
 i)Use the set command from an MS-DOS command line
 ii)Use the set command in the autoexec.bat file
 iii)Edit the environment variables using the Environment tab in the System control panel(Windows NT)

I recommend you to use the second approach(ii) to set the PATH variable(using autoexec.bat file). Following is the line in my autoexec.bat file for you to see as an example:

SET PATH=C:\JDK1.2.1\BIN

Note that when you set the PATH you have to point to the bin directory of your JDK's directory. Now you are ready to re-compile the source file. Open MS-DOS Prompt, go to the directory where the source file is and do the following command to compile the source(javac stands for JavaCompiler):

C:\PutInAppropriateDiskDriveAndDirectoryHere>javac SillyScrollTrial.java

If you do it correctly according to what I told you to, there shouldn't be any error with the source, only 1 warning. Note that in Java, case is CASE-SENSITIVE(meaning a is different from A, so, be careful with the casing). Let's test if the crack work after the source file is compiled into an executable. Copy the sample.html file you have earlier converted from sample.txt into the same directory as where the NEW .class file is but remove the following line from the .html file first:

<param name=copyright value="Silly Scroll v1.0 Copyright (c) 2000, consulting.com Inc.">

You could now double-click on that .html file and start testing our crack but I would like to show you something more about the JDK from Sun Microsystems, so, in the MS-DOS Prompt, do the following command(assuming that the .html file is named sample.html):

C:\PutInAppropriateDiskDriveAndDirectoryHere>AppletViewer sample.html

AppletViewer is another tool in the JDK which serves as an interpreter for applet. It does exactly as what the browser does but then, it has several other advantages like:

1. display the applet only
2. guranteed to be compatible with your compiler's version
3. some other stuffs

Look at it nicely. It does start even without the "copyright" parameter in the .html file(well, you should try without that parameter with the original .class file). There is also no annoying message in the status bar. We have succeeded. If you don't believe the AppletViewer, try with either Internet Explorer or Netscape Communicator. Cracked!!! That's all for now. Hope to see you soon on my next tutorial. As usual, contact me if I make any mistake, give me your feedback, comments, suggestions and opinions about this tutorial and my way of presenting it.

Extra notes:
I would like to say that I'm very happy while cracking this because it is my first ever Java crack and I have successfully cracked it with success. Though the crack is very simple, I hope whatever I present here could be useful(like the info about the JDK, how to configure, etc.) for the cracking community. I am also looking forward to do more tutorials on Java programs since Java is a significant programming language and is growing rapidly. Until then, do read my other tuts first...


Ending:
Thanks and greetz to:
+ORC, +HCU, Sandman, HarvestR, tKC, ytc_, Punisher, Kwai_Lo, TORN@DO, CrackZ, cLUSTER, LaZaRuS, mISTER fANATIC, yes123, WhizKiD, Volatility, ACiD BuRN, Eternal Bliss, R!SC, Kwazy Webbit, +Mammon, MisterE, Shadow, ^tCM^, WaJ, Borna Janes, Kathras, AB4DS(Death), douby, Steinowitz, Lord Soth, Latigo, Lucifer48, NeuRaL_NoiSE, Fravia+, Latigo, Duelist, Alpine, flag eRRatum, Nitrus, +Frog's Print, Muad`Dib, Iczelion, Razzia, Warezpup, Bomber Monkey, llama and other crackers, individuals and organisations who have helped me, either directly or indirectly.

Service for Mankind
ManKind
mankind001@bigfoot.com