25
UCRL-TR-213599 Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005

Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

UCRL-TR-213599

Design and Implementation of anAnomaly Detector

A. Bagherjeiran, E. Cantu-Paz, C. Kamath

July 14, 2005

Page 2: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

Disclaimer

This document was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise, does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes.

This work was performed under the auspices of the U.S. Department of Energy by University of California, Lawrence Livermore National Laboratory under Contract W-7405-Eng-48.

Page 3: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

��������� ��� ��� ������� ������������� ������ � !��� ���#" �$�%�&��'(�&��)

*,+&-/.10&.12 34.657098:-<;�8:=>-?.1@A7B#C�D<EGFIHJEKAMLONPEGDRQTS/D<EKU(BWVRLXS/F:BWY7A1BWZ�S/D[BWV<S/DR\

Z:BW]?^IEGD`_REGLOD[BWF:acbdYOYOFeY>f ]cS�N

g -/=ihkjml�.6@oncprqWs�.Mtu EGFkV<EGD�vwS/DyxdzezeYOLXEJ{|}HGLXEGFkVRL�~:H u S/Q�ze�eVRLOFe]A7B#C�D<EGFIHJEKAMLONPEGDRQTS/D<EKU(BWVRLXS/F:BWY7A1BWZ�S/D[BWV<S/DR\

H#BWF}VR�ez:BW��bdYOYOFeY�f ]cS�N

l�0&.1@9�&-/=>j�.��!.62�.Mnc0u EGFkV<EGD�vwS/DyxdzezeYOLXEJ{|}HGLXEGFkVRL�~:H u S/Q�ze�eVRLOFe]A7B#C�D<EGFIHJEKAMLONPEGDRQTS/D<EKU(BWVRLXS/F:BWY7A1BWZ�S/D[BWV<S/DR\

� BWQ�BWVR^:acbdYOYOFeY�f ]cS�N

� l���yqJ���4q����:�o�6�1�

����nc0��7�9�����M�1���

Page 4: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

����������� �

��������������������������� ��!����#"����$����� ��%'&(��&��)��*+��,-��*+��&."/��"/�10'&20 34�5%'��&����/��,167��8�����0'� �9� &�0'*2��,-:+����"����;"/0'�<3=0'��>"/����� *+��&�%$���?"@��ACB<� � ���D0 &D�$��8�� E'�;:F0 3G� ��*+��,-� ��HI0 ��JK3=��0 *L"/���#,-�-"����/�?"/8�� � MN�$!�� ���-�O��&�0'*D� ,-:P���;"/����"/0 �!�8���,-���<�5*+0Q����,G0 &R&�0'� *2� ,�����"/��M���0'*+��� � ���I"/�����I*D0Q����,�"/05��&���0'*D�-&�%P����"/��M�� &��R8������O�K"�����������0 ,���"/0����"/����*+��&���H#����&2"����S�-&���0 *D�-&�%9���?"@�T��������������&."�� &2� &�0'*D� ,1:'ACUV0Q����,��W��0'*+��� �;"/,1:X��������������&N"I"/���O����"@�!�8�"9� "/�-,�,4��,�,-0HY3=0'�Z�;[G����"��-E'�F��0'*+��� ���-��0'&GA5\I0 *D��������� 0'&]*D�;"/��0Q���$����"/����*+��&��5"����X�����>"@� &����X!���"7HI����&"7HI0$*+0Q����,-�40 3^����"/�Z0'��"/��������� "/� &�����!��;"_H`����&D�Z*+0Q����,�� &��F�a��0'��&N"bA���������� ��0',-�F����,�����"/�-0'&5���C�Z,�� ��% ��,-:&���%',-����"����c����0'!�,���*d�-&e"/���+,��1"/���/��"�8�����Mf!�8�"T"����+��8�� ����&N"K�-*D��,-��*+��&N"@��"��-0'&g��&���,�8������9"7HI0V*+��"���0Q���9"/0��� "���*D��"/�`"�����������0',-���43=��0'*h&�0'� *2��,i����"/��Akjl�-"/�K"/����������0 *D��0'&���&N"/��M.�a8������m�b� &X��0'&�� "/� 8���"W�aE?� ���-��"7:K0 3��&�0'*D� ,-:D���;"/����"���0'&(� �n����*+����A`�����T��*+��,-��*+��&."/��"/�10'&���0 &."@����&������;E'����� ,f*+��"���0Q����3=� 0'*o"����9,-�-"/���/��"�8�����A���������P������� ����"/�T�;pi����� ��*+��&N"/�O"����>"/���V"/���P����� 3=0'� *2� &����T0�34"/���T��0'*D��0 &���&N"/�O0'&("_H`0+HI��,-,16qJQ&�0H#&r��&��0 &��K��0'*+��,-��"/��,-:(� �>"/�1s������ ,f����"@� � ��"�AZ�����5����� 8�,-"��a��&����-�b�?"/�T"�����"S"/���K��*+��,-��*+��&."/��"/�10'&)HI0'��J.�$� &��]�b� &� ����� 0Q��8����P� ��� 8�,-"���3=��0'*t��� ��EQ��0 8��#�;pi����� ��*+��&N"/��A

Page 5: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

� ��������� � ���������

�7&�*D� &.:F����� ��8�*+� "/� &�������M�����"@�K� ��� �-E'�a��"<�P�/��"��S"/����"<% ������"/,1:+�np����������O�bE�� �-, � !�,1�O��� 0Q����� ���-&�%X��� ��� ���-"7:'A��0 �`�;p�� *+��,���Mi�/�bHl����"@�T3=��0'* � ��&�� 0'���<0'�`����*58�,���"��-0 &��W*2�b:+�-&���������"/�#"/���a��8���� ��&."<� "@�?"/8��I0 3k�P� :Q� "���*(M!�8�"T"/�/��&�� 3=0'� *2�?"/�-0'&g3=� 0'* "/�������D�/�bH ���?"@�)"�0V8�� ��3=8�,W�-&�3=0'� *2�?"/�10'&e�-�T�����+��8�,1"T!������ 8����D0 3<!�0 "��c"����� 8���&."/�1"_:]��&��e,���&�% "��e0�3W"����X����"/��A��7&g"/���X� "/� �b� *+��&�%R����"@��*D0Q����,������ � MG"/���X����"/����0'&�� ���>"90 3W��0'��&N"/�"�����"W� � ���1E'����&X��� � 8���&."�� � ,�0 �������W� &��+��������� ��!���"/���#��&��>"@� &N"@� &���0'8��m� "/��"/��0 3�"/���#�>:Q� "/��*VA"!a,1"/��0 8�%'�X"����0 �������Z���a��� � 8���&N"/� ��, M "/���5�>"/����� * *D��:V!��5��&is�&��-"���,1:(,-0'&�%�A#�7&]"/�������X��� ������M �-"a���a��*+����� ��"������ , "/02H<� �1"3=0 �m"����#��&��D0 3�"/���#� "����b��* "�0T!���% ��&+����0Q������� ��&�%%$."/�.8���M.����� �b� � �n�D,�0Q0 JQ�C"/090'&�,��-&���M.� &N:."/��*+�#��,�%'0'� �1"/��*F�"�0+��0'���$H#�-"/�R"/��������&�3=0 ��*D��"��-0'&2"/��8�&�� *+� A

�W:Q������� , ��&�0'*D� ,-:F���;"/���;"/0'� �����;"/���;"O� &�0 *2� ,-�-���I� �<���?"@�K��0'��&N"/�`"/����"<����% &��-s���� &N"/,-:F���;Ei����"/�S3=��0'*o�*+0Q����,C0�3`&�0 ��*D� ,4����"@���/�?"/�����Z"/����&g"@� �@J.,��K"/���X, ����%'���Z���?"@��*D�-&��-&�%2����0'!�,���*(AT�������Z��&.E'0 ,-E'���Z"/������������ "���&��;"T"@� ��J.� &F*D0Q����, "����2&�0 ��*D� ,W� &�� ��&���0'*+�-&�%(����"/��M4��0 *D�������+"����2*+0Q����,-��M4� &�� � �������>"@� �-& "����*+�b��&���&�%(0 3<����% &��-s���� &���� A !o*+0Q����,W0�3<"/���D���?"@�V� ��0'8�,-� ��0 &���8�*+�D,���� �P*D��*D0'�>:]"/��� &c"����D0'���-%'�-&�� ,!�8�"`����������� E'�a�-*D��0 � "@��&."m�n��� �/����"/�����-� "/�-��� 0 3 "/���O���?"@�$3=0'� � 8�!���� � 8���&N"<��0 *D��������� 0'&���A4�����S��0'*+��� ���-��0'&"����@��&�� � 8��<*58��>"C� ����� ������"/���`�����-,�0'� 0'�����-�b� , � 8���� "���0'&50�3�"/���I!��;"_H`����&X"7HI0a���-[ ��� ��&."4�-&."�����������"/��"/�-0'&��k0 3����"@��A"����0'* !�0 "/�F"/���O&�0 ��*D� ,�����"@�T� &��D8������`��&N"/8��1"/�-0 & M "/���O8�� ���W*58�� " "/����&2���;"/����*+��&���"����O�����>"@� &����!��;:'0'&��(H#���-�n�)"7HI0+*+0Q����,-�#� � �9���-%'&��1s��b��&."/,1:2���1[G������&."bA

�������(����� ���V�����������-!����r�-&��-"���� ,SHI0'� J "�0 � ��������� �V"������ �c"/�������c����0'!�,-��*+�)��& � %'��&������ ,T��8�����0'� ���&�0'*D� ,-:]����"/����"�0'��AR�����2� &�0'*D� ,1:]���;"/���;"/0'�P�����P&�0V��� �>"/����8�, ���Z"@� � %'��"K������,��-�b��"��-0'&GMf!�8�"P�-"T���9��8'�X6������&."/,1:K%'��&����/��,�"/09!��#8�� ��3=8�,�3=0'�C���;E'���/��,�� ����,�������"/�-0 &X� ����� ��A4�����S������,��-�b��"��-0'&X� � �b� �m����0 8�,�� MN��0�HI��E ����M� ��� � �P�X����"O0 3���0'*+*+0'&)� ��� 8�*D�i"/��0 &��#0 &)"/���T����"@��A(�������>"bMi"/���9���?"@�F� ��� �-E'�9� �O�X� "������ * 0 3�"�8���,-���#0 3"����a��� *+�S���*)���Mi!�8�"I�b� �@�2"/8���,��O���W��0'*+��,-��"/��,-:F��E?� ��,�� !�,-��H#����&R�1"I� � ���1E'���,+N"/8���,-���I�����a��"�0'*D�-� A"-i����0'&�� M"�8���,-���W�������1E'����&X��� � 8���&."�� � ,�0'� ������AC�����-��� M'"/8���,���� 0'�m����"/�ZH#��&���0H#� ���bE'�O,�� !���,-�C��09"/����"m"/���O��&�0'*D� ,-:����"/����"�0'�O�b��&V���;"/����*+��&��ZH#���;"/�����S0'��&�0 "#����"@�X����&�0'� *2��, ��8�����&�%F"��/� �-&���&�%�AC�����-�#, � �>"O� ��� 8�*+��"/�-0'&)���� �b� ,-,-:)0 &��K0 3 ��0'&.E'��&�����&����5!����b��8����X&�0'&��K0 3m"����K��0'*+��0'&���&."��Z�����Z�npi��,��-���-"SJ.&�0�H#,�����%'�50�3m"/���5,�� !���, M!�8�"S, � !���,��#� ���98����;3=8�,k�-&)"/���T��E?� ,�8���"/�-0'&)0 3C����"/����"�0'�S����� 3=0'� *2� &�����A.!a,-, "��������P0 3�"/�������K� � ��8�*+��"/�-0'&�������9��0'*+*D0'&R�-&R"/���T� &�0'*2��,-:D����"����;"/��0 &(,��-"�������"/8�� ���0/21�M3�54QM6/7/2� A

�����F� &�0 *2� ,1:(���;"/����"/0 �$��0'&�� ���>"/�$0 3 ��0'*+��0'&���&."/�a"/���?"$!�8��-,��r*D0Q����,���MG��0'*+��� � �5*+0Q����,-��M � &��g� �;6,-���;"K"/��� ��� ��0',�����A]������*D0Q����,��K� � �DHI��,-,16qJ.&�0H#& ����*+��&�� ��0'&Q67������8��;"/��0 & � &�� � "@�?"/���>"/�-�b� , *D0Q����,��T3=� 0'*"����(,-�-"����/�?"/8�� � A UV0Q����,#��0'*+��� � ��� �+����"/����*+��&���"/���)���-[ ��� ��&����(!���"7HI����& "7HI0 *+0i����,-�F0 �F!���"7HI����& �*+0Q����, � &��R�P��0'�-&."`�-&+"/���S����"@�P� %N� �-&+H#�1"/�DH`��,�, 67J.&�0�H#&2��0 *D��� ���-��0'&D*+��"���0Q����Am����� ������0',���� ��,-����"�0'����?"�"/��*D�i"I"/05,-�b� � &R�P"/������� ��0',-��3=��0 * "/��� �-&���&�%P����"@�5� &���"/���Z&�0'� *2� ,^*D0Q����, A4�����a3=0Q��8��<0 &R� ����� ��� !�,-���0'*+��0'&���&N"/�9� &��e0'!98 ���;" 6q0'���-��&N"/���g����� ��%'&g3 � ����,-�1"/��"/���Z��0Q���F� ��8�� � A:-i��*+�-,�����, :'M "/���X3=0Q��8��90 &e,��b����&��-&�%"�����������0 ,���� ����0�EQ�������W� �b� � 0'&�� !�,-�#����� 3=0'� *2� &�����H#�1"/��0 8�"W� &+�;pi���������-E �Z��*D0 8�&." 0�3G��[ 0'�>" "/0T�98������ H#��0�-�X8�&i3 � *+��,-�-� �PH#�1"/� "����)*+0Q����,��50'�5��0'*+��� � ����0 & *+��"/��0i����A;! *+0'����������������"/��� 0'�X!�0 ����� 8������F�b� &��8�� "�0'*+�<)��$0'�����n67�-*D��,1��*+��&N"#� ,-, � ��������"/�O0 3k"/���T� &�0 *2��,-:D����"�����"�0'��A

�������2��� ���������-����8���� ���R"/���g�������-%'&l� &��l�-*+��,-��*+��&N"@��"��-0 & 0 3T� &l� &�0'*2��,-: ����"����;"/0'��A=-i����"���0'&?>�����������-!����9"/���F�������-%'& 0�3`"����F��0'*+��0'&���&."��90 3W"/���F���;"/���;"/0 ��A�-i����"/�-0'&@1)������������!����T�-"/�$� ����,-���b�?"/�-0 &]"/0��&��2��E?� ,�8���"/�-0'&+0'&2���?"@� � ��"/�`��&F"/���S*D� �@����&��O,���� � &���&�%�M.&��;"_H`0'��JF��&N"/� 8����-0'&+����"�����"���0 & M���&��2� "�0Q�n����� "/�-�����0Q�������O��0'*D� ��&���A

Page 6: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

� ������� ��� � ��

!S&�0'*D� ,-: ���;"/���;"/0'� ��� � �V&�0�"�� &��;H ��&NE'��&N"/��0 & M`"/����: ���bE'�r�npQ"/��&����-E �]8�� �r�-& ��� 0Q����� �2��0'&N"/��0 ,S��&����� � "�����8�, � � ,1:D�-&R��&."���8�� ��0'&����;"/���;"/�-0'&)� :Q� "/��*+��AW�����-�������;"/�-0'&)�b��"���%'0 ���<)�������� ��EQ�-0'8��#� &�0'*D� ,1:D���;"/����"/0 �H`0'��JP!.:P"/���<*D0Q����,���&��F� ����,-���b�?"/�-0 & A��a��"����;"/0'� �m"/���?"m8�����*D��"/� �1p.67!�� �����5*D0Q����,��4�����>3=0'��*L0 �����/�?"/��0 &��� 8��@�D���� m���-&����-��� ,�\I0'*+��0'&���&." !S&�� ,1:i� ���40'� -i�-&�%'8�,�� ���W� ,�8����a����0'*+��0'���1"/��0 &50 &5"/���<����"@�Z� &��58����<"����� ��� 8�,-"S"/02����"�����"9��&�0'*D� ,��1����A��Z"������S����"�����"�0'���Z��,�8��>"/���S"����K����"/����&��]����"����;"$0'8�"�,��������S� �a��0'�-&."��S"�����"�����$��8'�+���-��&N"/,-:23 � �I3=��0'* "/���9��,�8��>"/������A �����-�#� ��EQ���;H �-��&�0 "#��0'*D����������&�� �-E'� M�!�8�"#�-"�,-��&�������8�����0 � "#"/0"����9��0'&�����&N"/����"/�-0'&(0�3�"/���9��8�� ����&N"S��� 0 8 ����"O0 &(*D0Q����,���M���0'*+��� ��������M^� &��)"�����������0 ,�����A

