Calendar

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

OpenSSH Security with Fake banner in FreeBSD

โดยปกติแล้วเจ้าเซอเวอร์ของเรามันจะโชว์เวอร์ชันของ ssh โดยจะบอกทั้งเวอร์ชั่น ระบบปฏิบัติการ ทำให้เป็นเป้าหมายของเหล่า hacker สามารถค้นหาและสามารถเล่นงานได้โดยง่าย
การทำ fake banner เป็นการเปลี่ยนรายละเอียนของโปรแกรมหรือเซอร์วิส เพื่อให้แสดงข้อมูลอย่างที่เราต้องการ ในตัวอย่างนี้ผมจะทำการเปลี่ยน banner ของ service OpenSSH ที่ลงในระบบปฏิบัตการ FreeBSD

โดยค่าปกติของ SSH Banner เป็นค่า SSH-2.0-OpenSSH_4.5p1
โดยเราจะเปลี่ยนให้เป็นค่า SSH-2.0-JiramotService

โดยทำการเข้าไปแก้ไฟล์ซอร์ส versioh.h ของ OpenSSH โดยใน FreeBSD จะอยู่ที่

/usr/scr/crypto/openssh/

จากนั้นแก้ให้เป็น

#define SSH_VERSION (ssh_version_get())
#define SSH_RELEASE (ssh_version_get())
#define SSH_VERSION_BASE “JiramotService”
#define SSH_VERSION_ADDENDUM “JiramotInfo”

ทำการบันทึก จากนั้นรีคอมไฟล์ โดยไปที่

/usr/src/secure/lib/libssh

make obj && make depend && make && make install

จากนั้นทำการ restart service

/etc/rc.d/ssh restart

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

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="">