7.11.07

Eight Ways to Hack Oracle

Oracle is touted as being unbreakable, if talk weren't so cheap. Well as with any computing system, there are ways to hack it, and Oracle is no exception. In this piece, we'll talk about some of the ways that you can get at data you're not supposed to. We'll start by taking the perspective of the hacker, and we hope as a manager of databases yourself this will illustrate areas where your infrastructure may be vulnerable. We'll then follow that by discussing ways to protect against the vulnerability.

1. SQL Injection

With many Oracle databases these days, they are the backend datastore for a web application of one sort or another. The thing about web applications which makes them vulnerable and relatively easy targets for us are threefold. One, they are complex, composed of many components making them difficult to test thoroughly. Two, the barrier to entry for programmers is lower. You don't have to be a C programming guru to hack together some webpages. We'll show why that matters to us shortly. The third reason is urgency. Web apps are always in development mode, so they're constantly changing, rolling out new features. So, security is necessarily a lower priority. Ok on to the good stuff.

SQL Injection is simply entering information in a web form, and secretly adding some unexpected code, tricking the application to execute that on the database, and return results the programmer had not foreseen. For example, you have a user login form which requests username and password. In the username field, you enter:

sean'); select username, password from all_users;--

Now if the programmer was not smart enough to "sanitize" our input, i.e. check for things like this, then this will execute on the remote db and this sensitive data will be dumped back to our browser. Wow!

Here's a great comic which illustrates this quite well: http://xkcd.com/327/

You may think this is scary, but there's more. David Litchfield in his book "Oracle Hacker's Handbook" calls one particular pl/sql injection the "holy grail" because it is vulnerable in Oracle 8 all the way through the current 10g release 2. If it's not obvious, that means you can use it on almost *any* Oracle database out there.

How's it work you ask? You make use of a package called DBMS_EXPORT_EXTENSION, use injection to get our code to execute an exception handler that grants some user or for that matter all users, DBA privileges!

This was what the famous Alert 68 was all about, and according to Litchfield was never really properly patched.

Defending Against This Attack

In a word, diligence. There is no bulletproof solution, as it involves all the subtleties of applications that face the internet. There are various SQL Injection Testing techniques available. There is an excellent 3-part article at Security Focus called "Penetration Testing for Web Applications"

It is also possible to *detect* SQL Injection to some degree with various intrusion detection tools. Learn more over at Pete Finnigan's security site (search the page for "detecting sql injection") http://www.petefinnigan.com/orasec.htm

For developers there are packages that help you *sanitize* your inputs. If you call the various clean and sanitize routine on every value you receive from a form, you are much more protected than otherwise. But of course be sure to test and verify by hitting the application with SQL Injection tools. That's really the only way to be sure.

Pete Finnigan has reported that Steven Feurstein is working on SQL Guard, a pl/sql package to provide this type of library to developers. Read more here: http://www.petefinnigan.com/weblog/archives/00001115.htm

2. Default Passwords
Oracle is such a huge product and there are schemas created for everything. Most of these logins have default passwords. Is the database administrator diligent? One way to find out. Take a gander at some of the more common ones:

Username Password
applsys apps ctxsys change_on_install dbsnmp dbsnmp outln outln owa owa perfstat perfstat scott tiger system change_on_install system manager sys change_on_install sys manager

What's more even if these are changed, sometimes they are quite easy to guess, give "oracle", "oracl3", "oracle8", "oracle9", "oracle8i" and "oracle9i" a try as well.

Pete Finnigan has a very comprehensive and up to date list of default users and passwords for you to try out. This list also includes hashed passwords, so if you've queried all_users, you can compare against this list.

http://www.petefinnigan.com/default/default_password_list.htm


Defending Against the Attack

As a Database Administrator, you should audit all your database passwords regularly. If there is business resistance to changing easily guessable passwords, explain calmly, but with a clear and visual illustration of what could happen, and what the risks are.

Oracle also provides password profile security. You can enable profiles that enforce a certain level of complexity in your database passwords. You can also enable regular password expiration. Beware enabling this for logins that only happen through a webserver, or middle tier application server, as the application may suddenly break, if no one directly sees the warnings and notifications.

3. Brute Force

Brute force, as the name implies, is the method for banging away at the lock, or keyhole until it breaks. In the case of Oracle it means trying every username and password by automating the process with a little bit of code to help you.

For years now, a piece of software called John the Ripper has been available to unix administrators for exactly this task. Now there is a patch available for you so you can use this handy software for banging away at Oracle passwords. Want to speed this process up even more? Prepare in advance a table of all password hashes. Such a table is called a Rainbow table. You will have a different one for each username because the password hashing algorithm uses the username as the salt to the function. We won't get into that in too much detail, but here's a resource for further study: http://www.antsight.com/zsl/rainbowcrack/

