Foundations of Security Week3 Seminar: SQL Injection (1)

291 字
1 分钟
Foundations of Security Week3 Seminar: SQL Injection (1)

SQL Injection (1)#

Objective#

To introduce you to SQL injection attack, identify and demonstrate common SQL injection attacks, understand the underlying mechanisms that allow these attacks to succeed, and apply best practices in software development to prevent SQL injection vulnerabilities in web applications.

Exploiting Databases Through Code Insertion#

What is it#

A type of attack where an attacker exploits vulnerabilities in a web application’s input fields to execute malicious SQL commands. These commands allow attackers to interact with a database in unauthorized ways, often leading to data breaches or system compromise.

How does it happen#

Attackers enter malicious SQL code into input fields (e.g., login forms, search boxes).
The application processes this input without proper validation.

Example#

Bypassing Authentication (login page)
Extracting Data.

Setup#

Tautology Based Injection#

Using logical operations that always return true to manipulate query logic.

SELECT * FROM users WHERE username='anything' OR '1'='1';

This injection uses a tautology (‘1’=‘1’ is always true) to bypass authentication logic and can potentially retrieve user records.

System query

SELECT * FROM students WHERE email = 'useremail' AND password = 'password';

Attacker’s input

Resulting query

SELECT * FROM students WHERE email = 'xxxxxx' AND password = '' OR '1'='1';

Task1: Connect to the Wireless Access Point/Router#

  1. Connect to the Wireless Access Point / Router as provided by the instructor (WiFi Name & Password will be provided)
  2. Open you browser and enter the IP address (will be provided by the instructor) of the Webserver PC in your browser and hit “Enter”
  3. Access the demo web application interface
12-3

Task2: Sign up on the web application#

Task3: Login to the web application using your registered details. Logout after successful login#

Task4: Perform a Tautology Based SQL Injection to bypass the login authentication without your registered account#

支持与分享

如果这篇文章对你有帮助,欢迎分享给更多人或赞助支持!

赞助
Foundations of Security Week3 Seminar: SQL Injection (1)
https://firefly.anka2.top/posts/obu/level5/semester2/fos/week3/seminar/
作者
🐦‍🔥不死鸟Anka
发布于
2026-03-26
许可协议
CC BY-NC-SA 4.0

评论区

Profile Image of the Author
A-n-k-a
Over the Frontier / Into the Front
看这里~
合作翻译官绝赞招募中!
音乐
封面

音乐

暂未播放

0:00 0:00
暂无歌词
分类
标签
站点统计
文章
59
分类
6
标签
20
总字数
550,118
运行时长
0
最后活动
0 天前

目录