Security Now
Security is top-of-mind everywhere, especially right here where Juniper experts share their thoughts on the latest security breakthroughs and product advancements
Showing results for 
Search instead for 
Do you mean 

NoSQL Injection

by Trusted Contributor on ‎06-19-2012 09:00 AM

As times change so do the problems that we face. In today’s world we face the problems of ever changing datasets. When creating an application the schema that is used to contain our data is no longer fixed. Due to the rapidity of development, companies can’t wait weeks to complete the definition of how they want to store their data. Waiting a week or a month on your application or enhancement may spell disaster for your product. In some cases you want the flexibility to change how your data is stored and queried to get the most out of your data. Because of these challenges the NoSQL movement was born.

 

NoSQL is a technology that allows you to have non-fixed datasets when storing data into a database. The minimal need you want to solve by using NoSQL is the need for two or more items stored in a dataset to have different properties. An example would be if you wanted to store contact information such as name, address, and telephone number. What if you had users that had twitter, foursquare, or Facebook data that you wanted to store with your traditional contact data? In a traditional relational database you would need to preallocate all the fields that you need upfront. You can change your fields within a relational database but it may take an extreme amount of time to apply those changes to your database. This may cause downtime or loss of productivity. Because of this NoSQL was created. Because we have moved forward with NoSQL doesn’t mean that we leave traditional databases behind. If you’re using a fixed field dataset then odds are traditional databases still work for that application.

 

NoSQL databases are popular in the field of web applications and analytics. There are even a few different types of NoSQL systems as they accomplish different things. One example is an in memory database. This would include Redis or Memcache. These systems are used for high volume queries that need extremely low latency responses. Great uses for these systems are for things like trending lists on social networks or online games. They both need low latency access to a set of data. In the case of social networks  such as Twitter tens of millions of people look at the top trends per day. A backend system performs analysis on the feed on incoming tweets and then posts the result of the analysis to the memory database. When users are looking to see what the hottest trends are they will access the memory store and then get a very fast response. This is much better than the usual query against a database. A database would need to spin up its disks, perform a calculation, and then return the data.

 

Because of the popularity of these databases and the fact that they are being used in a wide variety of applications, we naturally intersect with security risks. By default these databases do not use authentication. This would be the state if you downloaded the software and installed it yourself. Why not use authentication? Well the idea is accessibility toward developers. Ideally these databases are deployed in firewall secured locations or listening so only on server processes can talk to them. With the drive of cloud based services its possible to assemble an application of any scale very quickly. Sometimes in doing so developers may forget about the need for authentication.

 

Besides user data it’s common to store things such as session cookies or other application state data inside of these databases.  In extreme examples an attacker could dump all of your session cookies and then use this to access a site with another users credentials. Other cases attackers used the NoSQL systems to store and serve malware.

 

The biggest issue here isn’t with the databases themselves but as with most security issues it has to deal with the humans configuring them. Below is a series of links on how to enable authentication on the various databases that I mentioned. Ideally you would want to limit access to the systems with a network firewall or perhaps server side firewalling. If the database’s port is open to the Internet odds are someone will attempt a brute force attack on the system to break in. This is common with any authenticated service (SSH, FTP, HTTP, etc.) let alone a service that provides the potential for very valuable data. There is even a module for Metasploit to brute force against a MongoDB host. There are other similar modules for scanning for Redis and other NoSQL systems.

 

When choosing to use any service you need to be aware of the implications of it. If your going to use a service to host data, the protocol or application is irrelevant, be aware of the risk if that data is made accessible. Because NoSQL systems are somewhat new to network security administrators its important to be aware of the potential risks of these services running in your network.

 

Securing Databases:

MongoDB: MongoDB Security

Redis: Redis Security

CouchDB: CouchDB Security

Memcache: Memcached Security

Comments
by Bbaer
on ‎06-20-2012 02:13 PM