Ur��"����1p.6q!�� �����e� &�0'*2��,-:)���;"/����"/0 ���Z3=0Q��8��Z0'&g��0H "/0���0 *D�������K��0'�-&."/�O"/0�*D0Q����,��a� &��]*D0Q����,��O"/00�"/�����P*+0Q����,���A -Q��E'���/� ,W0 3I"/�������D���;"/���;"/0'� �K8�� �� m� ��&���������,W\I0'*+��0'&���&."�!a&���,-:Q���-���� W\.!��T�����������-!�����-& >iA*�'A0/iM ��&��]�1"/�#"_:Q���-�b� ,f8����K�-&r*+0Q����,-��&�%+���#"/02� ����� ��� ��&."Z"����K� 0'8�� �����a0 3m%'� �b��"���� "SE�� � � ��"���0 &V�-&V"��������"@��A -i�;E'����� ,`� 8�"/��0'������� 1�M/ 1 �`� ��% 8��+"�����"T"������T� ��,-� � &����F0'&c"����D� 0'8������20�3�*+0'�>"P0 3I"/���+E�� � � ��"���0 &*D� J ���9"/���+*+0Q����,C��&�� ��&�� �-"/�1E'�X"/0V��&�0'*D� ,-�-����AF���������9��0',-8�"/�-0'&��$8i"/��,-�*)��K"/���F,���� � "T� ��%'&��-s���� &."9� 0'8��������0�3mE�� � � ��"���0 &(H#�����@�g� ���K*+0'� �P����&����-"��-E'�P"/0�� &�0'*D� ,-�-����M � &��r"/�������S�np��������-*D��&."@��,�������8�,1"/�S:Q����,-�r!���" "/�������� 3=0'� *2��&�����A��a"������`8�� ���#��� >�M'/7/iM /�45� 0 3� `\.! ��&2� &�0'*D� ,1:X���;"/����"/�-0'&D3=0Q��8��I0'&2�1"/�`� !��-,�� "_:K"/0P������8����"����e���-*D��&����-0'&�� ,-� "7: 0�3P"����e��&���0'*+��&�% ����"@��A �7& 0'&��e��� ������Ma"����e��� ��8��e0�3K�>"/����� *+��&�% ���?"@� � ���-�������&��g"����X� 0',�8i"/��0 &]0 3m"/���X� 8�"/��0'���Z���S"/0R� ����0'���e��� � "$������8������i67����*+��&�� ��0'&g����"@�R��&��e����� 3=0'� * � 8���� �����H#�1"/� �(��0'*+��� � ����0 & *D�;"/��0Q�e"/����"T����� ����"�,-:g��0'*+��� ������ `\.!o� ����8���"/�-0'&��T0 3<����"/� � /�42� A������D��8���� ��&N"�-*D��,���*+��&N"@��"��-0 &)�-&���,-8�������"/���-�O� ����� 0N� �@�r��&��(3=8�� "/�����O�����������-!����S�1"#��& -i���;"/�-0'& >�A /QA*�'A(�7&r� �����-"���0'&�"/0 W\.!PM "���� -i��&�% 8�, � ��� � ,�8����a����0'*+��0'���1"/�-0'&�� -������S��,���0D�����a8�� �5�-&]��&�0'*D� ,-:�����"�����"���0'&r��8��n�g� �S"����EQ�-��8�� , ����"����;"/��0 &(0 34��� &��(%'��� "/8�� ���O8�&������#HI��"/����� /7>2� A

