SQL Injection Attack Lab
SQL Injection Attack Lab
Security
Muhammad Irfan
BCS-18-43
BS-CS 7th Sem. (M)
University of Sahiwal
SQL Injection Attack Lab
Lab Tasks
Task 1: Get Familiar with SQL Statements
I will use the statement ine the NickName field: ', Salary=10000 where name = ‘Alice’ #
Copy the code you get and paste in Alice’s profile editor as the following
statement:
', password=(code you copied) where name = ‘Boby’ #
Boby’s password before and after;
Task 4: Countermeasure — Prepared Statement.
seed@VM:-$ /var/www/SQLInjection/ bash: /var/www/SQL Injection/: Is a directory
seed@VM:-$ cd /var/www/SQLInjection/
seed@VM: .../SQLInjections ls
seed@VM:.../SQLInjections subl safe_home.php
seed@VM:.../SQLInjection$ subl unsafe_home.php
After exicute these codes copy the code from line 70 to 80 in SAFE_HOME_PHP and paste over
the line 70 to 100 in UNSAFE_HOME_PHP file then save the code file.
after saving run these codes in terminal.
[10/30/21] seed@VM: .../SOLInjection$ cd ..
[10/30/21] seed@VM:.../www$ cd..
[10/30/21] seed@VM:/var$ cd
[10/30/21] 11seed@VM:/$ sudo service apache2 reset
[10/30/211seed@VM:/$
GitHub Repository Link:
HMIrfan2599 (github.com)