No SQL options don't leverage the significant embedded knowledge among customers of SQL.  Often requires a completely new query language which can be seen as an investment in something unproven.  In other words investments in infrastructure that may have no legs or is not future proofed.  It would seem to me the better option would be to explore the NewSQL solutions that provide new, scalable infrastructure for big data but support existing query tools leveraging SQL knowledge and investments?

 

What is your opinion or perspective on this?

Post a Comment
Be sure to enter a unique name. You can't reuse a name that's already in use.
Be sure to enter a unique email address. You can't reuse an email address that's already in use.
Type the characters you see in the picture above.Type the words you hear.
Announcements

Network Design and Architecture Center
Labels
About the Author
  • Andrew is a Juniper Distinguished Engineer responsible for the architecture of Juniper's network management user interfaces.
  • Asher Langton is a senior software engineer and malware researcher on Juniper's Sky ATP team.
  • Bill is the Director of Federal Certifications and Policy at Juniper Networks. In this role, Bill focuses on several areas unique to the needs of Federal Government customers, including product certifications, IPv6, and security. Bill came to Juniper Networks in January 2008 after more than 20 years in the IT community working with commercial enterprise customers, service providers, and the US Federal Government. Bill started his career as an engineering officer in the US Air Force after graduating with a Bachelor of Aerospace Engineering from the Georgia Institute of Technology. Bill has an MBA from the Wharton School at the University of Pennsylvania.
  • Brad Minnis, CPP is the Senior Director of Corporate Environmental, Health, Safety & Security for Juniper Networks, Inc. based in Sunnyvale, CA, where he is responsible for strategic design, implementation and management of the company’s security, safety, environment, crisis management and business continuity functions. He also leads the company’s efforts in corporate citizenship and sustainability, and manages the Corporation’s government-related security programs. Mr. Minnis has over 30 years experience in the Silicon Valley and has managed EHSS operations for a number of high tech companies, including Juniper Networks, 3Com Corporation, and National Semiconductor Corporation. Mr. Minnis’ specialties include security management, supply chain and product integrity, anti-counterfeit, occupational health and safety and crisis management. In his role as Cyber Incident Response Team Leader for Juniper, Mr. Minnis has managed numerous high impact cyber-related incidents and cross-functional responses. Mr. Minnis served for ten years in the United States Navy and has served in leadership positions the International Security Management Association (ISMA) and ASIS International, serving as Chairman of the San Francisco Chapter in 2003. He has also co-written several publications on software integrity assurance and supply chain security with organizations such as SAFECode. Mr. Minnis is certified as a Protection Professional by the Professional Certification Board of ASIS International and attended the University of Connecticut, where he received two certificates in Environmental, Health and Safety
  • François Prowse is a Senior Systems Engineer for Juniper Networks, based in Brisbane Australia. Francois joined Juniper in 2006 as part of the New Zealand SE team, subsequently relocating to Australia. Prior to Juniper, Francois worked for four years at Alcatel in both operational and architectural roles, being jointly responsible for the construction of New Zealands' largest MPLS core network. Prior to Alcatel, Francois worked at UUnet, focusing on core network expansion in Europe. In all previous roles JUNOS has been the driving factor behind day to day operations, providing him with over 8 years of operational experience. Francois is a Juniper Networks Certified Internet Expert (JNCIE #144) which he obtained prior to joining Juniper Networks.
  • Greg Sidebottom is a Senior Engineering Manager in the Identity and Policy Management business unit at Juniper Networks. Greg has spent the last decade plus conceptualizing, architecting, designing, and leading the implementation of Juniper's SDX and SRC families of policy based service management applications. Previous to this, Greg held positions in the software and networking industries at Siemens, Cognos, Nortel, GTE labs subsidiary MPR Teltech, and the Alberta Research Council. Greg is an author of eight invention disclosures resulting in two patents issued and three pending. Greg holds a B.Sc. in Computer Science for the University of Calgary and an M.Sc. and Ph.D. in Computing Science from Simon Fraser University.
  • Jennifer Blatnik is vice president of cloud, security and enterprise portfolio marketing at Juniper Networks with focus on enterprise deployments of security, routing, switching, and SDN products, as well as cloud solutions. She has more than 20 years of experience helping enterprises solve network security challenges. Before joining Juniper, Jennifer served multiple roles at Cisco Systems, Inc., including directing product management for security technologies aimed at small to medium enterprises, as well as supporting managed services, cloud service architectures and go-to-market strategies. She holds a B.A. in Computer Science from University of California, Berkeley.
  • Jim Kelly, Senior Product Line Manager – CTP Products Juniper Networks. Jim Kelly is the senior product line manager for the CTP products where he is responsible for the CTP product direction, marketing and circuit emulation applications within Juniper Networks. Mr. Kelly has more than 28 years of experience in the networking industry in technical roles, sales, marketing, and product management positions. He started his career in the United States Air Force. He has worked for Wang, Digital Telecom Systems, American Airlines, Network Equipment Technologies, Carrier Access, and Nortel Networks. He started Juniper Networks federal DoD sales in July 2000 and joined Juniper Networks again in October 2005 through the acquisition of Acorn Packet Solutions where he was the director of sales and marketing.
  • Justin Ryburn is a Consulting Engineer at Juniper Networks. He holds an MBA and a MS in IT Management from Webster University as well as numerous industry certifications. Justin contributed content for Cyber Forensics (Auerbach Publishing, 2007), wrote Juniper's Day One Guide on Deploying BGP Flowspec, and has spoken at numerous industry conferences on BGP Flowspec. Prior to joining Juniper, Justin held various operations, engineering, and sales engineering positions over his 20-year career with companies such Savvis, Nortel, XO, and Charter.
  • Mark Belk is the National Government Chief Architect at Juniper Networks
  • 30 Years in Book Publishing, 20 years in Technical Book Publishing, including Apple Developer Press, Adobe Press, Nokia Developer Books, Palm Books, and since 2001, almost 10 years as consulting editor/editor in chief for Juniper Networks Book. Joined the company and started the Day One book line and in 2011, the new This Week book line.
  • Jonathan Looney is a Senior Staff Courseware Developer at Juniper Networks. Before joining Juniper, he performed network engineering for a large enterprise, a regional ISP, and an application service provider (ASP). The holder of several industry certifications, he enjoys the freedom his job at Juniper gives him to both continually learn and also to share his knowledge with others through a wide range of media.
  • Scott is the Director of Product Marketing for Mobile Security at Juniper Networks. In his 20+ years in high tech, Scott has worked on Mobile and Endpoint Security, Network Security, IPS, Managed Services, Network Infrastructure, Co-location, Microprocessor Architecture, Unix Servers and Network Adapters. He has held leadership roles at Check Point, McAfee, Symantec, Exodus Communications, Cable & Wireless, Savvis, and HP.
  • Sherry Ryan is IT Vice President and CISO of Juniper Networks. Previously, Sherry held similar positions at Blue Shield of California, Hewlett-Packard, Safeway and Levi Strauss where she established and led their information security programs. Sherry holds the Certified Information Security Manager (CISM) certification from ISACA and the Certified Information Systems Security Professional (CISSP) certification from ISC2. She is a member of the High Tech Crime Investigation Association (HTCIA) and the Information Systems Security Association (ISSA). Sherry has a bachelor's degree in Business Administration from the University of Redlands, and earned her MBA from the College of Notre Dame.
  • Network/Application Vulnerability Researcher. Having interests in Photography as well.
About Security Now

Discussing a wide range of topics impacting enterprises and
data center security.

Subscribe RSS Icon


Our Bloggers

Jennifer Blatnik
Vice President
Enterprise Portfolio Marketing

Profile | Subscribe

Ritesh Agrawal
Director
Software Engineering

Profile | Subscribe

Scott Emo
Director
Product Marketing

Profile | Subscribe

Bill Shelton
Director Field Sales

Profile | Subscribe