Archives

Tag: sql injection

Editors Note: I’ve been writing a lot about application and web security quite a bit lately, and that’s on purpose. There’s never been more attacks on our personal and private information. These attacks are comging from not only lone hackers but also from state-supported groups and intelligence agencies. This guest post gives a good overview of what’s been going on and a little on the tactics we can take to combat these activities. This isn’t an exhaustive treatise on how to secure your applications. It’s more an intro course on the topic. It’s a springboard for you to dive into this vast and quickly-evolving world.

Application Security — Cutting Edge Or Critical Failure?

How secure are your applications? While you might be confident about apps designed in-house, what about third-party software for desktops or mobile apps made using open-source code? Are current application security methods doing enough to meet the threat of cutting-edge cybercriminals, or are companies facing critical failure?

Non-denial denials aside, however — according to spokesman Don Boyd, “We do not comment on the authenticity or content of purported intelligence documents.” The released data contains a number of application attacks that could presumably net access to almost any device around the world. For example, some files contained instructions for compromising computer applications such as Skype, commercial antivirus programs and even PDF files. Applications such as “Wrecking Crew,” meanwhile, could crash targeted computers while others claim the ability to breach both Apple and Android smartphones, in turn bypassing the encryption offered by tools like WhatsApp, Signal or Telegram. It doesn’t stop there, though. A program code-named “Weeping Angel” — which the documents claim was developed in partnership with British intelligence — supposedly used Samsung smart televisions to listen in on conversations even when the device appears to be turned off.

There’s also another level of concern here: An authentic leak means that even CIA servers and storage solutions aren’t of reach for interested hackers. If the vaunted spy agency is at risk, what’s the downstream consequence for the average application or device?

Emerging Threats

While the WikiLeaks story may be top of mind given its high-profile target and potentially dangerous app attacks, it’s not exactly an outlier: Applications across multiple industries and government agencies are now under threat.

Consider the rise of connected-vehicle applications. Recent research suggests that Android-based connected car apps could be easily hacked if attackers gain access to rooted phones or convince users to download malicious files. Once in control of the car app, cybercriminals could leverage the tool to gain physical access without setting off the alarm. Seven of nine car apps tested were vulnerable. Research firm Kaspersky noted that the problem didn’t stem from code flaws but a simple lack of defense. According to security researcher Victor Chebyshev, these apps are “controlling very valuable things for the user, but they’re not thinking about security mechanisms.”

North of the border, meanwhile, the Canada Revenue Agency (CRA) was forced to temporarily shutter its online services and mobile applications after a vulnerability was discovered in Apache Struts 2, an open-source software tool that is widely used by government and private sector agencies alike. While there’s no evidence of lost or stolen data, it’s a sobering reminder that even popular (and presumably well-tested) applications can put companies at risk.

The Speed of Security

As noted by Dark Reading, the recent CIA breaches, vulnerable industry apps and open-source issues make the case for app security as “pre-industrial,” since it lacks the ability to handle attacks at scale, focuses mainly on vertical threats, and includes a “vast landscape of tools and point solutions.” Plus, without effective standardization and specification, these tools are ad hoc at best and may not successfully address the accelerating speed of security threats.

Top Tactics

The first step in shifting app security from critical failure to cutting edge? Identifying key threat vectors. For example, both DoS and DDoS attacks are on the rise, with 53 percent of security pros saying these threats are among their top concerns. In addition, 60 percent of apps are vulnerable to SQL injection, allowing hackers to gain access and take control. More than 50 percent of web applications still allow cross-site scripting (XSS) attacks. Companies aren’t doing themselves any favors when it comes to design and testing, with stock permissions and APIs opening the app door to hackers even as timid testing of apps assumes that internal code offers superior protection.

Bottom line? Apps are vulnerable and software security isn’t keeping pace. Pushing app protection into the present demands a hard look at current targets and a better understanding of top application threats.

For more information on application security threats and how to handle them, review the accompanying slideshow from Column Information Security.

Author bio: Nori De Jesus is Global Director of Marketing at Column Information Security. De Jesus brings more than 20 years of experience as an advent marketer and business strategist working with software manufacturers and launching proprietary software solutions into the market. With expertise in BPM and case management B2B marketing, she focuses on innovation and making a difference by maintaining agility as the technology climate continues to shift. De Jesus is an evangelist in educating buyers through their technology-purchasing journey via content and research.

SQL injection is one of the most typical ways web applications and online platforms can be compromised. It doesn’t matter the language either – badly formatted, non-filtered code is easy to write in PHP, ASP.net, and so on.

SQL injection is a way for an attacker to gain access to your database by sending malformed queries through a web form or service that gets data from a database. Since most web applications talk to database, it’s not hard to find a website that has some sort of connectivity and thus is ripe for attack. Once an attacker finds a vulnerable form, it can be exploited to not only return sensitive information, but also offer a way for the attacker to gain access to the system to perhaps upload a file they can then access via a browser to own your machine.

As you can see in the video below, it’s very easy for attackers to visit your site, app, or platform and try to exploit your data. If you’ve never seen how this type of attack works, or just how easy it is to write code that’s insecure, have a watch:

What can you do?

There have been books written about how to write safe and secure code, but as a starting point, please make sure that if you access user input and then perform any type of data search with it, you filter and escape it to not allow bad characters through.

Second, validate that input to ensure only the type of data you are asking for is being entered in your eventual SQL query. If you are asking for a number, do a check that the data the user has entered is indeed a number.

This is only the tip of the iceberg, but will hopefully set you down the path of writing code if you currently aren’t using these techniques. There are many places to start, but OWASP is always a good resource. They have a page dedicated to preventing SQL injection techniques and attacks.