Call: +44 (0)1904 557620 Call
Forum

Welcome, Guest. Please Login.
Aug 10th, 2022, 11:45pm
News: If you would like to register contact the forum admin
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 6159 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
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 #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 (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
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
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 #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

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
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 #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 (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
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
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 #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 (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
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
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 #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 (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
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
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 #10 on: Aug 15th, 2005, 8:51am »
Quote | Modify

Thanks a lot. I got it this time Smiley
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
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 #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 (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
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
  • PFCLScan PFCLScan

    Simply connect PFCLScan to your Oracle database and it will automatically discover the security issues that could make your Oracle database vulnerable to attack and to the potential loss of your data.

  • PFCL Obfuscate PFCLObfuscate

    PFCLObfuscate is the only tool available that can automatically add license controls to your PL/SQL code. PFCLObfuscate protects your Intellectual Property invested in your PL/SQL database code.

  • PFCLCode PFCLCode

    PFCLCode is a tool to allow you to analyse your PL/SQL code for many different types of security issues. PFCLCode gives you a detailed review and reports and includes a powerful colour syntax highlighting code editor

  • PFCLForensics PFCLForensics

    PFCLForensics is the only tool available to allow you to do a detailed live response of a breached Oracle database and to then go on and do a detailed forensic analysis of the data gathered.

  • Products We resell PFCLReselling

    PeteFinnigan.com Limited has partnered with a small number of relevant companies to resell their products where they enhance or compliment what we do

  • PFCLATK PFCLATK

    PFCLATK is a toolkit that allows detailed pre-defined policy driven audit trails for your Oracle database. The toolkit also provides for a centralised audit trail and centralised activity reporting

  • PFCLCookie PFCLCookie

    PFCLCookie is a useful tool to use to audit your websites for tracking cookies. Scan websites in a natural way using powerful browser driven scanner

  • PFCL Training PFCLTraining

    PFCLTraining is a set of expert training classes for you, aimed at teaching how to audit your own Oracle database, design audit trails, secure code in PL/SQL and secure and lock down your Oracle database.

  • PFCL Services PFCLServices

    Choose PFCLServices to add PeteFinnigan.com Ltd to your team for your Oracle Security needs. We are experts in performing detailed security audits, data security design work and policy creation

  • PFCLConsulting PFCLConsulting

    Choose PFCLConsulting to ask PeteFinnigan.com Limited to set up and use our products on your behalf

  • PFCLCustom PFCLCustom

    All of our software products can be customised at a number of levels. Choose this to see how our products can be part of your products and services

  • PFCLCloud PFCLCloud

    Private cloud, public cloud, hybrid cloud or no cloud. Learn how all of our services, trainings and products will work in the cloud

  • PFCLUserRights PFCLUserRights

    PFCLUserRights allows you to create a very detailed view of database users rights. The focus of the reports is to allow you to decide what privileges and accounts to keep and which to remove.

  • PFCLSTK PFCLSTK

    PFCLSTK is a toolkit application that allows you to provide database security easily to an existing database. PFCLSTK is a policy driven toolkit of PL/SQL that creates your security

  • PFCLSFTK PFCLSFTK

    PFCLSFTK is a toolkit that solves the problem of securing third party applications written in PL/SQL. It does this by creating a thin layer between the application and database and this traps SQL Injection attempts. This is a static firewall.

  • PFCLSEO PFCLSEO

    PFCLSEO is a web scanner based on the PFCLScan technology so that a user can easily scan a website for technical SEO issues