Calendar

September 2010
S M T W T F S
« Jul    
 1234
567891011
12131415161718
19202122232425
2627282930  

Apache Security with Fake Banner

เพื่อเป็นการป้องการกันโจมที apache server โดยการทำ Fake banner ของ apache service

/etc/httpd/conf/httpd.conf            ; redhat distro

ServerTokens Full,OS,Minor,Minimal,Major,Prod

ServerTokens Setting
ProductOnly Server: Apache
Major Server: Apache/2
Minor Server: Apache/2.0
Minimal Server: Apache/2.0.55
OS Server: Apache/2.0.55 (Debian)
Full (or not specified) default Server: Apache/2.0.55 (Debian) PHP/5.1.2-1+b1 mod_ssl/2.0.55 OpenSSL/0.9.8b

ถ้าจะแก้ไข header :  กรณีที่ต้องการเปลี่ยน banner ไปเลย

/usr/include/httpd/httpd.h            ; apache v.1
/usr/include/httpd/ap_release.h    ; apache v.2

44 #define AP_SERVER_BASEPRODUCT “Apache”
45
46 #define AP_SERVER_MAJORVERSION_NUMBER 2
47 #define AP_SERVER_MINORVERSION_NUMBER 2
48 #define AP_SERVER_PATCHLEVEL_NUMBER   9

ตัวอย่างการ config ServerTokens แบบ Full ก็เช่นเวปนี้ จะได้

Apache/2.2.9 (FreeBSD) mod_ssl/2.2.9 OpenSSL/0.9.8e DAV/2

PHP/5.2.6 with Suhosin-Patch SVN/1.5.2

อิอิ

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • Facebook
  • Google Bookmarks
  • Live
  • MySpace
  • PDF
  • RSS
  • Twitter
  • Yahoo! Bookmarks
  • email

1 comment to Apache Security with Fake Banner

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">