├── .dockerignore ├── Dockerfile ├── Injecting SQLite database based application.pdf ├── README.md ├── docker-compose.yml ├── head.php ├── ica-lab.db ├── images ├── head.jpg └── who.jpg ├── index.php ├── sqlite lab 2.png ├── sqlite lab 3.png ├── sqlite lab 4.png └── sqlite lab.png /.dockerignore: -------------------------------------------------------------------------------- 1 | README.md 2 | Dockerfile 3 | docker-compose.yml 4 | .git 5 | Injecting SQLite database based application.pdf 6 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.1-apache-bullseye 2 | MAINTAINER jose nazario 3 | LABEL version="1.1" description="sqlite-lab Docker image" 4 | 5 | RUN apt-get update && \ 6 | mkdir /var/www/html/sqlite-lab 7 | 8 | COPY . /var/www/html/sqlite-lab 9 | -------------------------------------------------------------------------------- /Injecting SQLite database based application.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/incredibleindishell/sqlite-lab/72ca2c842dc8c50c09974056f6964d0de2ec55b5/Injecting SQLite database based application.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # sqlite-lab 2 | This code is vulnerable to SQL Injection and having SQLite database. 3 | 4 | During practicing one challenge i faced SQLI vulnerable script with SQLite database integrated with it 5 | 6 | For SQLite database, SQL Injection payloads are different so it is for fun. Just enjoy it \m/ 7 | 8 | Types of SQL Injection in this Lab 9 | 10 | 1. Union based SQL Injection (numaric based) 11 | 12 | 2. Union based SQL Injection (String based) 13 | 14 | 3. Boolean based Blind SQL Injection 15 | 16 | # Guide for learning SQLIte SQL Injection 17 | 18 | https://github.com/incredibleindishell/sqlite-lab/blob/master/Injecting%20SQLite%20database%20based%20application.pdf 19 | 20 | # Note: - 21 | 22 | Those users who are using ubuntu, make sure php-sqlite package is installed in system 23 | 24 | command to install php-sqlite package 25 | 26 | apt-get install php5-sqlite 27 | 28 | # Lab screenshot 29 | 30 | 31 | screenshot 1 32 | 33 | 34 | 35 | 36 | screenshot 2 37 | 38 | 39 | 40 | screenshot 3 41 | 42 | 43 | 44 | screenshot 4 45 | 46 | 47 | 48 | --==[[Greetz to]]==-- 49 | 50 | Guru ji zero ,code breaker ica, root_devil, google_warrior,INX_r0ot,Darkwolf indishell,Baba ,Silent poison India,Magnum sniper,ethicalnoob Indishell,Local root indishell,Irfninja indishell, Reborn India,L0rd Crus4d3r,cool toad,Hackuin,Alicks,Gujjar PCP,Bikash,Dinelson Amine,Th3 D3str0yer,SKSking,rad paul,Godzila,mike waals,zoo zoo,cyber warrior,shafoon, Rehan manzoor, cyber gladiator,7he Cre4t0r,Cyber Ace, Golden boy INDIA,Ketan Singh,Yash,Aneesh Dogra,AR AR,saad abbasi,hero,Minhal Mehdi ,Raj bhai ji , Hacking queen ,lovetherisk, D2 and rest of TEAM INDISHELL 51 | 52 | --==[[Love to]]==-- 53 | 54 | My Father ,my Ex Teacher,cold fire hacker,Mannu, ViKi ,Ashu bhai ji,Soldier Of God, Bhuppi,Gujjar PCP,rafay baloch 55 | Mohit,Ffe,Ashish,Shardhanand,Budhaoo,Jagriti,Salty, Hacker fantastic, Jennifer Arcuri and Don(Deepika kaushik) 56 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2.1' 2 | 3 | services: 4 | web: 5 | image: sqlite-lab 6 | hostname: sqliteweb 7 | build: 8 | context: . 9 | ports: 10 | - "8080:80" 11 | -------------------------------------------------------------------------------- /head.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | --==[[IndiShell Lab]]==-- 10 | 11 | 128 | 139 | '; 140 | 141 | echo $head ; 142 | 143 | echo ' 144 | 145 | 146 |
147 | 148 | ####################################################################################################################################
149 | --==[[ SQLite database Powered SQL Injection Lab]]==--
150 | --==[[ With Love From Team IndiShell ]]==-- 151 |
152 |
154 | 155 | ####################################################################################################################################
156 | 158 | 159 | 160 | 161 |
162 | '; 163 | ?> -------------------------------------------------------------------------------- /ica-lab.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/incredibleindishell/sqlite-lab/72ca2c842dc8c50c09974056f6964d0de2ec55b5/ica-lab.db -------------------------------------------------------------------------------- /images/head.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/incredibleindishell/sqlite-lab/72ca2c842dc8c50c09974056f6964d0de2ec55b5/images/head.jpg -------------------------------------------------------------------------------- /images/who.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/incredibleindishell/sqlite-lab/72ca2c842dc8c50c09974056f6964d0de2ec55b5/images/who.jpg -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | open('ica-lab.db'); 10 | } 11 | } 12 | $db = new DB(); 13 | if(!$db){ 14 | echo $db->lastErrorMsg(); 15 | } 16 | 17 | function is_array_empty($arr){ 18 | if(is_array($arr)){ 19 | foreach($arr as $key => $value){ 20 | if(!empty($value) || $value != NULL || $value != ""){ 21 | return true; 22 | break; 23 | } 24 | } 25 | return false; 26 | } 27 | } 28 | 29 | echo ''; 30 | echo '
31 | 32 | 33 | 36 | 39 | 42 | 45 |
34 | 35 | 37 | 38 | 40 | 41 | 43 | 44 |
46 |
'; 47 | 48 | 49 | if(isset($_POST['us'])) 50 | { 51 | echo ' 52 | 53 | 54 |

