New Wordpress password hasher tool

This time just a quick post as I am in a hurry. Ever wondered how to change your Wordpress password in case you have forgotten it? In early versions Wordpress used the MD5 hashing algorithm to “encrypt” the passwords of a user. Nowadays Wordpress uses the Portable PHP password hashing framework (PHPASS) instead of MD5 hashing since version 2.5 (see this ticket) – so you cannot simply MD5 hash a new password and enter the digest into the database anymore. You have to encode it using the framework mentioned above.

Today i have implemented the PHPASS framework and turned it into a mainframe8 tool called the Wordpress password hasher. Use it to convert your new password into a “encrypted” hash and insert it into the wp_users table of the wordpress database. I will write a detailed howto later.

Posted in hands off! this is my stuff, security & privacy | Tagged , , , , | 15 Comments

How to crack MD5 passwords with John the Ripper – a live example exploiting TYPO3

Earlier I told you how to crack MD5 passwords in general. This article tells how to get the passwords out of a TYPO3 installation, which are MD5-hashed, and crack them using John the Ripper.

Preparations step 1: lurk the data!

Okay, assuming that you’re an TYPO3 administrator that wants to check the password strength of your backend users (good guy). Or you have gained access to the database of a TYPO3 installation and want to access the content management system (bad guy). No, you wouldn’t do that…
Well, in both cases you may want to to execute the following SQL query to assemble the account names and their respective passwords.


SELECT `username` , `password`
FROM `be_users`
INTO OUTFILE '/tmp/typo3passwords.txt'
FIELDS TERMINATED BY ':'
LINES TERMINATED BY '\n'

Now you have a well-formatted file containing all username/password combos of the specific TYPO3 setup.

Preparations step 2: fetch your tools!

Go and get John the Ripper (JtR) first. As required by the German law I can not tell how or where to get it. I guess you query your favourite search engine and will find it instantly. John the Ripper does come with a few cipher formats compiled in, but for MD5 you need more formats. These come in patches provided by third parties.

For Linux you have to compile JtR yourself, including the so called “big patch”.

<fetch john-1.7.2.tar.gz from a source near you>
tar xvf john-1.7.2.tar.gz
wget http://www.openwall.com/john/contrib/john-1.7.2-all-12.diff.gz
gunzip john-1.7.2-all-12.diff.gz
patch -p1 < john-1.7.2-all-12.diff
cd src/
make clean linux-x86-any
<notice: if you get errors missing des.h, you should install the libssl-dev (debian) package and re-run the make statement>

Sorry to say I have no idea how to get John the Ripper & the big patch running on windows. You better use Cain & Abel for that, i guess.

So, if the compiling went through you can test if everything went well:

~/jtr/john-1.7.2/src$ ../run/john

It should contain the following list of cipher formats:

--format=NAME force ciphertext format NAME: DES/BSDI/MD5/BF/AFS/LM/NT/PO/raw-MD5/IPB2/raw-sha1/macosx-sha1/md5a/hmac-md5/KRB5/bfegg/nsldap/ssha/oracle/MYSQL/mysql-sha1/mscash/lotus5/DOMINOSEC/NETLM/NETNTLM/NETLMv2/NETHALFLM/mssql/mssql05/epi/phps/mysql-fast

raw-MD5 is the cipher of choice and it is available right now – so let’s rock!

Go go gadget: starting to crack

The actual cracking process is quite simple: run John the Ripper using the format parameter stating that you want to use raw-MD5 and input the file you have created using the SQL statement above:

~/jtr/john-1.7.2/src$ ../run/john --format=raw-MD5 /tmp/typo3passwords.txt
Loaded 2 password hashes with no different salts (Raw MD5 [raw-md5])

The application then runs for a different amount of time – depending on your CPU power, your wordfiles and the weakness of the chosen passwords. In my example there are very weak passwords, as they are cracked nearly instantly. Let me show you using the –show parameter of JtR:

~/jtr/john-1.7.2/src$ ../run/john --format=raw-MD5 --show /tmp/typo3passwords.txt
jane.simpson:jane
admin:way2go
2 password hashes cracked, 0 left

That’s it! I can now approach the users and tell them how stupid their passwords are. You should do the same and check the passwords – especially your own. ;)

Did this article help you out? Please leave a comment, i appreciate them. You can subscribe to my RSS-Feed as well – it’s free! And last but not least do not forget to Digg me!

Posted in security & privacy | Tagged , , , , | 5 Comments

MD5 and SHA1 encoder plugins for major browsers

As already announced at the site itself, the MD5 and SHA1 encoders at mainframe8 support the use of custom browser search engines for quite a while now. This means you can MD5/SHA1 encode strings directly from the browser!