�a"/�����#*D0Q����,��<��8��@�r� �#��,�8��>"/��� ��&�%F����E'�$3=0'8�&��(� 0'*+�98�� �T�-&(� &�0'*D� ,1:2����"/����"���0'& A -i��� �(����� 3=0'� *D�3=8') )�:(��,�8�� "/������&�%D0 &r�-&."���8�� ��0'&)����"�����"���0'&V���?"@�D� &��r8������� `\.!h"�0D������8����P"����P���-*+��&�� ��0'&���,-�1"7:�0 34"��������"@�V��� ��0'�9"�0r��,�8�� "/�����-&�%;� /�/2� A �7& "�����"5� ����,��-�b��"��-0'& M��V��0'��&N"K�-�K� & � &�0'*D� ,1:g�-3<�-"P���93=8�� "������K��H<�b:3=� 0'* "/���$��,�8��>"/��� ��"/��� &)��0'*+�$����������s�&����("/��� ������0',�� A �7&(�X���-*D�-,����I� ����� 0N� �@�@�0/ �2� M��X��,-8�� "����#� &�� ,-:Q���-�0 &!� !�"# 6! �%$&$ $D����"/�2����0H#�a"/����"a*D� &.:V��" "@� �@J.�Z��0'&�&�����"���0'&��$� ���P��&��������r3 � �a�bH<��:(3=� 0'* ��,-8�� "������0�3<J.&�0�H#& &�0'��*D� ,C����"/��AD�������T��0'&���,�8�� ��0'& ,���&����T����������&����2"�0("����+8����+0 3<��,�8��>"/��� ��&�%V���P�(*+0Q����,m0 3&�0'��*D� ,G����"/�X3=0'�#��&�0'*D� ,-:D���;"/���;"/�-0'&(��&R"�����������"/� ���;"bA

�����$*D� �-&2��0'&���,-8����-0'&23=��0 * "/���-�I���;EQ����H 0 3f����, ��"����2HI0'� JD�-�`"/����"�� &�0'*D� ,-:F���;"/����"/�-0'&R*+��"���0Q���<�-&��E?� ���-��"7:]0 3I������,��-�b�?"/�-0'&g�����b���$3=0',-,-0Hh�R!�� ���-�X����" "/����& A��4�-���>"bM ����"/�)� ��� �-E'�X��"$"����F����"/����"�0'��A !S3 "/���"�������M "����5����"/����"�0'�Z���1"/�����a�����b� ,-,��S0'�S��������"����9�D*D0Q����,�0 3C"/���K&�0'��*D� ,f����"@�iM � &��e�2��0'*+��� ���-��0'&("/����&0Q����8�� �P!���"7HI����& "/���+&�0 ��*D� ,C*D0Q����, � &�� �(*+0Q����, 0�3I"����+��&���0'*D�-&�%R����"/�(0'�T�(� ��&�% ,��X��0'��&N"9H#�-"�����&"����K����"@�iAa�����5� ��� 8�,-"a0 3m"/�����S��0'*+��� � ��� 0'& M�%'�1E'��&]� 0'*D�T"/��� ��� ��0',��GMG���;"/����*+��&����SH#����"������Z0'�S&�0 "a"�����-&���0 *D�-&�%D����"/�R� � �X� &�0'*2��,�0 8���AZ����� � 8����>"/�-0'&e0�3 "/���5!���� "Z"/��� ������0',��g�-�a0'&��50 3 ����8����-� "/�-���a0'�a��� &��"�8�&��-&�%�Mf��&�� �1"$���Z0'&�,-:r,-��%'�N"/, :V����%'� ������� ��&]"/���F,��1"/���/��"�8�����A��7& 0 &�,-:]��3=�;H �����������9�����g"����+� 8i"/��0'� ��?"�"/��*D�i"4"�0Z� :Q� "���*D��"/�-�b��,�,-:9����"/����*+��&��`"/���`"/������� ��0',-� AmUV0'�>"m0 3�"������ �<"����@��&�� � 8����m��0'&."���0',Q"�����'�(*),+.-/)0+3 ��,����9��, � � *o�/��"�� ���54QM��%1iM / 1 � A

2 34�65��87��

�������D������"���0'& ����������&."/�R��& 0E'��� EQ���;H 0 3a"/���(3=8�&��;"/�-0'&�� ,-�1"_: 0 3Z"����r��0'&��>"/�-"�8���&N"2��0'*+��0'&���&."��20 3Z"������&�0'*D� ,-:2����"����;"/0'�O"�����"O!�8���,-�(*+0Q����,���M���0'*+��� ���9*+0Q����,-��M^� &��r� ��,-����"O"/��� ��� ��0',-����A�9 � �@�r0 3�"/���T��0 *F6��0 &���&N"/�W���C3=� 0'*L"/���#,��-"�������"/8�� ��� &��+*D� J ��� ��,��-%'�."�,1:K���1[ ������&."W� ��� 8�*+��"/�-0'&��m0'&F"/���O����"@�iAC�����O����� ��8��_6

/

Page 7: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

Train Test

Time

�4��%'8���� ��& �Z��"@� � 0H ��&R"����T� &�0'*D� ,1:2����"/����"�0'��A

� ��0'&D8�� ���<�P��0 &����-� "/��&."I&�0 "/��"/�-0'&F3=0'�`� ,�,��������������i"/��0 &��I� &��2��&����-�b�?"/��� "����a� ��� 8�*D�i"/��0 &�� "/����"`�����;E�� �-,��-&"����T� &�0'*D� ,1:2����"/����"�0'��A

UV0'�>"�0�3 "/���Z*+0Q����,�!�8��-,����-&�%T��0'*+��0'&���&."���������8�*+�S"/���?"��P*2�?"/��� pF0 3 "����a����"/�K�-�I��E�����, ��!�,-� A �Z��"/������$��&)�X*2�?"/��� pDH#��0'� �T� 0H#�#��0'��� ������0 &��("�0X"/���$��&����1EQ����8�� , ��0'��&N"/��� &��)H���0'���9��0',-8�*+&�����0'� ����� ��0'&��"�0e"����R3=�b��"�8������+0'�F��"�"����-!�8�"/����A ��0'�F�e*D��"����1p

X0 3S���-*D��&����-0'&

n × mMX

��� �n

��0'��&N"/�X�b���n� 0 3H#�����@�g��� �

m3=�b�?"/8�� ���$� &��g�-�a�b� ,-,����

xA �q3`�D"/�/��&�� 3=0'� *2�?"/�-0'&V0 3 "����50'� ��%'�-&���,f����"@�20'&N"/0R�2���-[ ��� ��&N"

!�� ���-�90Q����8�����Mk"����F����� 8�,-"/� &."9*D��"/� �1p]�-�X ′ 0 3WH#�����@�c�)��0'�-&."9�-�

x′ AXjl����& "/���F�������������i"/��0 & �-�$*D0'� �8�&������ � "@��&���� !�,��P3=0'�O��0',-8�*+&(E'���;"/0'� �Z�/��"������O"���� &r��0�HYE'���;"/0'� ��M "/���K*D��"/� �1p

X�-�S��& ��������q��� "7:Q���

��&��(��� �#��0'�-&."��xA �7&)"/�������T���1"/8��?"/��0 &���Mi"/���93=0 ,�,-0�H#�-&�%X�-����&N"/�1"/�-���<��0',-�3&

X = XT��&��

X = XTA

�����K� &�0'*D� ,1:�����"����;"/0'�S!�8��-,����S� &��r��0'*D��� �����S*+0Q����,��#0'&V� "/� �b� *+��&�%+����"/��A��7&V"������O����"@�+*+0Q����, M����"@�9� ��� �-E'���-&X"/��*+��0'��� ,�0 �������W� � �4�-%'8����#�O� ��0�H#��Am�����O���;"/����"/0 �W���1EQ�������W�$, � � %'���@�.8�&�JX0 3 ����"/�9�-&."�0"7HI0F&�0 &i670�E'����,�� ������&�%5��,-�����-&�%50 �<s�pi���i67,-��&�%�"/�R"/�-*D�SH#��&���0H#��A`\I0'*+��0'&���&N"/�<"/����"�!�8��-,���*D0Q����,��<*D�b:0 �<*D��:D&�0 "���8�����0'� "���,-�����-&�%PH#�-&���0�H#��A(�7&�������*D��&."/� , *+0Q����,G!�8���,-����� �<� 8�����0'�>"#� ,�������&�%TH#��&���0H#�IH#�-"/��9����� ��8�,�� � � 8���8��S0 3G��0'�-&."/�m��&XH#�����@�D&��;HI���W��0'��&N"/�m0E'���>H#���1"/�#0',������ 0 &�����A �O0'&i67�-&���� ��*+��&N"@� ,�0 � !���"��n�*+0Q����,C!�8��-,��������Z0'&�,1:r��8�����0 � "T!�8���,-����&�%�*D0Q����,��Z0 &es�pi���i67,-��&�%�"/�eH#�-&���0�H#�90'�Z�n�.8�&�J.��A:! 8�� ���9�b��& M0�3m��0'8������5��,-H<�b:Q�S8����5� &r�-&���� ��*+��&N"@� ,f*+0Q����,f!�8���,������S���Z�+!���"/�@�r*D0Q����,k!�8���,-������A���02��0'*D��� ���9"/�r�*+0Q����,���M."����a����"����;"/0'�<� ��� 8�*D���I"/����"`"/���Ss�� � "I"/�-*D�#H#�-&���0�H � &��-"��`*D0Q����,���������������&."�&�0'��*D� ,^����"/��A"�q3"����K� ����0 &��]H#��&���0H �-�S0 3m,���&�% "��r0'&�� M�"����K*+0Q����,k�-�O"����K��0'�-&."S�-"/� ��,13_A �a"/����� H#��� � M�"/���K*+0Q����,k���O0'&��0�3I"����+*+0Q����,-�Z3=��0'* -i���;"/�-0'& >iA*�D��&��c�-�98���8�� ,�,1:]0 3`"/���F�/� *+�XE�� � ���;"_:e���9"/���Xs����>"P0'&���A��$�-E'��&e"����*+0Q����,���MQ"/���Z����"����;"/0'��8������#0'&��Z0 3f"/���Z��0'*+��� � ����0 &R*+�;"/��0Q���<��& -i���;"/��0 & >iA /P"�0F��0'*+��� � �a"/����*VAC������������-%'&F0 3^"/����*D0Q����,���0 *D��������� �m���C��8 �D������&."�,-:5%'��&������ ,�"/0$��0'*+��� � ��������� ��*+�-,����4*+0Q����,��4"�����" � ��*+��,-� � ,1:� ����� ��� ��&."O"/���9���?"@�F� ����0'������&�%X"/0+�F� ��"O0 34��0'*+*D0 &(������8�*D��"���0'&���A

�4��% 8������ /c� &�� >c� ��0H "/���V�������/� � �n�����b��,#� ��, �?"/��0 &����������+��*D0'&�% "����V��0'*+��0'&���&."���A?! 8�� ���D�b� &��0'*5!��-&��("����r��0'*+� 0 &���&N"/�D"�0 ��� �b��"��]�cE?� ���-��"7: 0 39� &�0'*2��,-: ���;"/����"/0 ����A �����r��*+��,-��*+��&N"@�?"/�-0 & �-&i6��,�8������5� ��E'���/� ,I�;p���*D��,-�D%'��&����/� , 67��8�����0'� �2����"����;"/0'� ��Ag�������;pi����� ��*+��&N"/�58i"/�-,��*)��+"������ �R����"/����"�0'���K"/0����*+0'&�� "��/��"��$"/���9E?� ���-��"7:�0 34��0'*5!���&���"/�-0 &���A

>

Page 8: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

�4��% 8���� / &m�����T*+0Q����, !�8���,-�����<�������/� � �n�N:'A

����%'8�� ��>'&5������*+0Q����,W��0'*D��� �����P�������/� � �@�.:'ArUr��"���� pQ6q!�� � ��� *D0Q����,16 "/0�6q*F0Q����, ��0'*+��� �������P�;pQ"��/� �;"F�*D��"����1pZ� ����� ������&."/��"/�-0'&P0 3i"/���W*D0Q����,�� ��� ��0'� "�0S��0'*+��� � ����0 &�8 8�� "4� �f���-� "/0'% �/� *X6q!�� � ���9*D0Q����,16 "/0�6q*F0Q����,��0'*+��� ���������;pQ"/��� ��"S�F���-� "/0 %'�/��*t� ����� ��� ��&."/��"/�-0'&(0 3�"����9*+0Q����,-��A

1

Page 9: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

����� ��������� �����������

��������� �����! #" � ��%$9 � " '& Q���#(*)���� � � � � �! -i��&�%'8�, ��� �W� ,-8�� �a����0'*+��0'� �-"/�-0'& � - �����<0 34�F*D��"/� �1p

X:Q�-��,�����"��������T*D��"����-�����

UMSM�� &��

V��8��n�

"�����"X = USV

T Al�����r��������������&�% � � 8��?"/��0 & ���F"/���("/��� ���-"���0 &�� ,<��������������&."@�?"/��0 & 0 3Z"����V����,���"/�-0'&3$� � 8��-E���,���&."/,1:'MN0'&��#�b��&2� ,�� 09�;pi���������`"����O� ��,���"/�-0'&F� �

X = XT = VSU

T AC�����O*D��"/� �1pS

�-�W�9����� %'0'&�� ,*D��"����1pVH#��0'���+��&."��������T� � �F�-&e������� �b� � ��&�%(0'� �����9� &�� � ���X�b��,�,����]"/���F� ��&�% 8�, ���aE�� ,-8�����AX�����F��0',-8�*+&��0�3#*2�?"/���-�����

U� &��

V� � �D"/���2,��;3 "X��&�� ����% �."K� ��&�% 8�, � �9E'����"/0 ���50 3

XAr��������0',-8�*+&��P0 3

U���;s�&��

��&(0'�>"/��0 &�0'��*D� , ��8�!������ ���P0 &."�0XH#�����@�(0'&��9�b��&)"/��� &�� 3=0 ��*t0 ����% ��&�� , ���?"@��Am�����$"/��� &��>3=0'��*D��"/�-0 &R0�3C���0 ��&."

x�-&."�0X"/���T� 8�!�� ��� ���P0�3�"����9����"@�X�-� &

x′ = xU

�Z&��9��� &(0'!�"/� ��&�"/���$"/��� &��>3=0'��*D��"/�-0 &R0 3k"/���90'� ��%'�-&���, *2��"���� pR� � &

X ′ = VS

-Q��&����(0'&��(�b��& ������0'&�� "/� 8���"D"����(0 ����% ��&�� ,I���?"@�g3=��0 * "/���(���-&�%'8�,�� �KE�� ,�8����D��&�� E'����"�0'����MI"/���R"/�/��&��>63=0 ��*D��"/�-0 &g0�3`"����F�-&���8�"9����"@�R��0Q���9&�0 "T� �;"/8�� ,-,-:V��� � 8������5"/���X����������&����D0�3`"����F0'� ��%'�-&���,�����"/�R��&g"����*58�,1"/�-��,1�-����"/�10'& A

�Z&��I�b� &58����I"���� - ��� 0 3��S*D��"/� �1p$"/0a��� �b��"����S������8������i6q����*+��&�� ��0'&K��������������&."@�?"/��0 &X0�3�"����I*2�?"/��� p A�q3 "����X� ��&�% 8�, ���OE�� ,-8����$� � �5��0'�>"/���e��&]������� �b� � ��&�%R0'�������Z0 3 "����5��� ��%'0'&���,k��&."����-����M 0 &��5�b� &g8����K"/���

k,�� ��% ��� "W� ��&�% 8�, � �CE?� ,�8����`� &��+"/���a������0 *D����&.:Q��&�%P� ��&�% 8�, ���mE ����"�0'���W"/0P� ����� 0�pi�-*2��"��<"/���O0'���-%'�-&�� ,�����"/��Ajl�1"/�)8�"���,���)b��"��-0 &R0 3k"/���-�#� *2��,�,-���I��� � % 0'&�� , *2��"���� pGMQ"/���$"/��� &��>3=0'��*D��"/�-0 &

X ′ = VSk

�-�$��� ����8������Q67���-*D��&����-0'&g*+0Q����,�0 3 "����X���?"@�2H#�������Sk

��0'&."/� �-&��a"/���k

, � � %'��� "Z����&�%'8�,�� �SE?� ,�8����$� &��

V��0'&N"@� �-&��2"/���]��0'� ��������0'&�����&�% ����&�%'8�,�� �DE'����"�0'����ALjl�-"�� ������������")"�0 "/���]*D��� &i67� � 8�� �����l��� ��0'��0 3

"����P� ����8������]� ����� ��� ��&."/��"/�-0'&r�-&V��0'*+��� ���-��0'&RH#�-"/�)"/���T0'���-%'�-&�� ,G����"@�iM�"/���T������8������]����������� ��&N"@��"���0'&V���0 ��"/�-*2� , � 42� A

�����O��8���� ��&N"`�-*D��,-��*+��&N"@��"��-0'&5��*+��,-0:Q� � &D��,�%'0 ���1"���* � 42��"�����" ��&�������*D��&."@��,�,1:P��0'&�� "/� 8���"��I��& - ����-&F&��b� �_67,��-&���� ��"/�-*D�`H#�-"��F�����������;"W"/0Z"/����&Q8�*5!���� 0�3 ��0'��&N"/��A������#��&�������*D��&."@��, -���� � ,-%'0'���1"���*h�>"@� �>"/�H#�1"/�)� & - ��� 0�34�5� *2��,�, � ��"#0 3k��0'�-&."���� &��)� 8�%'*+��&N"/�<�1"�� ��&��;H ��0'�-&."/�<� ��� �-E'��ACjl�1"/��"����$��0'&."���&Q8�� ,� ��*+0E?� ,'0 3Q"���� ��*D� ,-,���� " ����&�%'8�, ���GE���,�8�� � &��P� ����0'*+��� &N:Q��&�%����-&�%'8�,�� �GE'����"�0'���k��3 "/��� �b� �@�T�-"����/�?"/��0 & Mb"�����-&���� ��*+��&N"@� ,i� ,-%'0'� �1"/��* *2� �-&."/� �-&��4�a� ����8������Q67���-*D��&����-0'&5��������������&."@�?"/��0 &X0 3�"����I0'���-%'�-&�� ,N����"@�S� "/0 ���-&�%0 &�,-:2"/���T*D��"/� �������#0�34"/���T������0'*D��0 ���-"���0'&GAW�����-�O,���� ����"/0+����% &��-s���� &N"#"/�-*D�$� &��V*+��*+0'� :�����EQ��&�% �#3=0'��-&���� ��*+��&N"@� ,.����"/�S0'��������"/�-0'&��k��8��@�F� �k"/���`*2��&�����8�, �?"/�10'&T0 3^�S� ��&�%',-�W��0'�-&."���&T"/���`0'���-%'�-&�� ,N*D��"����1pT��&��"����X� �����-"/�-0'&V0 3W��&���HL��0'�-&."S"/02"/���K*2��"���� p AZ���������X��� 0'�����>"/�����Z*D� J �K�-"a�����b� ,f3=0'�S"����5��&�������*D��&."/� ,��0'&��>"/��8���"/�-0'&(0 3�*D0Q����,��I3=��0'*t����"@��A

�������,+ - � �.� � � )k ��/ �#(*)�� � � �D� � �10 � � � m� ��&�������� ,O\I0 *D��0'&���&."�!a&���,-:Q���-� �322�O�-�D� HI��,�, 67J.&�0�H#& ����*+��&�� ��0'& � ����8��;"/�-0'& "����@��&�� � 8��VH#�-"�� H`��,�, 68�&������ � "/0Q0Q� � "@�?"/���>"/����� ,W��� 0'�����>"/������Ag�����R*+0Q����,`�-�P"/������� 0 8 ����"���0'& 0 3�"/��������"@�r0'&N"/0g�r3=��H 0 3#"��������%'��&.E'����"�0'���P0 3I"/���D�/��*D��,��F��0�E�� � � � &����+*2�?"/��� pg0 3I"����D���?"@��A2�����D� "/� &���� � � � ,-%'0'��� "/��* � � � 8��-�����K�

4

Page 10: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

�@�Q8�&�Jc0 3�����"/�V��& *D��"/� �1pg3=0'��*X

M4��0'*+��8�"����P"/���2���b�?"�"/���5*D��"����1pS = (n − 1)Σ

H#�������Σ

���T"������� *+��,��P��0�E�� � � � &����K*D��"/��� pV� &��r"/���K���-%'��&NE'���;"/0'� �$0�3 "����5� �b��" "/���Z*2�?"/��� p

UAZ�����5����028 ����"/�-0'&]0�3m"/���

����"@�X��� &

X ′ = (X − X̄)T Uk

H#�������X̄

���P"/���R*+�b� & 0 3#"/���R0'���-%'�-&�� ,W���?"@��MUk

��0'&."/� ��&��K"����k

,�� ��%'��� "5����% ��&NE'����"�0'���X0 3SAc�����

�-&."�����������"/��"/�-0'&)0 3X ′ �-��"/���?"O"����T��0'�-&."��O� ����� ��� ��&."S"/���T0'���-%'�-&�� ,G���?"@�XH#�-"��V� ����������"S"/0F"/���T����� ����"���0'&

0�3T"����g*+0'� "2E�� � � ��"���0 & 0�3T"����g����"@��A=-Q��&����]"����g����%'��&.E'����"/0 ���)�����������-!��e��� 0'%'� ����� �-E'��,-: ,������R0�3T"����E?� ����� &����a0�3 "/���a����"@��M."/���a8����a0 3 3=�;HI���`"/��� &2"����a0'� ��% ��&�� ,�&.8�*5!����`0 3 ����*+��&�����0 &�� :Q����,-���I�P������8��;"/��0 &�-&T���������WH#�-"���0'8�"��O� ��*58�,1"@��&���0'8��f, ����%'�m����������� ���I�-&9"/���`� ����8���� ��:90 3�"����I��������0bpi��*D��"/�-0 &$H#�1"/�P� ��� ������""�0F"����90'���-%'�-&�� , ���?"@��A

�������,� ��� N����!S�R0'&��]*D�-%'�N"2��&�3=���23=� 0'* "����g&�� *D�r0 39"/���g*+0Q����, MO� ��J �;"/�@�=� $ �Z�-���-&."���&������ "/0 !��g� ������8������i6����*+��&�� ��0'& M`��� � : "/0c��0'*+��8�"�� M<!�8i"2&�0 "D�;pQ"/� ��*+��,1: � ����8�����"/�V� ����� ������&."/��"/�-0'& 0 3Z"����V����"/��A !<"2�1"/���0'����M �D� J ��"��n�g���O"����K� ����8�,-"a0 3 �D�/� &���0'* ��� 0 8 ����"���0'&r0�3C"/���K����"@�'$ �1"S���a�+"��/� &��>3=0'��*D��"���0 &(3=� 0'* "����0 ����% ��&�� ,G����"@�F� �O�F*2�?"/��� p�0'&N"/0+�F���;"S0 34��� &���0 *tE'���;"/0'� ��A`�����T��8�� ����&N"S��*+��,-��*F��&."/��"/�10'&R������H#�#"������,���*D��&."��`0 3G"����OE'����"�0'���`3=� 0'* �T�����>"/���-!�8�"/�-0'&X"�����"`���;"/8�� &�� 6 �S� &�� �SH��-"/�D� � 8�� ,�����0 !�� !��-,��1"7: MN!�8�"`"����8������ �b��&+��8�!�� "/�1"/8�"��O� &�0�"/����� ���-� "�����!�8�"/�-0'& Afjl�-"��+� ������0'����� �?"/�<����� ,��-&�%�M "�����"/��� &��>3=0'��*D��"/�-0 &53=� 0'*L"����&�0'��*D� ,G����"@�X0 &."/05"/���$�/� &���0'*oE'����"/0 ���O�-��� ��E'�������-!�,���M�� 0F"�����"#0 &��9��� &(0 !�"@� �-&)� &(� ����� 0�pi�-*2��"��-0'&�0 3"����P0'���-%'�-&�� , ����"/��A������K!���&���s�"��Z0 3C8����-&�%��+��J �;"/�@�e� ���9"/����"S���-� "@��&����P!��;"_H`����&g��0'�-&."��S�-�O�����������>E'����-&V"/���P"/��� &��>3=0'��*+���r��������� ���5/5�C� &��r"�����"a0'&�,1:V�D3=�;Hh�/� &���0'* E'����"�0'���$� � �K&����������/� �>:]��&r����� ��"������P"/0���n���-��E'�$"/����������������� E���"���0'&GA

�Z&��$��� &)!�8���,-�R�5��J �;"/�@�(0'&)�5�@�Q8�&�J20�3k����"@�K0'�<0 &)�-&����1EQ����8���,���0'��&N"/�I����&����a"/���Z�/� &���0'* E'����"/0 ��������T��0'*+��,��;"/��,1:�8�&�� ��,���"/���("/0F"/���P����"@�iA �9�1E'��&V�+*D��"����1p

XH#�-"/�(���-*D��&����-0'&

n × mM�"/���P��,�%'0'� �1"/��*

% ��&����/��"������ �/� &���0'* *D��"����1pR

H#�-"�� ����*+��&�� ��0'&m × k

H#�������k

���F"����V&Q8�*5!����D0 3Z������8������ ���16*+��&�����0 &��a��&r"����5������8�,1"bA$�����5��&N"/���-���Z0�3

R� � �K3=� 0'* "����5�����;EQ��0'8�� ,-:V*+��&N"/��0 &����]����� "����-!�8�"/�-0'& AS�����

"��/� &�� 3=0'��*D��"���0 &r���X ′ = 1√

kXR

� /2� M � &��]"/���X��0'&�� "/� &."$����� ,��-&�%23 ����"/0 �1√k

�-�Z&����������/��� :]"/0������������ E'�"����9�����>"@� &�������A �a"������#� �b� ,-��&�%53 � �;"/0'� �O� � � M���0HI�;E'����M�&�0 "/���V�-&R"/���9,-�-"/���/��"�8������ > � A

��������� � � �;� � ��(! ���-� "�0'%'�/��* � / 1 ���-�m��&+��������0bpi��*D��"/�-0 &K0 3^"/������� 0'!�� !��-,�� "_:T����� "����-!�8�"/�-0'&K0 3 �a���b��, � �4�/� &���0'*hE?� ����� !�,���A�����D���-� "/0 %'�/� * *+0Q����,m���9&�0 &i67�-&���� ��*+��&N"@� ,C��&e"�����"T0'&��F"_:Q���-�b� ,-,-:r!�8��-,����9�)�����>"/0'%'��� * 0'&c�(�@�Q8�&�J0�3#����"@�]��&�� "�����& � ��!�8��-,����P�-"K0'& �r���1[G������&."5�@�Q8�&�Jc0 3#���?"@��Ar�����R����� "�0'%'��� * ��&c"/������8�������&."X��*X6��,���*+��&N"@�?"/��0 &)���-EQ�-������"/���T�/��&�%'�T0�34E�� ,-8����O0�3m�+��� &���0'*tE������ ��!�,��$��&N"/0+�+��� �����;"/��� *D�-&����r&.8�*5!����O0 3� � 8�� ,16 H#����"��(����� "/�1"/�-0'&���A 9 � �@�V0 3�"/�������P��� �>"/�1"/�-0'&�����0'8�&N"/�#"/���T&.8�*5!����#0 340Q����8�������&������a0 3�"/���9E?� ,�8��0�3W"/���X�/��&���0'* E�� � � � !�,-�PH#�-"/����&]"����F��� � "��-"/�-0 & AT�����F8������9�b� &e��0 &�s�%'8����X"����F&.8�*5!����$0 3W��� �>"/�-"���0 &����&��)"/���9�-&����;pR��&N"/05"/���9����"/�X"�����"�"/���9����� "�0'%'��� *t*+0Q����,���A

�k0$!�8���,-�K�a���-� "/0 %'�/� *Y% �-E'��&5�a�@�Q8�&�JP0 3�����"/��M 0'&��I*58�� "C����"/����*+��&��`"����I*D�?pi��*58�*Y� &��5*+��&���*K8�*E?� ,�8����<0 3f"����$����"@�5� &���"/����&)���1EQ�����S"������I��&N"/��� E�� , ��&N"/05�5����������"���� *D�-&����R&Q8�*5! ���<0 3k��� � "��-"/�-0 &��WH#�-"/��-&��-"���� ,���0'8�&."/�T0�3.)�����0�A���0'�$�b� �@� E�� ,-8��F�-&e"����+���?"@��Mf0'&��+� ��0'8�,-�es�&�� "/���+��� �>"/�1"/�-0'&]"/����"T��0 &."@����&��"����5E�� ,-8��F� &�� �-&���� ��*+��&N"9�1"/�Z��0'8�&."bA�!S3 "����Z"�������M "/���X��� 0'!�� !���,�� "_:(0 3I�2E�� ,�8��X���$� ������0bp��-*D��"/��,-:("��������"/�-0X0 3k"/���$3=��� � 8���&��;:(0 3k"/���$E���,�8��Z"/0X"/���$"�0 "@� ,G&Q8�*5!����#0 3kE�� ,-8�����A

Page 11: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

��������� � 0 �k� � � � � ��� � ��(! �.:Q!����-�V���-� "/0 %'�/� * ���%$2�k���O� &(�;pQ"/��&����-0'&V"/0F"/���T��0'&�������"a0 3C�+���-� "�0'%'�/��*t"�02�Xs�pi���i6q,���&�% "/�V� ,�������&�%"���*+�KH#�-&���0�H 0�3`����"/�R�/�?"/�����Z"/��� &g"����F��&."������5� "����b��*d0'�$�R�@�Q8�&�J�AX�����F�.:Q!����-�e�����>"/0'% �/� * � ��� �i"/��>"/0'��� %'��!�� � ���D0 &F"/����"/��*+��0'��� ,�� &��+� ����"/��� ,�����&����-"7:X0�3 "����#��&���0'*+��&�%Z����"@�9� &��+8�"/�-,��*)����m� &+� 8ipi��,-� ��� :����"@�X� "���8��;"/8����T��� ,-,�����"/���9�npi� 0 &���&N"/��� , ���-� "/0 %'�/� *(A

94p���0 &���&N"/� ��, �����>"/0'%'��� *+� � � � ��0'8�&."O!���&���� :����-%'�-"��<��&(�F���?"@�F�>"/����� * !.:R��0'8�&."���&�%X"/���T&.8�*5!����#0 30 &����a"�����"Z0Q����8��a��&r��*D� ,�,-���#"/��*+�9H#��&���0�H#�Z0 3m�;pi��0'&���&."/��� ,-,-:)��&������b������&�%�� �<)�� A#!a�Z�2� "����b��* 0�3 0'&������&�� )�����0 � � 0�H#�P�-&."�0)"����+�np���0 &���&N"/��� , ���-� "/0 %'�/��*VM "����D� ,-%'0'� �1"/��* ��,�,�0.�b��"����9�)&���H !�8��@J ��"P"/0(��� �@��-&���0 *D�-&�%20'&��5H#�1"/�e�2"/��*+�K� "/� *+� ATjl����&e"/�������X0 3 "/�������F!�8��nJ �;"/�T����E'�5"/���X��� *+�5E���,�8���M "�����:g� � �*+��� %'��� "/0r3=0'��* �r&���Ho!�8��nJ �;"FH#�1"/� "/���2"���*+�D� "@��*D� 0 3�"/����*+0'� "5� ������&."F� �����1"/��0 & A!9CE'��&."�8�� ,�,1:'M� 0'*+�P0 34"/���P!�8��@J ��"��aH#��,-, ����E'�T"/��*+���>"@� *+����"/���?"Z� � �P0',-�����#"���� &V"����P"���*+�9,��-*+�1"#��&(H#�����@�]��� ���P"������,�%'0'� �1"/��* ����� ,-,�0Q�b�?"/���9"/���2!�8��nJ���"/��Ag������������8�,1"50 3<"/�����P!�8��@J ��"X*D� ��&N"/��&�� &����D���K�V��� 0E�� !�,-: ��,�0'� ���������0bpi��*D��"/�-0 &]"/0)"����F"���8��F&Q8�*5!����T0�3I0'&����9"�����"T0Q����8��9��& �)!���&���� :]����"/�)� "����b��*dH#�1"/���-& �)%'�-E'��&"���*+�Z,��-*+�1"�A

!a&���,�0'% 0'8��R"�0 "/���e"/��� ���1"/�-0'&���,a�����>"/0'% �/� *(MO"/��� �N:Q!����-� ���-� "/0 %'�/� * *D� �-&."@���-&��R��0'8�&N"/�(0 3K����"@�E?� ,�8�����A�7&T��0'&N"/�/��� "f"/0#"����m"/�/�����-"���0 &�� ,������>"/0'%'��� *(Mb"/��� �.:Q!�� ���T�����>"/0'% �/� * ��� �b��"������ ��� �i"/�-E'�m��� �>"/�-"���0 &���-& !�0 "/�c������"/��� , � &�� "���*+��0'�/� ,C��&."����>E�� ,-�90 3I"/���D��� &���0'* E�� � � � !�,���AD����������� ������"/�1E'�+��� �>"/�1"/�-0'&��9� � ��npi��0'&���&N"/��� ,������>"/0'%'��� *+�W��0'&��>"/�/����&����2"�0K���������1s��a��&."����>E�� ,-�W0 3 "/���SE���,�8��S0�3 "/���a�/��&���0'* E�� � � � !�,-�S��&��"���*+��� ��%'�-0'&���A !#������"/�1E'�R��� � "��-"���0 &��KH#��0'���)!���% ��&�&��-&�%]"���*+���-��)�����0 � ���)����"/�1E'�R*D��� &��-&�%]"�����"X"������,�%'0'� �1"/��*tH#��,-,f�-&�������*+��&N"S"����K��0'8�&N"aH#����&���E'���$�+E?� ,�8��P� ��� �-E'����A 4��� "/�1"/�-0'&���H#��0'� �5!���%'��&�&���&�%F"/��*+��-�I&�0 "�)�����0X� ���a��&�����"/�1E'�a*+��� &���&�%P"/����"I"����$� ,-%'0'� �1"/��* H#�-,�,^&���E'������&�������*D��&."I"����Z��0 8�&."�A�9CE'��&."�8�� ,�,1:'M"����e��,�,O"����]��&�� �;"/�1E'�r��� � "��-"���0 &��DH#�-,�,O���-�/� ������� �2H#����&l"/�������2!�8��@J �;"/�)�;pi���-��� A !���� ��"/��"/�-0'& 0 39"������� � "��-"/�-0'&��$� ���-�����ZH#����& "/���+��0'8�&N"P0�3<� &c����"��-E'�F��� � "��-"/�-0'&]����% &��-s��b� &N"/,-:V����EQ����"/���93=� 0'* "/���+�bE'����� %'�0�3Z� ,�,I��� �>"/�-"���0 &��KH#�-"/� ����"/��A jl����& "/���)��0 8�&."+%'������"/,1: �;pi���������D"/���(��E'���/� % � M`"����)��� � "��-"/�-0 & *D�b:�-&�� ����8�����"/��,-:V��������������&."9"����5"���8��5��0 8�&."$0 3 "/���X���?"@��A9�����F� ,-%'0'� �1"/��* H#��,-,�� ��,��1"a"������ �F����� "/�1"/�-0'&��O"/03=0 ��* "7HI0)&���H9Mf��*+��"_:r��� �>"/�-"���0 &��a�b���n�e0 3WH#�����@� 0Q����8��������9��� ,13W0 3 "/���X0'� ��%'�-&���,��-&."���� E?� , AT�����X&���H��� � "��-"/�-0'&��+!�����0'*+�]� �;"/�-E'�r� &�� "/���V0',�� ��� �>"/�1"/�-0'& !�����0'*D���2��&�� �;"/�1E'� Aljl����& "/���r��0'8�&N"�0'& ��� �-���0�3`������"�� � ,-,1:r� �58�� ����&."T� ��"��-E'�X����� "/�1"/�-0'&��a�-�$���-%'&��1s��b� &N"/,1:V,������$"���� &g"/���+�bE'���/��%'� M "����F� ,�%'0 ���1"���* H#��,-,*+��� %'�X"/���+��� �-�$"�0V�/�bE'�D��������� A������D&���H9MC����"/�1E'�+*+��� %'���c��� � "��-"/�-0'&g��� �9"/���FH#���i"/�c0 3`"/���+��8�* 0 3�1"/�$��0'&��>"/�1"/8���&."P�-&."���� E?� ,���Mk� &��e"/���F0',��e��� �>"/�-"���0 &��$!�����0 *D�F��&�� �;"/�1E'� AF�����D&.8�*5!����90 3I��� �>"/�1"/�-0'&��Z�������0'��0'�>"/�-0'&�� ,4"/0("����D&.8�*5!����T0 3<�-&���8�"T����"/�(�-"���*+�9��8����-&�%)"/���F"/��*+�5H#��&���0�H � &�� �-�9"7:Q������� ,�,1:],������"���� &)"�������&Q8�*5!����#!����b� 8�� �P0 3���� �>"/�-"���0 &R*+��� %'��&�%�A

�k0 ���;"/����*+��&��V"/���r3=��� � 8���&���: 0 3P� ��� � "�����8�, ���+E�� ,-8��]0 3$"/���]�/� &���0'* E�� ����� !�,-� M<"/���g� ,-%'0'� �1"/��*������8�*58�, ��"����f"/���`��0'8�&N"40 3���� �@�5����� "/�1"/�-0'&9H#�1"/�P������������"4"/0O"/���`��� 0'��0'� "���0'&T0 3�"/���I�-&."����>E�� ,.�-"k0Q����8����-����A�7&e"/���F�;p�� *+��,��X�����>"/0'% �/� * 0 3��4�-%'8���� 1�M "/���+� ��"��-E'�F��� �>"/�1"/�-0'&��$� ���+��,�0'&�%�"/���F��0'� �<)�0 &."/� ,m�?pi����A+�k0s�&�� "/���(3=� � � 8���&���: 0 3$�c��0'�-&."

xM<0'&��)s���� "D,�0Q�b�?"/���F"����r� �;"/�1E'�V����� "/�1"/�-0'& "/���?"D��0'&N"@� �-&��+�-"�A �Z&��

��,�0 "��`��&D��*D� %'�1&�� �>:5� ���;"@� &�% ,��S��,�0'&�%9"����O!�0'8�&����`0�3G"/���O����� "/�1"/�-0'&F� &��2� ,�0 &�%$"/���#"/��*D��0'��� ,^�p��-�W�-&."�0"����2����� "bA(������� ���;"@� &�% ,��+H#�-,�,m��� � "�� � ,-, :g��&."���� �����;"5�;pi�-� "/�-&�%r����� "/�1"/�-0'&���M4� &�� "/���2����0 ��0'� "���0'&c0�3�"�����-&."������ ���;"/���c�����b�2H#�-"��e� ����������"9"/0�"/���5"�0 "@� ,4� �����R0 3 "/���X��� � "��-"/�-0'&r���a"�����"$��� � "��-"���0 &�� �Z��0'&N"/���-!�8�"/�-0'&0�3#�1"/�T3=��� � 8���&��;: "�0r"����D"/0 "/� , 3=� � � 8���&���:'AeUV0'� �D3=0'��*D� ,-,1: M�%'�1E'��& E?� ,�8��

x"/���?"5�-�P��&�� �����D� & � �;"/�-E �

��� � "��-"/�-0'&pM�"����$3=��� � 8���&��;:(0 3

x�-� &

freq(x) =∑

{pi|pi∩p6=∅}

|pi ∩ p|

|pi|freq(pi)

2

Page 12: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

�4��% 8����#1%& ! �.:Q!�� ���(����� "�0'%'��� * 3=��0'* ���%$2� A

����� � ������� �� � ��� � ����

���,+���� - /K� / �#(*)k�� Q�

����� W\.!L\I0 *D��� ����� �0/�45� ��0'*+��� � ���I"_H`0F������8������i6q����*+��&�����0 &)� ����� ��� ��&."/��"/�-0'&���0 3k����"/�5�n�.8�&�J.�S��3 "����������3=0 ��*+��&�% m���-&�������� ,#\I0'*+��0'&���&."�!a&�� ,-:Q���-�F0'& "/����*VA �����V����"/� *+0Q����,��F*58��>"D!�0 "�� !��(0 3a���<)��

n × kA �����9�����>"@� &����9�������;s�&����r!.:�"����$3=0',-,�0�H#�-&�%K3=0'��*58�,��'&

DPCA =tr

(

X ′T1

X ′2X ′T

2X ′

1

)

kH#�������

X ′1

�-�<"����9� ����8������Q67���-*D��&����-0'&)*+0Q����,G0 3k"����9&�0'��*D� ,G����"@��MX ′

2

�-�<"/���9*+0Q����,G0 3k"����$��&���0'*D�-&�%����"@��M���&��

k���<"����9&Q8�*5!����#0 3�������8������r���-*D��&����-0'&����-&R"/���9*+0Q����, A

���,+��,+L∞

/ �#(*)k�� .�

�����S�-&�s�&��1"_:5&�0'��* ��0'*+��� ����� ��0 *D��8i"/���m"/���O�-&�s�&��1"7:5&�0'� * 0 3 "/���#�����>"@� &������ / 25��!��;"_H`����&2"7HI0P*D��"����1p� ����� ��� ��&."/��"/�-0'&��O0 3C���?"@�F0 3C� �<)��

m × nAI�����P*2�?"/���-�����#�b��& M^0 3C��0'8�� ��� M�!��9"/���P0 ����% �-&�� ,G����"/�+0'�O� &N:

"7HI0+*D��"�����������0�3�"����9�/� *+�9� �<)�� A �����$3=0'��*58�,��5�-� &

d (X ′1, X ′

2) =

mmax

i

n∑

j=1

∣X ′1ij

− X ′2ij

H#�������X ′

ij

�-�<"/���9��&."/�>:)��"�"/���i"/�)��0H � &��

j"/�(��0 ,�8�*+&)�-&R"/���9*+0Q����, *D��"���� pGA

1

Page 13: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

���,+��,� � ��� � ���D� ��� / � (�)��� .�

�����DUV��&�J 0H#��J.�m��0'*D��� �����$��0'*+��8�"/���$"����+UV��&�J 0H#� JQ�m���-� "/� &���� �322�C!���"7HI����& "_H`0RE'���;"/0'� �T�npQ"/��&������"�0+*D��"����������<0 34� �<)��

m × nAm�����93=0'� *58�, �K�-� &

d (X ′1, X ′

2) = p

m∑

i=1

n∑

j=1

∣X ′1i,j

− X ′2i,j

p

H#�������p

�-�`�T��� ��� *+��"/��� "�����"`��� %'������"/��� "/��� &D0'�W� � 8�� ,^"/0P0'&�� AC�������W�����>"@� &����S��� �`0 "������W&�� *+����A ��0'�

p = 1M��1"#�-�<"/���PUr� &�����"�"/� &(���-� "/� &����T��&��)3=0'�

p = 2�1"#�-�<"/��� 9m8���,������b� &)���-� "@��&�����A

���,+���� ��" �4� )k��� & � ���� � �� / �#(*)k�� .�

�������X��0'*+��� � ���5��0'*D��8�"/���5"/���R����� "/� &����R!���"7HI����& "7HI0g��8�!�� ��� �����+0 3#"/�������b��,16qE?� ,�8���� ���������)0�3O"����*+0Q����,�� �����2� Am�����93=0'� *58�, �K��� &

d (X′1,X′

2) =

nmax

i

m

minj

∥X′1:i

− X′2:j

H#�������i�-&����np����#"/���9��0',�8�*D&���0�3

X ′1

� &��j

��&����;pi���#"����9��0 ,�8�*+&���0 3X ′

2

A

���,+���� � � ��( � �^� ����� � ( � � � �� / �#(*)k�� .�

������S0 ,�*+0'% 0'� 0EN6,-i*+�1��&�0�E5��0 *D��� ������S0',-*D0 %'0 ��0�EN6 -i*F�-� &�0EP"_H`0�6q"/� ��,-���+%'0Q0Q��&���� �>670�3 6qs�" ��� 25�^"/��� "I0 &��8�*58�, �?"/�1E'�(���-� "�����!�8�"/�-0'&���A �����r��0'*+��� �����2������8�*D���D"/����"+"/���V*+0Q����,-�D� � �V�����>"/0'%'��� *+��A ��0 ��0 *F6��8�"/�a"/���Z���-� "/� &�����M�"����$� ,-%'0'��� "/��* ��0'&NE'���>"/���b� �@�)0�3f"/���Z�����>"/0'%'��� *+�`��&."�0X�K��8�*58�,���"/�1E'�S�����>"/� ��!�8�"���0 &3=8�&���"���0'&VH#�����@�]���S���-*D��,1:R"/���K� 8�* 0 3C"/���P3=��� � 8���&��������$��&r�b���n�g0�3m"/���K!��-&��a�-&r"����K�����>"/0'%'��� *(AO�����*D�?pi��*58�* � !���0 ,�8�"���E�� ,-8��#0 3 "/���#�����>"@� &����S��"W��� �@�2!���&+!��;"_HI����&D"/���#�����>"/���-!�8�"/�-0'&53=8�&���"/�-0'&��

D���m"����

����� "/� &����#0 3G�-*+� 0 � "@��&����I"�09"����O� ,�% 0'���1"���*(A �q"W*58�� " �/��"���� 3 :K"�����3=0',�,-0�H#�-&�%a3=0'��*58�, �S"/09!��#� "@�?"/���>"/�-�b� ,-,1:� ��%'&��-s���� &." &

D >

−1

2

(

1

m1

+1

m2

)

ln(1 − α)

2

H#�������m1

����"/���<&Q8�*5!����C0 3�!��-&��C�-&5"����Is����>" ���-� "/0 %'�/� *h� &��m2

����"/����&.8�*5!����C0 3�!���&��C�-&K"/���<������0'&������� "�0'%'��� *VA������K��� �/��*D�;"/���

��a�D���-%'&��1s��b��&����P��� ��� *+��"/���OH#���-�n�r�����>E'���9���S"/���P"/��� ������0',��V3=0'�O"������

��0'*+��� ������A

���,+��� � ���� � � ��� .���1� / �#(*)k�� .�

������9 ��� "/� UV0�E'��� � �K��0'*+��� � ���T��0'*+��8�"����T"���� 9W��� "/� UV0�E'��� � � �a���>"@� &���� � 9`U ����� / � �W!��;"_HI����& "7HI0����� "�0'%'��� *D��A+������9WU �o!���"7HI����& "7HI0V���-� "/0 %'�/� *+�$�-�$"/���+*+��&��-*K8�* HI0'� Jg&�������� �/� �>: "/0)"/��� &��>3=0'��*0 &��X���-� "/0 %'�/� * �-&."�0)��&�0 "/������ATjc0'� Jr�-�Z����s�&����c� �a"/���X���-� "/� &����5!���"7HI����& "/���X*D����� ��&��Z0 3 "/���X!���&��0�3k�P���-� "/0 %'�/� * HI���-%'�."�����!N:+"/�������W����0'!�� !���,-�1"��-����A4�����a&�� *+�S!����-&�%'�W"�0K*D�-&��2� &R������8��/��"��a*D�;"@� ����0'�0�3S"����(� *+0'8�&N"F0 3S�b��� "/� *D0�E'��*+��&N"F&������������ � : "�0e��0'*+��,��;"/��,-: ��0E'���F"����)��*D� ,�,-���5���-� "�0'%'�/��* H#�-"/�

$

Page 14: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

"����r��� � "/� 3=��0'* "/���V, � � %'���+���-� "�0'%'�/��* �-3a"/���VH`���-%'�."��DHI�����r����,-���+0 3$�b� �>"/� A !S,-"���0'8�% � �-"D�-�D0'&�,1:8������]"/02��0'*+��� � �K���-� "�0'%'�/��*D�O��&V"����5����"/����"�0'��M "/��� 9WU � ���S��8'�+���-��&N"/,-:(%'��&����/� ,k"�0���0 *D�������P0 "/�����*+0Q����,���A�-i��&����9"/���-�O��0 *D���������#��8�������&."�,-:)��0'*+���������O&�0 ��*D� ,���)����(�����>"/0'%'��� *+��M�"����P����� "/� &����P*+��"������$���� � 8��-E���,���&."W"/09"/���aUr� ,�,-0H#�m�����>"@� &��������%�2� MQ!�8�"W"/���O��*+��,-��*+��&."@�?"/�-0 &F��� !�� � ���20'&2�T��8�!�,-����,-:X�bE�� �-, � !�,1��-*D��,���*+��&���"/�-0 &R0 3k"/��� 9WU � � / �2� A

���,+�� � � �k �= � ��� � � / �#(*)��� .�

�����]Ur� ��� , � &�0'!����5��0'*+��� � ���F��0 *D��8�"/���+"����(���-� "@��&����)3=� 0'* �e��0'��&N"F"�0 "����(����&."���0'�-� 0 3Z�e��,-8�� "/���������0 8�&."���&�%X3=0'�<"/���$E�� ����� &���� Am�����93=0'� *58�, � �322�f�-� &

d(x̄,x′) = (x′ − x̄)T

Σ−1 (x′ − x̄)H#�������

x′ ���m"����O��0',�8�*+&XE'���;"/0'�W0 3 �9����"/�9� 0 ��&N"

x��� 0 8 ����"����2�-&."�09"����O*+0Q����,�� ��� ��� M

x̄���m"����O*+�b� &+0�3

"����a&�0'��*D� ,^����"/��M�� &��Σ−1

���W"/���a��&NE'��� ���Z0�3 "/���Z��� *+��,��S��0E?� ����� &����a*2�?"/��� p+0 3 "/���a&�0 ��*D� ,�����"@��A"�7&"����90'&��;6q����*+��&����-0'&�� ,G��� ����M�3=0'���;p�� *+��,-� M�"/���PUr� ��� , � &�0'!��-�����-� "/� &����9�-�#� ��*+��,-:+"/���9� "/� &���� � ���<)���"/�-0'&0�3k�PE�� � � ��!�,��#H#�-"���������������"�"�0X�K*+�b� &�� &���� "/� &��������R����EQ� ��"���0 &3&

d(µ, x) = x−µσ

A !S,-"/��0'8�%'�2�-"`*2��J ���"����+� � ��8�*+��"/�-0'&g"�����"$"/���F��0'��&N"/�9�����53=��0'* �)&�0'��*D� ,4��� 0'!�� !��-,�� "_:V���-� "�����!�8�"/�-0'& MG�-"$���Z� "/�-,�,�8����;3=8�, �-&���/� �;"/����� A

���,+���� - � �^���� � � � � 0 / �#(*)k�� .�

�����W����0 !�� !��-,��1"7:S��0'*+��� � ��� ���;"/��� *D�-&���� "/��� ���-� "/� &���� !��;"_H`����&5�#��0'�-&."f� &��P�#����� "�0'%'��� *(A��q"f��&."���� �����;"/�"����9�����>"@� &����T� ��"����9����0 !�� !��-,��1"7:+"/����"�"/���T��0 ��&N"#��0Q���O&�0 "#�;pi�-� "S� �#�-&R"/���$3=0',-,�0�H#�-&�%K3=0'� *X8�, � &

d(x) = 1 − p(x)H#�������

p(x)�-��"/���T��� 0'!�� !��-,��1"7:20 34"����T��0'��&N"#3=� 0'*t"/���T����� "�0'%'��� *VA(�7&V���-"�8���"���0'&��<H#�������T"����T��0'��&N"O���

0 8�"/� �����Z"/���9!�0'8�&����O0'&)"����9!��-&��#0 3k"/���9����� "�0'%'��� *VMQ"/���T����0'!���!���,-�1"7:2�-� )���� 0D� &��)"/���T����� "/� &����9��� �'A

����� ���������� �� � ��� ��� �� ��

�����D!�� ���-�F3=8�&���"/�-0'&���,��1"7:]0 3<� & � &�0 *2��,-:]����"/����"�0'�P�-�9"�0V!�8���,�� �(*+0Q����,m0 3I����"/��Mk��0'*+��� � �+*+0Q����,���M��&��D��,�� ��*h"�����"`� &2��&�0'*D� ,-:K�np��-� "��WH#����&D"/���#��&���0'*D�-&�%$���?"@�9���-%'&��-s��b� &N"/,1:5���;EQ� ��"��#3=��0 * "/���#&�0'��*D� ,*+0Q����, A -Q0S3 ����M"/���-�k��� �����������4� ��������� �����5"/���Ws�� � "�"7HI0O"@� � JQ��A4�����`, � �>"k"/� ��J$��� 3=��� � 8���&."�,-:90E'����,�0Q0 J ����-&]"����X,��1"/���/��"�8���� �0/7/iM �%1iM �545� AP�����F��8�������&."9�-*D��,-��*+��&N"@��"/�10'&r8�� ���$"7HI0)*+�;"/��0Q���a"/0R���;"/����*+��&��K"����"�����������0 ,���3=��0'* "��/� �-&���&�%K����"/��Am�����Zs����>"#*+��"���0Q�R��0'*D��� �������5*+0i����,�"/05�b� �@�)0 3k�1"/�`"/��� ��&���&�%P��0'��&N"/���&��5!�8���,����4�S���-� "�0'%'�/��*Y0'&P"/���`�����>"@� &�������AC�����I"�����������0',-�5�-�k"�����&5���;"4"/0Z�S��� ���������-!���� � 8�� &."���,��W0�3�"��������� "/� &�������A !S,-"/��0'8�%'�T"/���I�-���b�O0 3^�#"/��� ������0',��P"/������� ��0',-�K��0Q���4&�0 "4������8����I"����I&.8�*5!�����0 3���� ��� *D�;"/������M�1"m� ,�,-0�H#��"/����8������C"/0$� ��"m"/�����/��*D�<0'�C� ��*+��,-� �f"/����������0 ,���� ����� 0'��� � ,-,i����"����;"/0'� ��Am�����#�-&."/������� ��"/��"/�-0'&50 3��&K� &�0'*D� ,-:Z���k!�����&�%#3=8��>"/�����f3=� 0'* "����W*+0Q����,'"/��� & $ $�� 0�3�"���� "��/� �-&��-&�%�����"/�#������*+��*+0'���m�-&."/8��-"/�1E'��,-:8�&������ � "@��&���� !�,��<"/����&F���-� "@��&������ 0�3

