×ðÁú¿­Ê±¹ÙÍøµÇ¼

ÔõÑùͨ¹ýLinux¹¤¾ß¾ÙÐÐÇå¾²ÈÕÖ¾ÆÊÎö£¿

ÔõÑùͨ¹ýlinux¹¤¾ß¾ÙÐÐÇå¾²ÈÕÖ¾ÆÊÎö£¿

ÔÚµ±½ñÊý×Ö»¯Ê±´ú £¬ÍøÂçÇå¾²ÎÊÌâÔ½À´Ô½Í»³ö¡£ÎªÁËʵʱ·¢Ã÷¡¢Ô¤·ÀÏ¢Õù¾öÇå¾²Íþв £¬Çå¾²ÈÕÖ¾ÆÊÎö³ÉΪÁËÒ»ÏîÖÁ¹ØÖ÷ÒªµÄʹÃü¡£ÔÚLinuxϵͳÖÐ £¬ÓÐÐí¶àÇ¿Ê¢µÄ¹¤¾ß¿ÉÒÔ×ÊÖúÎÒÃǾÙÐÐÇå¾²ÈÕÖ¾ÆÊÎö¡£±¾ÎĽ«ÏÈÈݼ¸¸ö³£ÓõÄLinux¹¤¾ß £¬²¢¸ø³ö´úÂëʾÀý £¬ÒÔ×ÊÖú¶ÁÕßÏàʶÔõÑùʹÓÃËüÃǾÙÐÐÇå¾²ÈÕÖ¾ÆÊÎö¡£

awk

awkÊÇÒ»ÖÖÇ¿Ê¢µÄÎÄÌìÖ°Îö¹¤¾ß £¬¿ÉÒÔÓÃÓÚ´¦ÀíºÍ¹ýÂËÇå¾²ÈÕÖ¾¡£ÏÂÃæÊÇÒ»¸öʾÀý´úÂë £¬ÓÃÀ´ÌáÈ¡ÈÕÖ¾ÎļþÖеÄÒªº¦ÐÅÏ¢£º

awk '/Error/ {print $0}' /var/log/syslog

µÇ¼ºó¸´ÖÆ

Õâ¶Î´úÂë»áÔÚ/var/log/syslogÎļþÖвéÕÒ°üÀ¨”Error”Òªº¦×ÖµÄÐÐ £¬²¢´òÓ¡³öÕûÐÐÄÚÈÝ¡£

grep

grepÊÇÁíÒ»¸ö³£ÓõÄÎı¾ËÑË÷¹¤¾ß £¬¿ÉÒÔÓÃÀ´¹ýÂ˳ö°üÀ¨Ìض¨Òªº¦×ÖµÄÈÕÖ¾¼Í¼¡£ÏÂÃæÊÇÒ»¸öʾÀý´úÂ룺

grep "Failed password" /var/log/auth.log

µÇ¼ºó¸´ÖÆ

Õâ¶Î´úÂë»áÔÚ/auth.logÎļþÖвéÕÒ°üÀ¨”Failed password”Òªº¦×ÖµÄÐÐ £¬²¢½«Ð§¹ûÊä³öµ½¿ØÖÆ̨¡£

sed

sedÊÇÒ»ÖÖÁ÷±à¼­Æ÷ £¬¿ÉÒÔÓÃÀ´±à¼­ºÍת»»Îı¾¡£ÏÂÃæÊÇÒ»¸öʾÀý´úÂë £¬ÓÃÀ´Ìæ»»ÈÕÖ¾ÎļþÖеÄÃô¸ÐÐÅÏ¢£º

sed -i 's/123456789/XXX/g' /var/log/access.log

µÇ¼ºó¸´ÖÆ

Õâ¶Î´úÂë»á½«/access.logÎļþÖеÄËùÓД123456789″Ì滻Ϊ”XXX”¡£

Logwatch

LogwatchÊÇÒ»¸ö¹¦Ð§Ç¿Ê¢µÄÈÕÖ¾ÆÊÎö¹¤¾ß £¬¿ÉÒÔ×ÊÖúÎÒÃÇ×Ô¶¯ÌìÉúÏêϸµÄÈÕÖ¾±¨¸æ¡£ÏÂÃæÊÇÒ»¸öʾÀý´úÂë £¬ÓÃÀ´ÌìÉú²¢·¢ËÍÈÕÖ¾±¨¸æµ½Ö¸¶¨ÓÊÏ䣺

logwatch --detail High --mailto admin@example.com --output mail

µÇ¼ºó¸´ÖÆ

Õâ¶Î´úÂë»áÌìÉúÒ»¸ö°üÀ¨¸ß¼¶ÏêϸÐÅÏ¢µÄÈÕÖ¾±¨¸æ £¬²¢Í¨¹ýÓʼþ·¢Ë͵½admin@example.com¡£

AIDE

AIDE£¨Advanced Intrusion Detection Environment£©ÊÇÒ»¸ö¿ªÔ´µÄÇå¾²¹¤¾ß £¬¿ÉÒÔÓÃÀ´¼ì²âϵͳÎļþµÄת±ä¡£ÏÂÃæÊÇÒ»¸öʾÀý´úÂë £¬ÓÃÀ´ÌìÉúϵͳÎļþµÄÍêÕûÐÔ±¨¸æ£º

aide --init
mv /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz

µÇ¼ºó¸´ÖÆ

Õâ¶Î´úÂë»áÌìÉúÒ»¸ö³õʼµÄϵͳÎļþÍêÕûÐÔÊý¾Ý¿â £¬²¢½«ÆäÃüÃûΪaide.db.gz¡£

×ܽ᣺

ÔÚLinuxϵͳÖÐ £¬Í¨¹ýʹÓÃÇ¿Ê¢µÄÇå¾²ÈÕÖ¾ÆÊÎö¹¤¾ß £¬ÎÒÃÇ¿ÉÒÔ¸üºÃµØ±£»¤×Ô¼ºµÄϵͳÃâÊÜÇå¾²Íþв¡£±¾ÎÄÏÈÈÝÁ˼¸¸ö³£ÓõÄLinux¹¤¾ß £¬²¢¸ø³öÁËÏìÓ¦µÄ´úÂëʾÀý £¬¶ÁÕß¿ÉÒÔƾ֤×Ô¼ºµÄÐèÇóÎÞаÔËÓá£Ï£Íû±¾ÎÄÄܹ»×ÊÖú¶ÁÕ߸üºÃµØÃ÷È·ÔõÑùͨ¹ýLinux¹¤¾ß¾ÙÐÐÇå¾²ÈÕÖ¾ÆÊÎö¡£

ÒÔÉϾÍÊÇÔõÑùͨ¹ýLinux¹¤¾ß¾ÙÐÐÇå¾²ÈÕÖ¾ÆÊÎö£¿µÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±¹ÙÍøµÇ¼ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
ÍøÕ¾µØͼ