Screenshot of an MD5 encoding option integrated to the Mozilla Firefox browser

Screenshot of an MD5 encoding option integrated to the Mozilla Firefox browser

Technical background

We don’t rely on the old Sherlock standard but used the up-to-date OpenSearch definition. Sherlock has been Mozilla specific while the A9 OpenSearch Standard is now supported by all major browser vendors (Microsoft, Mozilla and -as far as i know- Google). Sorry to say Apple’s Safari and Opera seem to deny to adopt OpenSearch functionality yet. Don’t worry, i plan to write a blog article on how to add custom search functionality to Opera and Safari later.

How to install the encoder functionality

By far the most simple way is to enter the encoder sites (MD5/SHA1) and to click on the link in the green news box:

News on the MD5 encoder that includes the possibility to integrate the MD5 encoder into the browser

News on the MD5 encoder that includes the possibility to integrate the MD5 encoder into the browser

This will add the encoder functionality to the browser by using a javascript function. You are free to repeat this step for each encoder you need. On each site there is a link for the specific encoder.

Another way to incorporate the encoder into the browser is by using the autodiscovery function of the browser itself. Every opensearch enabled tool by mainframe8 identifies itself as a possible browser search plugin. Smart browsers such as Firefox v2/v3 and (hard to say that ;) ) Internet Explorer v7/v8 will check that identification and display it to the user.

Mozilla Firefox browser pointing to a custom search enabled website

Mozilla Firefox browser pointing to a custom search enabled website

To integrate the encoding functionality you are required to click on the higlighted/backlighted icon of your default search engine. The browser then gives you the opportunity to integrate it by using a simple dialog.

The Microsoft Internet Explorer behaves similiar:

Microsoft Internet Explorer 7 browser pointing to a custom search enabled website

Microsoft Internet Explorer 7 browser pointing to a custom search enabled website

How to use the encoder functionality

Now that you have integrated the custom “search” engine to the browser of your choice you can start using it. Here is an example usage of the MD5 integration into the Microsoft Internet Explorer 7:

Encoding MD5 digest directly from the Microsoft Internet Explorer 7 browser

Encoding MD5 digest directly from the Microsoft Internet Explorer 7 browser

  1. Use the drop-down button of the installed search engines
  2. Choose the appropriate encoder (here: MD5)
  3. Enter your string to hash into the input box and press enter

You will see the digest of your message instantly. Happy converting real text strings to hashes! :)

Posted in hands off! this is my stuff, my beloved code, world wide webtech | Tagged , , , | Leave a comment

Review of first CloudCamp Berlin

As announced i took part in the first instance of a CloudCamp in Berlin last thursday. While originally intended for tech-savvy people i had the impression that there were many folks from the management as well.

The first thing to notice is the different perception of the term “Cloud Computing” among the crowd as well as the speakers. The speaker who is most consistent with my view was Niko Nelissen of Sun. Niko described these architectural service layers of Cloud Computing:

  1. Software as a Service (SaaS)
  2. Platform as a Service (PaaS)
  3. Infrastructure as a Service (IaaS)

In my opinion this is the broadest and most appropriate notion of Cloud Computing. All other speakers defined Cloud Computing as a subpart of these layers.

Eventually the speeches were of different quality. They were arranged as lightning talks, so no pitching allowed and only five minutes to talk per speaker. I had the impression that some guys have stripped down their usual presentation slides to exclude everything that smells like a product and talked about the rest of the slides. Usually there is not much information left in a marketing talk. So my advice would be that these guys should be allowed to pitch their product. By this the Google talk could have been interesting.
Otherwise there were some really good speeches. Morris Riedel of the Jülich Supercomputing Center summed up some important learnings of the GRID Computing community that could be helpful for early adopters of Cloud Computing. I also liked the talk by Scott Wheeler of Directed Edge, whose conclusion i did not get – but the overall talk was good. ;)

As far as i can remember there were speakers from the following companies:

  • Sun Microsystems
  • Amazon Web Services
  • CSC
  • Google
  • Zimory
  • aiCache
  • Directed Edge
  • Jülich Supercomputing Center
  • Thorleif of The unbelievable Machine Company

Overall the first CloudCamp Berlin was a good start and i’d like to see it repeat in the capital later this year!

More extensive reviews of the event in German can be found at gruenderszene.de and MashedUp.

Posted in cloud computing | Tagged , | 1 Comment

Heading for CloudCamp Berlin

Heading for CloudCamp Berlin soon. With around 160 attendees it’s going to be really crowded. Tonite’s the night! ;)

Posted in cloud computing | Tagged , | 1 Comment