แจก .htaccess ป้องกันการแฮกเว็บไซต์

เริ่มโดย CreePer, 17 มีนาคม 2014, 12:41:31

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

CreePer

แจก .htaccess ป้องกันการแฮกเว็บไซต์ ปลอดภัยจากเหล่า Hacker ทั้งหลาย

แจกฟรี ห้ามนำไปขายนะครับ *-*

ใช้แล้วได้ผลยังไงมาบอกกันด้วยนะครับ
:wanwan013: :wanwan013:
http://www.mediafire.com/download/wm15ou53c4cnaxp/htaccess.rar

mikeyx


Options +FollowSymLinks
RewriteEngine On
RewriteBase /
# Rewrite Rules

RewriteRule ^.*EXEC\(@.*$        - [R=404,L,NC]
RewriteRule ^.*CAST\(.*$         - [R=404,L,NC]
RewriteRule ^.*DECLARE.*$        - [R=404,L,NC] 
RewriteRule ^.*DECLARE%20.*$     - [R=404,L,NC]
RewriteRule ^.*NVARCHAR.*$       - [R=404,L,NC] 
RewriteRule ^.*sp_password.*$    - [R=404,L,NC]
RewriteRule ^.*%20xp_.*$         - [R=404,L,NC]



RewriteCond %{HTTP_HOST} !^www\. 
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]




ServerSignature Off
# Block suspicious request methods
RewriteCond %{REQUEST_METHOD} ^(HEAD|TRACE|DELETE|TRACK|DEBUG) [NC]
RewriteRule ^(.*)$ - [F,L]

# Block WP timthumb hack
RewriteCond %{REQUEST_URI} (timthumb\.php|phpthumb\.php|thumb\.php|thumbs\.php) [NC]
RewriteRule . - [S=1]

# Block suspicious user agents and requests
RewriteCond %{HTTP_USER_AGENT} (libwww-perl|wget|python|nikto|curl|scan|java|winhttp|clshttp|loader) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (<|>|'|%0A|%0D|%27|%3C|%3E|%00) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (;|<|>|'|"|\)|\(|%0A|%0D|%22|%27|%28|%3C|%3E|%00).*(libwww-perl|wget|python|nikto|curl|scan|java|winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner) [NC,OR]
RewriteCond %{THE_REQUEST} \?\ HTTP/ [NC,OR]
RewriteCond %{THE_REQUEST} \/\*\ HTTP/ [NC,OR]
RewriteCond %{THE_REQUEST} etc/passwd [NC,OR]
RewriteCond %{THE_REQUEST} cgi-bin [NC,OR]
RewriteCond %{THE_REQUEST} (%0A|%0D) [NC,OR]

# Block MySQL injections, RFI, base64, etc.
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=http:// [OR]
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=(\.\.//?)+ [OR]
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=/([a-z0-9_.]//?)+ [NC,OR]
RewriteCond %{QUERY_STRING} \=PHP[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} [NC,OR]
RewriteCond %{QUERY_STRING} (\.\./|\.\.) [OR]
RewriteCond %{QUERY_STRING} ftp\: [NC,OR]
RewriteCond %{QUERY_STRING} http\: [NC,OR]
RewriteCond %{QUERY_STRING} https\: [NC,OR]
RewriteCond %{QUERY_STRING} concat[^\(]*\( [NC,OR]
RewriteCond %{QUERY_STRING} union([^s]*s)+elect [NC,OR]
RewriteCond %{QUERY_STRING} union([^a]*a)+ll([^s]*s)+elect [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]
RewriteCond %{QUERY_STRING} (sp_executesql) [NC]
RewriteRule ^(.*)$ - [F,L]


1ZAA

[direct=http://www.rzeer.com][/direct]
[direct=http://www.rzeer.com]อาเสี่ย ดอทคอม[/direct] [direct=http://www.6395789.com]โลโก้ฮวงจุ้ย[/direct]  [direct=http://www.logo789.com]โลโก้มงคล[/direct]  Good Idea, Good Timing, Good Price, Good Connection.

Seventh

มือใหม่ อยากสอบถามวิธีการติดตั้งและใช้งานครับ
ขอบคุณครับ
[direct=http://www.xn--72cahca4dde6a0hb3g4dfbd7c8bwjoa8legu.com/][/direct]
รับแต่งหน้ารับปริญญา แต่งหน้าเจ้าสาว แต่งหน้าไปงาน แต่งหน้าพิธีกร สอนแต่งหน้า www.ช่างแต่งหน้าเช่าชุดราตรี.com

CreePer

อ้างถึงจาก: Seventh ใน 17 มีนาคม 2014, 13:20:24
มือใหม่ อยากสอบถามวิธีการติดตั้งและใช้งานครับ
ขอบคุณครับ

ถ้าบนโฮสยังไม่มี .htaccess ก็อัพขึ้น FTP ได้เลยครับ

แต่ถ้ามีอยู่แล้วก็ เอาไปปรับให้เข้ากับ .htaccess อันเก่า ครับ

iak1


buyteppen

ขอบคุณมาก จะลองเอาไปใช้ แค่อัพไฟล์ขึ้นโฮสอย่างเดียวใช่ไหม

CreePer

อ้างถึงจาก: buyteppen ใน 17 มีนาคม 2014, 13:30:20
ขอบคุณมาก จะลองเอาไปใช้ แค่อัพไฟล์ขึ้นโฮสอย่างเดียวใช่ไหม

ครับผม

hatyaiwebdesign

[direct=https://www.hatyaiwebdesign.com]ออกแบบเว็บไซต์หาดใหญ่[/direct]
[direct=https://www.hatyaiwebdesign.com]รับทำเว็บไซต์ หาดใหญ่[/direct]
[direct=https://www.hatyaiwebdesign.com]บริษัทรับทำเว็บไซต์หาดใหญ่[/direct]
[direct=https://www.hatyaiwebdesign.com]รับทำเว็บไซต์หาดใหญ่[/direct]
[direct=https://www.hatyaibatterystore.com/]แบตเตอรี่หาดใหญ่[/direct]

fil22t


เซียนคอม ในตำนาน

1 2 3 4 5

xvlnw.com

[direct=https://cloudhost.in.th/wordpress-hosting]ツ ⓌⓄⓇⒹⓅⓇⒺⓈⓈ ⒽⓄⓈⓉⒾⓃⒼ [/direct] :wanwan014:  :D
[direct=https://cloudhost.in.th/cloudhosting.html]Cloud Hosting[/direct] [direct=https://cloudhost.in.th/cloudvps.html]Cloud Server[/direct] [direct=https://cloudhost.in.th/vpshosting.html]Cloud VPS Hosting[/direct] [direct=https://cloudhost.in.th/windowsvps.html]Cloud Windows[/direct] Tel: 080-348-0843 LINE: ixvlnw

Seventh

ขอบคุณครับ +1ให้กับน้ำใจครับ
[direct=http://www.xn--72cahca4dde6a0hb3g4dfbd7c8bwjoa8legu.com/][/direct]
รับแต่งหน้ารับปริญญา แต่งหน้าเจ้าสาว แต่งหน้าไปงาน แต่งหน้าพิธีกร สอนแต่งหน้า www.ช่างแต่งหน้าเช่าชุดราตรี.com

akkradet

ว่างเปล่า

cracky

ไฟล์มันกันแฮกไม่ได้หรอกครับ
ไม่อยากใครฝากความหวังกับ htaccess

ไฟล์นี้กันช่องโหว่ง่ายๆอย่าง
sql injection ยังไม่ได้เลยด้วยซ้ำ
[direct=http://heart.3dsinteractive.com]My Blog[/direct]

CreePer

อ้างถึงจาก: cracky ใน 17 มีนาคม 2014, 18:00:23
ไฟล์มันกันแฮกไม่ได้หรอกครับ
ไม่อยากใครฝากความหวังกับ htaccess

ไฟล์นี้กันช่องโหว่ง่ายๆอย่าง
sql injection ยังไม่ได้เลยด้วยซ้ำ
ทำไมจะไม่ได้ผมลองมาแล้วครับทางบริษัท Gameindy ก็ใช้อยุ่ ผมเป็น BlackHat PCT รองมาหมดแบ้วว *-*

CreePer


Optimus

รับสอน Android Re-Skin Apps & Games | สอนแบบ 1 ต่อ 1 ผ่าน TeamViewer สนใจ PM สอบถามเลยครับ

รับรีสกิน Apps Android 1 ชุด 15 แอพ 2900 บาท ท่านสามารถนำไปอัพขึ้น Play Store หารายได้ได้เลยครับ สนใจ PM ครับ

ขาย Account Skimlinks ปั่น Amazon ได้ (ตอนนี้คนไทยสมัครไม่ผ่านแล้ว) 4500  บาท PM ครับ

cheapdeals


SEOHostThailand

ลงประกาศฟรี โคราช
[direct=http://www.udon-property.com]‎ขายบ้านอุดรธานี [/direct][direct=http://www.xn--22c0bakhec0en2h4biumj6b7s.net] ขายที่ดินอุดรธานี [/direct][direct=http://www.koratproperty.net] ขายที่ดินโคราช [/direct][direct=http://www.xn--12cgs3c9a6a3glv7kqc.net]‎ ที่พักโคราช [/direct][direct=http://www.xn--42cm1blb5ce3a1gme7n2a2e9d.com] รับทำเว็บโคราช [/direct]