7/29/2009

hunt 사용

스니핑 툴 중에 하나인 hunt를 사용.
hunt는 동일 네트워크 상에 있는 모든 세션을 확인할수 있다. (default로 telnet과 rlogin)
구하는 건 알아서.....
# tar zxvf hunt-1.5.tgz
# cd hunt1.5
# make
# ./hunt

실행을 하게 되면 아래와 같은 화면이 나오게 된다.
메뉴를 보게 되면
l/w/r) list/watch/reset connections   // 리스트를 보여주는 l , 보기모드인 w , 확인한 커넥션을 강제로 끈어 버리는 r
u)     host up tests                          // host가 up 되어 있는 확인 test
a)     arp/simple hijack (avoids ack storm if arp used) // arp spoofing
s)     simple hijack                        /// 말그대로 하이젝킹
d)     daemons rst/arp/sniff/mac
o)     options
x)     exit

hunt를 telnet이나 rlogin으로 접속 되어있고 통신을 하고 있다면 리스트에 뜨게 된다.

/*
 *      hunt 1.5
 *      multipurpose connection intruder / sniffer for Linux
 *      (c) 1998-2000 by kra
 */
starting hunt
--- Main Menu --- rcvpkt 0, free/alloc 64/64 ------
l/w/r) list/watch/reset connections
u)     host up tests
a)     arp/simple hijack (avoids ack storm if arp used)
s)     simple hijack
d)     daemons rst/arp/sniff/mac
o)     options
x)     exit
-> l
no connections are available
--- Main Menu --- rcvpkt 24, free/alloc 63/64 ------
l/w/r) list/watch/reset connections
u)     host up tests
a)     arp/simple hijack (avoids ack storm if arp used)
s)     simple hijack
d)     daemons rst/arp/sniff/mac
o)     options
x)     exit
*> l                                                       ///// 리스트를 보자.
0) 192.168.11.1 [2311]         --> 192.168.11.100 [23]
1) 192.168.11.1 [2000]         --> 192.168.11.131 [23]
--- Main Menu --- rcvpkt 58, free/alloc 63/64 ------
l/w/r) list/watch/reset connections
u)     host up tests
a)     arp/simple hijack (avoids ack storm if arp used)
s)     simple hijack
d)     daemons rst/arp/sniff/mac
o)     options
x)     exit
-> w                                         ///////// watch 모드로 보자.
0) 192.168.11.1 [2311]         --> 192.168.11.100 [23]
1) 192.168.11.1 [2000]         --> 192.168.11.131 [23]

choose conn> 0
dump [s]rc/[d]st/[b]oth [b]> b
print src/dst same characters y/n [n]> y

CTRL-C to break
ffddssaa

-bash: fdsa: command not found
[youngrap@localhost youngrap]$ ddffssaa

-bash: dfsa: command not found
[youngrap@localhost youngrap]$ ffddss

-bash: fds: command not found
[youngrap@localhost youngrap]$ ssuu

Password: fdsafdsa

su: incorrect password
[youngrap@localhost youngrap]$


-펌-

sniffit

Sniffit

sniffit은 hunt에서 제공하는 정보보다 좀더 많은 정보를 제공한다.

작성자 : Brecht Claehout

필요조건 : C, IP 헤더, libpcap 라이버리( ftp://ftp.ee.lbl.gov/libpcap.tar.Z)

Download : http://reptile.rug.ac.be/~coder/sniffit/sniffit.html

sniffit은 상당한 설정 기능을 제공하는 비장의 카드이다. 그러나 사용할 때에 고려해야 할 점들이 많이 있으므로 주의한다.

 

설치

[root@linux mk]#./configure

[root@linux mk]#make

 

** 인터렉티브 모드로 작동시키기

[root@linux mk]# ./sniffit -i

 

Server : 211.234.52.20

Client : 211.234.52.10

 

         Source                Target

211.234.52.10 : 1704 - 211.234.52.20 : 23     /*  ls, pwd 등 명령만 출력 */

211.234.52.20 : 23 - 211.234.52.10 : 1704     /*  ls, pwd 등 명령와 결과도 출력 */

 

** 패킷 모니터링 (모티터 출력)

[root@linux mk]# ./sniffit -d -t 211.234.52.10

[root@linux mk]# ./sniffit -d -t 211.234.52.20 -p 23

 

** 패킷 모니터링 (파일출력)

[root@linux mk]# ./sniffit -t 211.234.52.20 -p 23

파일명 : 211.234.52.10.1704-211.234.52.20.23     /*  ls, pwd 등 명령만 출력 */

 

[root@linux mk]# ./sniffit -t 211.234.52.10

파일명 : 211.234.52.20.23-211.234.52.10.1704     /*  ls, pwd 등 명령와 결과도 출력 */

 

일반모드(Normal mode)

각 커넥션에 대한 데이터가 "출발지IP.출발지포트-도착지IP.도착지포트"와 같은 형식으로 저장된다.

 

Dump 모드

-d, -a 옵션 등을 주었을 경우 데이터가 stdout으로 바로 출력된다.

-c : 설정파일 명시

-p : 특별히 감시할 포트 설정

-s : 발신지 IP로부터 들어오는 패킷을 수집

-t : 목적지 IP로부터 들어오는 패킷을 수집

 

인터렉티브 모드(Interactive mode)

-i, -I 옵션 등을 주었을 경우 데이터가 curses를 사용하는 터미널로 출력됩니다. 각 커넥션 리스트가 나오고 브라우징이 가능합니다.

F1 : 출발지 호스트에 대한 필터링

F2 : 목적지 호스트에 대한 필터링

F3 : 출발지 포트에 대한 필터링

F4 : 도착지 포트에 대한 필터링