สวัสดีครับ
ล่าสุดที่มี maxsite เว็บหน่วยงานต่างๆ ถูก hack มีท่านใด ตามแกะบ้างไหมครับ
ว่าช่องโหว่มากจากที่ได้ ผมจะได้นำไป patch และอัพลง github ต่อไปครับ
#Fix 1 Create file /public_html/data/.htaccess
Deny from all
<Files ~ "^\w.+(.gif|.jpe?g|.png)$">
order deny,allow
allow from all
</Files>
#Fix 2 SQL Injection (edit file /public_html/.htaccess)
RewriteEngine on
RedirectMatch 403 /(attach|backup|data|icon|UserFiles|video|webboard_upload|images)/.*.(php|html|htm|js|htaccess)$
AddDefaultCharset UTF-8
RewriteCond %{QUERY_STRING} base64_(en|de)code[^(]*\([^)]*\) [NC,OR]
RewriteCond %{QUERY_STRING} (;|<|>|'|"|\)|%0A|%0D|%22|%27|%3C|%3E|%00).*(/\*|union|select|insert|drop|delete|update|cast|create|char|convert|alter|declare|order|script|set|md5|benchmark|encode) [NC,OR]
RewriteRule ^(.*)$ - [F,L]
<Files *.php>
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Files>
<Files ~ "(index.php|val_img.php)">
Order Allow,Deny
Allow from all
</Files>
ขอบคุณครับ
