The VikiD Truth

Knowledge base / Computing / Security

Computing | Computer Security | Linux Security | Industrial Control Systems Security | Penetration Testing | Exploitation | Social Engineering | Metasploit | encryption | IDS/IPS | HoneyPots | Securing Web/Apps

Securing Web Applications and Softwares

Denial of Service

DOS attacks are attacks on the availability of a service.

Type of Attacks

Connection Threshold

On a TCP/IP connection handshake, attackers can attack on the Open State (Time between Sync and Ack(

One mititgation state is to reduce the Open State wait time (usually 4s). However the attacker can send Sync packets at a rate greater than the rate the servers drops the packets. We can use hping3

 hping3 server.address -S -a spoofed.address --flood

 option -S (enable sync flag) -a to spoof addresss.

Bandwidth Congestion - DDOS

Distributed Denial of Service - Practically you need a Botnet (such as PRO-RAT)

        |||||||||||||||||
        VVVVVVVVVVVVVVVVV
        -----------------
         Buffer Space
        -----------------
              ||
        -----------------
           Webserver
        -----------------

Web-Application Vulnerabilities

https://www.owasp.org/ OWASP - Open Wen App. Security Project

Top Vulnerabilities

Sequel Injection

Hackers are interested in getting user names and passwords but this is not easy. Typically they need to find some zero day Vulnerabilities in either the firewall, database or both.

A better way is to inject SQL queries directly into the database:

  SELECT * FROM WHERE COL NAME = PASSWORD

  1'or'1'='1

  

One good defense to this type of attack is:

Cross Site Scripting Attacks

The Vulnerabilities provides the attacker the ability to induce his source code into the source code of the web application.

<script>alert(xss);</script>

If the Vulnerability is found

Defense

Buffer Overflows

The plain idea

Securing web applications means defending the software people reach over the internet, the part of your system that is, by design, open to everyone, including everyone hostile. My notes above start with denial-of-service (DoS), attacks on availability, flooding a service until it falls over, but web security is really about all three parts of the classic triad: keeping data secret (confidentiality), unaltered (integrity) and reachable (availability).

Why it matters

A web app is your front door to the world, and it is always unlocked for business. Everything behind it, user data, payments, internal systems, is only as safe as that code. Most of the largest breaches in history were web-application flaws: an injection bug, a broken login, a misconfigured server. Understanding the common attack classes is how you stop being the next headline.

An everyday analogy: a shop open to the public

A web server is a shop with its doors open to any passer-by. Most are customers; a few are shoplifters, and one is parked outside revving an engine to block the entrance so nobody can get in (that is DoS). You cannot lock the doors, that would end the business, so instead you watch behaviour, limit how much any one person can take at once, and design the shop so a troublemaker cannot reach the stockroom.

A worked example: the DoS attacks in my notes, and defence in depth

My notes name three layers of flooding, and each has a matching defence:

Beyond availability, the modern baseline is the OWASP Top Ten: broken access control, injection (SQL, command), cryptographic failures, security misconfiguration and so on. A single well-known example, parameterised queries, kills SQL injection:

# vulnerable: user input becomes part of the query
cur.execute("SELECT * FROM users WHERE name = '" + name + "'")
# safe: input is data, never code
cur.execute("SELECT * FROM users WHERE name = %s", (name,))

A 2026 update

Since these notes, defence has consolidated: HTTPS everywhere (free via Let’s Encrypt), a WAF in front, content-security-policy headers against cross-site scripting, and framework defaults that are safe out of the box. DDoS has grown to terabit scale, handled by CDNs and scrubbing providers rather than a single server. And the attack surface has shifted to APIs, dependencies (supply-chain attacks) and cloud misconfiguration, which is why automated dependency scanning and least-privilege cloud roles now matter as much as the app code itself.

Common misconceptions

How it connects

The truth revealed: a web app cannot lock its doors, so security is not about keeping people out, it is about making sure that the ones who mean harm cannot reach anything that matters.

Last edited · 20 revisions

Tags: #Computing