.8M1×10−7

MN� &��2.54

3=0'�4"������������-[ ��� ��&N" ��0'*5!���&���"/�-0'&��40 3�*+0Q����,!�8���,-����� �Z� &��]��0'*+��������� ��A��a��� ���-"��K"/���5� ��,���"/�1E'�P�b� � �5H#�1"/�rH#���-�@�g0'&��K�b� &g����s�&��5"/���P"/��� ������0',��r3=0'�*+0Q����,16q"�0�6q��0'�1&."F��0'*+��� � ������M�� � ��*+��,-� �5*D�;"/��0Q� 3=0 �+*+0Q����, 6q"�0�6q*+0.����,<��0 *D��������� �+���F*D0'� �)���*�+��8�,-"bA-Q��&����K*+0Q����,��S� � �P0'&V"/�-*D�$H#��&���0H#�a� &��V"/�/����&��-&�%+���?"@�2� � �K� ,-, "/����"Z� � �K��E�����,�� !�,-�$3=0 �S���;"/����*+��&��-&�%"����F"/������� ��0',-� Mf"/���+��8���� ��&."P*+��"/��0Q�c� ��,��1"/�Z"/���+����"@�)��&e��� ,-3I� &�� ��0'*+��� � ���9*D0Q����,��$0 3`"/���+����,-E'����A�����9"/��� ��� ��0',��)���<"/���9*D�?pi��*58�*o���-� "@��&����9!��;"_H`����&V"����9*+0Q����,-��A

