Three Attacks You Can’t Stop with Secure Coding

F5 Ecosystem | July 15, 2019

When it comes to breaches involving apps and data exposure, fingers are almost always pointed at developers. Many times, this is the right direction. Injection attacks and stack-based exploits are almost always the result of insecure code. Usually because Security Rule Zero was violated.

But we can't blame all breaches on developers. The truth is that even if developers could turn out perfectly secure code, you still need application services to protect against many other attacks.

That's because application security is a stack. There are attacks that exploit protocols and networking principles that cannot be simply "secure coded" away. Further complicating security is that these attacks are often undetectable by applications because they lack the visibility to distinguish malicious from legitimate requests.

In particular, there are three attacks that developers simply shouldn't be responsible for handling. Instead, these attacks are best detected and mitigated by application services deployed upstream, where visibility and context are available to help put a stop to them.

Volumetric DDoS

We use the term volumetric to describe a traditional distributed denial of service attack to distinguish the network overload-based attacks from those that have moved "up the stack" to attack the application layer. They are different classes of attacks and thus we need to be able to defend against both of them, but the way in which we do so takes very different solutions.

A volumetric attack is just a blitz. A barrage of traffic is directed at a particular service with the intention of overwhelming whatever device/infrastructure/software is handling requests. The principle in play is that all devices - whether hardware or software, on-premises or in the cloud - have limited resources. Thus, by sending enough requests the device can be overwhelmed and shut down access to everything behind it.

The reason developers cannot effectively prevent this attack is because applications rely on platforms and host operating systems to manage networking. A volumetric DDoS attack targets that network stack and is able to consume so much of the shared resources that the application is barely able to process requests in order to determine it is under attack.

Secure coding can't prevent this - it's not an exploit due to a vulnerability. And it's really not the fault of code in any part of the system. It's simply the case that no matter how hard we try to pretend there is no hardware, that's where resources come from and they are limited.

Volumetric DDoS attacks are best detected and mitigated by high-capacity, high-performance application services residing up-stream from an application. The closer to the source of the attack, the better.

No exploit, no secure coding solution.

Layer 7 DDoS

Moving up the stack to the application layer we find an insidious form of denial of service called Layer 7 (or HTTP) DDoS. These attacks are infuriating because they are exploits, but they are not due to a vulnerability or insecure coding. These attacks work because of the nature of HTTP and the systems that implement it.

There are generally two types of layer 7 DDoS attacks: slow and fast. Slow layer 7 DDoS consumes resources by pretending to have a terrible network connection and s l o w l y siphoning off responses from legitimate requests. This consumes resources because web apps are connection-based, and once again resources to maintain those connections are limited. By connecting with enough clients and making legitimate requests only to slowly receive responses, attackers are able to tie up application resources. This has the effect of making it nearly impossible for legitimate clients to connect, effectively carrying out a denial of service attack.

This attack is particularly nefarious and difficult to detect - unless you're comparing network speeds to receiving speeds. That is, application services up-stream have visibility into the network characteristics of clients and can more accurately determine whether those clients are purposefully being slow to receive or really have a network issue. Determining legitimacy is critical to shutting down these kinds of attack.

Basically, these attacks exploit at the protocol layer (HTTP) and there is nothing that secure coding can do to address it.

No vulnerability, no secure coding solution.

Credential Stuffing

Last but not least is credential stuffing. The unbelievable number of credentials exposed through breaches in the past few years makes this attack a significant one to defend against.

Credential stuffing attacks generally rely on bots or tools, because they're based on brute force principles that take advantage of the vast pools of existing username/password dumps. Rarely are you going to find credential stuffing attacks carried out manually. A successful credential stuffing attack is not the result of insecure coding*. Attackers are not trying to exploit anything but poor password practices and the inability to recognize an attack in progress.