58 | --==[[Greetz to]]==--
Guru ji zero ,code breaker ica, root_devil, google_warrior,INX_r0ot,Darkwolf indishell,Baba ,Silent poison India,Magnum sniper,ethicalnoob Indishell,Local root indishell,Irfninja indishell
Reborn India,L0rd Crus4d3r,cool toad,Hackuin,Alicks,Gujjar PCP,Bikash,Dinelson Amine,Th3 D3str0yer,SKSking,rad paul,Godzila,mike waals,zoo zoo,cyber warrior,shafoon, Rehan manzoor
cyber gladiator,7he Cre4t0r,Cyber Ace, Golden boy INDIA,Ketan Singh,Yash,Aneesh Dogra,AR AR,saad abbasi,hero,Minhal Mehdi ,Raj bhai ji , Hacking queen ,lovetherisk, D2 and rest of TEAM INDISHELL
59 | --==[[Love to]]==--
# My Father ,my Ex Teacher,cold fire hacker,Mannu, ViKi ,Ashu bhai ji,Soldier Of God, Bhuppi,Gujjar PCP, 60 | Mohit,Ffe,Ashish,Shardhanand,Budhaoo,Jagriti,Salty, Hacker fantastic, Jennifer Arcuri and Don(Deepika kaushik),Govind

61 | 62 | 63 | 64 |
65 | 66 | '; 67 | 68 | } 69 | 70 | if(isset($_POST['box'])) 71 | { 72 | echo ' 73 | 76 |
74 | Hi, you can search your hosting plan according to following Tags
75 | ubuntu,redhat,kali and windows
77 |
78 | 79 |

80 |
81 |
82 | '; 83 | } 84 | 85 | if(isset($_POST['search'])) 86 | { 87 | $sql = "SELECT * from info where Tag = '".trim($_POST['tag'])."';"; 88 | $output = $db->query($sql); 89 | $row = $output->fetchArray(SQLITE3_ASSOC); 90 | 91 | if(is_array_empty($row)) 92 | { 93 | echo ' 94 |
Dear, you plan is available:)
Please write a mail to us order@pirate-host.local with your requirements.
'; 95 | } 96 | else 97 | { 98 | echo ' 99 |
sorry, but your plan is not available. Shot mail to e-mail support@pirate-host.local
'; 100 | } 101 | } 102 | 103 | if(isset($_POST['plans'])) 104 | { 105 | $sql ="SELECT * from info;"; 106 | 107 | 108 | $output = $db->query($sql); 109 | echo ' 110 | 111 |
Serial NumberOperating systemPrice
112 | 113 | '; 114 | while($row = $output->fetchArray(SQLITE3_ASSOC) ) 115 | { 116 | echo ''; 117 | } 118 | $db->close(); 119 | } 120 | 121 | if(isset($_GET['snumber'])) 122 | { 123 | $sql = "SELECT * from info where number = ".trim($_GET['snumber']).";"; 124 | $output = $db->query($sql); 125 | $row = $output->fetchArray(SQLITE3_ASSOC); 126 | if(is_array_empty($row)) 127 | { 128 | //print_r($all); 129 | echo '
130 |
'. $row['number'] . ''. $row['OS'] .''. $row['Price'] .'
131 |
Hi, deatils for the selected hosting plan is following, Hopefully you will find it suitable for your requirement :)
-Pirate Host-
132 | '; 133 | 134 | echo ''; 135 | 136 | } 137 | else { 138 | echo "serial number doesn't exist :) please try correct one"; 139 | } 140 | $db->close(); 141 | } 142 | 143 | 144 | if(isset($_GET['tag'])) 145 | { 146 | $sql = "SELECT * from info where Tag = '".trim($_GET['tag'])."';"; 147 | $output = $db->query($sql); 148 | $row = $output->fetchArray(SQLITE3_ASSOC); 149 | if(is_array_empty($row)) 150 | { 151 | echo '
152 |
Default Operating system'. $row['OS'] .'
Monthly payment (in $)'. $row['Price'] .'
Assigned IP '.$row['Server_IP'].'
153 |
Hi, deatils for the selected hosting plan Tag is following, Hopefully you will find it suitable for your requirement :)
-Pirate Host-
154 | '; 155 | 156 | echo ''; 157 | } 158 | else { 159 | echo "sorry, seems Tag name is inconnect. Please try again with available Tag :) "; 160 | } 161 | $db->close(); 162 | } 163 | echo "Welcome to Pirate H0st. we provide affordable hosting servers "; 164 | ?> 165 | -------------------------------------------------------------------------------- /sqlite lab 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/incredibleindishell/sqlite-lab/72ca2c842dc8c50c09974056f6964d0de2ec55b5/sqlite lab 2.png -------------------------------------------------------------------------------- /sqlite lab 3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/incredibleindishell/sqlite-lab/72ca2c842dc8c50c09974056f6964d0de2ec55b5/sqlite lab 3.png -------------------------------------------------------------------------------- /sqlite lab 4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/incredibleindishell/sqlite-lab/72ca2c842dc8c50c09974056f6964d0de2ec55b5/sqlite lab 4.png -------------------------------------------------------------------------------- /sqlite lab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/incredibleindishell/sqlite-lab/72ca2c842dc8c50c09974056f6964d0de2ec55b5/sqlite lab.png --------------------------------------------------------------------------------
Default Operating system'. $row['OS'] .'
Monthly payment (in $)'. $row['Price'] .'
Assigned IP '.$row['Server_IP'].'