close
  • 홈
  • :
  • 위치로그
  • :
  • 태그
  • :
  • 방명록
  • :
  • 관리자
  • :
  • 새글쓰기
블로그 이미지

이슬나라 [isulnara.com]
프로그램 관련 문의...
전체 (168)
자작 프로그램 (22)
WebFTP (2)
iSysInfoX (2)
IEPageSetup (3)
EzIP (3)
ezSVC (1)
iDebugX (1)
msnAlert (2)
기타 (7)
버그 신고 (1)
이것저것.. (53)
WebFTP 게시판 (0)
팁 모음 (65)
linux (16)
프로그래밍 (30)
윈도우 (5)
네크워크 (7)
기타 (6)
Reverse Engin.. (0)
윈도우 숨은.. (4)
터미널 서비스.. (1)
공개 웹하드 (1)
관리자 (0)
PC 원격제어.. (1)
NAS (19)
«   2010/03   »
일 월 화 수 목 금 토
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
MAC Address DDNS 홈 네트워크 다운로드스테이션 scp msn 알림이 synology sms apache 블록 디버깅 쉘스크립트 아이피설정 AjaXplorer DirectX9 IEPageSetup 알콘 tomcat setuid SSH CPUID SIP 아파치 FON mysql 선풍기 제어 DenyHosts expect Indy arm
ezlink 0.9.9 베타.
Synology NAS CPU 타...
무료 원격제어 프로그램.
IEPageSetup 크기에... (4)
시스템 에러 로그 SMS... (2)
양면 인쇄는 프린터에 따...
isul / 03/03
혹시 양면인쇄가 가능할...
쎄이 / 03/02
위의 답변에서 말씀드렸...
isul / 03/01
바로위에 글을 올렸던 사...
woobang / 02/28
도움이 되었다니 저도 기...
isul / 02/25
일반 어플리케이션을 서...
ㅇㅇ/ / 2009
사이코웨어 : nProtect,...
√ MIRiyA's AstraLog / 2008
웹페이지에서 인쇄시 머...
醉生夢死™ / 2006
웹페이지에서 MAC Addres...
날자~!! 날어~!! / 2005
 최근글 목록
 2010/02 [2]
 2010/01 [1]
 2009/11 [3]
 2009/10 [1]
 2009/09 [1]
넷하드
무료 원격제어 프로그램
바이러스제로
솔라리스 테크넷
스티브 맥코넬
파워해커
하얀나무's Story
Total of
292003 visitors
Today 62
Yesterday 248
 
글검색결과[brute-force attack] : 1
2008/12/01  DenyHosts로 sshd brute-force attack 막기
     
 NAS 
DenyHosts로 sshd brute-force attack 막기
Posted on 2008/12/01 21:33
 
 
 
 

What is DenyHosts?

"DenyHosts is a script intended to be run by Linux system administrators to help thwart SSH server attacks (also known as dictionary based attacks and brute force attacks).

If you've ever looked at your ssh log (/var/log/secure on Redhat, /var/log/auth.log on Mandrake, etc...) you may be alarmed to see how many hackers attempted to gain access to your server. Hopefully, none of them were successful (but then again, how would you know?). Wouldn't it be better to automatically prevent that attacker from continuing to gain entry into your system?

DenyHosts attempts to address the above.."

http://denyhosts.sourceforge.net/

사용된 버전: DenyHosts-2.6


1. python 설치(설치 안되어 있을 경우)
fs> ipkg install python24


2. DenyHosts-2.6.tar.gz 다운로드
:
http://downloads.sourceforge.net/denyhosts/DenyHosts-2.6.tar.gz?modtime=1165494115&big_mirror=0


3. DenyHosts-2.6 설치

fs> tar xvzf DenyHosts-2.6.tar.gz
fs> cd DenyHosts-2.6
fs> python setup.py install
fs> cp -R DenyHosts /usr/share/denyhosts
fs> ln -s /usr/share/denyhosts/DenyHosts /usr/bin/DenyHosts
fs> cd /usr/share/denyhosts
fs> cp denyhosts.cfg-dist denyhosts.cfg
fs> cp daemon-control-dist daemon-control
fs> chown root daemon-control
fs> chmod 700 daemon-control


4. /usr/share/denyhosts/denyhosts.cfg 수정
# Debian:
SECURE_LOG = /var/log/messages

# Another possibility (also see the next option):
HOSTS_DENY = /etc/hosts.evil

# http://denyhosts.sourceforge.net/faq.html#aux
BLOCK_SERVICE =   

# Debian
LOCK_FILE = /var/run/denyhosts.pid

# To enable synchronization, you must uncomment the following line:
SYNC_SERVER = http://xmlrpc.denyhosts.net:9911

# The default is SYNC_UPLOAD = yes
#
SYNC_UPLOAD = no

# The default is SYNC_DOWNLOAD = yes
#
#SYNC_DOWNLOAD = no
SYNC_DOWNLOAD = yes


5. /usr/share/denyhosts/daemon-control 수정
DENYHOSTS_LOCK = "/var/run/denyhosts.pid"


6. /etc/hosts.deny 설정

ALL: /etc/hosts.evil


7. 차단할 IP 주소를 기록할 파일 생성
fs> touch /etc/hosts.evil


8. 자동 실행 설정: /etc/rc.local 수정
# denyhosts
/usr/share/denyhosts/daemon-control start


9. DenyHosts 실행(최초 1회)
fs> /usr/share/denyhosts/daemon-control start


10. /etc/hosts.evil 확인: 아래와 같은 형식으로 공격자의 IP 주소가 기록됨
62.193.233.132
80.24.4.23
210.15.200.92
81.138.41.99
193.231.3.97
201.0.145.106
168.167.229.166
24.232.77.40
213.251.154.165



*. 참고사항
/usr/share/denyhosts/daemon-control start 실행 시 다음과 같은 에러가 발생할 경우
starting DenyHosts:    /usr/bin/env python /usr/bin/denyhosts.py --daemon --config=/usr/share/denyhosts/denyhosts.cfg
Traceback (most recent call last):
  File "/usr/bin/denyhosts.py", line 5, in ?
    import DenyHosts.python_version
  File "/usr/bin/DenyHosts.py", line 5, in ?
    import DenyHosts.python_version
ImportError: No module named python_version
에는 다음과 같이 처리하면 됩니다.
fs> cp -R DenyHosts /usr/share/denyhosts
fs> ln -s /usr/share/denyhosts/DenyHosts /usr/bin/DenyHosts


설치 과정은 다음 사이트를 참고하였습니다.
http://www.howtoforge.com/preventing_ssh_dictionary_attacks_with_denyhosts
Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
이올린에 북마크하기(0) 이올린에 추천하기(0)
brute-force attack, DenyHosts, SSH
Trackback [0] : Comment [0]
TrackbackAddress
http://isulnara.com/tt/trackback/178
SecretComment
  1