To detect these attacks, you need to be able to determine that the client is not a valid human being. So in a sort of reverse Turing test, you'll need to present challenges and use CAPTCHAs in ways that these automated systems are not able to answer.

No amount of secure coding can prevent this attack from succeeding. Improving password practices and detecting attack attempts are the best ways to avoid succumbing to this growing scourge of the Internet.

No exploitable code, no secure coding solution.

*Credential stuffing attacks may be made possible by insecure coding. After all, a significant number of breaches occur because of code-based vulnerabilities that result in massive lists of credentials available for this attack.

Differentiate to Detect and Defend

It's important to recognize when secure coding can be used to prevent an attack and when it can't. It's important because we can't just keep pointing the finger at developers for every successful attack. Security needs system-level thinking; we need multiple solutions because there are multiple types of attacks we need to defend against.

It's important to differentiate in order to effectively and successfully defend against the variety of attacks most organizations will be subjected to in the near future. Don't waste time trying to force developers to defend against attacks when it's (1) not an exploit due to insecure coding or (2) not possible due to a lack of visibility.

We need to approach security strategically from a system of services that provide the right security at the right places no matter what the source or attack surface might be.

Stay safe.

Share
Tags: 2019

About the Author

Lori Mac Vittie
Lori Mac VittieDistinguished Engineer and Chief Evangelist

More blogs by Lori Mac Vittie

Related Blog Posts

The everywhere attack surface: EDR in the network is no longer optional
F5 Ecosystem | 11/12/2025

The everywhere attack surface: EDR in the network is no longer optional

All endpoints can become an attacker’s entry point. That’s why your network needs true endpoint detection and response (EDR), delivered by F5 and CrowdStrike.

F5 NGINX Gateway Fabric is a certified solution for Red Hat OpenShift
F5 Ecosystem | 11/11/2025

F5 NGINX Gateway Fabric is a certified solution for Red Hat OpenShift

F5 collaborates with Red Hat to deliver a solution that combines the high-performance app delivery of F5 NGINX with Red Hat OpenShift’s enterprise Kubernetes capabilities.

F5 accelerates and secures AI inference at scale with NVIDIA Cloud Partner reference architecture
F5 Ecosystem | 10/28/2025

F5 accelerates and secures AI inference at scale with NVIDIA Cloud Partner reference architecture

F5’s inclusion within the NVIDIA Cloud Partner (NCP) reference architecture enables secure, high-performance AI infrastructure that scales efficiently to support advanced AI workloads.

F5 Silverline Mitigates Record-Breaking DDoS Attacks
F5 Ecosystem | 08/26/2021

F5 Silverline Mitigates Record-Breaking DDoS Attacks

Malicious attacks are increasing in scale and complexity, threatening to overwhelm and breach the internal resources of businesses globally. Often, these attacks combine high-volume traffic with stealthy, low-and-slow, application-targeted attack techniques, powered by either automated botnets or human-driven tools.

Volterra and the Power of the Distributed Cloud (Video)
F5 Ecosystem | 04/15/2021

Volterra and the Power of the Distributed Cloud (Video)

How can organizations fully harness the power of multi-cloud and edge computing? VPs Mark Weiner and James Feger join the DevCentral team for a video discussion on how F5 and Volterra can help.

Phishing Attacks Soar 220% During COVID-19 Peak as Cybercriminal Opportunism Intensifies
F5 Ecosystem | 12/08/2020

Phishing Attacks Soar 220% During COVID-19 Peak as Cybercriminal Opportunism Intensifies

David Warburton, author of the F5 Labs 2020 Phishing and Fraud Report, describes how fraudsters are adapting to the pandemic and maps out the trends ahead in this video, with summary comments.

Deliver and Secure Every App
F5 application delivery and security solutions are built to ensure that every app and API deployed anywhere is fast, available, and secure. Learn how we can partner to deliver exceptional experiences every time.
Connect With Us
Three Attacks You Can’t Stop with Secure Coding | F5