linuxϵͳ°²È«(¶þ): ÈÕÖ¾
linuxϵͳ°²È«(¶þ): ÈÕÖ¾
http://www.ibm.com/developerworks/cn/linux/security/l-ossec/part2/index.html
ÎĵµÑ¡Ïî
´òÓ¡±¾Ò³
½«´ËÒ³×÷Ϊµç×ÓÓʼþ·¢ËÍ
¼¶±ð£º ³õ¼¶
½úÁÁ (sound810@sina.com), ÍøÂ簲ȫ¹¤³Ìʦ
2003 Äê 1 ÔÂ 09 ÈÕ
ÎÒÃÇÖ÷Òª½²Ò»ÏÂLinux»·¾³ÖеÄϵͳ¼ÇÕʺÍϵͳÈÕÖ¾¹ÜÀíÒÔ¼°ÔõôÓÃһЩ¹¤¾ß¸ü¼Ó·½±ãÓÐЧµÄ¹ÜÀíÈÕÖ¾ÐÅÏ¢¡£
µ±ÎÒÃÇÓÃÉÏÃæµÄ·½·¨½øÐÐÁË Linux ·þÎñÆ÷µÄ°²×°ºÍһЩ»ù±¾µÄÉèÖúó£¬ÎÒÃǵķþÎñÆ÷Ó¦¸Ã˵À´ÊDZȽϰ²È«µÄ¡£µ«ÊÇ×ÜÊÇ»¹»áÓкڿͿÉÒÔͨ¹ý¸÷ÖÖ·½·¨ÀûÓÃϵͳ¹ÜÀíÔ±µÄÊèºöÇÖÈëÎÒÃǵÄϵͳ¡£ËûÃǵÄÒ»¾ÙÒ»¶¯¶¼»á¼Ç¼µ½ÏµÍ³µÄÈÕÖ¾Ö®ÖУ¬¾¡¹ÜËûÃÇ¿ÉÄÜ¿ÉÒԸıäÕâЩÈÕÖ¾ÐÅÏ¢£¬ÉõÖÁÓÃ×Ô¼ºµÄ³ÌÐòÌæ»»µôÎÒÃÇϵͳ±¾ÉíµÄÃüÁî³ÌÐò£¬µ«ÊÇͨ¹ýÈÕÖ¾ÎÒÃÇ×Ü»¹ÊÇÄÜÕÒµ½Ò»Ð©ÖëË¿Âí¼£¡£ÏÂÃæÎÒÃÇÖ÷Òª½²Ò»Ï Linux »·¾³ÖеÄϵͳ¼ÇÕʺÍϵͳÈÕÖ¾¹ÜÀíÒÔ¼°ÔõôÓÃһЩ¹¤¾ß¸ü¼Ó·½±ãÓÐЧµÄ¹ÜÀíÈÕÖ¾ÐÅÏ¢¡£
1 ϵͳ¼ÇÕÊ
×î³õ¿ª·¢µÄϵͳ¼ÇÕÊÓÃÓÚ¸ú×ÙÓû§×ÊÔ´Ïû·ÑÇé¿ö£¬´ÓÓû§ÕʺÅÖÐÌáÈ¡·ÑÓÃΪĿµØµÄ¡£ÏÖÔÚÎÒÃÇ¿ÉÒÔ°ÑËüÓÃÓÚ°²È«Ä¿µÄ£¬¸øÎÒÃÇÌṩÓйØÔÚϵͳÖз¢ÉúµÄ¸÷ÖֻµÄÓмÛÖµÐÅÏ¢¡£
ϵͳ¼ÇÕÊÖ÷Òª·ÇΪÁ½Àà:
1) Á¬½Ó¼ÇÕÊ
Á¬½Ó¼ÇÕÊÊǸú×Ùµ±Ç°Óû§µ±Ç°¶Ô»°¡¢Óû§µÇ¼ºÍÍ˳öµÄ»î¶¯¡£ÔÚ Linux ϵͳÖÐʹÓà utmp (¶¯Ì¬Óû§¶Ô»°)ºÍ wtmp (µÇ¼/Í˳öÈÕÖ¾¼Ç¼)¹¤¾ßÀ´Íê³ÉÕâÒ»¼ÇÕʹý³Ì¡£Wtmp ¹¤¾ßͬʱά»¤ÖØÐÂÒýµ¼ºÍϵͳ״̬±ä»¯ÐÅÏ¢¡£¸÷ÖÖ³ÌÐò¶ÔÕâЩ¹¤¾ß½øÐÐˢкÍά»¤£¬Òò´ËÎÞÐë½øÐÐÌØÊâµÄºǫ́½ø³Ì»ò³ÌÐò¡£È»¶ø£¬utmp ºÍ wtmp Êä³ö½á¹ûÎļþ±ØÐë´æÔÚ£¬Èç¹ûÕâЩÎļþ²»´æÔÚ»á¹Ø±ÕÁ¬½Ó¼ÇÕÊ¡£Óë utmp ºÍ wtmp ÓйصÄËùÓÐÊý¾Ý½«·Ö±ð±£´æÔÚ /var/run/utmp ºÍ /var/log/wtmp ÖС£ÕâЩÎļþ¹é¸ùÓû§ËùÓС£ÕâЩÎļþÖеÄÊý¾ÝÊÇÓû§²»¿É¶ÁµÄ£¬µ«Ò²Óй¤¾ß¿ÉÒÔת»»³É¿É¶ÁµÄÐÎʽ¡£
dump-utmp ¿ÉÒÔת»»Á¬½Ó¼ÇÕÊÊý¾ÝΪ¿É¶ÁµÄ ASCII ¸ñʽÊý¾Ý¡£
ac ÃüÁîÌṩÁËÓйØÓû§Á¬½ÓµÄ´ó¸Åͳ¼Æ£¬ÎÒÃÇ¿ÉÒÔʹÓôøÓбêÖ¾ d ºÍ p µÄ ac ÃüÁî¡£±êÖ¾ d ÏÔʾÁËÒ»ÌìµÄ×ÜÁ¬½Óͳ¼Æ£¬±êÖ¾ p ÏÔʾÁËÿһ¸öÓû§µÄÁ¬½Óʱ¼ä¡£ÕâÖÖͳ¼ÆÐÅÏ¢µÄ·½Ê½¶ÔÁ˽âÓë̽²âÈëÇÖÓйصÄÓû§Çé¿ö¼°ÆäËû»î¶¯ºÜÓаïÖú¡£Last ºÍ who ÊdzöÓÚ°²È«½Ç¶È¶¨ÆÚʹÓõÄ×î³£ÓÃÃüÁî¡£
last ÃüÁîÌṩÿһ¸öÓû§µÄµÇ¼ʱ¼ä£¬Í˳öµÇ¼ʱ¼ä£¬µÇ¼λÖã¬ÖØÐÂÒýµ¼ÏµÍ³¼°ÔËÐ춱ð±ä»¯µÄÐÅÏ¢¡£last -10 ±íʾ last µÄ×î¶àÊä³ö½á¹ûΪ×î½üµÄ 10 ÌõÐÅÏ¢¡£È±Ê¡Ê± last ½«ÁгöÔÚ /var/log/wtmp ÖмǼµÄÿһÁ¬½ÓºÍÔËÐ춱ðµÄ±ä
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
ʵÏÖ³ÌÐòÔÚºǫ́ÔËÐУº
[³ÌÐò] &
µ«Èç¹ûÍüÁËÊäÈë&£¬µ«ÓÖ²»Ïë°Ñ³ÌÐòÍ£Ö¹ºóÖØÐÂÆô¶¯£¬
Äã¿ÉÒÔÕâÑù×ö£º
°´Ctrl+z,ÔÝͣǰ̨¹¤×÷£¬
È»ºóÓÃjobsÃüÁî²é¿´µ±Ç°shellÒ»¹²Æô¶¯Á˶àÉÙºǫ́³ÌÐò£¬Äã¿ÉÒÔ¿´µ½ÄãµÄ³ÌÐòÔÚÆäÖУ¬
ËüµÄ״̬ÊÇstopp ......
ÔÚÉÏһƪÎÄÕÂÖжÔÏ߳̽øÐÐÁ˼òµ¥µÄ¸ÅÊö£¬ËüÔÚϵͳÖкͱà³ÌµÄÓ¦ÓÃÖУ¬°çÑݵĽÇÉ«ÊDz»ÑÔ¶øÓ÷µÄ¡£Ñ§Ï°Ëü¡¢ÕÆÎÕËü¡¢³Ô͸ËüÊÇ×÷Ϊһ¸ö³ÌÐòÔ±µÄ±ØÐë×÷Ϊ¡£ÔÚ½ÓÏÂÀ´µÄ½²ÊöÖУ¬ËùÓÐÏ̵߳IJÙ×÷¶¼ÊÇÓû§¼¶µÄ²Ù×÷¡£ÔÚLINUXÖУ¬Ò»°ãpthreadÏ߳̿âÊÇÒ»Ì×ͨÓõÄÏ߳̿⣬ÊÇÓÉPOSIXÌá³öµÄ£¬Òò´ËËûµÄÒÆÖ²ÐÔÊǷdz£ºÃµÄ¡£
& ......
Linux ÏÂÃæʹÓÃRPCÐèҪʹÓõ½ÃüÁîrpcgen.
ÔÚLinuxÏ¿ª·¢RPC³ÌÐòÁ÷³ÌÈçÏ£º
1.дһ¸örpc³ÌÐò
Èçtest.x
2.ʹÓÃrpcgenÉú³É±ØÐëµÄÎļþ£¬Í¨³£ÊÇ¿Í»§¶ËºÍ·þÎñÆ÷¶ËÒÔ¼°Í·Îļþ
$rpcgen test.x
3.ʹÓÃrpcgenÉú³É·þÎñÆ÷¶ËºÍ¿Í»§¶ËµÄCÓïÑÔ´úÂë
$rpcgen -Ss -o test_s ......