���

Page 15: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

Streaming Data

Pre-processing

ExtractTraining Windows

ExtractTesting WIndows

Build TestingModel

ModelsDifferent?

Anomaly Normal

Build NormalModel

Continue?

ModelComparer

Threshold

Yes

Models

WindowSizes

Yes No

�4��% 8���� 4 & !a&�0 *2� ,1:2���;"/����"/0 � � 0�HI�@��� � "�A

����� � � � � ��� ��� � � � ��� � � ����� �

�����<, � �>"4� "����X��&P"����I����� ��%'&X� &��X�-*+��,-��*+��&N"@�?"/�-0 &P0 3���&X� &�0'*D� ,1:9���;"/����"/0 �C���k"�0Z��0 *5!���&��W"����I��0'*+��0�6&���&."�� ��&N"/09�Z8����;3=8�,^� &�0 *2��,-:T����"�����"�0'��AC�����-�m������"���0'&F��������� ��!���� "�������8�� ����&N"/,1:5��*+��,-��*+��&."����X�np�� *D��,������"/����"�0'����A ����%'8�� ��42����0H#�Z"/���5!�� ���-�50'��������"/�-0'&]0 3`��& ��&�0'*D� ,1:(����"����;"/0'�ZH#�1"/�]"/���X��� ��EQ��0 8���,1:r���n6� ��� ��!����V��0 *D��0'&���&."���AI�����-�O������"���0'&V�����������-!����O"/���T0'�����/��"���0'&)0 3�"/��� ���T���-[ ��� ��&N"a� &�0 *2��,-:2����"����;"/0'� � &"����+*+0Q����, 6q"�0�6q*+0.����, M *D0Q����,16 "/0�6q��0 �-&N"bMf��&�� E'0 "���&�%)*+0Q����, 6q"/0?6q��0'�-&N"$����"����;"/0'� ��A�9 � �@�c0 3`"/���F����"����;6"�0'���Z� ��� 8�*+���Z"�����"$� &g� �����1"/�-0'&�� ,f��0'*+� 0 &���&N"$�np��-� "��Z"�0R*D� &�����8�,���"��9"/���5���?"@��AZ�������a��0'*+��0'&���&."Z���� ��� � 0 &����-!�,��P3=0'�a���;"/���-��EQ�-&�%2"/���5����"@�iMG��������"/�-&�%2"/���5&����������/��� :]"���*+�TH#��&���0H#��Mf��&��g��&N"/����� �;"/��&�%DH#�-"/�"����T� &�0'*D� ,1:2����"/����"�0'��A

����� *+0Q����, 6q"�0�6q*+0.����,�����"/����"�0'� "��/� �-&�� *+0Q����,-� 0'&T�<�n�.8�&�JZ0�3i&�0'� *2��,'��&��T� &��9��0'� ���-!�,-:Z��&�0'*D� ,�0 8���-&���0 *D�-&�%a����"/��M'����"���� *D�-&����4"/���<���-[ ��� ��&���� MQ��&��F� ��"/8���&��C"/��������"/����"���0'&X����� 8�,-"��m%'�1E'��&F�a"/��� ������0',�� A �7&"����W"/��� ��&���&�%#����� ����MN�#"/��� ��� ��0',��P����,�����"/0 ������"���� *D�-&������#"/����������0 ,��P!�� �����50'&P*58�,-"��-��,-�m��0'*+��� � ��� 0'&��k0 &��� &���0 * ����,-E'���W0�3G"/���O���?"@��A �7&D"����#"/��� "/�-&�%P����� ����MQ"/���S����"/����"�0'�`��0'*D��� ����� "/���O*+0Q����,�0 3 "/���#"���� "���&�%����"@�ZH#�1"/�X"����#�>"/0'� ���+*+0Q����,�0 3�"/���<"/��� ��&��-&�%Z���?"@�$8�� ��&�%T�$����0EQ�-�����F*D0Q����,16 "/0?6q*+0Q����,i��0'*+��� � ����A ��0'��;E�� ,-8���"���0'&D0 3 "/���Z����"/����"�0'��Mi"����a, ��!���,�0�3k�T"/�-*D�#H#�-&���0�Hl���`&�0'� *2��,^0'&�,-:XH#����&)&�0X��" "@� �@JF��0'��&N"/�I� � �������� ��&N"bA

�����#*+0Q����, 6q"�0�6q��0'�1&."4����"����;"/0'�m��0'*+��� � ���m*+0Q����,��4"�09� ��&�% ,��I��0'��&N"/��A!a���-���<3=� 0'*h"/������M "/���<3=8�&���"���0'&

���

Page 16: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

0�3�"/���9*D0Q����,16 "/0�6q��0'�1&."<���;"/���;"/0 �O���#� &�� ,�0 %'0'8��I"/0X"/���?"O0�3�"/���T*+0Q����,16 "/0�6q*F0Q����,G����"����;"/0'��A�����<E'0 "/�-&�%$*+0Q����,16q"�0�6q��0'�1&."4����"/����"�0'�m*2� J ��� �Z�������-����0 &X!�� � ���+0 &+�aE'0 "�� A !a� �Z�@�Q8�&�JK0 3^"/��� ��&���&�%

����"@� � � ���-E'����MO"/���e����"/����"�0'�R"/�/����&������;E'���/��,9*D0Q����,���0'&l�-"�A !O3 "/����"/��� ��&���&�%�MO�1"R����,-���;"/�V� � ����� ����"/�"�����������0 ,��53=0'�4��� �@�F0 3�"/���<*D0Q����,���!�� �����F0'&5"����I"/������� ��0',-�X����,����;"/�-0'&X� ,�% 0'���1"���* � &��F�a����������"�����*+�-&����� 8���&."/�-,��5��� �/� *+��"�����A �a8����-&�%R"����>"/��&�%�M "/���X���;"/���;"/0'�$��0'*+��� � ���Z"/���X��0'�-&."ZH#�-"��e��� �n� 0�3W"/���X*+0Q����,-�8�����&�%F�X��0�"/��&N"/��� ,�,1:+���-[ ������&."���0'*+��� �����I3=0'�I�b� �@� A �����-�<"����>"/��&�%X����0Q������8�� �9� ����8�,-"/�<��&�0'&��ZE'0�"/�Z3=� 0'*��� �@�]*D0Q����, 67��0 *+��� � ���#��������A��73C"����TE'0 "/�-&�%D������8�,1"/�S����0�Hh� 4 ���t*D�58 0'���1"7:R0 34E'0 "/���S3=0'�S� &]� &�0 *2��,-: M"����9����"����;"/0'�#��,�� ��*+�I"�����"�"/���9��0'�-&."����#� &�0 *2��,�0 8�� $�0 "������>H#��� � M�"/���9��0 ��&."�����&�0 ��*D� , A

� �����!��� ��� � ��� 5

�������$������"/�-0'&e����� ��� ��!����9�;pi����� ��*+��&N"/�$"�����"9����,-�g"/0)���;"/����*+��&��KH#����"������$"/���X��*+��,-��*+��&."/��"/�10'&rHI0 ��J.���&��XH#����"/����� �1"C�b� &X��������0Q��8����#J.&�0�H#&+�npi� �����-*D��&."��C3=��0'* "/����,��1"/���/��"�8�����A�������s���� "m�;pi����� ��*+��&N"m"���� "��"����V� J ��"/�@� *D0Q����,#0'& *D� �@����&��),-�b� � &���&�%e����"/�e"/0c���;"/��� *D�-&��)H#���;"/�����2�-"+��� & � 8���������� 3=8�,-,-: ������8����"����e���-*+��&�� ��0'&���,-�1"7: 0 3T"����e���?"@� H#�1"/��0'8i")�;pQ"�����*+��,1: � ��E'������� ��[G����"��)0'&l��, �������1s��b�?"/��0 &l� ����8���� ��: A-Q����0 &���,-: MQ�$"���� "W0'&F&���"7HI0'� JX�-&."/� 8����-0'&X����"@�$��0'*D��� �����F"/���#����"�����"���0'&F�/��"���� 0 3 ����E ���/��,^0 3 "����#*D0Q����,16"�0�67��0 ��&." ��0 *D��������� �f�-&T� &T��"�"���*+��" "�0#������,�������"/�m� &�0 "/�����f������EQ�-0'8��f�np���������*+��&."bA�f� � "�,-:'M?� &T� � "��-s���� � ,1,1:% ��&����/��"����("���*+�;6qE?� ������&."<��� 0Q����� �O"����>"/���("/���9����"�����"���0'&(����"/�$0 3k"/���9*+0Q����, 6q"/0?6q*+0.����,G��0'*+��� ��������A

�����$s����>"O�npi�������-*D��&."#�-�#�X� ����,-������"/�-0'&�0�34� &)�����;EQ��0'8��#0'&��$"�0F���;"/��� *D�-&��Z"����$��[ ���;"S0�34�X�/��&���0'*����028 ���;"/��0 & 0 3Z����"@�e0'& ��, �������1s��b�?"/��0 & � ����8��/� �;:'A �����V��� ��EQ��0 8��+�;pi����� ��*+��&N" � 1 �O����� 3=0'� *D��� �e��� 0�68 ����"���0'&c0�3I"/�/����&��-&�%(� &�� "/��� "/�-&�%V���?"@�(0'&N"/0r�(���;"K0 3<�/��&���0'* !�� ���-�TE'����"�0'���P�����-0'�$"/0V��, �������1s��b�?"/��0 & A!O3 "/���W��� 0 8 ����"���0'& M'"/���O�npi�������-*D��&."W��,�� ��� �-s����+"/���O����"@�$H#�1"/�+0'&��O� &��+s�E'�S&���� ����� " 6q&����-%'�Q!�0 ��M.��������� ��0'&"������ MI� &�� ��8�����0'� "FE'����"/0 �+*D� �@����&��R��, � � ���-s������ � 12� A �����(����"@� � ��"��D� � �R"����(� �GM`��0',-0'& M ��0'&�0'������������M��&��]����� *5!�� � �K����"/� ���;"/�S3=��0'* "/����Z\.�SUV� �n����&���� �b� � &���&�%�"O����0'���1"/0'�>: � 17� A �7&r"����K��8�������&."Z�;pi�������16*+��&N"bM�"/���T����"@�XHI�����P�>"@� &���� �����<)����V8����-&�%F"/���T*+�b� &V� &��V� "/� &���� � �V����EQ����"/�-0'& M�� &��("����T�;pi����� ��*+��&N"����� 3=0'� *D���V"/��&]� 8�&��S0 3C"���&i6 3=0',��(��� 0'���_6qE�� ,-�����?"/�-0'& �322��� &��r���-�r�-&���,�8����9"����P��8�����0 � "aE ����"�0'�a*D� �@����&����, � � ���1s�����A�"#��� 8�,-"���3=��0'*o"����9�����;Ei�-0'8��#�;pi��������*+��&N"O����0HI���V"�����"#�/� &���0'* ����028 ���;"/��0 &��#���-�)&�0 "#,�0H`���"����T� ����8��/����:)� ����8�,-"/�#0 &(�����>"@� &����9!�� � ���V��,�� ��� �-s������O���#*X8��n�V���#0'&��9*+��%'�N"���&N"/8��1"/�1E'��,-:D�;pi�����;"bAW�������8���� ��&N"P�;pi��������*+��&N"T��,�0'� ��,-:V3=0',�,-0�HI���]"/���F��� 0 8 ����"���0'&e*+��"���0Q��0',-0'% :]��&�� 8�� ��� "/���F�/��*D�X����"/�)� ��"/��A�����S� ��� 8�,-"��`� � ����0H#&D��&F��� !�,�� �O����*+0'&��>"/�/�?"/��"/����" 3=0'�m����"/�9���;"/� H#�-"/�+�9, ����%'��&.8�*5!���� 0 3G�np�� *+��,����� � � MW�-0'&�0'� ������� � M`� &�� � ��� *5!������%�P"/���(������8��/� �;: � ����8�,-"/�53=0'�5"����)��8�� ����&."+�;pi����� ��*+��&N"+� 8�����0'�>"+"������0'&���,�8�� ��0'&)0 3k"/���9��� ��EQ��0 8��#�;pi����� ��*+��&N"bA