Oracle servers default to automatically lockout a particular account after ten failed logins. Normally though "sys as sysdba" does not have this restriction. The thinking I guess is if you lockout the administrator, then everyone is locked out! Fortunately, for us this means programs like OraBrute make our lives much easier! Author Paul Wright has put together a great program for banging on the front door of your fortress all day and all night until it opens. Head on over to Paul's blog and download a copy for yourself! http://www.oracleforensics.com/wordpress/index.php/2007/03/04/oracle-passwords-and-orabrute-paper-update/

Defending Against the Attack

Defending against this type of attack can be done with the methods describe above for default passwords. A curious and proactive DBA might also go the extra step to download these tools, and attempt to hack into his own system. This will help illustrate your real risks, and better educate how safe you really are.

4. Sneaking Data Out The Back Door

(I was going to have a section called Auditing, but that makes more sense for the article on prevention).

In the security world, this concept is known as data exfiltration. It comes from the military term, opposite of infiltration, it means getting out without being noticed. In the context of getting data from a target database, it could be as simple as picking up some tape backups and restoring the database, or getting a copy from a retired crashed disk. However, it can also involve snooping network traffic for relevant packets of data.

Oracle has a package called UTL_TCP, which can make outside connections to other servers. It could be used with a little programming magic, to sending a low bandwidth stream of data from the database to some remote host. Oracle also comes with some useful packages to hide what might be inside your secret stream of data, so make ample use of those if you think an intrusion detection system might be monitoring your activities. They include DBMS_OBFUSCATION_TOOLKIT and DBMS_CRYPTO.

Defending Against the Attack

The best way to defend against these types of attacks is to setup an intrusion detection system. These can watch incoming and outgoing packets on the network. Some provide "deep packet inspection" which actually tests for certain SQL, and based on a set of rules, triggers alarms in certain circumstances. These tools can look for telltale signs like added UNIONs, various types of short- circuiting, truncating with a comment "--" and so on.
Conclusion:

So, as you can see there are a lot of ways to plan your attack, and get into a target Oracle database. DBAs should keep in mind that for each vulnerability, there is a way to defend against it, so vigilance is key. In Part II of this series, we will cover the insecurities of the Oracle Listener, privilege escalation to get more access from a less privileged login we already have, executing operating system commands, which can be very powerful, and under appreciated, and lastly filesystem security. If you can read the raw data out of the binary data files making up your database, you can completely circumvent any security measures put in place by Oracle

Author: Sean Hull @ www.databasejournal.com


Read more ...

6.11.07

Chesapeake Energy Deploys Oracle Grid Computing

REDWOOD SHORES, Calif., Nov. 5 -- Chesapeake Energy Corp., the largest independent and third-largest overall producer of natural gas in the United States, has deployed Oracle grid computing to enable greater performance and scalability of enterprise-wide online transaction processing (OLTP) and decision-support applications.

Chesapeake Energy implemented Oracle Database 10g, Oracle Real Application Clusters, Oracle Automatic Storage Management and Oracle Enterprise Manager 10g on three-nodes of four-way, dual-core Dell PowerEdge 6850 servers running Linux to power Oracle's PeopleSoft Enterprise Human Capital Management. The company migrated to PeopleSoft Enterprise on Jan. 1 to increase efficiency and operating performance and better serve their growing work force. Using a foundation of Oracle Database and Oracle Real Application Clusters, PeopleSoft Enterprise Human Capital Management is available to 6,000 Chesapeake Energy employees.

Since January, the company has incorporated various packaged applications -- both new and existing -- into their Oracle grid computing environment. Oracle's Hyperion Data Relationship Management was deployed to manage master data in the Team Table, a tool that leverages maps and spatial data to pinpoint team members based on their location and roles. In total, Oracle grid computing helps deliver enhanced performance, fault tolerance and scalability to five core enterprise applications and a centralized, corporate data warehouse with additional applications scheduled to be deployed on the grid.

Chesapeake Energy employs Oracle Enterprise Manager 10g to manage and monitor the performance of its applications and grid environment. To manage its storage environment, the company uses Oracle Automatic Storage Management, a database volume manager and file system optimized for database access and automates and streamlines performance and storage management for related systems. This has enabled the company to consolidate management tools for database storage and reduce the amount of manual intervention related to database storage management.

