Blogs & Stories

SpiderLabs Blog

Attracting more than a half-million annual readers, this is the security community's go-to destination for technical breakdowns of the latest threats, critical vulnerability disclosures and cutting-edge research.

Announcing Net::TNS for Ruby – A Gem for Connecting to Oracle Databases

For the security professional, working with Oracle Database can present some…challenges. Not least is in the simple ability to connect to a database. Oracle provides a few clients, each fairly heavyweight and with their own sets of dependencies (e.g. Java). And that's about it. There are virtually no open implementations of TNS (the protocol used to talk to Oracle DB[1]), and Oracle publishes virtually no documentation on the protocol.

This leaves limited options for developers of security products like Trustwave's, as the available clients may be too cumbersome or may not provide the functionality needed. Today, though, we're announcing that that tight spot for us has led to benefits for all: we're publishing a lightweight Ruby gem for TNS. The gem, which is the result of significant work and research by several SpiderLabs members, currently has limited capabilities, but we hope those can be expanded with the help of internal and external contributors.

Install the gem from RubyGems with a simple 'gem install net-tns', or head on over to the SpiderLabs GitHub site at https://github.com/SpiderLabs/net-tns and check out the source code itself. We'd gladly accept pull requests, reported issues, or any other feedback.

[1] More accurately, the suite of protocols whose best-known member is TNS.