�����]� ����0'&�� �;pi��������*+��&N"23=0',-,-0H#�F"����r�����-���1"2� &�0�"/�����2��� ��EQ��0'8��2�;pi����� ��*+��&N"�!�8�"28����������-[ ��� ��&."����"@�$� &��+� �����m���;E'���/��,���&�0'*D� ,-:T����"����;"/��0 &+*+��"���0Q����AC�����#��� ��EQ�-0'8��m�;pi����� ��*+��&." ���545����0'*D��� �����X3=0'8��*+0Q����,16q"�0�6q��0'�1&."m��0 *D��� �������W0 &2�9��8��>"/0'*+�<)����FE'����� ��0'&D0�3G"������ ��&���0',�& �f� !�� �%$&$&1 � !�" 6! �;E�� ,-8���"���0'&����"@� � ��" ���%12� AD�����D!�� �����T3=0'�9��0'*+��������� 0'&gHI��� �+"/���+����"/����"���0'&c����"/�F0 3<��"�"/� �nJ.�P� &�� "����D� *+0'8�&N"T0 3"���*+�9&�������� �/� � :("/0D����"����;"$� &]��" "@� �@JR0'&����P�1"S!���%'� & A#�����K��8�������&."a�;pi����� ��*+��&N"S3=0',�,-0�H#��"/���T"/��� ��&���&�%��&��X"/��� "/�-&�%$*D�;"/��0Q���m0 3^"/������� ��EQ��0 8��m�;pi����� ��*+��&N" !�8�"m8������`�a"/��� ��� \I8�� � $&$&$Z����"@� � ��" ��� ��H#�����@��-�m� ,-��0Z!�� �����+0'&5"/����� !�" 6! � $&$&1a��E���,�8���"���0'&K����"@������" ��� 1 � A4�����#*D� �-&5���1[G������&������ !���"7HI����&+"����<"7HI0����"@� � ��"��������C"/����" "���� ��� ����"/�#� ���m��8�!�,-����,-:a��E?� ��,�� !�,-��M�,�� !���,-��� M� &��T� ,�� �b� ��:S3=0'� *2��" "/��� Af����� 0 "/���������"@� � ��"���&���,�8�������"/��*+� 0 �/� ,G��&��(��%'%'����%N��"��Z�-&�3=0'� *2�?"/�10'&D3=��0 * "����$0 ����% ��&�� , � !�"# �!Y���?"@� � ��"<"/����"<���8�&���E�����,�� !�,-�$��&("���� ���L����"/��A<����� ���L����"/�+��0'&������>"a0 3C� ��E'���/� ,f"/��0'8��/� &��r� � � 8���&N"/��� ,�,1:R0'�������������0'&�&�����"���0'&R� ����0 �����<3=� 0'* 0'&��aH`����J�0�3k���-*58�, �?"/����&���"7HI0'� JD"��/� �+� A 9 � �@�)��0'&�&�����"/�-0'&R�-&���,-8������`3=0'� "7:N6

�5/

Page 17: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

���b��"�8������ \I, �������1s���� � � ��0',�0 & �-0'&�0'� ������� � � ��� *5!�� � �4 ��6 � � $ �'A $ $ �'A 1&1 4 ��A � 2 4QA 1714 � "/����E �'A 1&1 4iA 1�1 �'A 1'� A 2 24 46 � � 1 $�A 4 � �'� A0>7> 2 $�A �7> 2 ��A �&�4 � "/����E /iA0/�4 4iA0/ /iA � / A $�>4 �a� $�4iA $ � ��/ � 1�A � � ��>�A � 44 � "/����E A 1 ��A0/ � /iA >&$ � A0> 1�54 ��6 � � $�/iA � 2 1 $iA � 2 1 ��A 1 � 1&$�A �'��54 � "/����E /iA >&� 1�A04 2 �'A04 $ A 1�1�54 46 � � 1 $�A0> � 4 2QA0>7> 2 $�A 421 1&��A 1 >�54 � "/����E /iA >&1 4iA 2 1 /iA > / A � 2�54 �a� $�4iA 17> 4 1iA0>7> � ��A 1 � 27/iA 2�54 � "/����E A0>7> 4iA > 4 >�A04�4 A 1&$> � ��6 � � $ /iA > 421 1 2iA / � $ ��A 1�>> � � "/����E /iA��%1 ��A �71 �'A $&1 A >�>> � 46 � � $ ��A 1 2 4�4QA0>7> 2 1 1&1> � � "/����E /iA �&1 ��A $'� /iA >71 A04 �> � �a� $ 4iA $ 4�4QA � 2 2 2iA � � 2 1�A $&$> � � "/����E A / $ 2iA � 4 /iA0/ 1 A 1 2!S,�, ��6 � � 47>iA0>7> 1 ��A 4 2 $'�'A0/ 1!S,�, � "/����E ��A 2 �'A 1&� A > 2!S,�, 46 � � ��/ 2 $�A0> 2 1&1�A 2 $!S,�, � "/����E 4iA0/ $ /iA��54 A 1 $!S,�, �a� �71�A � 2 2 1�A 1 2 ��A04 �!S,�, � "/����E 4iA � 2 /iA >&� A 1&�

��� !�,�� ��&�"#����8�,-"/��3=0'�k"/���I*2� �@���-&��`,���� ��&��-&�%a�npi�������-*+��&."C������,��-�b�?"/��0 & Af�����<3=����"/8������C��0',-8�*D&K�-&���������"/���"����I&.8�*5!�����0 3�� ����8������53=�b�?"/8�� ���48�� ���X��� ��0'� "/0a��, � � ���-s��b��"���0'&GAk�������a� ��, �������1s����k���k"�����\.1�A 4O��������� ��0'&"������ A "#����8�,-"/�4� ���`&�0�"/�����b��!�,-:T� !�����&N"43=0'�k"����<� �K���?"@� � ��"C!����b� 8����I"/���`�;pi����� ��*+��&N"C��0'&���8�*D���X� 0Z*58��@�*+��*+0'�>:2"�����"�"/���9����0'%'��� *o"�����*+��&���"/���RH#�-"���0'8�"#��0'*+��,��;"/�-&�%5"����9*D��� ��8�����*+��&N"bA

� >

Page 18: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

0 &��T3=����"/8�� ���S0 34H#�����@�V"/����� "7:N6q3=0 8��O� � �T&Q8�*+��� ����A#UV0 � "a0�34"/���T*2��"���� pQ6q!�� � ���(*D0Q����,-�O�-&("����P��8���� ��&N"�npi�������-*D��&."+0'&�,1: 8����)"/���(&.8�*+�����-�R3=����"/8������ $#3=8�� "/������*+0'� � MW"����(��8�������&."D�np��������-*D��&."+0'&�,-: 8�"���,-�*)����"����F��8�!�,��-�������e"���&i6q����������&N"P�/��*D��,-��&�%�0 3W"/���F��0'&�&�����"���0'&��$3=0'�9� ,-,�"/��� "���A:�7&e"����X"���� "���Mf"����F���?"@�)� � �� ��,��1"K!.: ��, � � �5, ��!���, A ! ��� &���0'* �/��*D��,��2� ����8������X"/����0�E'���5&��-&���"7: "/��0'8��/� &�� &�0'� *2� ,W��0'&�&�����"���0'&��"�0rs�E'�����;"/�X0�3#0'&��n69� &�� ���1p.6 "/��0'8��/� &�� ��0 &�&����;"/�-0'&���A �7& ��0 *5!���&��?"/�-0'& H#�1"/� �r���-&�%',-�2��"�"/� �@J ��,�� ����M"����(s�E'�n6q"/��0'8��/��&��i67��0'&�&�����"���0'& "/�/� �-&��-&�%c��&�� 0'&��n6q"���0'8���� &��i6q��0'&�&����;"/��0 & "/���>"/�-&�% &�0'��*D� ,����;"/�D3=0'� *�e���-&�%',��R��E?� ,�8���"/�-0'& ����"�A?-i�-&����R"/���(����"/� �-&���,-8����(�g"/0 "/� ,�0 3S"_H`��&."7:N6q"7HI0 �?"�"@���nJ ��,�� ��� ���2� &�� "�����npi�������-*D��&."Z��� �as�E'�5��8�&���M �2"�0 "@��,�0 3 0'&��n67�.8�&���� ���g"���&g��&����-EQ����8�� , "/��� "Zs�,����a3=0'� * "/���5!�� � ���a0 3 "�����npi�������-*D��&."�A �Z&g�b� �@�e0 3m"/�������5"/���>"$s�,-����M "/���5�;pi����� ��*+��&N"$��0'*+��� � ���]"/���F� ,-,�*+0Q����,4!�8���,-����� �a3=� 0'*-Q����"���0'&:>�A*�<H#�-"��X"����SUV� ��� ,�� &�0'!����m\I0'*+��� �����43=��0'* -i����"/�-0'& >�A0/iA 2S3=0'�4"/����*2�?"/��� p.67!��������X*D0Q����,��m��&��"���� m��0'!�� !���,-�1"7:g\I0 *D���������Z3=� 0'* -i����"���0'&@>�A0/iA 1�3=0 �Z"/���F����� "�0'%'��� *D��A5�����+�np��������-*D��&."9"���� "����c��� �@�!�8���,-�����_67��0 *D���������4��0'*5!��-&���"���0 &X� ,�0'&��<0'&F"����#����"@�9� &��FH#�1"/�X"/���#*D�28 0 ���1"7:TE'0 "/��0 3 �����>"/0'% �/� *(M - ���KM-QJ ��"/�@� M `\�!KM�� &���*D��"����1pF*+0Q����,�!�8��-,��������WH#�1"/� 4T������8������R����*+��&�����0 &���A4�����S"/��� ������0',���� ���-�����`3=� 0'*� ��,-����"���0'& *+��"���0Q� ����� �����-!���� �-& -i���;"/�-0'& >iA0>rH#�-"�� � 8�� &."���,-���5��& "/���R��� &�%'��0 3 4 ��� "�0 ��� ����A �����*+0Q����,167� �������-s������ ��� *+��"/�����X��&���,-8�����"����)&.8�*5!����X0 3S������8������ ����*+��&�����0 &��K3=0'�X*+0Q����,��K"/���?"F������8��������"@������*+��&�����0 &�� ,-�1"7:V� &��g"/���53=����"/8����X��&����;p]3=0 �Z"����X�����>"/0'% �/� *+��A���0'�a"/���F&.8�*5!����$0�3`���-*D��&����-0'&���M"����2E���,�8����KHI�����23=��0'* 4("/0 /74V��& ��&�������*D��&."/�K0 3 4iMm� &�� �-&����������K��� &�%'��� 0�E'���K"�������&."/�-���2��� &�%'�20 3�-&����-�����$�-&g"/���F���?"@� � ��"bAX�����+&.8�*5!����90�3I��0'*5!���&��?"/�-0'&��Z0 3I�npi�������-*D��&."T� 8�&��$:Q����,������c� &e�;pQ"/� ��*+��,-:,�� ��% �`�;pi����� ��*+��&N"C"�����"4"�0i0 JT���;E'����� ,����b:Q�m0�3^��0'*+��8�"���&�%S"���*+�`0'&X� /iA04 ��� )I����0Q����� ��0'��Am�k0$� !���"��I"����,�� ��% �$��*D0'8�&."<0 3k"���*+�a&����������/� �>:'M�"/���TUr� ��� ,�� &�0 !����I���-� "/� &����Z*2� �-&."/� �-&����R�X��0'�.:�0�3k"����Z"/���$�-&.E'�������0�3f"/���Z��0�E�� ����� &����Z*D��"/� �1p+��05"�����"<�-"I������&�0�"����bE'�Z"�05������� ,���8�,���"/�S"������I*D��"����1pF3=0'�I�;E'���>:�� 0 ��&N"bAC�����-�� ��&�% ,��O����� 3=0'� *2��&����S��&���� &�����*D��&."<����0'8�,��2&�0�"<� ��E'����� ��,-:D��[G����"`"/���a� ����8�,-"/��Am��� !�,-� >P� ��0H#�`"/���O"/� 8����0 ���-"��-E'�5�/�?"/�53=0'�a"/���XE�������0 8��9�?"�"@���nJr��, � � �����93=0 �$��� �@� 0 3W"/���F���;"/����"/0 ���9�;pi������"T3=0'�a"/���X���-� "/0'% �/� *+�!����b� 8����g"����]������8�,1"/�2HI�����]*X8��n� HI0'��� �]"���� & 3=0'�D"����]0 "������ ��A �4�-%'8�� � � ����0�H#�)� ��0'*+��� ���-��0 & 0 3"����P����"����;"/��0 &r����� 3=0 ��*D� &������O3=0'�#E�� � ��0 8��O*D0Q����,f!�8��-,��������#"/���?"a8���� �54F� ����8������g����*+��&�� ��0'&��O��&("������-���0'*+��8�"@�?"/��0 &���A

�����Z"/���-���)��&��Rs�&�� , �npi�������-*D��&."�8������#��0'*+��,-��"���,-:D� � "��-s���� � ,�����"@�5!����b� 8����$"/���9��8�"/��0 �<��0'8�,��R&�0 "s�&��X��8�!�,-����,1:P�bE�� �-, ��!�,-� M�����0'������,-:93=0'��*D��"�"���� M � &��5��0'� �����;"/,1:K,�� !���,����P"/��*D��0 �/� ,-,1:90'�����������F���?"@��A 9 � �@�0�3W"/���X0'&��X�Q8�&�������� 3=����"/8������$��&]"/���X����"/�R���Z� "/��"/�-� "����b��,�, :V��&���������&�����&."P� &��e�����>"/���-!�8�"����e� ����0'�����-&�%"�0K0'&��S0 3 "/�������a0 &��;6q����*+��&�����0 &�� ,��9� 8���� � � &D�����>"/� ��!�8�"���0 &���A4�k05� ,�,-0�H 3=0'�W��0'*+�O"/��*D��0 �/� ,^��0'*D��0 &���&N""�0F"����9����"@�iM�"����9��� �>"/����8�, ���<���-� "/� ��!�8i"/��0 &R��������&����S0 &V�F� ��*+��,��as���� ">670'� �����SUV� ��J 0�ER�n������&@� 25� H#���������� �@�2� "/��"/�#:Q����,����m"/���O�����/� *+��"������ 0 3 �9&�0'��*D� ,������>"/� ��!�8�"���0 &+� ���4�-%'8���� 29�-,�,-8�� "/����"/����A4�����S��,-,-8�� "��/��"����*+0Q����,��-�a�����/� *+��"������*)����r3=0'�S���1[G������&N"$� &�0 *2��,-:)����"/����AZ�����

aa��� ��� *+��"/���a�-�O"/���K����,13 6q"��/� &�� �-"��-0'&("/0

"����#��&�0'*D� ,-:T�>"@��"��#� &��F��� 0EQ������� ��&F�npi� ����"/��"/�-0'&F0 3���0H *D� &.:K� &�0 *2� ,-0'8��4��0'�-&."��m� ������� �C��&X�Z%'�-E'��&"���*+�5H#��&���0H �-3W"/���FH#�-&���0�H ��0'&."/� ��&��P��& � &�0'*D� ,1:'AF�����

na��� ��� *+��"/���9���������-s����T"/���+��� 0'!�� !���,�� "_:

"�����"I�TH#�-&���0H H#�-,�,�!��a� &�0'*D� ,-0'8���A"��0'� "����S��8�� ����&."<�npi�������-*+��&."�MQ"������W��� ��� *+��"/���W���W���;"I"�0K%'��&�������"/�� 0'8�%'��,-:V"����X�/� *+�X&.8�*5!����Z0 3I��" "@� �@JVH���&���0�H#�$E'����� 8��T&�0'� *2��,40'&�����APjl�-"��g"������ �F��� �/��*D�;"/������M "�����npi�������-*D��&."I"����>"/�I"/���S3 � ,�� �S��0'���1"/�-E'�O�/��"��a0 3 "/���a���1[G������&."I����"����;"/0'� ��% �-E'��&2"/���a&.8�*5!����I0�3k� &�0'*D� ,��1����-& "/���)H#�-&���0H9A �k0c%'��&�������"/�)"/���(���?"@��MW"/���(%'��&����/��"�0'�+� "/� � "��+��& &�0'� *2��,��>"@��"�� �V� &�� %'��&����/��"/���0 &��)�.8�&���� ��� s�E'�)�/� *+��,-���K3=��0'* �g&�0'� *2��,I���-� "/� ��!�8i"/��0 & H#�-"�� "/���)��&���������"/��� *D��� & � &�� �>"@� &���� �������EQ� ��"���0'&GA !O3 "/���F"����(��&��1"/����,<% ��&����/��"���0'&GM`"����(%'��&����/�?"/0'�+*+0E ���F"/0e"/���(���1[G������&N"D�>"@��"����+H#�1"/� "����� ��0H#&r����0'!���!���,-�1"��-����AW�����P� &�0'*D� ,-0'8��<� "@�?"/��>F��� �O��*D� ,-,G"/��� &�� �-"/�-0'&)����0'!���!���,-�1"/�1���#� &��V���-%'&��-s��b� &N"/,1:����%'�����R*+�b� & ��&�� ��*D� ,-,-���2� "@��&���� � � ����EQ����"/�-0'& A �����e������8�,1"@� &N")����"@� ��0'&�� ��� ")0 3���� 4QM � � � ��0'��&N"/�3=� 0'* "/�������V�����>"/���-!�8�"/�-0'&���MI� &�� "����(H#�-&���0�H ,���&�% "�� �-�+0'&��(�Q8�&�������� 3=0'8��+��0'�-&."/��A �_& "/�����+���-%'��,1:

� 1

Page 19: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

0

0.2

0.4

0.6

0.8

1

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14

Tru

e P

ositi

ve

False Positive

True Positive v. False Positive

"MajorityVote"

0

0.2

0.4

0.6

0.8

1

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14

Tru

e P

ositi

ve

False Positive

True Positive v. False Positive

"MajorityVote""Matrix"

0

0.2

0.4

0.6

0.8

1

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14

Tru

e P

ositi

ve

False Positive

True Positive v. False Positive

"MajorityVote""Matrix"

"PCA"

0

0.2

0.4

0.6

0.8

1

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14

Tru

e P

ositi

ve

False Positive

True Positive v. False Positive

"MajorityVote""Matrix"

"PCA""SVD"

0

0.2

0.4

