Create an account    
 home  
 
Web www.thaihealth.net
  You are here:> home>topics> Linux&NUKE Security > การแฮคหน้าเวป ความสง่างามของการแฮค ©
Linux,PHP&MySQL: การแฮคหน้าเวป ความสง่างามของการแฮค
Posted on Monday, October 06 @ 09:05:07 GMT+7 by admin

Linux&NUKE Security

ไม่ได้มาสอนวิธีการครับ เพราะทำไม่เป็นเหมือนกัน

สำหรับการแฮคหน้าเวปโดยอาศัย url แล้วถือเป็นความงามสง่ามากเพราะไม่ต้องอาศัยอะไรเลย มีเพียงเครื่องและความชาญฉลาดในการประกอบโค้ด โดยอาศัยช่องโหว่บางอย่างเช่น unicode บน windows หรือ input validation ที่ไม่หนาแน่นพอใน php หรือ cgi scripts

การแฮคประเภทนี้ แม้แต่ firewall หรือ IDS ก็ไม่สามารถทำอะไรได้ เพราะมันเข้าทาง server โดย port 80 ที่เราจำเป็นต้องเปิดเพื่อให้มีการเข้าชมเวปไซด์

วิธีการป้องกัน

1.โปรแกรมเวปหรือ php เลือกที่มี input validation เพียงพอ ช่วงแรก ของ php-nuke ยังกรองพวก javascript หรือ sql injection ไม่ดีพอ ทำให้มีการสอดไส้ java มาเปลี่ยนหน้าเวปได้ ดังที่มีผู้เจอมาแล้ว ขอให้อัพเกรดเป็นเวอร์ชั่นล่าสุด

2.เลือก script ที่สามารถ run บน safe mode ได้ และ run บน register globals=off ได้

3.ปิดการทำงานของ htacces โดย set ที่ httpd.conf ตรงส่วน AllowOverride = none โดยเฉพาะถ้าเราทำเวปของเราเอง เราจะสามารถนำ .htacces ที่มีแต่ละ folder มากำหนดเองที่ main server โดยใช้ directive

<Directory>

</Directory>

(โดยไม่เปิดโอกาสให้ลูกค้าใช้งานเอง)

4.ปิดการทำงานของ cgi ให้ใช้เฉพาะใน folder เฉพาะ

5.run apache และ home directory ใน chroot environment

6. อาศัย mod_security ใน Apache ช่วยในการกรองอย่างง่าย ๆ

ปัญหาคือเราจะ admin NUKE ลำบากเพราะมันจะฟ้องตลอด ว่าเราเข้าไปก่อให้เกิดการเปลี่ยนแปลงใน scripts

7ปิดการสำรวจ php โดยเลือก disable functions=phpinfo() ใน php.ini

8.ปิดการสำรวจเวปโดยการเลิกใช้ Options Indexes ใน httpd.conf

9.ใช้ proxy เปลี่ยน port ของ web server ให้ใช้แบบไม่ standard และมีการกรองผ่านทาง proxy ที่ config ดี ๆ เข้าทำนองนำ firewall มากั้น

10.ไม่ให้ php show error

11.ใช้ mod rewrites เปลี่ยนคำว่า php เป้นอื่น ๆ ไม่ให้ใครรู้ว่าเราใช้ php อิ อิ แสดงว่าไง ?

จริง ๆ แล้วยังมีอีกมากและบางครั้งก็มีคนสามารถหา การ attack ใหม่ ๆ มาได้เรื่อย ๆ

open source จะมีปัญหาก็ตรงนี้ เพราะเนื่องจากแจกฟรี หาง่าย คน explore เยอะ เลยมีจุดอ่อนเยอะตาม

 


blog this


blog this

More about linuxsecure
· phpNUKE security hole in News Module (up to Ver 7.9)2006-11-29 18:23:53
· security fixes for cross site scripting in nuke6.0-7.02004-03-26 01:15:24
· important security fix in admin.php2004-03-26 00:14:00
· upgrade Apache to 2.0.48 lastest one2003-12-20 16:25:11

Comment Post
1  by
on Sunday, March 16 @ 19:51:35 GMT+7
< href="http://f.jsoftj.com/">URL blocked by staff منتديا&

Read the rest of this comment...




Your Name:

[ New User ]

Subject:


Comment:

Allowed HTML:
<b> <i> <a> <em> <br> <strong> <blockquote> <tt> <li> <ol> <ul>
Security code:



T news tweak
 

       Sponsored Links
       Related Links
· More about Linux&NUKE Security
· News by admin


Most read story about Linux&NUKE Security:
 Top tools for Linux(19630)

       Article Rating
Average Score: 0
Votes: 0

Please take a second and vote for this article:

Excellent
Very Good
Good
Regular
Bad


       Options

 Printer Friendly  Printer Friendly

 Send to a Friend  Send to a Friend

News ©

เล่นเกมส์ arcade games free!

main sitethaihealth | home | forums | downloads | topics

Seo from our desk thai seo
Web site engine code is Copyright © 2003 by PHP-Nuke.Copyright 2007 Thaihealth and pattaya doctor
Page Generation: 0.253 Seconds

Theme developed by WebDesignHQ.com Modified By DoctorNUKE