"Oracle grid computing has enabled enhanced overall application and system availability translating into less downtime for users," said John Marks, database systems supervisor at Chesapeake Energy Corp. "We have the flexibility to conduct hardware maintenance on an individual server as needed without impacting business users and taking a system offline. And we have the option of adding a server to the cluster before scalability becomes a problem."

Grid Computing Supports Reduction in Energy Consumption

By deploying an Oracle grid, Chesapeake Energy has a single environment to support various applications and databases previously running on stand alone servers. As a result, the company has:

* standardized its applications and databases on a common hardware platform.

* reduced the amount of servers used to support these applications.

* reduced hardware- and maintenance-related costs.

* lowered overall energy consumption by servers.

"As a leader in green initiatives, we're constantly seeking ways to be more energy efficient," said Stephen Taylor, IT infrastructure director for Chesapeake Energy Corp. "Oracle grid computing helped us reduce power consumption rates by enabling us to use fewer physical servers in our environment."

For more information on Oracle grid computing, including Oracle Database 11g, go to www.oracle.com/database.

About Chesapeake Energy Corp.

Chesapeake Energy Corp. is the largest independent and third-largest overall producer of natural gas in the United States. Headquartered in Oklahoma City, Okla., the company's operations are focused on exploratory and developmental drilling and corporate and property acquisitions in the Mid-Continent, Fort Worth Barnett Shale, Fayetteville Shale, Permian Basin, Delaware Basin, South Texas, Texas Gulf Coast, Ark-La-Tex and Appalachian Basin regions of the United States.

Source: Oracle Corp.


Read more ...

5.11.07

Oracle Fusion Gets a New Boss

Thomas Kurian is taking over the pivotal effort to make sense of the bevy of business software products acquired during CEO Ellison's three-year spree.

Oracle's (ORCL) fastest-rising executive has just stepped into a job that could determine how successful the world's second-biggest software company will be during the next decade.

Thomas Kurian, described by turns as thoughtful, charismatic, eloquent, and ambitious, took the helm of Oracle's Fusion project on Oct. 15 amid growing worries that the pivotal, complicated initiative may underwhelm customers and investors when it arrives in late 2008. The aptly named project is a grand plan to stitch together the wide array of business software products Oracle has acquired in the course of a three-year, 35-company takeover binge costing $24 billion.

Kurian, previously the chief of Oracle's fast-growing middleware application business, has big shoes to fill. He's taking over for John Wookey, a well-regarded veteran beloved by developers and customers, who has been reassigned within the company. "There are lots of stars inside Oracle, but they put multiple stars next to [Kurian's] name," says Brent Thill, director of software research at Citigroup (C).
Will Fusion Deliver?

For customers and investors, a lot riding is on Fusion's success. So they'll be listening closely for rare public clues about the potential financial and technological impact when Kurian gives a speech on Nov. 13 at the Oracle OpenWorld conference in San Francisco.

The new suite of applications—used for functions such as managing a company's books, keeping track of customers, managing payrolls, and planning manufacturing schedules—is supposed to cherry-pick the best of Oracle's software collection. That includes applications from Oracle's homegrown line, as well as from PeopleSoft, J.D. Edwards, Siebel Systems, and smaller acquisitions such as Retek and i-Flex Solutions. The first version will likely include what Oracle considers its biggest guns—its own accounting software, PeopleSoft's human resources product, and Siebel's customer management application—melded together with a unified approach to storing data and interacting with the programs.

Many Oracle customers and Wall Street analysts are skeptical that Fusion can deliver what the company has promised. Corporate IT departments have been left in the dark about what to expect since Oracle has eschewed the usual practice of testing a major product upgrade with select customers at least a year or two before it's released. "No one knows because no one's seen anything," says Charles Di Bona, a senior equity analyst at Sanford C. Bernstein & Co. And some chief information officers still have a hangover from a buggy version of Oracle applications released in 2000.

For now, Oracle's customers are stuck with a passel of aging products for which they pay hefty annual technical-support fees, and which aren't particularly easy to combine with one another or the latest Web technologies. The first Fusion version of Oracle's applications will attempt to solve those problems using the Java programming language and "Web services," an industry term for a set of Internet communications protocols. If successful, Fusion will lower customers' IT costs, yet keep them doling out lucrative support and maintenance fees to Oracle for years to come.
Diamond or Dud

Oracle is already tops in database software. But with all the acquisitions, culminating in Fusion, it wants to unseat archrival SAP (SAP) for control of the applications market. SAP controlled 20.8% of the $56.4 billion market for enterprise applications in 2006, nearly double Oracle's 10.7% share, according to industry consultancy AMR Research.

