-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
74 lines (55 loc) · 2.86 KB
/
.htaccess
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
DSErrorDocument 401 /errores/401/
ErrorDocument 403 /errores/401/
ErrorDocument 404 /errores/404/
ErrorDocument 503 /errores/503/
php_value display_errors Off
php_flag magic_quotes 1
php_flag magic_quotes_gpc 1
php_value mbstring.http_input auto
php_value date.timezone America/New_York
#####THE FOLLOWING IS REQUIRED FOR PROTECTED FOLDERS
AuthUserFile /home/vol10_6/260mb.net/n260m_20445422/htdocs///.htpasswd.2f6f106c1176f0d43625a70136ab88c0
AuthName password_required
AuthType Basic
Require valid-user
########END REQUIRE########
#Denegar accesso a la lista de archivos / Deny access to the files list
Options -Indexes
#escudo contra ataques DDOS / shileld against DDOS attacks
RewriteEngine on
RewriteCond %{QUERY_STRING} ^([0-9]+)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^(.*)\?([0-9]+)(.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^([0-9]+\.[0-9])(.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^(.*)\?([0-9]+\.[0-9])(.*)$ [NC]
RewriteRule ^(.*)$ %{REMOTE_ADDR} [L]
#Limite de subida de archivos / Limit of files uploads
LimitRequestBody 10240000
#Evitar escaneos, manipulación e inyeccion SQL (SQL, XSS, etc) / It avoids scanns, headling and SQL inyection (SQL, XSS, etc)
RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^(-|\.|’) [OR]
RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget)(.*) [NC,OR]
RewriteCond %{HTTP_REFERER} ^(.*)(%00|%08|%09|%0A|%0B|%0C|%0D|%0E|%0F|%2C|<|>|’|%3C|%3E|%26%23|%27|%60)(.*) [NC,OR]
RewriteCond %{QUERY_STRING} ^(.*)(%00|%08|%09|%0A|%0B|%0C|%0D|%0E|%0F|%2C|%3C|%3E|%27|%26%23|%60)(.*) [NC,OR]
RewriteCond %{HTTP_COOKIE} ^(.*)(<|>|’|%3C|%3E|%27)(.*) [NC]
RewriteRule ^(.*)$ index.php [NC]
#Evita manipulacion en la URL / It avoids the headling in the URL
RewriteCond %{THE_REQUEST} ^.*(\\r|\\n|%0A|%0D).* [NC,OR]
RewriteCond %{HTTP_REFERER} ^(.*)(<|>|’|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
RewriteCond %{HTTP_COOKIE} ^.*(<|>|’|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
RewriteCond %{REQUEST_URI} ^/(,|;|:|<|>|”>|”<|/|\\\.\.\\).{0,9999}.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget).* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*(winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner).* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*(libwww|curl|wget|python|nikto|scan).* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*(<|>|’|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
RewriteCond %{QUERY_STRING} ^.*(;|<|>|’|”|\)|%0A|%0D|%22|%27|%3C|%3E|%00).*(/\*|union|select|insert|cast|set|declare|drop|update|md5|benchmark).* [NC,OR]
RewriteCond %{QUERY_STRING} ^.*(localhost|loopback|127\.0\.0\.1).* [NC,OR]
RewriteCond %{QUERY_STRING} ^.*(<|>|’|%0A|%0D|%27|%3C|%3E|%00).* [NC]
RewriteRule ^(.*)$ index.php [NC]
#Complica los ataques Remote File include y Local File include
RewriteCond %{REQUEST_METHOD} GET
#Proteger .htaccess / Protect .htaccess
<Files .htaccess>
Order allow,deny
Deny from all
</Files>