Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Security-Basics
[Top] [All Lists]

Re: Cracking simple password encryption

Subject: Re: Cracking simple password encryption
Date: Fri, 23 Dec 2005 18:37:41 -0800
On 12/22/05, S.A.B.R.O. Net Security <sabronet@indy.rr.com> wrote:
It almost appears to be or very close to a simple Base64 scheme with
maybe a shift or substitution somewhere.

For example, your patterns :

a        aQ==
b        cg==
c        ew==

Now heres the results of a true Base64 encrypt :

a       YQ==
b       Yg==
c       Yw==


As you see the results are very close.  Hope this helps some.

Yes it does look like it is base64 now.  I have a few more passwords
that I put into html at http://vorpal.cc/~david/samples.html.  Also on
that page is the base64 decoded values and hex values of the
passwords.

I feel like I am very close to getting this.  It looks like each
character is 3bits left and XORed with itself.  Characters after the
first are XORed with the previous shifted right 5 bits.  However every
fourth character is treated differently if the password is longer than
3 characters.  I haven't figured that part out yet.

Here is some C# code that correctly encodes up to 3 characters:

private static byte[] Encode(byte[] a)
{
        byte[] c = new byte[a.Length];
        for (int i = 0; i < a.Length; i++)
        {
                c[i] = (byte)(a[i] ^ (a[i] << 3));
                if (i > 0)
                        c[i] = (byte)(c[i] ^ (a[i - 1] >> 5));
        }
        return c;
}

Since we found a utility that will reverse the encoding, this I don't
really need to get this anymore.  At this point it is purely for
entertainment :)

---------------------------------------------------------------------------
EARN A MASTER OF SCIENCE IN INFORMATION ASSURANCE - ONLINE
The Norwich University program offers unparalleled Infosec management 
education and the case study affords you unmatched consulting experience. 
Tailor your education to your own professional goals with degree 
customizations including Emergency Management, Business Continuity Planning, 
Computer Emergency Response Teams, and Digital Investigations. 

http://www.msia.norwich.edu/secfocus
----------------------------------------------------------------------------


<Prev in Thread] Current Thread [Next in Thread>