If Oracle gets Fusion right, delivering cutting-edge technologies that make it cheaper for customers to build on its platform, the company may add to its applications market share. It would also help extend Oracle's reach into new markets such as retailing and transportation. And with one underlying software code to support instead of the current five, the company could make better use of, or cut, its $2.2 billion in annual research and development spending.

If Fusion's a dud, Oracle risks losing ground to SAP and Salesforce.com (CRM), both of which have been quicker to deliver Web-based versions of enterprise software. The Web-based approach has grown in popularity because customers can lower the cost of keeping software up-to-date.

Worse, Oracle could lose customers to rival offerings from SAP, Microsoft (MSFT), and other competitors, a risk software companies face when they overhaul the code underlying their products. "In any technology architecture shift there are winners and losers, and you clearly want to be on the right side of that," says Peter Kuper, a vice-president and research analyst at Morgan Stanley (MS).
Unclear Road Map

It may take years and multiple generations of Fusion before the outcome is known. Murray Beach, president of investment bank Boston Corporate Finance, says he expects Oracle will have a strong offering in several years, by perhaps its fourth version of the software. "You're not going to see the best product the first time around," he says. Recent analyst speculation about a potential Fusion delay has died down, but some think Oracle simply readjusted its target. "Oracle will ship something in 2008 and declare victory that they got it out the door," says Citigroup's Thill.

At Oracle's annual shareholder meeting on Nov. 2, CEO Larry Ellison said some Fusion products will appear in 2008, and more in 2009. Customers will move to them "over a very long period of time," he said. Oracle declined to comment for this story.

But IT executives say Oracle's Fusion road map—the multiyear plans tech vendors publish to show customers what to expect and when—has been fuzzy at best. "Other than a lot of hype and hot air about Fusion, how is it really going to work?" asks Allen Emerick, IT director at Skanska USA Building (SKAB), a construction firm involved in projects such as the new NFL stadium at New Jersey's Meadowlands sports complex. "The timing has been all over the place." Skanska runs applications from J.D. Edwards, which Oracle picked up when it bought PeopleSoft. It remains unclear, Emerick says, how Oracle will get that software and its customized elements working with Fusion products.
The Uncertainty of Transition

Further complicating matters is the chance that Oracle could make another bid for middleware vendor BEA Systems (BEAS) (BusinessWeek.com, 10/30/07), adding another alien product line that would need to be integrated into Fusion at some point.

SAP is trying to exploit the uncertainty, telling customers that Fusion's goal of tying together Oracle's various applications could be a red herring to get them to stay on board. "Maybe they were being a little naive" in thinking they could pull off the integration, and "maybe they were being a little marketing-oriented" in selling the Fusion concept to customers, says Bill McDermott , SAP's president and CEO for the Americas, Asia Pacific, and Japan. In September, SAP introduced an Internet suite of software (BusinessWeek.com, 9/19/07) for small and midsize companies called Business ByDesign.

Oracle could quiet its critics with a strong early version of Fusion, or at least erode their arguments over time. Either way, the company has played its hand deftly while it makes the transition. First off, nearly all Oracle customers have been signed up for multiyear licensing agreements that will hold regardless of whether they choose to upgrade to Fusion. The company also has held onto customers of PeopleSoft, Siebel, and other acquired vendors by offering them lifetime tech support.
Kurian's Ascension

The aftermath of the power struggle between Kurian and Wookey could go a long way toward streamlining Fusion. Kurian's middleware group and Wookey's applications team were working on overlapping Fusion projects, and the two were fighting over pieces of Hyperion Solutions, the data-analysis software vendor Oracle bought in March, analysts say. In addition, Kurian was being recruited by other tech companies and needed a promotion to stay on board, according to sources.

To be sure, marginalizing Wookey, who had a reputation for holding onto key developers and fixing projects that went off track, could set Oracle back. "He was a tremendous asset," says Citigroup's Thill. "He's not someone who's easily replaceable." Wookey is staying on at Oracle to assist with the reorganization, according to an Oct. 15 e-mail Ellison sent to employees. Messages left at Wookey's office weren't returned.

A couple of years ago, Oracle president Charles Phillips introduced Kurian at a customer event in Boston as Oracle's potential next CEO. There's a long list of former highfliers and potential successors who are long since gone from the company, though, including venture capitalist Raymond Lane, former PeopleSoft CEO Craig Conway, and onetime heir-apparent Gary Bloom.

People who know Kurian say he's got the smarts and savvy to get even further ahead in Oracle's rough and tumble world. Shipping a winning version of Fusion would go a long way toward proving them right.

Author: Aaron Ricadela @ businessweek.com


Read more ...