Auditing an Oracle database for security issues is very important. PeteFinnigan.com provides all of the information and tools that you will need Click here for details of PeteFinnigan.com Limited's detailed Oracle database security audit service Click here for details of PeteFinnigan.com Limited's Oracle Security Training Courses
Cookie Policy:We only use essential cookies on small sections of this website. For details see here.

Welcome, Guest. Please Login.
Nov 20th, 2017, 1:46am
News: Welcome to Pete Finnigan's Oracle security forum
Home | Help | Search | Members | Login
   Pete Finnigan's Oracle Security Forum
   Oracle Security
   Oracle Security tools
(Moderator: Pete Finnigan)
   hashattack a dictionary attack tool for Oracle
« Previous topic | Next topic »
Pages: 1  Reply | Notify of replies | Send Topic | Print
   Author  Topic: hashattack a dictionary attack tool for Oracle  (Read 5234 times)
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
hashattack a dictionary attack tool for Oracle
« on: Aug 8th, 2005, 10:38pm »
Quote | Modify

Josh Wright has written a set of PL/SQL scripts that can be used to pre-compute password hashes for an Oracle user account. The results are stored in a table and this table can then be used at a later date to check any other database for the password of the same account.  
 
The generation of the password hashes takes time up front but the table of results can be used many times again. This is useful for default accounts such as SYS, SYSTEM, DBSNMP and OUTLN.  
 
