TTY watcher ¿±â
UNIX system¿¡¼ »ç¿ëÀÚ°¡ ·Î±äÀ» ÇÏ°Ô µÇ¸é kernelÀº »õ·Î¿î °¡»óÀÇ Å͹̳ÎÀÎ tty¸¦ ÇÒ´çÇÏ°í tty¸¦ ÅëÇØ »ç¿ëÀÚ¿Í ´ëȸ¦ ÇÏ
°Ô µÈ´Ù. ¸¶Ä¡ ½Ç»ýÈ°¿¡¼ tty¶õ Àüȱâ¶ó°í ÇÒ ¼ö ÀÖ´Â °ÍÀÌ´Ù. Àüȸ¦ µµÃ»ÇÏ´Â °Íó·³ ±× tty ¸¦ ¿³º¸°Ô ÇØÁÖ´Â °ÍÀÌ ttywatc
herÀÌ´Ù. Áï, ttywatcher¶õ local system¿¡¼ »ç¿ëÀÚµéÀÌ ÇÏ´Â ÇൿµéÀ» Á¦¾î ¶Ç´Â ¸ð´ÏÅ͸µÇÒ ¼ö ÀÖ´Â µµ±¸ÀÌ´Ù. ttywatcher´Â
Àü ³×Æ®¿÷¿¡ ´ëÇؼ »ç¿ëÀÚµéÀ» Á¦¾î ¸ð´ÏÅ͸µÀ» ÇÒ ¼ö ÀÖ´Â IP-watcher¿¡ ±â¹ÝÀ» µÎ°í ¸¸µé¾îÁ³´Ù. ºñ½ÁÇÑ Á¾·ùÀÇ µµ±¸·Î´Â tap
À̶õ°Ô ÀÖÀ¸³ª ttywatcher´Â tapº¸´Ù´Â Áøº¸ÀûÀÌ°í user-friendlyÇÑ ÀÎÅÍÆäÀ̽º¸¦ Áö´Ï°í ÀÖ´Ù. X-windows Interface¸¦ »ç¿ëÇÑ´Ù
.
±×¸®°í,
TTYwatcherÀÇ °æ¿ì Çѱ¹À̶ó´Â »óȲ¶§¹®¿¡ ÇÊÈ÷ "ÇѱÛ"¹®Á¦°¡ Àֱ⠸¶·ÃÀÌ´Ù. X interface·Î ¶ç¿î °æ¿ì Ưº°¸® ÇѱÛ
À» º¸±â À§ÇÑ ¼Â¾÷ÀÌ µÇ¾î ÀÖÁö ¾Ê´Ù¸é ÇѱÛÀº ¸ðµÎ ±úÁ®¼ ³ª¿À°Ô ¿ß°ÍÀÌ´Ù. ±×¸®°í ¿ª½Ã curses ¸ðµå·Î ½Ã¿ëÇÏ¿©µµ ÇѱÛÀ» Áö
¿øÇÏÁö ¾Ê´Â Å͹̳ÎÀÌ¸é ¿ª½Ã ÇѱÛÀ» º¼¼ö°¡ ¾ø´Ù. ÀÌ·¯ÇÑ ¹®Á¦ÀÇ ÇØ°áÃ¥Àº ¾Æ·¡¿Í °°´Ù.
X-interface :
¾Æ·¡ ÁÖ¼Ò¿¡¼ ÇÑ±Û X-library¸¦ °¡Á®¿Í¼ ¼³Ä¡ÇÑ ÈÄ ½ÇÇà ÇÑ´Ù.
ftp://ara.kaist.ac.kr/pub/SPARCS/HanX
Curses interface :
hantermÀ» ¼³Ä¡ÇÑ ÈÄ hanterm³»¿¡¼ ½Ãµ¿ÇÑ´Ù.
ÀÌ·¸°Ô Çϸé ÇÑ±Û ¸Þ¼¼Áö±îÁö ¿ÏÀüÇÏ°Ô º¸ÀÏ°ÍÀÌ´Ù.
Watcher´Â ÁÖ·Î trapÀ» °É¶§ »ç¿ëÇÑ´Ù. ÇØÄ¿°¡ ħÀԽà ±×¿¡ ´ëÇÑ log¸¦ Àâ±â À§ÇØ Ä§ÀÔ·çÆ®¸¦ ¿¾îÁÖ°í ±×ÀÇ ÇൿÀ» °üÂûÇÑ ÈÄ
·Î±×·Î ³²±ä ÈÄ Â÷ÈÄ¿¡ Áõ°Å·Î ¾µ¼ö ÀÖ´Â Á¡¿¡¼ ±× À¯ÀÏÇÑ Àǹ̸¦ ãÀ»¼ö ÀÖ´Ù. º¼¹ý »ç¿ëÀÚ¿¡ ÀÇÇØ »ç¿ëµÉ¶§ À̵µ±¸´Â °³ÀÎÀÇ
ÇÁ¶óÀ̹ö½ÇÀ» Àû³ª¶óÇÏ°Ô µé¾îÁú¼ö ÀÖ´Â µµ±¸°¡ µÈ´Ù´Â Á¡¿¡¼ ±× ¾çº¯¼ºÀ» ãÀ»¼öÀÖ´Ù.
TTY watcher ±¸Çϱâ
ftp://kus.kaist.ac.kr/pub/Security/tools/ttywatcher-*.*.*.tar.gz
http://nad.infostructure.com/watcher.html
TTY watcher ¼³Ä¡
1.SunOS 4.x¿¡ ¼³Ä¡Çϱâ
2.Solaris 2.x¿¡ ¼³Ä¡Çϱâ
SunOS 4.xÀÇ °æ¿ì
ÃÖ»óÀ§ directoryÀÇ MakefileÀ» ÆíÁýÇÑ´Ù. ´ÙÀ½Àº °¢°¢ÀÇ factor¿¡ °üÇÑ ¼³¸íÀÌ´Ù.
1. CompilerÀÇ Option ¼±ÅÃÇϱâ
CCOPT = -g -O -Itwtch -I/usr/5include # For gcc//cc compile½Ã comment out
#CCOTT = -0 -Itwtch -I/usr/5include # For cc//cc compile½Ã comment in
2. »ç¿ëÇÒ X library include file ¼±ÅÃ
INCLUDES = -I/use/openwin/incluse #for standard xview
#INCLUDES = -I/use/local/X11R6/include #For use installed Xview
Sun»çÀÇ openwindow¸¦ »ç¿ëÇÒ °æ¿ì¿£ ±×´ë·Î X11R6¸¦ »ç¿ëÇÒ °æ¿ì¿£ ¾Æ·¡ ¶óÀÎÀ» commemt in ÇÑ´Ù.
3. »ç¿ëÇÒ XVIEW¶óÀ̺귯¸®ÀÇ ¼±ÅÃ
#LIBXVIEW = -L/local/X11R6/lib/xviex-L/use/local/X11R6/lib-L /use/lob -lc -lxvuew -lolgx # -lX11
LIBXVIEW = -L/use/opemwin/lib-L/use/lib -lc0lxview -lolgx -lX11 -lm
ÀÇÀÇ °æ¿ì¿Í µ¿ÀÏÇÏ´Ù. ´Ü, À§¿¡¼ X11À» ÅÃÇØ ÁÖ¾î´ô ÇÑ´Ù.
4 CompoilerÀÇ ¼±ÅÃ
CC = gcc -traditional
#CC =cc
LD=gcc
#LD =cc
ttywatcher´Â K&R¹æ½ÄÀ¸·Î ÄÚµùµÇ¾î ÀÖÀ¸¹Ç·Î K&R¹æ½ÄÀ» Áö¿øÇÏ´Â ÄÄÆÄÀÏ·¯·Î ÄÄÆÄÀÏÇÑ´Ù.
´ëºÎºÐÀÇ ÄÄÆÄÀÏ·¯°¡ K&R styleÀ» Áö¿øÇϹǷΠ½Å°æ¾µ ÇÊ¿ä´Â ¾ø´Ù.
ÀÌÁ¦ ttywatcher ¸¦ build ÇÑ´Ù.
$make
ÄÄÆÄÀÏÀÌ ¿Ï·áµÇ¸é Ä¿³Î¿¡ ¸ðµâÀ» »ðÀÔÇÑ´Ù. ttywatcher´Â À¯Àú¿¡°Ô tty°¡ ÇÒ´çµÇ°í ´Ù½Ã Ä¿³Î¿¡ ±Í¼ÓµÇ´Â ÀÏ·ÃÀÇ °úÁ¤À» À§ÇØ
Ä¿³Î¾È¿¡¼ ÀÌ ±â´ÉÀ» ÇØÁÙ¼ö Àִ ƯÁ¤ ÇÔ¼ö µéÀÇ ÁýÇÕÀÎ ¸ðµâÀ» »ðÀÔÇØ¾ß ÇÑ´Ù. ƯÁ¤ÇÑ ¸ñÀû¿¡ ÀÇÇØ º¯Á¶µÈ Ä¿³ÎÀÇ °æ¿ì Mulica
st, Sybase kernel Fault °¡ ³¯¼öµµ ÀÖ´Ù.
½Ã½ºÅÛÀ» Reboot ½Ãų¶§ ¸¶´Ù module À» »ðÀÔÇØ¾ß ÇÑ´Ù. ´Ù¼öÀÇ ¸ðµâÀ» »ðÀÔÇϸé ttywatcher°¡ µ¿ÀÛÇÏÁö ¾Ê´Â´Ù. modstat, m
odunload µîÀÇ ¸í·ÉÀ» »ç¿ëÇϵ® kernel ¸ðµâÀ» Çڵ鸵 ÇÒ¼ö ÀÖ´Ù.
$ cd twtch
$ make
$ su root
$ make doit /*¸ðµâÀ» »ðÀÔÇØÁÖ´Â ·çƾÀÌ´Ù.*/
¸ðµç ¼Â¾÷ÀÌ ¿Ï·áµÇ¾ú´Ù.
ttywatcher¸¦ ½ÇÇàÇÑ´Ù.
$ ttywatcher [ -c ]
option for CURSES envirronment not X
Solaris 2.xÀÇ °æ¿ì
Makefile.solaris ¸¦ ÆíÁýÇÏ¿© »ç¿ëÇÑ´Ù.
ÁÖÀÇÇÒÁ¡À¸·Î´Â, ttywatcher´Â X liblary¸¦ »ç¿ëÇϹǷΠ(when compiled Dynamically ) LD_LIBRARY_PATH¿¡ /use/opensin/libÀ»
ÁöÁ¤Çϵµ·ÏÇÑ´Ù.
&seten LD_LIBRARY_PATH/use/openwin/lib (csh style)
$ LD_LIBRARY_PATH= /use/openwin/lib;export LD_LIBRARY_PATH (sh style)
TTY watcherÀÇ »ç¿ë¹ý
ttywatcher´Â µÎ°¡ÁöÀÇ ÀÎÅÍÆäÀ̽º·Î ¿î¿ëµÉ¼ö ÀÖ´Ù.
1.view (X-windows) interface
2.Curses (text based) interface
TTYwatcher´Â ½Ãµ¿Áï½Ã X-windows ÀÎÅÍÆäÀ̽º¸¦ °¡µ¿ÇÏ·Á°í ½ÃµµÇÑ´Ù. (DISPLAYº¯¼ö°¡ ¼³Á¤µÇ¾îÁø °æ¿ì) X-WINDOWS ÀÎÅÍÆäÀ̽º
¸¦ »ç¿ëÇÏ±æ ¿øÇÑ´Ù¸é ½Ãµ¿Àü¿¡ DISPLAY º¯¼ö¸¦ ¼³Á¤ÇØ¾ß ÇÑ´Ù.
Curses ¸ðµå¿¡¼ÀÇ ÀÎÅÍÆäÀ̽º´Â ´ÙÀ½°ú °°ÀÌ ³ªÅ¸³´Ù.
=============================================================================
TTY=Watcher v1. 0 by En Garde Systems | Command:
----Active Session---------------------------------Status----------------------
dwhong [/dev/pts/0] 0 | Conn : No active connection
dwhong [/dev/pts/1] 0 | Conn status : *DEAD*
chester [/dev/pts/3] 0 |
chester [/dev/pts/4] 0 | Active conns:5
young [/dev/pts/2] 0 |
|-------------keys-----------------------
| Arrow/VI keys scroll,<ret> selects
| [f]ullscreen mode, [q]uit
-----------------------------Server -> Client-----------------------------------
----------------------------Client -> Server------------------------------------
==============================================================================
Main window ´Â ÇöÀçÀÇ Active session¿¡ ´ëÇÑ Ç¥½Ã¿Í ¿©·¯°¡ÁöÀÇ Option ¸Þ´º°¡ ÀÖ´Ù.
Window¿¡¼ ¿øÇÏ´Â session À» Ŭ¸¯ÇÏ¸é ±×¼¼¼Ç¿¡ ´ëÇÑ À©µµ¿ì°¡ Çϳª ´õ ¶ß°Ô µÇ°í ÀÌÀ©µµ¿ì»ó¿¡¼ »ç¿ëÀÚÀÇ tty¸¦ °¨½ÃÇÒ¼ö
ÀÖ´Ù.
´ÙÀ½ÀÇ ¿¹Á¦µéÀº Silaris 2.4¿¡¼ ½ÇÇàÀ» º¸ÀÌ´Â ¿¹Á¦ÀÌ´Ù.
Active sessions :
chester [/dev/pts/2 ] 1697
/dev/pts/2ÀÇ ¼¼¼ÇÀº chester¶õ À¯Àú°¡ ½º°í ÀÖ´Ù. ¸ð´ÏÅ͸µ ½ÃÀÛºÎÅÍ 1697¹ÙÀÌÆ®ÀÇ Á¤º¸°¡ ±× ¼¼¼ÇÀ» Åë°úÇÞ´Ù´Â °ÍÀ» ³ªÅ¸ ³»
°í ÀÖ´Ù. ÀÚ¼¼ÇÑ key sequence ´Â man ttywatvjer¿¡ ÀÚ¼¼È÷ ¼³¸íµÇ¾î ÀÖ´Ù.