0.6

0.8

1

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14

Tru

e P

ositi

ve

False Positive

True Positive v. False Positive

"MajorityVote""Matrix"

"PCA""SVD"

"Sketch"

����������� ��������������������������

0.9

0.92

0.94

0.96

0.98

1

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14

Tru

e P

ositi

ve

False Positive

True Positive v. False Positive

"MajorityVote"

0.9

0.92

0.94

0.96

0.98

1

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14

Tru

e P

ositi

ve

False Positive

True Positive v. False Positive

"MajorityVote""PCA"

0.9

0.92

0.94

0.96

0.98

1

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14

Tru

e P

ositi

ve

False Positive

True Positive v. False Positive

"MajorityVote""PCA"

"Sketch"

0.9

0.92

0.94

0.96

0.98

1

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14

Tru

e P

ositi

ve

False Positive

True Positive v. False Positive

"MajorityVote""PCA"

"Sketch""SVD"

���������������� ���������������!�"��������

����%'8�� � �'& "6�9\ ��8��>E'���F3=0'�X� ��E'���/� ,�����"����;"/0'���XH#����� �)"/���)��0'�-&."/�X� ���R��0 *D��8i"/��� !.: "/����HI���-%'�."�����bE'����� %'�90 3���,�� ����"���8��9��0'� �-"��-E'�$%'�1E'��&R"/���9&Q8�*5!����#0 3���0 &�&����;"/�-0'&��#��&)��� �n�(��,�� ����A

3Anomalousmean = 25stdev = 2

2Normal

mean = 15stdev = 5

1Normal

mean = 10stdev = 1

1-na-nn

1-na-nn

na (1 - aa)/2na

aa

(1 - aa)/2

nnnn

����%'8�� � 2 &m�����PUr� � J 0ER�@��� �-&R"/���?"#%'��&����/�?"/���)"/���9� � "��-s���� � , ����"@�X�-&R"����$"/���-���R�;pi����� ��*+��&N"bA �k��� &���� 6"���0'&R��� ��� *D�;"/�����O��,�,-0Hl3=0'�<"�8�&����(����"/� ���;"/��A

�54

Page 20: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

\I0'&�&�����"���0'&�� !�" "@� �@J)\I,�� ���/7/ ��> !�� �@J> � !�8�[G���

0�E'��� � 0H1 3 "/�

H#���1"/�47> %'8������

��� ���>HO��5/ ��*D� �

� / 1 2 ����� HI�����/ � ,�� &��$ ,-0N� ��*+0Q��8�,-�2 *58�,1"/�-��0'�

��� 27/ �'� &����i"/8�&��/7> � &�*D� �> ������,1 ����3

/ � 1 � 0Q�� �71 � ��0'�>"/� H`�������� ��0Q0 "�JQ�1"

� 4 1&$ �/��"/� &/ 1 � 2 $ � � *58�� 3

/ ���N:$ 2 $ "/��� ����� 0'�� � / � H<� � � )���,��-��&N"/ � H<����� )�*D� � "����

��� !�,�� / &��O8�*5!����I0 3f��0'&�&����;"/��0 &��<��&2�b� �@�R��,�� ���`3=0'�W"/��� ��� \I8�� �%$&$ $K&���"7HI0'��JD�-&."���8�� ��0'&2���?"@� � ��"��� � 8����-&�% ����� 0 3k"/���9���?"@��A

�%�

Page 21: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

��� ����� ��� � ���� ���� ���� ���� ���� � ����� ����� ����� ����� ���� ��� ���� ��� �������� ���� � �

k ��� �! "�� ��� �! "�� ��� �! "�� #$����� ��% ���&�' ��% ���"�� ��% �����( ��% �"�&�) ��% �"�)�* ��% '�&�+�* ��% +�+� �+ ��% +�+�*�� ��% +�(�+�) ��% +�+�&�) ��% +�+�)�� ��% +�+�"�( ��% )�(�(�� ��% +�+�(�(#$,�-.�!/

�!0���/�1

2 �!3

��% ��&�*�* ��% (�&�*�* ��% (�&�*�* ��% '�)�)�( ��% (�&�*�* ��% ����)�( ��% ������� ��% "�*�*�* ��% *�)�)�( ��% ����)�( ��% ������� ��% )�)�)�( ��% (�)�)�( ��% ����)�(

4 5

36/�7 ���% ��)�"� ��% �)�"� ��% �)�"� ��% '�*�(� ��% *�(� �� ��% ��)�"� ��% ������� ��% ������� ��% *�(� �� ��% ��)�"� ��% ��)�"� ��% ������ ��% *�(� �� ��% ��)�"�

8 ,$�!���

5$������3:9��% ������� ��% +�&���� ��% +�+���) ��% ���+�' ��% +�&���� ��% ������� ��% ������� ��% ������� ��% '�+���) ��% ������� ��% ��(� � ��% +�&���� ��% �"�&�* ��% �������

7 ;<��5 ��% (� ���� ��% +� �&�* ��% +� �&�* ��% +� �&�* ��% ������� ��% ��&�*�* ��% (� ���� ��% (�+��!( ��% (���&�* ��% ��&�*�* ��% (�+��!( ��% &�(� �� ��% &�(� �� ��% ��&�*�*7 5$��3=�!��5 ��% ������� ��% �&�'�" ��% �+�"�" ��% �+���" ��% �! � �) ��% ������� ��% ������� ��% ������� ��% ������' ��% ������� ��% ������� ��% ���!(�" ��% "� �+�' ��% �������� ��>$9 ��% ��'�(�) ��% ������� ��% ������� ��% ������� ��% ������� ��% ������� ��% ��'�(�) ��% ��'�(�) ��% ��'�(�) ��% ������� ��% ����+�� ��% ������� ��% ������� ��% �������� ����9

;<��9�1

,$� �

��% ������� ��% )������ ��% (�"�"�" ��% *�&�&�+ ��% )�)�)�( ��% ������� ��% ������� ��% "�"�"�" ��% "�(�(�& ��% ������� ��% ������� ��% )������ ��% )������ ��% �������

;?,$� 7 �$��5 ��% ������ ��% ������ ��% ������ ��% "���'�* ��% )�'�"�+ ��% "�&� �( ��% ������ ��% �(���' ��% �(���' ��% "�&� �( ��% �(���' ��% (���'�* ��% (���'�* ��% "�&� �(>$�!5� ,$>$� ��% +�(�)�) ��% ������� ��% ������� ��% +�+� �" ��% ������� ��% ������� ��% +�(�)�) ��% +�&��!( ��% +�&�+�� ��% ������� ��% +�&�+�� ��% +�+�+� ��% +�+�+�+ ��% �������>$;<��5 ��% ������� ��% '� ���" ��% '� ���" ��% '� ���" ��% '� ���" ��% ������� ��% ������� ��% ������� ��% ����)� ��% ������� ��% ����"�" ��% '�'� �+ ��% '� ���" ��% �������5@�!/�� ��% ������� ��% ������� ��% ������� ��% ������ ��% ������� ��% ������� ��% ������� ��% *�*�*�* ��% ������� ��% ������� ��% ������� ��% ������� ��% ������� ��% �������5$� 4 ��% ������� ��% ������� ��% ������� ��% ������ ��% ������� ��% ������� ��% ������� ��% ������� ��% �!"� �� ��% ������� ��% ������� ��% ������� ��% ������� ��% �������5@��9 ��% ������� ��% +�&���� ��% +�&���� ��% '�+��� ��% +�&���� ��% ������� ��% ������� ��% ������� ��% ������� ��% ������� ��% ������� ��% &�����) ��% ��)�'�& ��% �������5@��/��1

��3����!5��% �! ���� ��% ��+�&�� ��% ��&���* ��% "� �(�" ��% "�(�*�) ��% ������� ��% �! ��� ��% ��)�'�' ��% "�*�)� ��% ��(�'� ��% �! �'�& ��% "�*���* ��% *�*���* ��% ��(�'��

/����� ��7 ��% ������� ��% '� ���� ��% '� ���� ��% *� ���� ��% ������ ��% ������� ��% ������� ��% "� ���� ��% *������ ��% ������� ��% "������ ��% '������ ��% *������ ��% ����������� ��> ��% '�+� �* ��% �)�&�+ ��% &� ���& ��% +� �*�( ��% �+�*�� ��% ������� ��% &�&���( ��% +���*�( ��% +�*���& ��% ������� ��% &�&�&�� ��% &�+�"�( ��% +�"�(�) ��% ���������;?,$/ 4 ��% ������� ��% ������� ��% ������� ��% ������� ��% +�+�+�' ��% ������� ��% +�+�+�' ��% +�+�+��>$��/�;<��� ��% ����'�� ��% ���!"�� ��% ���!"� ��% ���!"�� ��% ���!"� ��% ����(�* ��% ����*� ��% �����! ��% ����&�� ��% ����&� ��% ����*� ��% ������� ��% ������ ��% ������'

��� !�,�� >'&C��� !�,-�Z0 3f"����$��E'���/� %'�a"/� 8��Z��0'���1"/�-E'�a����"/���<3=0'�I��� �@�)0 3f"/���9��" "@� �@JD��, � � ��������&�0'&��Z��8�&R0 3f"����&���"7HI0'��JD��&N"/��8�����0 &����;"/���;"/�-0'&R�;pi����� ��*+��&N"<H#�-"/�2"/��� ��� ��0',��R0�3�$&1���Am�����ZE�� ,-8����I3=0'�`"/���Z&�0 ��*D� , ��, � � �������"/����3 � ,�� �#��0'� �-"/�1E'���/��"�� A \I,�� ��� ���`� &��+����� 8�,-"�� "�����"`� � �O&�0 " EQ�����-!�,-�<HI�����S&�0 "`��E?� ��,�� !�,-����"m"/����"/��*+�0�34��0 *D��,���"���0 &R0 3k"/���-�#� ����0'�>"bA �_&)"����$"@� !�,�� Mi"/����-iJ �;"/�@�r*+0Q����, !�8���,-�����<���#� !�!����;Ei����"/���)H#�-"�� -iJN"/�@� A

� 2

Page 22: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35

Fal

se P

ositi

ve

P(A|A)

Detector Performance v. Known Anomaly Rate

"Hist_EMD"

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35

Fal

se P

ositi

ve

P(A|A)

Detector Performance v. Known Anomaly Rate

"Hist_EMD""Hybrid_EMD"

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35

Fal

se P

ositi

ve

P(A|A)

Detector Performance v. Known Anomaly Rate

"Hist_EMD""Hybrid_EMD"

"Matrix_Inf"

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35

Fal

se P

ositi

ve

P(A|A)

Detector Performance v. Known Anomaly Rate

"Hist_EMD""Hybrid_EMD"

"Matrix_Inf""SVD_Inf"

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35

Fal

se P

ositi

ve

P(A|A)

Detector Performance v. Known Anomaly Rate

"Hist_EMD""Hybrid_EMD"

"Matrix_Inf""SVD_Inf"

"SVD_Minkowski"

����%'8�� ��1 &X��������8�� E'�23=0'�T"����2�����>3=0'��*D� &����20 3<"/���2����"/����"�0'�KH#�1"/� ���;E'���/��,I��0'*5!��-&���"/�-0 &��T0 3�*D0Q����,!�8���,-����� �`� &��2*+0Q����,^��0'*+��� � ��� �W3=0'� "����O"/�������+�;pi����� ��*+��&N"bAC�����a��0 ���<)�0'&N"@� ,^�?pi���W,-��� "�� "����S�����/� *+��"����

aa3=��0'* �4��%'8����%2iM�� &�� "/���XE'��� "������ , �?pi���9,��-� "��$"����F3 � ,-���F��0'� �-"/�1E'�F����"/�XH#�������+"/���+��0'���1"/�-E'�X��,�� ���9���

"����T� &�0'*D� ,1:'A

�%1

Page 23: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

��0'&."����1E'���+�;p�� *+��,���M.0 &��#��0'&���� � 8���&N"/,-:F�npi������"��`"����S��&�0'*D� ,1:K���;"/���;"/0'�m"/0T����� 3=0'� * E'���>:XHI��,-, A �4�-%'8����1�����0�H#�$"/���X��8�� E'���90 3W"����X����"�����"�0'�9����� 3=0'� *2��&������$3=0 �$��3=��HL*D0Q����,��$��&��e��0 *D��������� �$��&]H#�����@�c��,�,��8�� E'���X� �����b���P"�0r!��2�;p�� �;"/,1: "����2��� *+� A !a,1"/��0 8�%'� "/���+"/��8��2��0'� �-"��-E'�+����� 3=0 ��*D� &����D*+��� ��8�� ���5� � �&�0 "9� ��0H#&GM "/���;:e�����X% ��&����/� ,-,-:(E'���>:g%'0Q0Q�g�np������i"T3=0'�a"/��� `\.! � &�� -iJ���"/�@�c*+0Q����,���AP�����5"_:Q���-�b� ,����� 3=0'� *2��&����a������8�,1"/�I3=0'�W"/�������Z"_H`0F� &�0 *2��,�0 8��I� &�0 *2� ,1:F����"����;"/0'����� ���a���1"/������� ,1H<�b:i�I&�0 "<���;"/����"/�-&�%��&2��&�0'*D� ,-:P0'�W� ,1H<��:Q� ���;"/���;"/�-&�%K��&2��&�0'*D� ,1:'A!S�`�9,��-J ��,1:K�;pi��, ��&���"/�-0'& M'��*+��,-��*+��&."@�?"/�-0 &X����� 0'� �-�m"/0!�, � *+� A������a��0 *D��������� �W"/0P��0K� � � 8��-���O"/���?"`"/���S"7HI0K*+0Q����,��W!��S0 3 "����S�/� *+�O����"@�iMi� &��D"/���a��&�0'*D� ,-:����"/����"�0'�O��0Q���O&�0 "#�@�����@JR"�����"�"/���;:(�����90 3k"/���9�/��*D�$����"/��A �����T����0 !�,���*t������&R"/���T�-*D��,���*+��&N"@��"��-0 &0�3�"������;pi����� ��*+��&N" �/��"������4"/����&X"/�����-*D��,-��*+��&N"@��"��-0'&K0 3^"/������0'*D��0 &���&N"/�CH#�����@�F���4"�������� ��*D� � :93=0Q��8��0�3�"/���9�;pi����� ��*+��&."�A

� � ��� � � � 5������

��������������������������� ��!����#"����$����� ��%'&(��&��)��*+��,-��*+��&."/��"/�10'&20 34�5%'��&����/��,167��8�����0'� �9� &�0'*2��,-:+����"����;"/0'�<3=0'�"����`�>"/����� *+��&�%#����"@�#*D0Q����,6����� � A�7&P"������f*D0Q����, M?����"/�O��0'�-&."/�f��0'&N"/�-&Q8���,�,1:$� ��� �-E'� ��&T��0'&�������8�"/�1E'�I0'� ������M� 0)� &N:r� &�0'*D� ,1:)����"����;"/0'�Z*58��>"aHI0'��J(0'&r"/���5����"/��� �S"/���;:]� ��� �-E'��AZ�����X� &�0'*2��,-:)����"/����"�0'�a"/���?"Z���"����S��8�!98 ����"<0 3G"/���-�W��� �����`!�8���,-���`�T*D0Q����,^0'&2&�0'��*D� ,�����"/��MQ��0'*D��� �����W"/���-�W*D0Q����,�"/0P��&���0'*+�-&�%9����"@���%N� ��&�� "K�("/������� ��0',-� "�0r���;"/��� *D�-&��+H#����& "����2�-&���0 *D�-&�%(���?"@�r� � �2� &�0'*D� ,-0'8���AVU(0Q����,-�K��0'*+��� �;"/,-:� ����� ��� ��&."Z"/���K����"/�2!�8�"Z� "���,-,k� ,�,-0�H 3=0'�S�;[G����"/�1E'�5��0 *D��������� 0'& AS�����5��*+��,-��*+��&."@�?"/�-0 &V����,����;"/�Z� ��E'����� ,"��/� &�� 3=0'��*D��"���0 &9��&��T���-� "/0 %'�/� * *+0Q����,-� 3=� 0'* "���� ,��1"/������"/8���� AkUV0Q����,N��0'*+��� ���-��0'&$*+��"/��0Q���f���;"/����*+��&��"����Z�����>"@� &����Z!���"7HI����&)"_HI0X*+0Q����,��I0 3f����"/�50'�`"/���Z���-� "@��&����Z!���"7HI����&V�5*+0Q����, � &��)�5��0'��&N"bM�� &��R"�����-*D��,���*+��&N"@��"��-0 &V� %'� ��&(� ��,-����"��a� ��E'����� ,�*D��"/� �1p.6q!�� �����r��&��r��� 0'!�� !���,��1� "/�-�$��0 *D��� ���-��0'&(*+��"/��0Q���O3=� 0'*"����],��1"/���/��"�8�����A -i�-&����V"/��� ��� ��0',�� ����,����;"/�-0'& ���20�E'����,-0Q0'J ��� ��& "/���],��1"/������"/8���� MI"/���]�-*D��,���*+��&N"@��"��-0 &�-&���,-8�������"_H`0+*D�;"/��0Q����"�0+��� "/�-*2�?"/�Z"�����������0',-����3=��0'*t&�0 ��*D� , ���?"@��ACjl�-"��)"������ �P�-&����1Ei�-��8�� ,1,1:28�����3=8�,��0'*+��0'&���&N"/��MQ�Z8�� ���m�b� &F��0'&��>"/��8���"`�aE��������;"_:K0�3G��&�0'*D� ,-:T����"/����"���0'&F� �n����*+����A ! � �����-���m0 3^"���������"���� "��� ��E'���/� ,W0�3`"/�������D� �n����*+���T"/0(����"/����*+��&��5"/�������9����� 3=0'� *2��&����F0'&e"7HI0(H`��,-,167J.&�0�H#&c� &�� 0'&��+� � "��-s���� � ,����"@� � ��"�A �����T������8�,1"/��E'�����-3 :2"/���T��0'&���,�8�� ��0'&���3=��0 *o"/���9��� ��EQ��0 8��#�;pi����� ��*+��&."���A

!a,1"/��0'8�%'�P8����;3=8�, M�"����I��8���� ��&."C�-*D��,���*+��&N"@��"��-0 &P�-� 8 8�� "m�S�>"@� �>"4��&T"/���`���;E'��,�0 ��*D��&."40 3^��&X��&�0'*D� ,-:����"/����"�0'��A ��8i"/8�� �IHI0'� JP����0'8�,-�X,-0Q0'J$"/0Z*+0'���`��0'*+��0'&���&."/��3=0'��"/���I����"�����"�0'��MN� &X�-&."����/����"/�1E'�I%'��� �����-�b� ,8������#�-&."/��� 3 � ��� M�!���"�"�����"����>"O����"/��M�� &��(*+��"���0Q���<3=0'�<��0'&N"/��0 , ��&)� �����-"/�-0'&2"/0F����"/����"���0'&GA �����9��� 0'!�,-��*0�3C� &�0 *2� ,1:D����"�����"���0'&(�-����*+��0'� "/� &."�� &��(�@��� ,-,���&�%'��&�%�Mi!�8�"O�-"������>"/��,-,G0'&�,1:R�F� *2��,�,G��0'*D��0 &���&N"O0 3C��&��8�"/0'&�0'*D0 8�� ��0'&."���0',��>:i�>"/��*VA -Q8��n�2�T�>:Q� "/��* ����0'8�,��+!��S� !�,��<"/0T8�� �a� &D� &�0'*D� ,1:K����"����;"/0'� "/0T���;"/���;"�@��� &�%'���Z��&]������0Q�������9� &��]"/����&g�����������KH#����"Z"�0���0�"�02"/���K����0Q�������Z"�0������>"/0'� �5&�0'��*D� ,-��:)0'�a����� ,��*)��"�����"�"/���9�@��� &�%'���V����0Q�������O����&�0'� *2��, A

�+� ��� �� � � ( � �� �����-�#HI0'��J�HI� �S����� 3=0'� *D���V8�&������O"����P� 8������������S0 3�"/��� PA0- A*�a����� � "�*D��&."S0 39m&�����% :K!N: S&��-E'��� ���1"_:P0 3 \<� ,-�-3=0'� &������f�bH#����&���� � �-E ����*+0'� � �S��"/�-0'&�� , �k��!�0'�/��"�0'� :T8�&������C��0 &."/��� ��"��S0�Aj 6�2 1 � 4�6 9m&�%�6 1 1�A

!a!���� ��� * B<� %'����� 8 ������� &r���a�2% �/� ��8���"/�P� "/8�����&N"T�?"a"���� O&��1E'����� �-"7:V0�3 �S0 8�� "�0'& AZ�<�����SHI0 ��J)H<� ���0'&��$H#����&V���$H<���S�X� "/8�����&N"S��&."���� &V�?"�� �� �mA

�%$

Page 24: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

�����/����� � � �65

��� � ��� \I8�� � $&$&$<����"@��A2!kE�����, ��!�,-�C��" & �." "/�3&�����J.���GA �-����A 8���� A ����8�������"/� !�� � �����?JQ������8�� $&$���J.������8�� $&$�A �."�*D, M�Z��"/0 !���� �%$&$ $�A

�0/5���a��*+�1"/���1�"!��@��,��-0'��"/� ��A*�Z��"/� !������;6 3=���-��&���,1:K�/� &���0'* ����028 ���;"/�-0'&���A6�7&�� ) -���� � +�������-�������������������+�������! #" $&%(')"+*),.-/$&%('0�1 324-/$&%�'0�6562 ��7�8�( -�0+�9&8 -��:� ),+��;0+ (=<>���!-��?� '@� 'BA '������7C�D����81�;M�����%'���/ 2 12+ / 1'�'A !S\�U m� ������M / � �'�'A

� >2��9m,�, �2BI��&�%'��� * � &�� �O���-JQJ.� Ur��&�&���,���A "S��&���0'* ��� 0 8 ����"���0'&g�-&g���-*D��&����-0'&�� ,-� "_:(� ����8��;"/�-0'&3& !a�i6��,��-�b��"��-0'&��<"�0+�-*D� %'�$��&��)"/�npi"O����"/��A �7&FE ,6,HGJIKI@L M / � � �'A

� 1 �K\aA �mA^BI,�� J �9� &��r\aA�M�A U(��� )�A a\.�I������0'���1"/0'�>:R0�34*D� �@����&��$,���� ��&��-&�%X���?"@� !���������M��%$ $&1�A

�045�KUr��" "/���;H BI�/��&�� A �^��� "(0'&�,-��&�� - ��� � ��EQ��� ��0'&��R3=0 �),-��%'�N"_HI����% �."R� ����0'*+*D��&������)�>:i�>"/��*D��A �7&� ) -����N� +������ -��O����� 2 � + )P� $&%P�6"Q% ���R�0)D�*'@��+.-��*'@< -��S�S�0) ���;�� -�� , '@� ' " +�� +���� M / � �7>�A

� �2���Z��"/� ��A Ur����&."/� �-&��-&�%V� "/� �b� * �>"@��"���� "������K0E'���5��,��-����&�%VH#�-&���0�H#��A $&%N�3" T -�9 )D�*'@<6-�� -(8�(=9��R�0)$ 0+����;��;M%>'��� 1 ��&�� 2 $715+6�%1 � >iA

� 25��"O�-�n��� ��� �5A �a8�����M ���"���� 9�A �a��� "bMO��&�� �Z�bEQ��� �XA�-Q"�0'��J^AU��'@�����0)D� < '����0+ VW '@��+.-���A jl��,-��:N6�7&."������ ���-��&���� M /?&��(�����-"/�-0'& M / � �'�'A

� 12���a*+�-"/� �-: ���/����J.��&g� &�� �a��EQ��� UV� ���-%N� & A�9Cpi��������*+��&."/�aH#�-"��g��� &���0 * ��� 028 ����"���0'&��a3=0'�a*D� �@����&��,���� ��&��-&�%�A �_&X� ) -����N� +������6-��)�����W� +������ �1 #"Y$&%�' E ,6, +������0)D�*'@� +.-��*'@<� -��S�S�0)����;��6-��ZE[� -���<>�N����� +>� -�\@�0)�7 '@�=�]� '@�.'^8 +�� +���� M�����%'��� 4 � 2 +'4�/�/iA !S\�U m� ������M�/ � ��>�A

� $2� !KA �$��,-!����>"bM`_XA O0 "/�-������M - A4UV8�"/�.8�J.���-����&���& Mm� &�� UcA -Q"/�/��8�����AbaZ8��-�@JQ��� &��3&XaZ8��-�@Je��8�*D*D� � :� &��V� &�� ,-:Q���-��0 3�&���"7HI0 ��JR����"@��Am�k���n��&������ , "#����0'�>" / � �'��6 1 >�M � �>U !O\ - M / � �'�'A

����� � �9��&�� �TA �90 ,�8�! ��&�� \I��� ��,-��� �W� & � 0N� & A " '@��),+dc -�8�(=9&�.'@��+.-��J�;AeM 0'��&�� �S0'��JQ�-&�� � �M(> � ������1"/�-0'& M �%$ $&��A

����� �PUcA �O��&%)���&�%'����M kA "O� %'����E�� &GMG� &�� - A "S�58�� % 0'��� ,���& AO\I0'*+��8�"/�-&�%D0'&r����"/�D� "/� �b� *+��AO�k���@��&��-�b� ,"O����0'� " �%$&$&16 �'�7�'M �a��%'�1"@��,�-Q:Q�>"/��*+� "#������� ���@�]\I��&N"/����M��%$&$ 1�A

���5/2�$jl��,-,-����* BaAfM 0'��&���0'& � &��gM 0'�/��* � ��&�����&��>"/��� 8�����A 94pQ"/��&����-0'&��+0 3a,��-�����@���1" )R*D� �����-&�%'�X�-&."�0c�����,-!����>"#� ��� ��� A �7& -��S�S�0) ���;���+�� " -h���0)D� � �*'@<i7�0+>� '@�=�j� ) -@A 'KA�+�< +��k7?M���� %'��� � 1&$5+'/ �&��M � $&171�A

��� > ��-i8�J.�Q!���&������ 98�*2� ��M 9 ,�� ��&��gBaA#Ur� �>"/��&GMa� &��lM 8�,-� � &lUV0'� ������A �a��"����;"/��0 & 0 3P��� 0Q����� �(*D0Q����,�n��� &�%'���`��& W\.! !��������D����� 3=0 ��*D� &����O*+0'&��1"/0'� �-&�%�A`� ) -����N� +�������-�������� � 8^�0),+� '@� -�����) -�< -�� -�S�0)����mD�;M / � � /iA

��� 17� !a&.8�J 0Q0', �f� J.����&���MCUr� � Jc\I��0�E'��,-, ��M�� &�� \I�������>"/0'�������S��0 "�A �a��� %'&�0 ����&�%V&���"7HI0'� JN6 H#�����+"/��� �+�� &�0'*D� ,-�-����AC�k���@��&��-�b� ,�"#����0'�>"SB a\ -.67�6"<6 / � �71�6 � �&1�M�BI0'�>"/0'& O&��-E'����� �-"7:'M / � �71�A

���542� !a,-��J.�/� &���� � �f�7)�� ���;Ei�-� M � �;E'��&N"�9 �>"/0�)�M �Z�-����& $8�*D� ��M !C:Q����,��#)�%'8���M � &��nM'� �-������� -i� �-E���� "@�bE���A! ��0'*+��� ����"/�1E'�V� "�8���: 0 39� &�0'*D� ,1: ����"����;"/��0 & � �n����*+���R�-& &��;"_H`0'��J �-&."���8�� ��0'& ����"�����"���0'&GA �7&� ) -����N� +������ -��O����� 2 � + )P� $&%P�6"Q% ���R�0)D�*'@��+.-��*'@< -��S�S�0) ���;�� -�� , '@� ' " +�� +���� M / � �7>�A

/ �

Page 25: Design and Implementation of an Anomaly Detector · Design and Implementation of an Anomaly Detector A. Bagherjeiran, E. Cantu-Paz, C. Kamath July 14, 2005. Disclaimer This document

���%� � 9�A � �;Ei�-&��P� &��� kAiB`���@J ��, A �<���S�b� �>"/�D*D0�E'��� � �W���-� "@� &����O���m"/���O*D� ,�,10H#�m�����>"@� &����7&4��0'*+�O�-&����-%'�."��3=��0'*t� "@�?"/���>"/�-����A �7& � ) -C����N� +������ -��[������� + ������� % ����� % ���R�0)D�*'@��+.-��*'@< -��S�S�0) ���;�� -(� -(8�(=9��R�0)��+>�0+.-���M�E'0 ,�8�*+� /iM�����%'��� /�4 � +'/�4 �iM / � � �'A

��� 22�TBI��� &�� � �(j A �f�-&���%'� ��& A $ �.'@� +>����+� '@< 2 ��� - )D7?AWUr����*+��,�,-� &GM%> � �(�����-"���0'& M��%$ 2 ��A

���%1 � "O�-�n��� ��� kA � ������*D� &�&GM/�Z�bEi�-�1M�A5��� �����GM5�7�/�'� � �$�/��3_M�M'0 ���.8��#j A �a� �-&�����M 9� ���>"/0'��������"TA�$��&���� ,�, M�Z��EQ�-�(UV�b\I,�8�&�%�M �Z� &�jc��!�����M -i��"�� 9�AQj ��!�� "�����M �Z��&�j :i� �n��0'%'��0Q�GM "O0 !���� " XA�\I8�&�&���&�% ��� *(M� &�� Ur� ��� !KA��G��� ��*D� & A 9CE?� ,�8��?"/��&�% ��&N"/��8�����0 & ����"����;"/��0 & � :Q� "���*+� &r"/���@�%$&$&1e��� � ��� 0 [^67,��1&����&N"/��8�����0 &$����"����;"/��0 &T�;E�� ,-8���"/�-0'& A2�7&Z� ) -���� � +������ -��0����� GJIBIBI�,W�65 � � % �S� -/)D8 '@��+.-�� $ 9 )�\%+�\/'BA�+�< +���7 -��S�S�0) ���;D� '@�=��� c8( -�0+�� +.-���MiE'0',�8�*+� /QM���� %'��� �5/ +'/ ��M / � � ��A

���%$ � � ��& aZ��� 0�M �a�1E.:N� J?� &N" !a%'����H<��, M�� &�� !a*+��9m,3!a!�!�� ��� A -i8�����0 � "/�-&�%X� ,�������&�%PH#�-&���0H � 8������-���<3=0'���0'&N"/�-&Q8�0 8��I����"@�P�>"/����� *+��A��7& � ) -����N� +������ -�� ����� L� ��� % ���R�0)D�*'@��+.-��*'@< -��S�S�0) ���;�� -�� $ 0+������ + VW'@�=� $ � '@� +>����+� '@< , '@�.'KA '��� " '@�*'����8^����� M / � ��>�A

� / � �6_XA "#8�!�&����X� &�� \aA4�k0'*D� ��� Ae\I0Q���23=0'�P"/���R��� � "�� *D0�E'��� �5�����>"@� &�����AgHI��! ��� %'����E�����, ��!�,-�2�?" &�." "/�3&����?H�H�H9A ����A ��8�J'� A ����8 �F"/0 *2� � ����� 0 3 "7H<� � �����*D� A �N"/*(A

� / � �6_W0'� ����"#8�!�&�����MS\<� ��,-0 �k0'*D� ��� M#� &�� � ��0'&��-��� ��M�A �$8���!�� ��A ! *+��"����-�(3=0'�D�����>"/���-!�8�"���0 &��FH#�-"/�� ����,-������"/�-0 &��k"/0Z��*D� % �`����"/� !�� � ����A �7&^� ) -����N� +������#-�������� L��6% ����� % ���R�0)��*'@� +.-��*'@< -��S�S�0) ���;��-�� -�8�(=9��R�0) ��+>�0+.-���M3�%$&$&1iA

� /�/2� �S�-����& -Q��� � MmM'�;[ ����: O&���������0�[G����MG��&�� !S&Q8���� * M 0'� ��� A���8%) )�:(��,�8��>"/��� ��&�%F3=0'�#��&."���8�� ��0'&)����"����;6"/�-0'& A �7& � ) -D���N� +������ -��Z����� L@G ��� % ����� % ���R�0)D�*'@��+.-��*'@< -��S�S�0) ���;�� -����;9����h7 $ 7C���R��81�;M�!S�����-,/ � ��>iA

� /7> �P\`:Q��8�� -i������� !��G��&�� �a0'&�%'�Q8�� _`��& A "O��� ,16 "/�-*+�#����" "/��� &���� 0', �?"/�-0 &2� &���������0'%'&��-"/�-0'&D0�E'���I��*+*+���>6���1E'�`����&���0 �4����"/�O� "����b��*D��A9�7&X� ) -����N� +������6-��f����� ��� % �����0)D�*'@� +.-��*'@< -��S�S�0) ���;���-�� " 9&<i� + -�" �N� + '" -h����< +���� M���� % ���#$�>5+6�7� >�M / � �7>�A

� / 17�PUV��� 6 � ��&�%@-i�N:i8GM -i�.8i6>\I���-&�%c\I����&GM 9� &�0'J.� ��� -�� � ��&�&�� ��� J 0 ��& M`��&�� � �Ij 8 \I����&�%�A ! &�0�E'��,� &�0'*D� ,1:V����"�����"���0'&e���@����*+�+!�������� 0'& ��� ��&���������,4��0'*+��0'&���&."9��, �������1s�����A��7& � ) -���� � +������ -��Z�����% ������� -�9��=� '@��+.-��J� '@�=���[��� , + ) �D�� +.-��J��-�� , '@� ' " +�� +������ -/)��� � - (�� +�� -����D9��;�� +.-�� ��+����������2 � + )N� % ����� % ���R�0)D�*'@��+.-��*'@< -��S�S�0) ���;�� -�� , '@� ' " +�� +������ %( #,6"! I#"%$ M / � ��>�A

� /�42� !a� ����� � -i��&�% ��� ,`� &�� �Z� ,-��9�A"-i��!�0'� %�AeUr��"��n����&�%]����"�"�����&��K3=��0'* ���-� "/0 ������� , ����"@�V8����-&�%! W\.!� &��(���-� "/� &����9� ��*+��,-� � �1"7:+3 � ��"�0'����A(�7&F� ) -��D�N� +������ � -/).����� � 8^�0),+� '@< -���� ) -�< -��S�S�0) ���;��;M%/ � �'�'A

� / � �P\<� ��0 ,f����:Q,-0'�O� &��bM �-* !S,-E'���>6,��0'� ��A'&�� 0H ��0 � "(&9&��;"7HI0'��JR��&N"/� 8����-0'&(����"/����"���0'& A��7& � ) -����N� +������-��.�����'�[��� $ ���9 )0+���7j��' ) 'B� + �@81� � -/))���� - (�M�����%'���#1&$5+ $&��M -i���i"/��*5!���� / � �'�'A

� / 22� �Z��EQ�-� - A�j ��"�JQ�-&���A*�;9��=� '@8^����� '@<�� -��O8 '@��),+dc -�8�(=9&�.'@��+.-��J�;A4jl�-,���: M3� $&$'�'A

� / 1 � "O0 !���� " � Akjl��&�J.,-����A $ � '@� +>����+�����6� ) -@A,'BA�+�< +���7+� % �S�S�0) ���;���� '@�=� , ��0+>�0+.-���A �O0',-"�M�"O�-&������ � "X��&��jl��&��>"/0'&GM��%$ 2�4iA

/ �