I just discussed the tool in my blog in a post titled "[url http://www.petefinnigan.com/weblog/archives/00000502.htm]Joshua Wright has provided a free tool to check Oracle accounts for common passwords[/url]" - the code is available from Josh at [url http://802.11ninja.net/code/hashattack-0.1.tgz]Hashattack[/url]  
 
Any comments, suggestions, improvements, then please let us know
 
cheers
 
Pete
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
gamyers
PeteFinnigan.com Junior Member
**



I love YaBB 1G - SP1!

   
View Profile |

Posts: 80
Re: hashattack a dictionary attack tool for Oracle
« Reply #1 on: Aug 9th, 2005, 7:55am »
Quote | Modify

Had a quick look at this.
I think the speed could be considerably improved if the cleartext passwords were loaded into a table rather than read using UTL_FILE.
Also, there's no need for the INSERT to be done with EXECUTE IMMEDIATE which will have an additional parsing overhead.
 
 
IP Logged
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: hashattack a dictionary attack tool for Oracle
« Reply #2 on: Aug 9th, 2005, 3:40pm »
Quote | Modify

Hi Gary,
 
Thanks for the suggestions. Josh is a member here so hopefully he will jump in and contribute.  
 
I thought about the same myself yesterday (about loading the passwords) and sent an email to Josh to see if he could do it. The Adam Martin tool installed a big list of dictionary words into a table with a set of insert statements. The same could be done with SQL*Loader - which should be the fastest method.
 
A pre-created table exported would be an alternate solution - I could host this here depending on its size.
 
Your other suggestion about not using execute immediate is also valid, dynamic SQL is always slower and of course presents a risk of SQL Injection.
 
cheers
 
Pete
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
gamyers
PeteFinnigan.com Junior Member
**



I love YaBB 1G - SP1!

   
View Profile |

Posts: 80
Re: hashattack a dictionary attack tool for Oracle
« Reply #3 on: Aug 10th, 2005, 1:01am »
Quote | Modify

The USAGE file with the downlead mentions a precreated file : hashattack-system-35m-rec.csv.bz2  
with "~3.5 million passwords for the SYSTEM account"
 
A quick estimate would give that about 100-150 Mb uncompressed.  
 
Another advantage of a table loaded password list, is that you could easily add mangled passwords with things like
INSERT ... SELECT translate(password,'OL','01')
 
PS. If he does read this, it probably worth including in the USAGE notes that anyone running it should ensure the profile for the created user has any password reuse checking disabled as that would almost certainly kill performance.
IP Logged
Joshua Wright
PeteFinnigan.com Newbie
*






   
View Profile | Email

Gender: male
Posts: 6
Re: hashattack a dictionary attack tool for Oracle
« Reply #4 on: Aug 11th, 2005, 7:19pm »
Quote | Modify

Pete, gaymers,
 
Thanks for the comments on the hashattack tool, I appreciate your feedback.
 
I implemented some of your suggestions, and re-wrote how I'm obtaining the dictionary words in this 2nd version of the tool.  Instead of reading one word at a time with utl_file, I create a directory object and an external table to refer to the wordlist, then I use a CTAS statement to create a table with all the dictionary words.
 
Once the dictionary words are populated in the table, I LOOP through a cursor for each dictionary word with ALTER USER and an INSERT into the hashattack table.  I removed the unnecessary EXECUTE IMMEDIATE for the insert as well.
 
Here is how performance looks on my P4 3.4 GHz 9.2.0.1.0 Linux database:
 
hashattack 0.1.0 - 25k words completed in 245 seconds
hashattack 0.2.0 - 25k words completed in 198 seconds
 
That's a decent performance boost, plus it allows me to add a "password permutation mode" feature like both of you suggested using translate().
 
The new version is up at http://802.11ninja.net/code/hashattack-0.2.0.tgz.  I'd love feedback and comments on my puny PL/SQL coding style. Smiley
 
Thanks!
 
-Josh
IP Logged
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: hashattack a dictionary attack tool for Oracle
« Reply #5 on: Aug 11th, 2005, 10:43pm »
Quote | Modify

Hi Josh,
 
Thanks very much for the updated version. I have added a link to it on my tools page and also downloaded it.  
 
I have had a look at the code and will have a play with it later.
 
cheers
 
Pete
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Marcel-Jan
PeteFinnigan.com Junior Member
**






   
View Profile | WWW |

Gender: male
Posts: 83
Re: hashattack a dictionary attack tool for Oracle
« Reply #6 on: Aug 12th, 2005, 8:06am »
Quote | Modify

This morning I tried to download hashattack-0.2.tgz, but it wasn't available. hashattack-0.1.tgz is available, I've noticed after altering the URL slightly.  
 
Apparently this tool doesn't go unnoticed as I found while searching on the Internet: http://www.indianz.ch/toolslnxe.html.
IP Logged
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: hashattack a dictionary attack tool for Oracle
« Reply #7 on: Aug 12th, 2005, 11:13am »
Quote | Modify

Hi Marcel-Jan,
 
Welcome to the forum!, I just tried the link again for hashattack 2.0 and it works for me. I just downloaded it again and unzipped it fine. Maybe Josh's site was down when you tried?, although if you were able to get version 1.0 that theory doesn't hold true. Anyway it just worked for me.
 
cheers
 
Pete
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Marcel-Jan
PeteFinnigan.com Junior Member
**






   
View Profile | WWW |

Gender: male
Posts: 83
Re: hashattack a dictionary attack tool for Oracle
« Reply #8 on: Aug 13th, 2005, 9:22pm »
Quote | Modify

Hi Pete,
 
I've tried to download it several times from both work and home locations, with both Mozilla Firefox and Internet Explorer. I've also tried it at several times on the day, but the message is the same everytime:
 
Not Found
The requested URL /code/hashattack-0.2.tgz was not found on this server.
 
 Huh
IP Logged
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: hashattack a dictionary attack tool for Oracle
« Reply #9 on: Aug 14th, 2005, 9:32pm »
Quote | Modify

Hi Marcel-Jan,
 
Not sure what your issue is, I just tried it again and it was OK. maybe Josh could check his logs and see if there is a generic download issue.  
 
In the meantime I have just emailed hashattack 2.0 to you.
 
cheers
 
Pete
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Marcel-Jan
PeteFinnigan.com Junior Member
**






   
View Profile | WWW |

Gender: male
Posts: 83
Re: hashattack a dictionary attack tool for Oracle
« Reply #10 on: Aug 15th, 2005, 8:51am »
Quote | Modify

Thanks a lot. I got it this time Smiley
IP Logged
Joshua Wright
PeteFinnigan.com Newbie
*






   
View Profile | Email

Gender: male
Posts: 6
Re: hashattack a dictionary attack tool for Oracle
« Reply #11 on: Aug 15th, 2005, 9:40pm »
Quote | Modify

Hi guys,
 
Note that the URL is http://802.11ninja.net/code/hashattack-0.2.0.tgz - not "hashattack-0.2.tgz".
 
Thanks!
 
-Josh
IP Logged
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: hashattack a dictionary attack tool for Oracle
« Reply #12 on: Aug 16th, 2005, 8:41pm »
Quote | Modify

OK, we now might be getting somewhere. The link in Josh's last reply is correct and works and I have also fixed the link on my [url http://www.petefinnigan.com/tools.htm]tools page[/url] which was missing a "0" in the URL.  
 
Thanks for the correction Josh.
 
cheers
 
Pete
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pages: 1  Reply | Notify of replies | Send Topic | Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright 2000-2004 Yet another Bulletin Board