Help - Search - Members - Calendar
Full Version: When Encryption Is Unserviceable
Forums > General GSO > GSO Tutorials
SuRGeoN
You can find also here -> http://surgeon.gotdns.org/tutos/WhenEncryp...serviceable.txt

I'm waiting for your comments...
Have a nice day smile.gif

CODE
[SOF]
===============================================================================
            When Encryption is unserviceable
                               by SuRGeoN
===============================================================================                                                                                                                                              28/06/2007

Some times we use encryption just to feel more secure. But many times the real truth is that the
encryption is unserviceable even if we have a very difficult/big password with a strong
encryption algorithm. I'll give two examples to explain this idea.

==========
1) Forums
==========

We suppose that the Administator of a www.oneforum.com forum has a very strong password. We know
that the forum uses MD5 algorithm for password encryption. Then someone steals Administrator's
cookie with some XSS vulnerability in this forum and he know the md5 hash
bbbd53e913a404b04abf373dc1dac49b. It's easy for him to find Administrator's UserID from members.php
for example http://www.oneforum.com/member.php?u=123 when he looks for Admin's profile.

In this scenario crackers try to crack the md5 hash with program like John the Ripper, Cain & Abel
or Passwordpro etc. This method for a strong password will take a year, maybe more.
Is this the best way?

No.Why we have to find the real password and we use it with the standard way in the Login Form when
we can do a http request with the prefered web page in the forum (ex. Admin's Forum ->
forumdisplay.php?f=123) including in the http header the cookie with Administrator's data (we dont
need the real password only the hash).

A http request example in the above scenario...

-------------------------------------------------------------------------------------
GET http://www.oneforum.com/forumdisplay.php?f=123 HTTP/1.1
Host: www.oneforum.com
Cookie: bbuserid=123; bbpassword=bbbd53e913a404b04abf373dc1dac49b;
-------------------------------------------------------------------------------------

==========
2) Shares
==========

Another example that it'll help us to understand why encryption sometimes is unservicable are Shares.

We suppose that we have access to a LAN which uses Sharing. We can find LM/NTLM hashes with many
ways (ex. Sniffing(ettercap), PwDump, Findpass, CacheDump etc). We know that if we crack this hashes
we can map a network drive with the victim's local drives, we can execute commands or we can take a
remote desktop.

All the known tools need the real password to work ... examples ...

    A) Map a network drive (net command)
        net use z: \\administrator-cn\c$ /USER: DOMAIN\Administrator <password>

    B) Remote execute commands (psexec)
        psexec \\administrator-cn -u DOMAIN\Administrator -p <password> c:\winnt\notepad.exe

    C) Remote desktop (mstsc)
        mstsc.exe it asks for Username/Password.

...but the clear text password travels over the network?

No. Just the hash. So if we could send the hash not the password with above tools we dont need to
crack the very strong password and we see why the encryption in this situation is unservicable too.

I found one tool that it seems to work with this method "Passing The Hash".
SMBProxy -> http://www.cqure.net/wp/?page_id=11

Of course the encryption is important for more security but we have to know when it can be unservicable.
The real hackers don't need to crack :)
===============================================================================
[EOF]
Jeremy
Password hashing via algorithms is not the same as encrypting. Encrypting is reversible using a known algorithm and key whereas the 2 methods you referred to are one-way algorithms.
SuRGeoN
QUOTE(Jeremy @ Jul 3 2007, 06:42 AM) *
Password hashing via algorithms is not the same as encrypting. Encrypting is reversible using a known algorithm and key whereas the 2 methods you referred to are one-way algorithms.


Jeremy,

You are right, the examples are one-way algorithms but I wrote for encryption general because this
idea could work for encryption algorithms too. If you disagree let me know why...

For example, think a simple two-way algorithm encryption for a password...

example <-real password

algorithm: character(ascii(character(i))+1)

fybnqmf <-hash

again if you find a way to bypass the login form and find a way to use only the hash it works.
For example you have to create a program that it'll send a tcp/ip packet with the same way with
the original form/program but yours will send the hash directly.

PS: This Thread is double... (maybe you can remove the second one? sorry and tnx)
GovernmentSecurity.org > General GSO > GSO Tutorials
System Hardening/Networking Security / Firewall / IDS / VPN / Routers
SuRGeoN
Some additional thoughts/tools

CODE
MSVCTL Tool
-----------

http://truesecurity.se/blogs/murray/archive/2007/03/16/why-an-exposed-lm-ntlm-hash-is-comparable-to-a-clear-text-password.aspx
http://www.microsoft.com/emea/itsshowtime/sessionh.aspx?videoid=351 -> MSVCTL Tool

SAMBA (winexe)
--------------

http://www.foofus.net/jmk/passhash.html
bonarez
I came across the 'passing the hash' technique a few years ago in a 'hacking exposed' book.

Been searching for some tools for a while, but didn't find any code.

tried smbproxy, but without much success.

came across a modded samba client though: Click to view attachment never tried it though

anyone could get me source, you'd make me a happy person biggrin.gif
SuRGeoN
just to put them all together smile.gif ...
The latest one...

CODE
What is Pass-The-Hash Toolkit?


The Pass-The-Hash Toolkit contains utilities to manipulate the Windows Logon Sessions mantained by the LSA (Local Security Authority) component. These tools allow you to list the current logon sessions with its corresponding NTLM credentials (e.g.: users remotely logged in thru Remote Desktop/Terminal Services), and also change in runtime the current username, domain name, and NTLM hashes (YES, PASS-THE-HASH on Windows!).


http://oss.coresecurity.com/projects/pshtoolkit.htm
mango1122
Hmm i posted that already, didn't get much replies though.Nice tool though
feyt333
can we use winxp?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.